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 - SPOOL

Former Member
0 Kudos

Hi, all.

I created 2 programs, prg1 & prg2.

prg1 call prg2 by 'SUBMIT'.

The two programs have their spool.

I need to see only one spool at the end of elaboration. The spool that I need is the union of the 2 spool of the two programs.

The prg2 can also be called more times by the prg1.

Does someone know how I can do?

3 REPLIES 3

Former Member
0 Kudos

Try this way....


  SUBMIT rkaep000
     USING SELECTION-SET 'BPC TEST'
           EXPORTING LIST TO MEMORY AND RETURN.

* Read list from memory into table
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = lt_listobject
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.

  IF sy-subrc <> 0.
*   Error in function module &1
  ENDIF.

*Spool content in Ascii format
  CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
      listobject         = lt_listobject
      listasci           = txtlines
    EXCEPTIONS
      empty_list         = 1
      list_index_invalid = 2
      OTHERS             = 3.


  CALL FUNCTION 'WRITE_LIST'
    TABLES
      listobject = lt_listobject
    EXCEPTIONS
      empty_list = 1
      OTHERS     = 2.

  CALL FUNCTION 'LIST_FREE_MEMORY'
    TABLES
      listobject = lt_listobject.

Prabhudas

AlexandreMendes
Participant
0 Kudos

sorry, I don't understand.

are you creating a write report?

0 Kudos

>

> sorry, I don't understand.

>

> are you creating a write report?

Yes, I create 2 report.

The first report call the second with 'SUBMIT'