ABAP Select data from SAP table IFIINTERNALORDER 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 IFIINTERNALORDER 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 IFIINTERNALORDER. 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 IFIINTERNALORDER 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_IFIINTERNALORDER TYPE STANDARD TABLE OF IFIINTERNALORDER, WA_IFIINTERNALORDER TYPE IFIINTERNALORDER, 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: <IFIINTERNALORDER> TYPE IFIINTERNALORDER. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_IFIINTERNALORDER. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM IFIINTERNALORDER INTO TABLE IT_IFIINTERNALORDER. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM IFIINTERNALORDER * INTO TABLE @DATA(IT_IFIINTERNALORDER2). *--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_IFIINTERNALORDER INDEX 1 INTO DATA(WA_IFIINTERNALORDER2). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_IFIINTERNALORDER ASSIGNING <IFIINTERNALORDER>.*To update a field value using a field symbol simply change the value via the field symbol pointer
<IFIINTERNALORDER>-MANDT = 1.
<IFIINTERNALORDER>-INTERNALORDER = 1.
<IFIINTERNALORDER>-INTERNALORDERDESCRIPTION = 1.
<IFIINTERNALORDER>-ORDERCATEGORY = 1.
<IFIINTERNALORDER>-BUSINESSAREA = 1.
ENDLOOP. LOOP AT IT_IFIINTERNALORDER INTO WA_IFIINTERNALORDER. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_IFIINTERNALORDER-CONTROLLINGAREA, sy-vline,
WA_IFIINTERNALORDER-PLANT, sy-vline,
WA_IFIINTERNALORDER-CURRENCY, sy-vline,
WA_IFIINTERNALORDER-ISSTATISTICALORDER, sy-vline,
WA_IFIINTERNALORDER-REFERENCEORDER, sy-vline,
WA_IFIINTERNALORDER-SALESORDER, sy-vline.
ENDLOOP. *Add any further fields from structure WA_IFIINTERNALORDER 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_IFIINTERNALORDER 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_IFIINTERNALORDER INTO WA_IFIINTERNALORDER. *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 INTERNALORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-INTERNALORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-INTERNALORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REFERENCEORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-REFERENCEORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-REFERENCEORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field SALESORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-SALESORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-SALESORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ABPSP, internal->external for field WBSELEMENT CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-WBSELEMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-WBSELEMENT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REQUESTINGCOSTCENTER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-REQUESTINGCOSTCENTER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-REQUESTINGCOSTCENTER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REQUESTINGORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-REQUESTINGORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-REQUESTINGORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field EXTERNALORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-EXTERNALORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-EXTERNALORDER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field ACTUALPOSTEDCOSTCENTER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-ACTUALPOSTEDCOSTCENTER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-ACTUALPOSTEDCOSTCENTER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field COSTCENTER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-COSTCENTER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-COSTCENTER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field LOGICALSYSTEM CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-LOGICALSYSTEM IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-LOGICALSYSTEM.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field INTORDERSETTLEMENTCOSTELEMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-INTORDERSETTLEMENTCOSTELEMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-INTORDERSETTLEMENTCOSTELEMENT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field BASICSETTLEMENTGLACCOUNT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-BASICSETTLEMENTGLACCOUNT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-BASICSETTLEMENTGLACCOUNT.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field INVESTMENTSCALE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-INVESTMENTSCALE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-INVESTMENTSCALE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field JOINTVENTURE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-JOINTVENTURE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-JOINTVENTURE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field JOINTVENTURERECOVERYCODE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-JOINTVENTURERECOVERYCODE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-JOINTVENTURERECOVERYCODE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field JOINTVENTUREEQUITYTYPE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-JOINTVENTUREEQUITYTYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-JOINTVENTUREEQUITYTYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field JOINTVENTUREOBJECTTYPE CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-JOINTVENTUREOBJECTTYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-JOINTVENTUREOBJECTTYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field PROFITCENTER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-PROFITCENTER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-PROFITCENTER.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field RESPONSIBLECOSTCENTER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IFIINTERNALORDER-RESPONSIBLECOSTCENTER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IFIINTERNALORDER-RESPONSIBLECOSTCENTER.
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_IFIINTERNALORDER_STR,
MANDT TYPE STRING,
INTERNALORDER TYPE STRING,
INTERNALORDERDESCRIPTION TYPE STRING,
ORDERCATEGORY TYPE STRING,
BUSINESSAREA TYPE STRING,
CONTROLLINGAREA TYPE STRING,
PLANT TYPE STRING,
CURRENCY TYPE STRING,
ISSTATISTICALORDER TYPE STRING,
REFERENCEORDER TYPE STRING,
SALESORDER TYPE STRING,
SALESORDERITEM TYPE STRING,
WBSELEMENT TYPE STRING,
WBSELEMENTINTERNALID TYPE STRING,
REQUESTINGCOSTCENTER TYPE STRING,
REQUESTINGCOMPANYCODE TYPE STRING,
REQUESTINGORDER TYPE STRING,
INTERNALORDERLOCATION TYPE STRING,
LOCATIONPLANT TYPE STRING,
EXTERNALORDER TYPE STRING,
ACTUALPOSTEDCOSTCENTER TYPE STRING,
PLANNINGWITHLINEITEMSISACTIVE TYPE STRING,
COSTCENTER TYPE STRING,
LOGICALSYSTEM TYPE STRING,
ORDISUSEDININTEGRATEDPLANNING TYPE STRING,
TAXJURISDICTION TYPE STRING,
RESULTANALYSISINTERNALID TYPE STRING,
CONDITIONUSAGE TYPE STRING,
CONDITIONAPPLICATION TYPE STRING,
COSTINGSHEET TYPE STRING,
OVERHEADCODE TYPE STRING,
ORDERINTERESTCALCPROFILE TYPE STRING,
INTORDERSETTLEMENTCOSTELEMENT TYPE STRING,
BASICSETTLEMENTGLACCOUNT TYPE STRING,
INTORDERINDIVIDUALFIELD1VALUE TYPE STRING,
INTORDERINDIVIDUALFIELD2VALUE TYPE STRING,
INTORDERINDIVIDUALFIELD3VALUE TYPE STRING,
INTORDERINDIVIDUALFIELD4VALUE TYPE STRING,
INTORDERINDIVIDUALFIELD5AMOUNT TYPE STRING,
INTORDERINDIVIDUALFIELD6DATE TYPE STRING,
INTORDERINDIVIDUALFIELD7VALUE TYPE STRING,
INTORDERINDIVIDUALFIELD8DATE TYPE STRING,
INTORDERINDIVIDUALFIELD9DATE TYPE STRING,
INTORDERINDIVIDUALFIELD10VALUE TYPE STRING,
ORDERPROCESSINGGROUP TYPE STRING,
INVESTMENTPROFILE TYPE STRING,
INVESTMENTSCALE TYPE STRING,
INVESTMENTREASON TYPE STRING,
ENVIRONMENTALINVESTMENTREASON TYPE STRING,
JOINTVENTURE TYPE STRING,
JOINTVENTURERECOVERYCODE TYPE STRING,
JOINTVENTUREEQUITYTYPE TYPE STRING,
JOINTVENTUREORIGINALCOSTOBJECT TYPE STRING,
JOINTVENTUREOBJECTTYPE TYPE STRING,
JOINTVENTURECLASS TYPE STRING,
JOINTVENTURESUBCLASS TYPE STRING,
ISDELETED TYPE STRING,
CREATIONDATE TYPE STRING,
CREATIONTIME TYPE STRING,
CREATEDBYUSER TYPE STRING,
LASTCHANGEDBYUSER TYPE STRING,
LASTCHANGEDATE TYPE STRING,
LASTCHANGETIME TYPE STRING,
CONTROLLINGOBJECT TYPE STRING,
COMPANYCODE TYPE STRING,
PROFITCENTER TYPE STRING,
FUNCTIONALAREA TYPE STRING,
CONTROLLINGOBJECTCLASS TYPE STRING,
ORDERTYPE TYPE STRING,
RESPONSIBLECOSTCENTER TYPE STRING,
INTERNALORDERRESPONSIBLEUSER TYPE STRING,
INTORDERPLANNEDRELEASEDATE TYPE STRING,
INTORDERPLANNEDCOMPLETIONDATE TYPE STRING,
INTORDERPLANNEDCLOSINGDATE TYPE STRING,
INTERNALORDERRELEASEDATE TYPE STRING,
INTERNALORDERCOMPLETIONDATE TYPE STRING,
INTERNALORDERCLOSINGDATE TYPE STRING,END OF T_EKKO_STR. DATA: WA_IFIINTERNALORDER_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_IFIINTERNALORDER_STR-MANDT sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDER sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDERDESCRIPTION sy-vline
WA_IFIINTERNALORDER_STR-ORDERCATEGORY sy-vline
WA_IFIINTERNALORDER_STR-BUSINESSAREA sy-vline
WA_IFIINTERNALORDER_STR-CONTROLLINGAREA sy-vline
WA_IFIINTERNALORDER_STR-PLANT sy-vline
WA_IFIINTERNALORDER_STR-CURRENCY sy-vline
WA_IFIINTERNALORDER_STR-ISSTATISTICALORDER sy-vline
WA_IFIINTERNALORDER_STR-REFERENCEORDER sy-vline
WA_IFIINTERNALORDER_STR-SALESORDER sy-vline
WA_IFIINTERNALORDER_STR-SALESORDERITEM sy-vline
WA_IFIINTERNALORDER_STR-WBSELEMENT sy-vline
WA_IFIINTERNALORDER_STR-WBSELEMENTINTERNALID sy-vline
WA_IFIINTERNALORDER_STR-REQUESTINGCOSTCENTER sy-vline
WA_IFIINTERNALORDER_STR-REQUESTINGCOMPANYCODE sy-vline
WA_IFIINTERNALORDER_STR-REQUESTINGORDER sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDERLOCATION sy-vline
WA_IFIINTERNALORDER_STR-LOCATIONPLANT sy-vline
WA_IFIINTERNALORDER_STR-EXTERNALORDER sy-vline
WA_IFIINTERNALORDER_STR-ACTUALPOSTEDCOSTCENTER sy-vline
WA_IFIINTERNALORDER_STR-PLANNINGWITHLINEITEMSISACTIVE sy-vline
WA_IFIINTERNALORDER_STR-COSTCENTER sy-vline
WA_IFIINTERNALORDER_STR-LOGICALSYSTEM sy-vline
WA_IFIINTERNALORDER_STR-ORDISUSEDININTEGRATEDPLANNING sy-vline
WA_IFIINTERNALORDER_STR-TAXJURISDICTION sy-vline
WA_IFIINTERNALORDER_STR-RESULTANALYSISINTERNALID sy-vline
WA_IFIINTERNALORDER_STR-CONDITIONUSAGE sy-vline
WA_IFIINTERNALORDER_STR-CONDITIONAPPLICATION sy-vline
WA_IFIINTERNALORDER_STR-COSTINGSHEET sy-vline
WA_IFIINTERNALORDER_STR-OVERHEADCODE sy-vline
WA_IFIINTERNALORDER_STR-ORDERINTERESTCALCPROFILE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERSETTLEMENTCOSTELEMENT sy-vline
WA_IFIINTERNALORDER_STR-BASICSETTLEMENTGLACCOUNT sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD1VALUE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD2VALUE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD3VALUE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD4VALUE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD5AMOUNT sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD6DATE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD7VALUE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD8DATE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD9DATE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERINDIVIDUALFIELD10VALUE sy-vline
WA_IFIINTERNALORDER_STR-ORDERPROCESSINGGROUP sy-vline
WA_IFIINTERNALORDER_STR-INVESTMENTPROFILE sy-vline
WA_IFIINTERNALORDER_STR-INVESTMENTSCALE sy-vline
WA_IFIINTERNALORDER_STR-INVESTMENTREASON sy-vline
WA_IFIINTERNALORDER_STR-ENVIRONMENTALINVESTMENTREASON sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTURE sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTURERECOVERYCODE sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTUREEQUITYTYPE sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTUREORIGINALCOSTOBJECT sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTUREOBJECTTYPE sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTURECLASS sy-vline
WA_IFIINTERNALORDER_STR-JOINTVENTURESUBCLASS sy-vline
WA_IFIINTERNALORDER_STR-ISDELETED sy-vline
WA_IFIINTERNALORDER_STR-CREATIONDATE sy-vline
WA_IFIINTERNALORDER_STR-CREATIONTIME sy-vline
WA_IFIINTERNALORDER_STR-CREATEDBYUSER sy-vline
WA_IFIINTERNALORDER_STR-LASTCHANGEDBYUSER sy-vline
WA_IFIINTERNALORDER_STR-LASTCHANGEDATE sy-vline
WA_IFIINTERNALORDER_STR-LASTCHANGETIME sy-vline
WA_IFIINTERNALORDER_STR-CONTROLLINGOBJECT sy-vline
WA_IFIINTERNALORDER_STR-COMPANYCODE sy-vline
WA_IFIINTERNALORDER_STR-PROFITCENTER sy-vline
WA_IFIINTERNALORDER_STR-FUNCTIONALAREA sy-vline
WA_IFIINTERNALORDER_STR-CONTROLLINGOBJECTCLASS sy-vline
WA_IFIINTERNALORDER_STR-ORDERTYPE sy-vline
WA_IFIINTERNALORDER_STR-RESPONSIBLECOSTCENTER sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDERRESPONSIBLEUSER sy-vline
WA_IFIINTERNALORDER_STR-INTORDERPLANNEDRELEASEDATE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERPLANNEDCOMPLETIONDATE sy-vline
WA_IFIINTERNALORDER_STR-INTORDERPLANNEDCLOSINGDATE sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDERRELEASEDATE sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDERCOMPLETIONDATE sy-vline
WA_IFIINTERNALORDER_STR-INTERNALORDERCLOSINGDATE sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.