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: 

SKIPPING REPORTS

Former Member
0 Kudos

HI everyone,

HOW can I return from the 1st report from the transaction called from the 2nd report. 2nd report is generated when a line is selected in the 1st report. Th2 2nd report calls a transaction and the client want IF the back button is pressed from the transaction it wont return to the 2nd report but to the 1st report. LEAVE TO SCREEN is not working because each report has no screen number. How Can I make this work? Thanks in advance!

Regards,

Mike

1 REPLY 1

Former Member
0 Kudos

Hi Michel,

Instead of creating transaction codes for your programs

just use the command SUBMIT command, with this one can pass parameters between programs.

you can also go for SET PARAMETER ID and GET PARAMETER ID.

i have not worked with SET PARAMETER ID and GET PARAMETER ID's. but can give you example for SUBMIT command,

submit <program name to which you would like to pass parameters>

with p_werks = p_werks

with s_dispo-low = s_dispo-low

with s_dispo-high = s_dispo-high

with s_matnr-low = s_matnr-low

with s_matnr-high = s_matnr-high.

this with p_werks = p_werks tells us what parameters we are going to pass

with s_dispo-low = s_dispo-low

with s_dispo-high = s_dispo-high

with s_matnr-low = s_matnr-low

with s_matnr-high = s_matnr-high.

if you still have doubts,

just go through the following illustrations,

Submit to call an ABAP report from within another report.

For example:

submit 'ZREPORT1' using pernr = g_pernr

exporting list to memory

and return.

In this case we are submitting the report ZREPORT1, passing the parameter pernr a value of g_pernr (from the calling program) sending the output list to ABAP memory, and returning to the calling program.

You can retrieve the list using the function module LIST_FROM_MEMORY.

Hi,

U have one option in SUBMIT which is EXPORTING LIST TO MEMORY.

This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.

The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.

The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.

The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.

The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.

The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.

e.g:

Once the program report has been accessed, the list stored there in the ABAP Memory is read by means of function modules and inserted in the current list.

DATA list_tab TYPE TABLE OF abaplist.

SUBMIT report EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = list_tab

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc = 0.

CALL FUNCTION 'WRITE_LIST'

TABLES

listobject = list_tab.

ENDIF.