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

Passing Selection parameters Using SUBMIT statement

Former Member
0 Likes
4,644

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
874

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.

6 REPLIES 6
Read only

Former Member
0 Likes
874

Hi ,

refer

Assing points if it helps.

-Gaurang

Read only

Former Member
0 Likes
874

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

Read only

Former Member
0 Likes
874

Hi Debaprasad,

Refer this code in ur PROG2:

SUBMIT prog1 WITH P_LOCNO P_MATNR AND RETURN.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
874

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'.

Read only

Former Member
0 Likes
874

hi,

*Code used to populate 'parameters' & execute report  
 SUBMIT zreport with p_param1 = 'value'
                with p_param2 = 'value'.

Regards

Reshma

Read only

Former Member
0 Likes
875

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.