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: 

SUBMIT Repoat

Former Member
0 Kudos

Hi Experts,

I Have My Internal table It_main, i want to retrive my data from other program using submit report.

how to use submit,import & export to get data from other report ?both the internal tables are same i have given

please sugest me how to use this submit, export & import in report. thanks in advance .

Regards

7 REPLIES 7

kesavadas_thekkillath
Active Contributor
0 Kudos

its a FAQ

search in SCN

link:[;

former_member555112
Active Contributor
0 Kudos

Hi,

Using SUBMIT program you will not be able to get any internal data of the program.

SUBMIT will just process the 2nd program. In case you use the addition EXPORTING LIST TO MEMORY then the report output will be sent to memory which you can extract making use of FM LIST_FROM_MEMORY and LIST_TO_ASCI.

What is your exact requirment?

Regards,

Ankur Parab

Former Member
0 Kudos

HI,

Pls find here a small piece of code...

Calling Program:

SUBMIT zdelete_delivery

WITH p_deli EQ delivery "Delivery

WITH p_item EQ item_number

AND RETURN.

  • Retrieve Return table from ABAP Memory

IMPORT return5 FROM MEMORY ID 'RETURN5'.

FREE MEMORY ID 'RETURN5'.

Submit program:

EXPORT return5 TO MEMORY ID 'RETURN5'.

Regards,

Aditya

former_member184551
Contributor
0 Kudos

If your requirement is just to get the data of an itab from report A to report B you dont have to use submit.

There are several ways

1. You can use import export itab (check the keyword documentation on how to use)

2. If this is a recursive requirement think about making a class and use a method to create this table by encapsulating the logic or if these reports are run subsequently you can have a ztable as a buffer.

Hope this helps you.

Rgds

Sameer.

former_member198275
Active Contributor
0 Kudos

Hi,

I have the same issue. I solve this way. I will call program B from program A. Now in progrma B, I will export the final table to memorry ID and use code,

if sy-tcode ne 'tcode for B',
          export it_final to memorry id 'MEM'.
        else.
         perform go_for_display .
        endif.

" thus the report will not execute when I use submit .

now in program A write import it_final from memorry id 'MEM,.

define the same structure of it_final in both the report.

Regards,

Kaushik

venkat_o
Active Contributor
0 Kudos

Hi, follow the steps. <li> In called program, you need to set like below.


EXPORT it_main TO MEMORY ID 'IT_DATA'.
<li>In calling program use below statement to execute the called program and sending itab to memory.

"If variant is created for called program 
SUBMIT ztest_notepad USING SELECTION-SET <varint_name>. 
  "OR
"If you want to pass selection-screen data of called program dynamically.
  SUBMIT ztest_notepad WITH SELECTION-TABLE <itab_for_selection_scrren_of_called_program> AND RETURN. 
"itab_for_selection_scrren_of_called_program type  RSPARAMS
<li>After submit statement use IMPORT statement to get the itab data from memory.
IMPORT it_main FROM MEMORY ID 'IT_DATA'.
<li>Internal tables structures must be same. Thanks Venkat.O

Former Member
0 Kudos

Hi,

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.

=============================================================

SYNTAX ;SUBMIT... [VIA SELECTION-SCREEN]

[USING SELECTION-SET <var>]

[WITH <sel> <criterion>]

[WITH FREE SELECTIONS <freesel>]

[WITH SELECTION-TABLE <rspar>].