0% found this document useful (0 votes)
196 views

How To Submit Can I Pass Parameter Value To Another Program

Shabeer asks how to pass a parameter value from one program to another when submitting from one program to another. The response provides examples using SUBMIT with selection screen options to pass parameters, as well as using EXPORT and IMPORT to pass values between programs by storing them in shared memory.

Uploaded by

arda
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views

How To Submit Can I Pass Parameter Value To Another Program

Shabeer asks how to pass a parameter value from one program to another when submitting from one program to another. The response provides examples using SUBMIT with selection screen options to pass parameters, as well as using EXPORT and IMPORT to pass values between programs by storing them in shared memory.

Uploaded by

arda
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

hi to all,

i am shabeer abap fresher , i hava scenario in that is like this.


prog1:

parameters: path type string ,


r1 radiobutton group rd,
r2 radiobutton group rd.

if r1 eq 'x'.
submit <zxxxxxxx> and return.
endif.

can i pass that path value to zxxxxxxxxxx. is it possible if not i must get that in
zxxxxxxxx send some exaples.

bye

Hi Shaik,

Yes you can do that.

please check the sample code to achieve this:

Lets say u have the following parameters on your selection screen of the report:
1. s_aufnr (order)
2. s_werks (plant)
3. p_matnr (material)

SUBMIT X
WITH s_aufnr IN s_aufnr
WITH s_werks IN s_werks
WITH p_matnr EQ p_matnr
AND RETURN.

Complete details about the submit.

Syntax
SUBMIT {rep|(name)} selscreen_options
list_options
job_options
AND RETURN.

Addition:
... AND RETURN

Effect
The SUBMIT statement accesses an executable program rep. The executable program is
executed as described under Calling Executable Reports.

The program name rep can either be specified directly or as the content of a
character-like data object name. The data object name must contain the name of the
program to be accessed in block capitals. If the program specified in name is not
found, an irretrievable exception is generated.

The selscreen_options additions can be used to determine the selection screen for
the program accessed and to supply it with values.
The list_options additions allow you to influence the output medium and the page
size in the basic list for the program accessed.
SUBMIT - selscreen_options

Syntax
... USING SELECTION-SCREEN dynnr
VIA SELECTION-SCREEN
selscreen_parameters ... .

Extras:
1. ... USING SELECTION-SCREEN dynnr

2. ... VIA SELECTION-SCREEN

Effect
The addition USING SELECTION-SCREEN specifies the selection screen, VIA SELECTION-
SCREEN specifies whether it is displayed. The additions selscreen_parameters
provide values for the parameters, selection criteria, and the free selection of
the called selection screen.

The values are transferred to the selection screen between the events
INITIALIZATION and AT SELECTION-SCREEN OUTPUT The following hierarchy applies for
transferring values:

First, the variant of the addition USING SELECTION-SET is transferred, which sets
all parameters and selection criteria to the values of the variant. The values
previously set in the called program are overwritten.

The values of the table of the addition WITH SELECTION-TABLE are then transferred.
All parameters and selection criteria specified there are overwritten accordingly.

Finally, the values of the additions WITH sel value are transferred. All parameters
and selection criteria are overwritten accordingly. If the addition WITH sel value
is used more than once for the same parameter, this is overwritten with the last
specified value. If the addition WITH sel value is used more than once for the same
selection criterion, a selection table with the corresponding number of lines is
transferred.

Providing values for free selections is independent of this hierarchy.

OR
you can achieve this by following code:

u can use EXPORT and IMPORT statement for transferring Values from one program to
another

Calling Program:
EXPORT matnr field1 field2 field3 to MEMORY ID 'MEM1'.

Called Program:
IMPORT matnr field1 field2 field3 FROM MEMORY ID 'MEM1'.

Regards,
Sunil.

You might also like