09-17-2008 6:11 PM
PARAMETERS: p_date TYPE syst-datum MEMORY ID keydate.
DATA: text TYPE string.
AT selection-screen output.
EXPORT p_date TO MEMORY ID 'KEYDATE'.
AT SELECTION-SCREEN ON EXIT-COMMAND.
IMPORT p_date FROM MEMORY ID 'KEYDATE'.
text = p_date.
MESSAGE text TYPE 'I'.
On the selection-screen am entering the date and after pressing the BACK button am not able to display the date in the Message. Please guide me.
09-17-2008 8:58 PM
Why are you trying to do this with memory id's? To keep it simple, do the following:
PARAMETERS: p_date TYPE syst-datum MEMORY ID keydate.
DATA: text TYPE string.
AT SELECTION-SCREEN ON EXIT-COMMAND.
text = p_date.
MESSAGE text TYPE 'I'.
At selection screen output runs before the selection screen is shown on screen. Doing an export statement will have only blanks parameters.
If you want to preserve the value when pressing back, do export to memory id in at selection screen on exit command event.
Regards
09-17-2008 6:41 PM
use AT selection-screen on p-date.
PARAMETERS: p_date TYPE syst-datum MEMORY ID keydate.
DATA: text TYPE string.
AT selection-screen on p-date.
EXPORT p_date TO MEMORY ID 'KEYDATE'.
AT SELECTION-SCREEN ON EXIT-COMMAND.
IMPORT p_date FROM MEMORY ID 'KEYDATE'.
text = p_date.
MESSAGE text TYPE 'I'.
09-17-2008 6:45 PM
09-17-2008 6:48 PM
Hi,
The memory ID addition uses the sap memory and not abap memory..
Check this example..
PARAMETERS: p_date TYPE sydatum MEMORY ID /bi0/odate.
Thanks
Naren
09-17-2008 6:52 PM
09-17-2008 7:00 PM
That is the full code..to retain the values across user sessions..
do you require the details about Sap memory & Abap memory?
Thanks
Naren
09-17-2008 7:10 PM
AT selection-screen output is triggering only if we press the execute button.
if you just enter the value and press back button that event is not triggering and the date is not passed to the memory..
09-17-2008 8:58 PM
Why are you trying to do this with memory id's? To keep it simple, do the following:
PARAMETERS: p_date TYPE syst-datum MEMORY ID keydate.
DATA: text TYPE string.
AT SELECTION-SCREEN ON EXIT-COMMAND.
text = p_date.
MESSAGE text TYPE 'I'.
At selection screen output runs before the selection screen is shown on screen. Doing an export statement will have only blanks parameters.
If you want to preserve the value when pressing back, do export to memory id in at selection screen on exit command event.
Regards
09-17-2008 10:45 PM