Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: Using SUBMIT in an ABAP program.

$
0
0

Hi Alice D' Souza,

 

please use below code.


        SUBMIT ZTRANSACTIONPROGRAM

 

          WITH w_param1 EQ '1000'

 

          WITH w_param2 EQ iw_something

                    

         EXPORTING LIST TO MEMORY

                       AND RETURN.

 

 

* Structure get the data from memory in ascii format....................

   DATA: lt_list TYPE abaplist OCCURS 0 WITH HEADER LINE.

 

* Structure get the data from memory....................................

   DATA: lt_txtlines(1024) TYPE c OCCURS 0 WITH HEADER LINE.

 

   CLEAR : lt_list,lt_reportlines.

   REFRESH : lt_list[],lt_reportlines[].

 

   CALL FUNCTION 'LIST_FROM_MEMORY'

     TABLES

       listobject = lt_list

     EXCEPTIONS

       not_found  = 1

       OTHERS     = 2.

 

   CHECK sy-subrc = 0.

 

   CALL FUNCTION 'LIST_TO_ASCI'

     TABLES

       listobject         = lt_list

       listasci           = lt_txtlines

     EXCEPTIONS

       empty_list         = 1

       list_index_invalid = 2

       OTHERS             = 3.

 

   CHECK sy-subrc = 0.

 

   lt_reportlines[] = lt_txtlines[].

 

   CALL FUNCTION 'LIST_FREE_MEMORY'.



Regards,

Venkat.


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>