Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding parameters

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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'.

0 Kudos

Now also it is not displaying.

Former Member
0 Kudos

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

0 Kudos

hi,

please provide the complete description.

Former Member
0 Kudos

That is the full code..to retain the values across user sessions..

do you require the details about Sap memory & Abap memory?

Thanks

Naren

Former Member
0 Kudos

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..

Former Member
0 Kudos

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

Former Member
0 Kudos

Try by using USER-COMMAND.