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

rk

Tags:
Former Member
replied

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

<b>


* 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.
endloop.</b>

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

Regards,

Rich Heilman

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