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: 

How to save the screen field values

Former Member

Hi Gurus,

I have designed two screens using the transaction code SE51. In the first screen I am entering the input values just like selection screen and in the second screen I am displaying the values based on the values entered on the first screen. In the second screen I need to enter some field values manually and If I press save button I need to save the changed values in my output internal table. Is there any command to do this? (Parameter id is also not available for the fields which I am changing in the second screen). I know in ALV but I don’t know in module pool. Please tell me which command I can use to save the changed values in my scenario. Because I need to pass the changed values to IDOC once if I press save button in the second screen. Please help me because It is very urgent.

Thanks a lot.

4 REPLIES 4

Former Member
0 Kudos

just define variable with same field name in second screen.

now when u press save button.

the variable will contain the values which u entered in fields.

so u can insert these values to internal table...

reward points please...

0 Kudos

Hi,

First of all thanks a lot for your reply.

Please send me the sample code how I can use let say my second screen field names are VEKP-LAENG(length).

Thanks & Regards,

Babji Veeravaneni.

Former Member
0 Kudos

Hi Babji,

In PAI of the second screen use <i><u>loop at screen</u></i> statement and capture the field values that you want to pass in the idoc.

You can use local variables to assign the screen values. Address the screen fields with the names you have given while designing the screen.

Award points if this is useful.

Regards,

Bhanu

Former Member
0 Kudos

Hi Babji,

You can do it like this. In PAI of the second screen on

CASE OK_CODE.

WHEN 'SAVE'.

ITAB-ASART = ZTA_ME41-ASART.

ITAB-SPRAS = ZTA_ME41-SPRAS.

ITAB-ANFDT = ZTA_ME41-ANFDT.

ITAB-ANGDT = ZTA_ME41-ANGDT.

ITAB-ANFNR = ZTA_ME41-ANFNR.

APPEND ITAB.

This way you can get the values in the screen to an internal table . For this you need to have an internal table with the structure of your screen fields.

Regards

Tharanatha