Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling ABAP Programs →  Calling Executable Programs →  SUBMIT 

SUBMIT - list_options

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


... [LINE-SIZE width] 
    [LINE-COUNT page_lines]
    { [EXPORTING LIST TO MEMORY]
   | [TO SAP-SPOOL spool_options] } ... .

Extras

1. ... LINE-SIZE width

2. ... LINE-COUNT page_lines

3. ... EXPORTING LIST TO MEMORY

4. ... TO SAP-SPOOL spool_options

Effect

These additions modify the basic list in the called program. While LINE-SIZE and LINE-COUNT modify the formatting, the other two additions determine the output type of the list.

EXPORTING LIST TO MEMORY saves the list to the ABAP Memory and TO SAP-SPOOL sends it as a print list to the SAP spool system. If you do not specify these additions, the basic list is displayed as a screen list.


Note

The additions only take effect the first time the called program is executed. If a selection screen is displayed in the program accessed, the runtime environment accesses the program again after completion, without taking account of the list_options additions. This is particularly important to the addition TO SAP-SPOOL, because the basic list is displayed as a screen list and not as a print list when the program is accessed again. For this reason, it is advisable not to use the addition VIA SELECTION-SCREEN when using list_options.

Addition 1

... LINE-SIZE width

Addition 2

... LINE-COUNT page_lines

Effect

These additions define the line width and page length of the basic list. They have the same effect as the additions of the same name in the introductory program statement for the called program. If the called program has the same additions in the introductory program statement, these overwrite the values specified for SUBMIT.

Addition 3

... EXPORTING LIST TO MEMORY

Effect

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 ABAP Dictionary.

The calling program can access the list stored once the program has been called, using function modules from 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.
  • The function module LIST_TO_ASCI converts the content of an internal table of the row type ABAPLIST to ASCII representation.


Note

The addition can only work provided the function key Enter is not associated with a function code in the GUI status last defined for the called program.


Example

Once the program report has been called, the list stored there in the ABAP Memory is read using 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. 

Addition 4

... TO SAP-SPOOL spool_options

Effect

If you specify this addition, a new print list level is opened in the internal mode of the called program and the first output statement for the basic list of this program creates a new spool request. All list output for the called program is passed page by page as a print list to the SAP spool system. The spool_options additions are used to define the print and archiving parameters for the spool request.


Note

It is not possible to switch from the print list to the screen list in the called program. The NEW-PAGE PRINT OFF statement does not modify a print list level created using SUBMIT TO SAP-SPOOL.


Example

Calls an executable program and creates a spool request. When the name of the called program is passed to the input parameter REPORT of the function module GET_PRINT_PARAMETERS, the information about the line width and page length of the print list is taken from the statement that introduces the program.

DATA: print_parameters TYPE pri_params,
      archi_parameters TYPE arc_params,
      valid_flag       TYPE c LENGTH 1.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    report                 = 'SUBMITABLE'
    archive_mode           = '3'
  IMPORTING
    out_parameters       = print_parameters
    out_archive_parameters = archi_parameters
    valid                = valid_flag
  EXCEPTIONS
    invalid_print_params = 2
    OTHERS           = 4.

IF valid_flag = 'X' AND sy-subrc = 0.
  SUBMIT submitable TO SAP-SPOOL
                    SPOOL PARAMETERS print_parameters
                    ARCHIVE PARAMETERS archi_parameters
                    WITHOUT SPOOL DYNPRO.
ENDIF.

Continue

SUBMIT - spool_options

Program Calls, Influencing the Basic List