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

selection-screen

Former Member
0 Likes
589

Hello all,

I have two programs with one select option common to them (truck_id).

Now suppose i entered the truck_id in prg1, and press one button then control goes to second programs selection screen. I want the entered truck_id value remains same here.

The value should persist. I am using submit. What should i do... Is there any option ....please let me know.

5 REPLIES 5
Read only

rainer_hbenthal
Active Contributor
0 Likes
549

Position the cursor on the submit statement and press F1.

Read only

Former Member
0 Likes
549

hi use ... submitt ............ WITH SELECTION-TABLE seltab

Effect

seltab is an internal table with the structure RSPARAMS.

This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime.

You can use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure RSPARAMS. By using SUBMIT ... WITH SELECTION-TABLE seltab, you can then pass these values on directly.

Read only

Former Member
0 Likes
549


"for example s_truck is select option in first program


DATA: seltab TYPE TABLE OF rsparams,
      s_truck2 LIKE LINE OF seltab.
        
s_truck2-selname = 'S_TRUCK'. "select option name
s_truck2-sign    = s_dispo-sign.
s_truck2-option  = s_dispo-option.

LOOP AT s_truck.
  s_truck2-low = s_dispo-low.
  s_truck2-high = s_dispo-high.
  APPEND s_truck2 TO seltab.
ENDLOOP.

SUBMIT zprg2 WITH SELECTION-TABLE seltab.

Read only

Former Member
0 Likes
549

Hey all thanks for your reply...

I got the answer...Use Set Parameter before going for SUBMIT and GET parameter at initialisation of second program...

Thanks lot for all your help...

Read only

Former Member
0 Likes
549

Hi,

you can also use the option SET parameter in the first program with the help of parameter id,

GET parameter option in the secon parametr with the same paramid.

So you will get the value in the second program.

Please reward points if helpful.

thanks

Sivaparvathi