Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calling a program from another program

Hi All,

I have program A and program B, need to call prg B from prg A. and need to pass values from prg A as single values in selection criteria of prog B.

Please help me how to call.

Answers are highly rewarded

Thanks in advance


Former Member

Sure, see the sample program below. Here we are taking values from the itab and building our RANGE, then we are passin this RANGE to the select-option of the submitted program.

report zrich_0001.

data: begin of itab occurs 0,
      datum type sy-datum,
      end of itab.

<b>ranges: r_datum for sy-datum.</b>

* create some data in ITAB
itab-datum = sy-datum.
do 10 times.
  itab-datum = itab-datum  + 1.
  append itab.


* Build the range
clear r_datum. refresh r_datum.
loop at itab.
  r_datum-sign = 'I'.
  r_datum-option = 'EQ'.
  r_datum-low = itab-datum.
  append r_datum.

submit zreport
<b>    with s_datum in  r_datum</b>
          and return.


Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question