Search

Loading

Monday, July 2, 2012

Submit abap program and gets output from memory

The following program runs an abap program and gets the output list from memory into internal table :

program EXEC_CMD
report ztest_submit.
*&---------------------------------------------------------------------*
*&     www.developerpages.gr
*&
*&---------------------------------------------------------------------*


SUBMIT ZEXEC_CMD
*          with par1 = ''           " Parameters



                          EXPORTING LIST TO MEMORY AND RETURN.
PERFORM write_list.


*&---------------------------------------------------------------------*
*&      Form  WRITE_LIST
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM WRITE_LIST.
  DATA : BEGIN OF MYLIST1 OCCURS 100.
          include structure ABAPLIST.
  DATA : END OF MYLIST1.

  DATA: BEGIN OF DOWNTAB OCCURS 1,
           LINE(255),
         END OF DOWNTAB.

  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      LISTOBJECT = MYLIST1
    EXCEPTIONS
      NOT_FOUND  = 1
      OTHERS     = 2.
read full Article : http://www.developerpages.gr/index.php/desktop-development-2/abap/74-submit-abap-program-and-gets-output-from-memory

No comments:

Post a Comment