cancel
Showing results for 
Search instead for 
Did you mean: 

SUBMIT statement not passing parameters to called program

Mahesh1
Explorer
0 Kudos

Hi all,

I am using below submit statement to call ZACCT_R program, but when I run the code calling program is not passing parameter values to called program(ZACCT_R). So not getting any output from called program.

Actually here I want to take ZACCT_R  final output internal table to process it further

SUBMIT ZACCT_R  WITH BUKRS EQ P_BUKRS
                                WITH BUDAT EQ P_BUDAT
                                WITH GSBER EQ P_GSBER
                                WITH KUNNR IN SO_KUNNR
        EXPORTING LIST TO MEMORY AND RETURN.

IMPORT IT_OUTPUT FROM MEMORY ID 'ZACCT'.

 

please suggest..

Sandra_Rossi
Active Contributor
0 Kudos
EQ is highly NOT recommended, = should be used instead. See ABAP documentation.
Sandra_Rossi
Active Contributor
0 Kudos
Please format your code with button "..." and "</>".
Sandra_Rossi
Active Contributor
0 Kudos
Please show all concerned code. IMPORT it_output FROM MEMORY is obsolete, instead use IMPORT dobj_id = any_variable_name FROM MEMORY (corresponding to the data source EXPORT dobj_id = any_variable_name TO MEMORY - Of course, "dobj_id" can be any name)
View Entire Topic
ptrck
Explorer
0 Kudos

Hi @Mahesh1 

according to the online help you should read the final table of of the called programm with the function module 'LIST_FROM_MEMORY' instead of IMPORT FROM MEMORY. Here´s the example from online help:

 

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. 

 

Sandra_Rossi
Active Contributor
0 Kudos
Nooooo, that code on one line, again the same bug like in the old forum...
ptrck
Explorer
0 Kudos
Now it´s better 🙂
Mahesh1
Explorer
0 Kudos
when I debug SUBMIT statements SY-SUBRC = 4, hence not able to get any data in LIST_FROM_MEMORY, what could be the possible reason