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

submit program, and return

former_member227595
Active Participant
0 Likes
826

Hi,

I am using a SUBMIT with AND RETURN.

But when it's executed it stops at ALV at the end of the execution, and doesn't return.

Is there any way to call a program using SUBMIT that doesn't show me excecution of the program, and back to my main program?

I wait for your comments ?

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
790

Hi,

Use the EXPORTING LIST TO MEMORY in SUBMIT and RETURN statement.

Cheers

~Niranjan

Read only

Former Member
0 Likes
790

Hi,

Example:

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.

Cheers

~Niranjan

Read only

Former Member
0 Likes
790

I had this requirement, I tried a lot for

SUBMIT report EXPORTING LIST TO MEMORY
              AND RETURN.

but it did not work in my system. It works in case of ALV_LIST, but does not work in case of ALV_GRID.

I had to put in enhancement spot at the end to 'LEAVE PROGRAM' in case the calling function was my program, and had to export the ALV output table to memory which I imported in my program.

It will be very interesting if you could find any better way to do it.

Which report you are running BTW?

Read only

0 Likes
790

Came Across this article.

See if it fits your requirement.