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 AND RETURN

Former Member
0 Likes
579

Hi All,

I am using SUBMIT and return in my program. But the program which is called is using the ALV display. So how to skip this display and return back to my calling program.

Regards,

Sathish Reddy.

5 REPLIES 5
Read only

Former Member
0 Likes
539

when u use SUBMIT and Return , it wont display any output ?

u have to use LIST EXPORT to Memory inaddition

first check the syntax of ur call ?

press F1 on Submit in Se38 editor then u wll come to know .

Regards

Peram

Read only

Former Member
0 Likes
539

Hi

You have to press the BACK button on the ALV display Menu to comback to the calling program.then only it will come.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
539

Instead of displaying a list on the screen, you can store it in ABAP memory using the

EXPORTING LIST TO MEMORY addition in the SUBMIT statement:

SUBMIT... AND RETURN

EXPORTING LIST TO MEMORY.

Regards

Read only

ashok_kumar24
Contributor
0 Likes
539

Hi Sathish,

<b>Try the following.

*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,</b>

Thanks and Good Luck

Ashok

Read only

Former Member
0 Likes
539

Hi,

*Example Code 

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 and RETURN.

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.

Regards

Sudheer