ABAP Select data from SAP table IACESOITEM into internal table
Get Example source ABAP code based on a different SAP table
Below is a number of ABAP code snippets to demonstrate how to select data from SAP IACESOITEM table and store it within an internal table, including using the newer @DATA inline declaration methods. It also shows you various ways to process this data using ABAP work area, inline declaration or field symbols including executing all the relevant CONVERSION_EXIT routines specific to IACESOITEM. See here for more generic Select statement tips.
Sometimes data within SAP is stored within the database table in a different format to what it is displayed to the user. These input/output conversation FM routines are what translates the data between the two formats.
There is also a full declaration of the IACESOITEM table where each field has a char/string type for you to simply copy and paste. This allows you to use processing that is only available to these field types such as the CONCATENATE statement.
DATA: IT_IACESOITEM TYPE STANDARD TABLE OF IACESOITEM, WA_IACESOITEM TYPE IACESOITEM, GD_STR TYPE STRING. DATA: lo_typedescr type REF TO cl_abap_typedescr. DATA: lv_fieldname type fieldname. FIELD-SYMBOLS: <FIELD> TYPE any. FIELD-SYMBOLS: <IACESOITEM> TYPE IACESOITEM. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_IACESOITEM. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM IACESOITEM INTO TABLE IT_IACESOITEM. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM IACESOITEM * INTO TABLE @DATA(IT_IACESOITEM2). *--Further methods of using ABAP code to select data from SAP database tables *You can also declare the header/work area using the in-line DATA declaration method READ TABLE IT_IACESOITEM INDEX 1 INTO DATA(WA_IACESOITEM2). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_IACESOITEM ASSIGNING <IACESOITEM>.*To update a field value using a field symbol simply change the value via the field symbol pointer
<IACESOITEM>-MANDT = 1.
<IACESOITEM>-ACCRUALENGINEACCRUALOBJECTTYPE = 1.
<IACESOITEM>-ACCRUALOBJECTLOGICALSYSTEM = 1.
<IACESOITEM>-COMPANYCODE = 1.
<IACESOITEM>-ACCRUALOBJECT = 1.
ENDLOOP. LOOP AT IT_IACESOITEM INTO WA_IACESOITEM. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_IACESOITEM-ACCRUALSUBOBJECT, sy-vline,
WA_IACESOITEM-ACCRUALITEMTYPE, sy-vline,
WA_IACESOITEM-LEDGER, sy-vline,
WA_IACESOITEM-ACCRSUBOBJECTITMVALDTYENDDTE, sy-vline,
WA_IACESOITEM-ACCRSUBOBJECTITMVALDTYSTRTDTE, sy-vline,
WA_IACESOITEM-ACCRUALMETHOD, sy-vline.
ENDLOOP. *Add any further fields from structure WA_IACESOITEM you want to display... WRITE:/ sy-uline. * Aternatively use generic code to Write field values (and NAME) to screen report DO. ASSIGN COMPONENT sy-index OF STRUCTURE wa_IACESOITEM TO <field>. IF sy-subrc <> 0. EXIT. ENDIF. WRITE:/ 'Field Value', <field>, sy-vline. gd_str = <field> . lo_typedescr ?= CL_ABAP_DATADESCR=>DESCRIBE_BY_DATA( <field> ). lv_fieldname = lo_typedescr->GET_RELATIVE_NAME( ). WRITE:/ 'Field Name', lv_fieldname. ENDDO. *Redo loop but convert all fields from internal to out value LOOP AT IT_IACESOITEM INTO WA_IACESOITEM. *Write horizonal line to screen report. WRITE:/ sy-uline. *Convert all fields to display/output versions using conversion routines PERFORM convert_all_field_values CHANGING wa_EKKO. ENDLOOP. *&---------------------------------------------------------------------* *& Form convert_all_field_values *&---------------------------------------------------------------------* FORM convert_all_field_values CHANGING p_EKKO LIKE wa_EKKO. DATA: ld_input(1000) TYPE c, ld_output(1000) TYPE C.
*Conversion exit ALPHA, internal->external for field ACCRUALOBJECTLOGICALSYSTEM CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCRUALOBJECTLOGICALSYSTEM IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCRUALOBJECTLOGICALSYSTEM.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCRUALITEMTYPE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCRUALITEMTYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCRUALITEMTYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field LEDGER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-LEDGER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-LEDGER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PLANACCRUALITEMTYPE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-PLANACCRUALITEMTYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-PLANACCRUALITEMTYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACTUALACCRUALITEMTYPE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACTUALACCRUALITEMTYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACTUALACCRUALITEMTYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field DEFERRALITEMTYPE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-DEFERRALITEMTYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-DEFERRALITEMTYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field TOTALACCRUALQUANTITYUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRUALQUANTITYUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRUALQUANTITYUNIT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINTRANSCRCY CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINTRANSCRCY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINTRANSCRCY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMTINCOMPANYCODECRCY CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMTINCOMPANYCODECRCY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMTINCOMPANYCODECRCY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINGLOBALCRCY CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINGLOBALCRCY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINGLOBALCRCY.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY1 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY1 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY1.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY2 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY2 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY2.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY3 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY3 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY3.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY4 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY4 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY4.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY5 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY5 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY5.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY6 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY6 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY6.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY7 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY7 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY7.
WRITE:/ 'New Value:', ld_input.
*Conversion exit AC152, internal->external for field TOTALACCRAMOUNTINFREEDFNDCRCY8 CALL FUNCTION 'CONVERSION_EXIT_AC152_OUTPUT' EXPORTING input = WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY8 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-TOTALACCRAMOUNTINFREEDFNDCRCY8.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCROPNGPOSTGACCRACCOUNT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCROPNGPOSTGACCRACCOUNT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCROPNGPOSTGACCRACCOUNT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCROPNGPOSTGOFFSTGACCOUNT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCROPNGPOSTGOFFSTGACCOUNT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCROPNGPOSTGOFFSTGACCOUNT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCRPERDCPOSTGACCRACCOUNT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCRPERDCPOSTGACCRACCOUNT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCRPERDCPOSTGACCRACCOUNT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCRPERDCPOSTGOFFSTGACCT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCRPERDCPOSTGOFFSTGACCT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCRPERDCPOSTGOFFSTGACCT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCRCLSGPOSTGACCRACCOUNT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCRCLSGPOSTGACCRACCOUNT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCRCLSGPOSTGACCRACCOUNT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACCRCLSGPOSTGOFFSTGACCOUNT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IACESOITEM-ACCRCLSGPOSTGOFFSTGACCOUNT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IACESOITEM-ACCRCLSGPOSTGOFFSTGACCOUNT.
WRITE:/ 'New Value:', ld_input.
ENDFORM. *&---------------------------------------------------------------------* *& Form process_as_string_field_values *&---------------------------------------------------------------------* FORM process_as_string_field_values CHANGING p_EKKO LIKE wa_EKKO. TYPES: BEGIN OF T_IACESOITEM_STR,
MANDT TYPE STRING,
ACCRUALENGINEACCRUALOBJECTTYPE TYPE STRING,
ACCRUALOBJECTLOGICALSYSTEM TYPE STRING,
COMPANYCODE TYPE STRING,
ACCRUALOBJECT TYPE STRING,
ACCRUALSUBOBJECT TYPE STRING,
ACCRUALITEMTYPE TYPE STRING,
LEDGER TYPE STRING,
ACCRSUBOBJECTITMVALDTYENDDTE TYPE STRING,
ACCRSUBOBJECTITMVALDTYSTRTDTE TYPE STRING,
ACCRUALMETHOD TYPE STRING,
ACCRSUBOBJHDRSTARTOFLIFEDATE TYPE STRING,
ACCRSUBOBJHDRENDOFLIFEDATE TYPE STRING,
ACCRUALITEMISOBSOLETE TYPE STRING,
PLANACCRUALITEMTYPE TYPE STRING,
PLANACCRUALMETHOD TYPE STRING,
ACTUALACCRUALITEMTYPE TYPE STRING,
ACTUALACCRUALMETHOD TYPE STRING,
DEFERRALITEMTYPE TYPE STRING,
DEFERRALMETHOD TYPE STRING,
TOTALACCRUALQUANTITY TYPE STRING,
TOTALACCRUALQUANTITYUNIT TYPE STRING,
TOTALACCRAMOUNTINTRANSCRCY TYPE STRING,
TOTALACCRAMTINCOMPANYCODECRCY TYPE STRING,
TOTALACCRAMOUNTINGLOBALCRCY TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY1 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY2 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY3 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY4 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY5 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY6 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY7 TYPE STRING,
TOTALACCRAMOUNTINFREEDFNDCRCY8 TYPE STRING,
TRANSACTIONCURRENCY TYPE STRING,
COMPANYCODECURRENCY TYPE STRING,
GLOBALCURRENCY TYPE STRING,
FREEDEFINEDCURRENCY1 TYPE STRING,
FREEDEFINEDCURRENCY2 TYPE STRING,
FREEDEFINEDCURRENCY3 TYPE STRING,
FREEDEFINEDCURRENCY4 TYPE STRING,
FREEDEFINEDCURRENCY5 TYPE STRING,
FREEDEFINEDCURRENCY6 TYPE STRING,
FREEDEFINEDCURRENCY7 TYPE STRING,
FREEDEFINEDCURRENCY8 TYPE STRING,
ACCROPNGPOSTGDOCUMENTTYPE TYPE STRING,
ACCRPERDCPOSTGDOCUMENTTYPE TYPE STRING,
ACCRCLSGPOSTGDOCUMENTTYPE TYPE STRING,
ACCROPNGPOSTGACCRACCOUNT TYPE STRING,
ACCROPNGPOSTGOFFSTGACCOUNT TYPE STRING,
ACCRPERDCPOSTGACCRACCOUNT TYPE STRING,
ACCRPERDCPOSTGOFFSTGACCT TYPE STRING,
ACCRCLSGPOSTGACCRACCOUNT TYPE STRING,
ACCRCLSGPOSTGOFFSTGACCOUNT TYPE STRING,
ACCRUALITEMLASTCHANGEDATETIME TYPE STRING,END OF T_EKKO_STR. DATA: WA_IACESOITEM_STR type T_EKKO_STR. DATA: ld_text TYPE string. LOOP AT IT_EKKO INTO WA_EKKO. MOVE-CORRESPONDING wa_EKKO TO WA_EKKO_STR. CONCATENATE: sy-vline
WA_IACESOITEM_STR-MANDT sy-vline
WA_IACESOITEM_STR-ACCRUALENGINEACCRUALOBJECTTYPE sy-vline
WA_IACESOITEM_STR-ACCRUALOBJECTLOGICALSYSTEM sy-vline
WA_IACESOITEM_STR-COMPANYCODE sy-vline
WA_IACESOITEM_STR-ACCRUALOBJECT sy-vline
WA_IACESOITEM_STR-ACCRUALSUBOBJECT sy-vline
WA_IACESOITEM_STR-ACCRUALITEMTYPE sy-vline
WA_IACESOITEM_STR-LEDGER sy-vline
WA_IACESOITEM_STR-ACCRSUBOBJECTITMVALDTYENDDTE sy-vline
WA_IACESOITEM_STR-ACCRSUBOBJECTITMVALDTYSTRTDTE sy-vline
WA_IACESOITEM_STR-ACCRUALMETHOD sy-vline
WA_IACESOITEM_STR-ACCRSUBOBJHDRSTARTOFLIFEDATE sy-vline
WA_IACESOITEM_STR-ACCRSUBOBJHDRENDOFLIFEDATE sy-vline
WA_IACESOITEM_STR-ACCRUALITEMISOBSOLETE sy-vline
WA_IACESOITEM_STR-PLANACCRUALITEMTYPE sy-vline
WA_IACESOITEM_STR-PLANACCRUALMETHOD sy-vline
WA_IACESOITEM_STR-ACTUALACCRUALITEMTYPE sy-vline
WA_IACESOITEM_STR-ACTUALACCRUALMETHOD sy-vline
WA_IACESOITEM_STR-DEFERRALITEMTYPE sy-vline
WA_IACESOITEM_STR-DEFERRALMETHOD sy-vline
WA_IACESOITEM_STR-TOTALACCRUALQUANTITY sy-vline
WA_IACESOITEM_STR-TOTALACCRUALQUANTITYUNIT sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINTRANSCRCY sy-vline
WA_IACESOITEM_STR-TOTALACCRAMTINCOMPANYCODECRCY sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINGLOBALCRCY sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY1 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY2 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY3 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY4 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY5 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY6 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY7 sy-vline
WA_IACESOITEM_STR-TOTALACCRAMOUNTINFREEDFNDCRCY8 sy-vline
WA_IACESOITEM_STR-TRANSACTIONCURRENCY sy-vline
WA_IACESOITEM_STR-COMPANYCODECURRENCY sy-vline
WA_IACESOITEM_STR-GLOBALCURRENCY sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY1 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY2 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY3 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY4 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY5 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY6 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY7 sy-vline
WA_IACESOITEM_STR-FREEDEFINEDCURRENCY8 sy-vline
WA_IACESOITEM_STR-ACCROPNGPOSTGDOCUMENTTYPE sy-vline
WA_IACESOITEM_STR-ACCRPERDCPOSTGDOCUMENTTYPE sy-vline
WA_IACESOITEM_STR-ACCRCLSGPOSTGDOCUMENTTYPE sy-vline
WA_IACESOITEM_STR-ACCROPNGPOSTGACCRACCOUNT sy-vline
WA_IACESOITEM_STR-ACCROPNGPOSTGOFFSTGACCOUNT sy-vline
WA_IACESOITEM_STR-ACCRPERDCPOSTGACCRACCOUNT sy-vline
WA_IACESOITEM_STR-ACCRPERDCPOSTGOFFSTGACCT sy-vline
WA_IACESOITEM_STR-ACCRCLSGPOSTGACCRACCOUNT sy-vline
WA_IACESOITEM_STR-ACCRCLSGPOSTGOFFSTGACCOUNT sy-vline
WA_IACESOITEM_STR-ACCRUALITEMLASTCHANGEDATETIME sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.