Application Development and Automation 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: 
Read only

Calling transaction via SUBMIT and then returning back to same program

Former Member
0 Likes
1,798

Hi,

I want to process internal table from 1 page to an executable program which shall process that internal table, and I want to get the processed data in another internal table to my calling program.

I used SUBMIT AND RETURN.

But where to begin the second processing, I get struck.

Is there any function module to aviod it.

Thanks.

Hi,

I want to process internal table from 1 page to an executable program which shall process that internal table, and I want to get the processed data in another internal table to my calling program.

I used SUBMIT AND RETURN.

But where to begin the second processing, I get struck.

Is there any function module to aviod it.

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
1,117

hi johny,

Use EXPORT and IMPORT to pass internal table . please explain what u actualy want to do.

Edited by: abhishek prakash on Feb 12, 2009 3:22 AM

Read only

Former Member
0 Likes
1,117

Hi,

After Submit .... and Return statement you can start second processing .Before starting second processing you need to import the table from the called program by statemment follows --

Submit .... and  Return
IMPORT  t_itab  FROM MEMORY ID 'ABCD'.

In the called program you need to export the same -


EXPORT t_itab TO MEMORY ID 'ABCD'.

Regards

Pinaki

Read only

Former Member
0 Likes
1,117

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

*Example Code (Retrieving list from memory)

DATA BEGIN OF itab_list OCCURS 0.

INCLUDE STRUCTURE abaplist.

DATA END OF itab_list.

DATA: BEGIN OF vlist OCCURS 0,

filler1(01) TYPE c,

field1(06) TYPE c,

filler(08) TYPE c,

field2(10) TYPE c,

filler3(01) TYPE c,

field3(10) TYPE c,

filler4(01) TYPE c,

field4(3) TYPE c,

filler5(02) TYPE c,

field5(15) TYPE c,

filler6(02) TYPE c,

field6(30) TYPE c,

filler7(43) TYPE c,

field7(10) TYPE c,

END OF vlist.

SUBMIT zreport EXPORTING LIST TO MEMORY.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_list

EXCEPTIONS

not_found = 4

OTHERS = 8.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

list_index = -1

TABLES

listasci = vlist

listobject = itab_list

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

IF sy-subrc NE '0'.

WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.

ENDIF.

Read only

Former Member
0 Likes
1,117

Hi johny,

passing internal table i_tab1 to another executable program..


    EXPORT i_tab1 TO MEMORY ID 'AA'.
    SUBMIT <progname> AND RETURN.

in called program..

IMPORT itab1 from memory id 'AA'.

loop at i_tab1 into workarea.

"process data....

append workarea to i_tab2.

endloop.

export i_tab2 to memory id 'BB'.

leave.

in calling program ......

after submit statement..

import i_tab2 from memory id 'BB'.

itab1 and itab2 must be declared in both the programs and have same structure..

Regards,

Mdi.Deeba.