05-05-2008 1:39 PM
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
05-05-2008 1:41 PM
hi,
Yes you can do that ...
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit.htm
Regards,
Santosh
05-05-2008 1:43 PM
HI,
u can pass the parameters value along with the submit statement.
refer to this link for example code
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
rgds,
bharat.
05-05-2008 1:45 PM
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.
05-05-2008 1:48 PM
In Calling program..
REPORT ZAK_SUBMIT .
data: rspar type table of rsparams with header line.
rspar-selname = 'P_NAME'.
rspar-kind = 'P'.
rspar-low = 'Hello'.
append rspar.
submit zak_submitted via selection-screen with selection-table rspar and return.
In the called program..
report zak_submitted.
parameters: name(10), salary type i.
end-of-selection.
write:/ name, salary.
05-05-2008 1:54 PM
hi,
in program <zxxxxxxx> define
parameter : zpath type string .
and in prog1,
SUBMIT <zxxxxxxx> USING SELECTION-SCREEN '1000'
WITH zpath = path .
10-17-2013 12:22 PM
Hi Ahmed,
SUBMIT<zxxxxxxx> WITH path EQ path AND RETURN.
This will work.
Regards,
Raju K. Rao
10-17-2013 12:34 PM
Hi,
Yes u can pass the path Variable.
submit ZXXXX
with path = ' XYZ '
And ZXXXX should also contain a selection-screen parameter called path with same datatype/data element.
reward if helpful.
07-19-2022 12:09 AM
*&---------------------------------------------------------------------*
*& Report Z_TEST_SUBMIT
*&---------------------------------------------------------------------*
REPORT Z_TEST_SUBMIT.
DATA: s TYPE STRING,
i TYPE I,
n(10) TYPE N,
c(10) TYPE C.
s = 'string'.
i = 123.
n = '987'.
c = 'ABC'.
SUBMIT Z_TEST_SUBMITTED
WITH parm_s EQ s
WITH parm_i EQ i
WITH parm_n EQ n
WITH parm_c EQ c
AND RETURN.
*&---------------------------------------------------------------------*
*& Report Z_TEST_SUBMITTED=
*&---------------------------------------------------------------------*
REPORT Z_TEST_SUBMITTED.
PARAMETERS: parm_s TYPE STRING,
parm_i TYPE I,
parm_n(10) TYPE N,
parm_c(10) TYPE C.
WRITE: / 'Z_TEST_SUBMITTED: parm_s=', parm_s,
', parm_i=', parm_i,
', parm_n=', parm_n,
', parm_c=', parm_c.