‎2008 Jun 25 1:29 PM
Hi all
I have 2 fields on my screen , when I enter the 1st one the sec one should be set dynamically with the corresponding entry value of the first filed. I am using module pool . I tried with select statement in PAI , but didnt work . Please help.
Bharathi
‎2008 Jun 25 1:33 PM
hi,
-the code should be in PBO, not in PAI
-you also have to press Enter, adding the value to the first field won't be enough
hope this helps
ec
‎2008 Jun 25 1:33 PM
hi,
-the code should be in PBO, not in PAI
-you also have to press Enter, adding the value to the first field won't be enough
hope this helps
ec
‎2008 Jul 22 1:30 PM
Hi,
is there any way so that we can trigger the PAI of the screen...
by giving F4 help manually to the First Screen in the POV ...
Thanks,
Vinay
‎2008 Jul 23 6:45 AM
If this is a program then it's easy
BEFORE the START OF SELECTION
at selection screen output
* check field entered
* update your 2nd screen field directly.
If you need to use a HELP like F4
at selection-screen on value-request for screen-field
* your help code
* update with call to (FM DYNP_VALUES_UPDATE updates screen fields WITHOUT a PBO).
Code these before the start-of-selection if running an ABAP..
If you are in a transaction / sequence of screens then use the ON VALUE REQUEST in the screen logic to trigger your help code.
code
Call to the same Function module will update the appropriate dynpro fields without a PBO.
jimbo
‎2008 Jun 25 1:43 PM
Hi,
To handle the EVENT you should perform some event action,
in that scenario pressing ENTER key(any button...etc) is also an event.
So when u press enter the sy-ucomm will be space, so that u can handle the logic with in PAI.
In user-command module write as below.
case sy-ucomm.
when SPACE.
--> P_FIELD2 = <your calculated value>
endcase.
‎2008 Jun 25 2:00 PM
Hi,
As you know for an event to happen there is need of user interaction ,
User interaction with the screen is done through FCT codes
there must be Some user interaction like pressing an ENTER key for an event to happen
In the PAI under case sy-ucomm write the code you require
ENTER KEY has FCT code /00 or '=ENTR' ( not sure but you can try)
regards
prasanth
Edited by: prasanth kasturi on Jun 25, 2008 3:35 PM
‎2008 Jun 25 5:52 PM
Hi,
Try this....
Here i am taking example like in ur first field have states(AP,TN,KN......) when u click ap corresponding city wiil be display in second field
write ur logic in PAI.
loopat r_state.
cse r_state-fieldval.
when ' ap'.
append 'hyd' to t_city.
append ' ' to ....
...............
when 'tn'.
..............
...........
endcase.
endloop.
use f4if_int_tbale_value.
Regards
Krishna.
‎2008 Jun 26 5:18 AM
Hi Bharathi,
For my Sense, What u have made to block your code in PAI is right....
But..
I have two suggestions for this...
1) aftering entering values in the first field have to press some button or ENTER for an action.. So that the Second field can be make populated based on that...
2) If the First field CAN BE a set of repeated Values , you can maintain it as DROP DOWN - LIST, so that you have an action triggered for the item selected in the list.
<removed_by_moderator>
Edited by: Julius Bussche on Jul 18, 2008 12:45 PM
‎2008 Jul 18 3:42 PM
Hi Bharathi,
You can achieve ur target even with the following process:
If the fieldnames are f1 and f2. Now upto my understannding what you need is f2 values should change according to the values selected in the field f1.
Initially keep the second field f2 disable and make it enable only when the user selects a value for f1.
All the logic should be in the PBO module.
LOOP at SCREEN.
if screen-field = f1 .
"Check whether the user has entered value in field f1 or not
" if yes make the field f2 enable
"else throw some error message
" now write the required logic or select query
endif.
ENDSCREEN.
Hope it will helps you.
Regards,
Swarna Munukoti.
‎2008 Jul 23 10:37 AM
Hi Bharathi,
Write the Logic in PAI.
There should be one action event to perform the action .
so when user press enter sy-ucomm will be space . So that it wl execute the action in PAI.
case sy-ucomm.
when SPACE.
call BAPI.
endcase.
<removed_by_moderator>
Regards,
Muneesh Gitta.
Edited by: Julius Bussche on Aug 25, 2008 4:14 PM