Application Development 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: 

Regarding calling 1 report from another

Former Member
0 Kudos

Hello Friends,

Can u plz tell me how to call one report from another report.

Regards,

Drashana

4 REPLIES 4

Former Member
0 Kudos

Hi ,

Use Submit statement

like SUBMIT PROGRAM ZTEST RETURN

Reward

fareed

Former Member
0 Kudos

hi,

Use SUBMIT program statement

SUBMIT ZFIR001

chk this.

*Code used to populate 'select-options' & execute report

DATA: seltab type table of rsparams,

seltab_wa like line of seltab.

seltab_wa-selname = 'PNPPERNR'.

seltab_wa-sign = 'I'.

seltab_wa-option = 'EQ'.

  • load each personnel number accessed from the structure into

  • parameters to be used in the report

loop at pnppernr.

seltab_wa-low = pnppernr-low.

append seltab_wa to seltab.

endloop.

SUBMIT zreport with selection-table seltab

via selection-screen.

*Code used to populate 'parameters' & execute report

SUBMIT zreport with p_param1 = 'value'

with p_param2 = 'value'.

Other additions for SUBMIT

*Submit report and return to current program afterwards

SUBMIT zreport AND RETURN.

*Submit report via its own selection screen

SUBMIT zreport VIA SELECTION-SCREEN.

*Submit report using selection screen variant

SUBMIT zreport USING SELECTION-SET 'VARIANT1'.

*Submit report but export resultant list to memory, rather than

*it being displayed on screen

SUBMIT zreport EXPORTING LIST TO MEMORY.

  • Once report has finished and control has returned to calling

  • program, use function modules LIST_FROM_MEMORY, WRITE_LIST and

  • DISPLAY_LIST to retrieve and display report.

\[removed by moderator\]

rEGARDS

Edited by: Jan Stallkamp on Jul 29, 2008 5:25 PM

Former Member
0 Kudos

Hi,

Calls an executable program.

Syntax

SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]

[USING SELECTION-SET <var>]

[WITH <sel> <criterion>]

[WITH FREE SELECTIONS <freesel>]

[WITH SELECTION-TABLE <rspar>]

[LINE-SIZE <width>]

[LINE-COUNT <length>].

Calls the program <rep>. If you omit the AND RETURN addition, the current program is

terminated, otherwise, the data from the current program is retained, and processing returns to

the calling program when <rep> has finished running. The other additions control the selection

screen and set attributes of the default list in the called program.

Ex.

REPORT REP1 NO STANDARD PAGE HEADING.

DATA: ITAB TYPE I OCCURS 10,

NUM TYPE I.

SUBMIT REP2 AND RETURN.

IMPORT ITAB FROM MEMORY ID 'HK'.

LOOP AT ITAB INTO NUM.

WRITE / NUM.

ENDLOOP.

TOP-OF-PAGE.

WRITE 'Report 1'.

ULINE.

This program calls the following executable program (report):

REPORT REP2 NO STANDARD PAGE HEADING.

DATA: NUMBER TYPE I,

ITAB TYPE I OCCURS 10.

SET PF-STATUS 'MYBACK'.

DO 5 TIMES.

NUMBER = SY-INDEX.

APPEND NUMBER TO ITAB.

WRITE / NUMBER.

ENDDO.

TOP-OF-PAGE.

WRITE 'Report 2'.

ULINE.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'MBCK'.

EXPORT ITAB TO MEMORY ID 'HK'.

LEAVE.

ENDCASE.

Regards,

Bhaskar

Former Member
0 Kudos

Thanks