2023 May 15 2:37 PM
Hello All
i am using the statement SUBMIT (PROG2 ) WITH SELECTION-TABLE rsparams AND RETURN. in PROG1
in PROG2 how can i access these in rsparams.
Thank you for your valuable responses.
2023 May 15 4:20 PM
DATA: t_sel_par TYPE STANDARD TABLE OF rsparams WITH DEFAULT KEY.
APPEND VALUE #( selname = 'P_DATE' " Name Parameter or select option in submitted program
kind = 'P' " P - Parameter, S - Select options
sign = 'I'
option = 'EQ'
low = sy-datum ) TO t_sel_par.
SUBMIT ztest WITH SELECTION-TABLE t_sel_par AND RETURN.
In this case the parameter P_DATE must also exist in called report ZTEST:
REPORT ztest.
PARAMETERS: p_date TYPE d.
...
2023 May 15 2:43 PM
Values will be accessible in selection screen = PARAMETERs + SELECT-OPTIONs of PROG2. But is it really what are you trying to figure out?
2023 May 15 2:56 PM
Hi tomas.buryanek ,
Thank you for your response
do i need to declare all the parameters+select-options in PROG2 or is there any way to access the rsparams directly in PROG2 as a table?
2023 May 15 2:59 PM
The second program will be call like if you are doing it manually.
You cannot specify additionnal parameters, variable, tables, ... you cannot access the memory of program 1 to get additional information.
If you need additional information, you will have to use SingleTon design pattern (or function group, memory shared, SHMA)
2023 May 15 3:06 PM
Hi Frederic Girod,
i didnt get you actually.
what i want is to transfer these data using the above statement to PROG2 and access it in PROG2.
2023 May 15 3:10 PM
basicaly you have to use the parameters / select-options to retrieve informations of program 1
but, you could by pass this using some technical tips & trick
2023 May 15 4:20 PM
DATA: t_sel_par TYPE STANDARD TABLE OF rsparams WITH DEFAULT KEY.
APPEND VALUE #( selname = 'P_DATE' " Name Parameter or select option in submitted program
kind = 'P' " P - Parameter, S - Select options
sign = 'I'
option = 'EQ'
low = sy-datum ) TO t_sel_par.
SUBMIT ztest WITH SELECTION-TABLE t_sel_par AND RETURN.
In this case the parameter P_DATE must also exist in called report ZTEST:
REPORT ztest.
PARAMETERS: p_date TYPE d.
...
2023 May 16 7:10 AM
2023 May 15 4:39 PM
SUBMIT PROG2 WITH SELECTION-TABLE rsparams ...
Is to pass values to existing parameters of PROG2.
Parameters must exist in PROG2.
If you just want to pass data but not declare anything in PROG2, then maybe you should look at other ways than just the old SUBMIT.