Wednesday, May 29, 2013
Steps to read called program output into internal table defined in the calling program.
- Use syntax addition "EXPORTING LIST TO MEMORY AND RETURN" to SUBMIT statement. 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 is a structured data type in ABAP Dictionary.
- Use the function module LIST_FROM_MEMORY to load the list from the ABAP Memory to an internal table of the row type ABAPLIST.
- Use the function module LIST_TO_ASCI to convert the content of an internal table of the row type ABAPLIST to ASCII representation.
- Please check the below screen shots to see data in table before and after LIST_TO_ASCI function module is used.
- Data is in pipe delimited. So loop the internal table and split the row type into corresponding fields.
- Sample code to convert ASCI data to internal table
LOOP AT IT_WGTY_REP INTO WA_WGTY_REP. CHECK SY-TABIX GT 3 AND SY-TABIX LT LV_TOT_RECS. IF SY-TABIX = 4. SPLIT WA_WGTY_REP AT '|' INTO LV_DUMMY01 LV_DUMMY02. IF LV_DUMMY02 CS 'List Contains no data'. EXIT. ENDIF. ENDIF. " Split pipe delimited data SPLIT WA_WGTY_REP AT '|' INTO LV_DUMMY01 WA_ALV_OUTPUT_C-PERNR LV_DUMMY02 WA_ALV_OUTPUT_C-FPPER WA_ALV_OUTPUT_C-PAYDT WA_ALV_OUTPUT_C-LGART WA_ALV_OUTPUT_C-LGTXT WA_ALV_OUTPUT_C-BETRG LV_DUMMY03. APPEND WA_ALV_OUTPUT_C TO IT_ALV_OUTPUT_C. CLEAR WA_ALV_OUTPUT_C. ENDLOOP.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.