Application Development and Automation 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: 
Read only

Leave screen

Former Member
0 Likes
569

Hi,

I am calling a dialogue screen from a program. The screen accepts a value from the user, performs a calculation and should return the calculated value , say A when I press back button.

I am using


if okcode = 'BACK' or okcode = 'E' or
   okcode = 'ENDE'.
 SET SCREEN 0.
LEAVE SCREEN.
endif.

Now on the execution of this statement, the control returns to my include, what should I do to ensure that I have the value A available in my Include.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
543

Hi!

If you are using a global variable, which can be seen from both programs, then that's one solution.

The another solution, to use the global SAP memory.

EXPORT myvariable TO MEMORY ID 'MYVARIABLE'.

Then retrieve it like this:

EXPORT myvariable FROM MEMORY ID 'MYVARIABLE'.

Regards

Tamá

4 REPLIES 4
Read only

Former Member
0 Likes
543

Hello Suker,

Use SAP Memory to populate the value of the field.

Using Set parameter / Get Parameter Syntax.

Regards,

Deepu.K

Read only

Former Member
0 Likes
544

Hi!

If you are using a global variable, which can be seen from both programs, then that's one solution.

The another solution, to use the global SAP memory.

EXPORT myvariable TO MEMORY ID 'MYVARIABLE'.

Then retrieve it like this:

EXPORT myvariable FROM MEMORY ID 'MYVARIABLE'.

Regards

Tamá

Read only

narin_nandivada3
Active Contributor
0 Likes
543

Hi,

You can export the value 'A' to the memory and then import that in the screen program...

[Export value to memory|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bd1358411d1829f0000e829fbfe/frameset.htm]

[Import value from memory|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bd1358411d1829f0000e829fbfe/frameset.htm]

Hope this would help you.

Good luck

Narin

Read only

Former Member
0 Likes
543

Try LEAVE TO SCREEN 0 even though it means the same thing as what you have done..( set screen 0. leave screen)

coz i had a similar scenario like yours and this worked for me