‎2007 May 07 11:03 AM
Hi,
Suppose there are 2 programs : PROG1 and PROG2.
PROG1 has two selction criteria say p_locno and s_matnr.
PROG2 has 3 selection criteria say p_disease, p_locno and p_matnr,
There is a variant in PROG2 which is maintained which fills the p_disease only and the rest two fields are blank (since these fields are to be filled using the PROG1).
I have a requirement of passing the selection parameters of PROG1 to PROG2.
Is it possible? If yes how do we go about it using the SUBMIT using option ?
Points will be rewarded to the best answer.
Thanks in advance.
‎2007 May 07 11:15 AM
Hi,
SUBMIT PROG2 VIA SELECTION-SCREEN WITH P_BUKRS EQ P_BUKRS
with P_var1 eq p_var2
with p_var2 in p_var2.
U hav to fill those p_burks p_var1 and p_var2 values prior to submit statement
if it parameter use eq or if it is select-option use in operator
Cheers
Anji.
‎2007 May 07 11:07 AM
‎2007 May 07 11:09 AM
Hi
see the options of Submit
In PROG1 use the submit
SUBMIT priog2
WITH <selection Variant>
WITH p_locno EQ p_loc
WITH s_matnr in v_matnr.
Reward points if useful
Regards
Anji
‎2007 May 07 11:10 AM
Hi Debaprasad,
Refer this code in ur PROG2:
SUBMIT prog1 WITH P_LOCNO P_MATNR AND RETURN.
Reward points if helpful.
Regards,
Hemant
‎2007 May 07 11:12 AM
Refer the following two programs:
*&---------------------------------------------------------------------*
*& Report Z_82235_TEST1 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
report z_82235_test1 .
types: begin of tab1,
a(1),
b(1),
end of tab1.
types: begin of tab2,
c(1),
d(1),
end of tab2.
data: itab1 type table of tab1,
wa1 like line of itab1,
itab2 type table of tab2,
wa2 like line of itab2.
wa1-a = '1'.
wa1-b = '2'.
append wa1 to itab1.
clear wa1.
wa1-a = '3'.
wa1-b = '4'.
append wa1 to itab1.
clear wa1.
export itab1 to memory id '001'.
export itab2 to memory id '002'.
submit z_82235_test2 and return exporting list to memory .
import itab1 from memory id '003'.
import itab2 from memory id '004'.
write:/ 'ITAB1'.
loop at itab1 into wa1.
write : / wa1-a, wa1-b.
clear: wa1.
endloop.
write:/ 'ITAB2'.
loop at itab2 into wa2.
write : / wa2-c, wa2-d.
clear: wa2.
endloop.*&---------------------------------------------------------------------*
*& Report Z_82235_TEST2 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
report z_82235_test2 .
types: begin of tab1,
a(1),
b(1),
end of tab1.
types: begin of tab2,
c(1),
d(1),
end of tab2.
data: itab1 type table of tab1,
wa1 like line of itab1,
itab2 type table of tab2,
wa2 like line of itab2.
import itab1 from memory id '001'.
import itab2 from memory id '002'.
itab2[] = itab1[].
wa1-a = 'a'.
wa1-b = 'b'.
append wa1 to itab1.
clear wa1.
export itab1 to memory id '003'.
export itab2 to memory id '004'.
‎2007 May 07 11:13 AM
hi,
*Code used to populate 'parameters' & execute report
SUBMIT zreport with p_param1 = 'value'
with p_param2 = 'value'.Regards
Reshma
‎2007 May 07 11:15 AM
Hi,
SUBMIT PROG2 VIA SELECTION-SCREEN WITH P_BUKRS EQ P_BUKRS
with P_var1 eq p_var2
with p_var2 in p_var2.
U hav to fill those p_burks p_var1 and p_var2 values prior to submit statement
if it parameter use eq or if it is select-option use in operator
Cheers
Anji.