10-22-2008 6:00 PM
hi,
i have a screen with a tabstrip inside which a subscreen exists. in that subscreen i have two fields in which user can enter/choose any value. Once he does that it's corresponding value i need to fetch from the table and display in a nearby display only text field.
so in the PAI of the subscreen i need to write the logic that will identify when the user modifies the value in those fields and then fetch the equivalent value for the display fields.
what is that logic ?
my guess is something like
PROCESS AFTER INPUT.
LOOP at SCREEN.
??
??
ENDLOOP.
I am not sure what to write. any help ?
thks
10-22-2008 6:08 PM
10-22-2008 6:06 PM
even if you write some thing in pai it will not work.
"this is wrong...
PROCESS AFTER INPUT.
LOOP at SCREEN.
??
??
ENDLOOP.
you have to call the function DYNP_VALUES_UPDATE in the event PAI ,say when ENTER Action.
10-22-2008 6:08 PM
10-22-2008 8:36 PM
actually i used
FIELD <fieldname> module <module name> and it worked...
but one problem is that in a situation i need to blank out that display field. if i simply say MOVE ' ' TO f1. it does not help...how do i inform SAP to refresh the screen so that the display field now displays blank ?
thks
10-22-2008 8:39 PM
why can't you update the screen field value using the function module DYNP_VALUES_UPDATE
10-22-2008 8:59 PM
hey vijay,
i used the FM u said. thanks...but i am facing an issue where in my subscreen there are two display fields that i need to clear out based on two fields...so my PAI has statements as
FIELD F1 MODULE F1_VALIDATE.
FIELD F2 MODULE F2_VALIDATE.
Now it so happens that in F1_validate and F2_validate I have written code as follows
SELECT SINGLE PORT_NAME INTO L_PORTNAME FROM ZTAB WHERE PORT_CODE = F1.
CLEAR WA_DYNPREAD.
REFRESH I_DYN_FIELDS.
WA_DYNPREAD-FIELDNAME = 'F1_DISPLAY_FIELD'.
WA_DYNPREAD-FIELDVALUE = L_PORTNAME .
APPEND WA_DYNPREAD TO I_DYN_FIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = SY-REPID
dynumb = SY-DYNNR
TABLES
dynpfields = I_DYN_FIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8.
what happens is the display fields are updated only after my second field's validation is done !!
i want this way..as soon as user presses enter key to move out of the first field i want the f1_display_field to have the display value...same with second field..whats wrong ?
thsk
10-22-2008 9:02 PM
are you writing this in PAI user_command module or placing in the respective field modules..?
10-22-2008 9:17 PM
10-22-2008 9:43 PM
then it should trigger before the enter event. since field modules will trigger for each change in the fields.
10-22-2008 8:39 PM