ABAP Select data from SAP table IBOMITEMSTP 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 IBOMITEMSTP 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 IBOMITEMSTP. 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 IBOMITEMSTP 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_IBOMITEMSTP TYPE STANDARD TABLE OF IBOMITEMSTP,
      WA_IBOMITEMSTP TYPE IBOMITEMSTP,
      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: <IBOMITEMSTP> TYPE IBOMITEMSTP.

*Process all fields in table header/work area as string values
  PERFORM process_as_string_field_values CHANGING wa_IBOMITEMSTP.

SELECT *
*restrict ABAP select to first 10 rows
 UP TO 10 ROWS      
  FROM IBOMITEMSTP
  INTO TABLE IT_IBOMITEMSTP.

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM IBOMITEMSTP
*  INTO TABLE @DATA(IT_IBOMITEMSTP2).
*--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_IBOMITEMSTP INDEX 1 INTO DATA(WA_IBOMITEMSTP2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_IBOMITEMSTP ASSIGNING <IBOMITEMSTP>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<IBOMITEMSTP>-MANDT = 1.
<IBOMITEMSTP>-BILLOFMATERIALITEMUUID = 1.
<IBOMITEMSTP>-BILLOFMATERIAL = 1.
<IBOMITEMSTP>-BILLOFMATERIALCATEGORY = 1.
<IBOMITEMSTP>-BILLOFMATERIALVARIANT = 1.
ENDLOOP.

LOOP AT IT_IBOMITEMSTP INTO WA_IBOMITEMSTP.
*Write horizonal line to screen report.
  WRITE:/ sy-uline.

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_IBOMITEMSTP-BILLOFMATERIALVERSION, sy-vline,
WA_IBOMITEMSTP-BILLOFMATERIALITEMNODENUMBER, sy-vline,
WA_IBOMITEMSTP-HEADERCHANGEDOCUMENT, sy-vline,
WA_IBOMITEMSTP-MATERIAL, sy-vline,
WA_IBOMITEMSTP-PLANT, sy-vline,
WA_IBOMITEMSTP-BOMITEMINTERNALCHANGECOUNT, sy-vline.
ENDLOOP. *Add any further fields from structure WA_IBOMITEMSTP 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_IBOMITEMSTP 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_IBOMITEMSTP INTO WA_IBOMITEMSTP. *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 NUMCV, internal->external for field BILLOFMATERIAL CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-BILLOFMATERIAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-BILLOFMATERIAL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field BILLOFMATERIALVARIANT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-BILLOFMATERIALVARIANT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-BILLOFMATERIALVARIANT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field HEADERCHANGEDOCUMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-HEADERCHANGEDOCUMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-HEADERCHANGEDOCUMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATN1, internal->external for field MATERIAL CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-MATERIAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-MATERIAL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field ENGINEERINGCHANGEDOCFOREDIT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-ENGINEERINGCHANGEDOCFOREDIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-ENGINEERINGCHANGEDOCFOREDIT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field ENGINEERINGCHANGEDOCUMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-ENGINEERINGCHANGEDOCUMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-ENGINEERINGCHANGEDOCUMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field CHGTOENGINEERINGCHGDOCUMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-CHGTOENGINEERINGCHGDOCUMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-CHGTOENGINEERINGCHGDOCUMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATN1, internal->external for field BILLOFMATERIALCOMPONENT CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-BILLOFMATERIALCOMPONENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-BILLOFMATERIALCOMPONENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit NUMCV, internal->external for field BILLOFMATERIALITEMNUMBER CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-BILLOFMATERIALITEMNUMBER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-BILLOFMATERIALITEMNUMBER.
WRITE:/ 'New Value:', ld_input.

*Conversion exit CUNIT, internal->external for field BILLOFMATERIALITEMUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-BILLOFMATERIALITEMUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-BILLOFMATERIALITEMUNIT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field DOCNUMBER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-DOCNUMBER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-DOCNUMBER.
WRITE:/ 'New Value:', ld_input.

*Conversion exit CUNIT, internal->external for field OPSLEADTIMEOFFSETUNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-OPSLEADTIMEOFFSETUNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-OPSLEADTIMEOFFSETUNIT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field CREDITOR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-CREDITOR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-CREDITOR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field COSTELEMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-COSTELEMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-COSTELEMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit CUNIT, internal->external for field UNITOFMEASUREFORSIZE1TO3 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_IBOMITEMSTP-UNITOFMEASUREFORSIZE1TO3 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_IBOMITEMSTP-UNITOFMEASUREFORSIZE1TO3.
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_IBOMITEMSTP_STR,
MANDT TYPE STRING,
BILLOFMATERIALITEMUUID TYPE STRING,
BILLOFMATERIAL TYPE STRING,
BILLOFMATERIALCATEGORY TYPE STRING,
BILLOFMATERIALVARIANT TYPE STRING,
BILLOFMATERIALVERSION TYPE STRING,
BILLOFMATERIALITEMNODENUMBER TYPE STRING,
HEADERCHANGEDOCUMENT TYPE STRING,
MATERIAL TYPE STRING,
PLANT TYPE STRING,
BOMITEMINTERNALCHANGECOUNT TYPE STRING,
VALIDITYSTARTDATE TYPE STRING,
VALIDITYENDDATE TYPE STRING,
ENGINEERINGCHANGEDOCFOREDIT TYPE STRING,
ENGINEERINGCHANGEDOCUMENT TYPE STRING,
CHGTOENGINEERINGCHGDOCUMENT TYPE STRING,
INHERITEDNODENUMBERFORBOMITEM TYPE STRING,
BOMITEMRECORDCREATIONDATE TYPE STRING,
BOMITEMCREATEDBYUSER TYPE STRING,
BOMITEMLASTCHANGEDATE TYPE STRING,
BOMITEMLASTCHANGEDBYUSER TYPE STRING,
BILLOFMATERIALCOMPONENT TYPE STRING,
BILLOFMATERIALITEMCATEGORY TYPE STRING,
BILLOFMATERIALITEMNUMBER TYPE STRING,
BILLOFMATERIALITEMUNIT TYPE STRING,
BILLOFMATERIALITEMQUANTITY TYPE STRING,
ISASSEMBLY TYPE STRING,
ISSUBITEM TYPE STRING,
BOMITEMSORTER TYPE STRING,
FIXEDQUANTITY TYPE STRING,
PURCHASINGGROUP TYPE STRING,
CURRENCY TYPE STRING,
MATERIALCOMPONENTPRICE TYPE STRING,
IDENTIFIERBOMITEM TYPE STRING,
MATERIALPRICEUNITQTY TYPE STRING,
COMPONENTSCRAPINPERCENT TYPE STRING,
OPERATIONSCRAPINPERCENT TYPE STRING,
ISNETSCRAP TYPE STRING,
NUMBEROFVARIABLESIZEITEM TYPE STRING,
QUANTITYVARIABLESIZEITEM TYPE STRING,
FORMULAKEY TYPE STRING,
COMPONENTDESCRIPTION TYPE STRING,
BOMITEMDESCRIPTION TYPE STRING,
BOMITEMTEXT2 TYPE STRING,
MATERIALGROUP TYPE STRING,
DOCUMENTTYPE TYPE STRING,
DOCNUMBER TYPE STRING,
DOCUMENTVERSION TYPE STRING,
DOCUMENTPART TYPE STRING,
CLASSNUMBER TYPE STRING,
CLASSTYPE TYPE STRING,
RESULTINGITEMCATEGORY TYPE STRING,
DEPENDENCYOBJECTNUMBER TYPE STRING,
OBJECTTYPE TYPE STRING,
ISCLASSIFICATIONRELEVANT TYPE STRING,
ISBULKMATERIAL TYPE STRING,
BOMITEMISSPAREPART TYPE STRING,
BOMITEMISSALESRELEVANT TYPE STRING,
ISPRODUCTIONRELEVANT TYPE STRING,
BOMITEMISPLANTMAINTRELEVANT TYPE STRING,
BOMITEMISCOSTINGRELEVANT TYPE STRING,
ISENGINEERINGRELEVANT TYPE STRING,
SPECIALPROCUREMENTTYPE TYPE STRING,
ISBOMRECURSIVEALLOWED TYPE STRING,
OPERATIONLEADTIMEOFFSET TYPE STRING,
OPSLEADTIMEOFFSETUNIT TYPE STRING,
ISMATERIALPROVISION TYPE STRING,
BOMISRECURSIVE TYPE STRING,
DOCUMENTISCREATEDBYCAD TYPE STRING,
DISTRKEYCOMPCONSUMPTION TYPE STRING,
DELIVERYDURATIONINDAYS TYPE STRING,
CREDITOR TYPE STRING,
COSTELEMENT TYPE STRING,
SIZE1 TYPE STRING,
SIZE2 TYPE STRING,
SIZE3 TYPE STRING,
UNITOFMEASUREFORSIZE1TO3 TYPE STRING,
GOODSRECEIPTDURATION TYPE STRING,
PURCHASINGORGANIZATION TYPE STRING,
REQUIREDCOMPONENT TYPE STRING,
MULTIPLESELECTIONALLOWED TYPE STRING,
PRODORDERISSUELOCATION TYPE STRING,
MATERIALISCOPRODUCT TYPE STRING,
EXPLOSIONTYPE TYPE STRING,
ALTERNATIVEITEMGROUP TYPE STRING,
FOLLOWUPGROUP TYPE STRING,
DISCONTINUATIONGROUP TYPE STRING,
ISCONFIGURABLEBOM TYPE STRING,
REFERENCEPOINT TYPE STRING,
LEADTIMEOFFSET TYPE STRING,
PRODUCTIONSUPPLYAREA TYPE STRING,
ISDELETED TYPE STRING,
ISALE TYPE STRING,
LASTCHANGEDATETIME TYPE STRING,
BILLOFMATERIALHEADERUUID TYPE STRING,END OF T_EKKO_STR. DATA: WA_IBOMITEMSTP_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_IBOMITEMSTP_STR-MANDT sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALITEMUUID sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIAL sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALCATEGORY sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALVARIANT sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALVERSION sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALITEMNODENUMBER sy-vline
WA_IBOMITEMSTP_STR-HEADERCHANGEDOCUMENT sy-vline
WA_IBOMITEMSTP_STR-MATERIAL sy-vline
WA_IBOMITEMSTP_STR-PLANT sy-vline
WA_IBOMITEMSTP_STR-BOMITEMINTERNALCHANGECOUNT sy-vline
WA_IBOMITEMSTP_STR-VALIDITYSTARTDATE sy-vline
WA_IBOMITEMSTP_STR-VALIDITYENDDATE sy-vline
WA_IBOMITEMSTP_STR-ENGINEERINGCHANGEDOCFOREDIT sy-vline
WA_IBOMITEMSTP_STR-ENGINEERINGCHANGEDOCUMENT sy-vline
WA_IBOMITEMSTP_STR-CHGTOENGINEERINGCHGDOCUMENT sy-vline
WA_IBOMITEMSTP_STR-INHERITEDNODENUMBERFORBOMITEM sy-vline
WA_IBOMITEMSTP_STR-BOMITEMRECORDCREATIONDATE sy-vline
WA_IBOMITEMSTP_STR-BOMITEMCREATEDBYUSER sy-vline
WA_IBOMITEMSTP_STR-BOMITEMLASTCHANGEDATE sy-vline
WA_IBOMITEMSTP_STR-BOMITEMLASTCHANGEDBYUSER sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALCOMPONENT sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALITEMCATEGORY sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALITEMNUMBER sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALITEMUNIT sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALITEMQUANTITY sy-vline
WA_IBOMITEMSTP_STR-ISASSEMBLY sy-vline
WA_IBOMITEMSTP_STR-ISSUBITEM sy-vline
WA_IBOMITEMSTP_STR-BOMITEMSORTER sy-vline
WA_IBOMITEMSTP_STR-FIXEDQUANTITY sy-vline
WA_IBOMITEMSTP_STR-PURCHASINGGROUP sy-vline
WA_IBOMITEMSTP_STR-CURRENCY sy-vline
WA_IBOMITEMSTP_STR-MATERIALCOMPONENTPRICE sy-vline
WA_IBOMITEMSTP_STR-IDENTIFIERBOMITEM sy-vline
WA_IBOMITEMSTP_STR-MATERIALPRICEUNITQTY sy-vline
WA_IBOMITEMSTP_STR-COMPONENTSCRAPINPERCENT sy-vline
WA_IBOMITEMSTP_STR-OPERATIONSCRAPINPERCENT sy-vline
WA_IBOMITEMSTP_STR-ISNETSCRAP sy-vline
WA_IBOMITEMSTP_STR-NUMBEROFVARIABLESIZEITEM sy-vline
WA_IBOMITEMSTP_STR-QUANTITYVARIABLESIZEITEM sy-vline
WA_IBOMITEMSTP_STR-FORMULAKEY sy-vline
WA_IBOMITEMSTP_STR-COMPONENTDESCRIPTION sy-vline
WA_IBOMITEMSTP_STR-BOMITEMDESCRIPTION sy-vline
WA_IBOMITEMSTP_STR-BOMITEMTEXT2 sy-vline
WA_IBOMITEMSTP_STR-MATERIALGROUP sy-vline
WA_IBOMITEMSTP_STR-DOCUMENTTYPE sy-vline
WA_IBOMITEMSTP_STR-DOCNUMBER sy-vline
WA_IBOMITEMSTP_STR-DOCUMENTVERSION sy-vline
WA_IBOMITEMSTP_STR-DOCUMENTPART sy-vline
WA_IBOMITEMSTP_STR-CLASSNUMBER sy-vline
WA_IBOMITEMSTP_STR-CLASSTYPE sy-vline
WA_IBOMITEMSTP_STR-RESULTINGITEMCATEGORY sy-vline
WA_IBOMITEMSTP_STR-DEPENDENCYOBJECTNUMBER sy-vline
WA_IBOMITEMSTP_STR-OBJECTTYPE sy-vline
WA_IBOMITEMSTP_STR-ISCLASSIFICATIONRELEVANT sy-vline
WA_IBOMITEMSTP_STR-ISBULKMATERIAL sy-vline
WA_IBOMITEMSTP_STR-BOMITEMISSPAREPART sy-vline
WA_IBOMITEMSTP_STR-BOMITEMISSALESRELEVANT sy-vline
WA_IBOMITEMSTP_STR-ISPRODUCTIONRELEVANT sy-vline
WA_IBOMITEMSTP_STR-BOMITEMISPLANTMAINTRELEVANT sy-vline
WA_IBOMITEMSTP_STR-BOMITEMISCOSTINGRELEVANT sy-vline
WA_IBOMITEMSTP_STR-ISENGINEERINGRELEVANT sy-vline
WA_IBOMITEMSTP_STR-SPECIALPROCUREMENTTYPE sy-vline
WA_IBOMITEMSTP_STR-ISBOMRECURSIVEALLOWED sy-vline
WA_IBOMITEMSTP_STR-OPERATIONLEADTIMEOFFSET sy-vline
WA_IBOMITEMSTP_STR-OPSLEADTIMEOFFSETUNIT sy-vline
WA_IBOMITEMSTP_STR-ISMATERIALPROVISION sy-vline
WA_IBOMITEMSTP_STR-BOMISRECURSIVE sy-vline
WA_IBOMITEMSTP_STR-DOCUMENTISCREATEDBYCAD sy-vline
WA_IBOMITEMSTP_STR-DISTRKEYCOMPCONSUMPTION sy-vline
WA_IBOMITEMSTP_STR-DELIVERYDURATIONINDAYS sy-vline
WA_IBOMITEMSTP_STR-CREDITOR sy-vline
WA_IBOMITEMSTP_STR-COSTELEMENT sy-vline
WA_IBOMITEMSTP_STR-SIZE1 sy-vline
WA_IBOMITEMSTP_STR-SIZE2 sy-vline
WA_IBOMITEMSTP_STR-SIZE3 sy-vline
WA_IBOMITEMSTP_STR-UNITOFMEASUREFORSIZE1TO3 sy-vline
WA_IBOMITEMSTP_STR-GOODSRECEIPTDURATION sy-vline
WA_IBOMITEMSTP_STR-PURCHASINGORGANIZATION sy-vline
WA_IBOMITEMSTP_STR-REQUIREDCOMPONENT sy-vline
WA_IBOMITEMSTP_STR-MULTIPLESELECTIONALLOWED sy-vline
WA_IBOMITEMSTP_STR-PRODORDERISSUELOCATION sy-vline
WA_IBOMITEMSTP_STR-MATERIALISCOPRODUCT sy-vline
WA_IBOMITEMSTP_STR-EXPLOSIONTYPE sy-vline
WA_IBOMITEMSTP_STR-ALTERNATIVEITEMGROUP sy-vline
WA_IBOMITEMSTP_STR-FOLLOWUPGROUP sy-vline
WA_IBOMITEMSTP_STR-DISCONTINUATIONGROUP sy-vline
WA_IBOMITEMSTP_STR-ISCONFIGURABLEBOM sy-vline
WA_IBOMITEMSTP_STR-REFERENCEPOINT sy-vline
WA_IBOMITEMSTP_STR-LEADTIMEOFFSET sy-vline
WA_IBOMITEMSTP_STR-PRODUCTIONSUPPLYAREA sy-vline
WA_IBOMITEMSTP_STR-ISDELETED sy-vline
WA_IBOMITEMSTP_STR-ISALE sy-vline
WA_IBOMITEMSTP_STR-LASTCHANGEDATETIME sy-vline
WA_IBOMITEMSTP_STR-BILLOFMATERIALHEADERUUID sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.