‎2008 Jun 04 1:49 PM
hi all,
plz help:
requirement:
thr r 2 screen fields CODE(Input Enable) and DESC(Output Only).
when user enters CODE corresponding DESC will come automatically but if no value is entered in CODE, DESC will also be blank with an error msg below: 'Enter Code'.
i have PAI Module like this:
FIELD code MODULE validate_code.
Module Validate_code.
if CODE is initial.
clear DESC.
Message e000(zz) with 'Enter Code'.
else.
select DESC for CODE entered.
endif.
endmodule.
for this code, though DESC becomes initial when CODE is deleted from screen but in the screen it is still showing the previous DESC value. i need to this older value of DESC.
ME21N->Org.Data TAB
Enter Pur.Org. and press ENTER Once and then delete the same and press ENTER again.
I need this functionality.
Plz Help.
Edited by: AVIJIT SIKDAR on Jun 4, 2008 2:59 PM
‎2008 Jun 04 2:58 PM
Add a Function Code to your CODE field. This will force the PAI and PBO routine if it changes.
‎2008 Jun 04 3:01 PM
plz give me example. i am not getting ur point. after assigning FCode to CODE wht 2 do?
rgds,
Avijit
‎2008 Jun 04 3:14 PM
Nothing else.
By putting an FuncCode on the field, when the user changes it, the process will immediately go to the PAI routine, process the code
you have there, and then process the PBO routine to redisplay.
If your code recognizes an error, the error will be displayed and the user will need to correct the issue before proceeding.