ABAP Select data from SAP table PEBOCHDITMCST 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 PEBOCHDITMCST 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 PEBOCHDITMCST. 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 PEBOCHDITMCST 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_PEBOCHDITMCST TYPE STANDARD TABLE OF PEBOCHDITMCST,
      WA_PEBOCHDITMCST TYPE PEBOCHDITMCST,
      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: <PEBOCHDITMCST> TYPE PEBOCHDITMCST.

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

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

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM PEBOCHDITMCST
*  INTO TABLE @DATA(IT_PEBOCHDITMCST2).
*--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_PEBOCHDITMCST INDEX 1 INTO DATA(WA_PEBOCHDITMCST2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_PEBOCHDITMCST ASSIGNING <PEBOCHDITMCST>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<PEBOCHDITMCST>-MANDT = 1.
<PEBOCHDITMCST>-COSTELEMENT = 1.
<PEBOCHDITMCST>-CTRLGORIGINCLASSIFICATION = 1.
<PEBOCHDITMCST>-CONTROLLINGDEBITCREDITCODE = 1.
<PEBOCHDITMCST>-MFGORDERBUSTRANSACTIONTYPE = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_PEBOCHDITMCST-ORIGINCOSTCENTER, sy-vline,
WA_PEBOCHDITMCST-ORIGINCOSTCTRACTIVITYTYPE, sy-vline,
WA_PEBOCHDITMCST-ORIGINBUSINESSPROCESS, sy-vline,
WA_PEBOCHDITMCST-ORIGINORDER, sy-vline,
WA_PEBOCHDITMCST-COSTORIGINTYPE, sy-vline,
WA_PEBOCHDITMCST-ORIGINOBJECT, sy-vline.
ENDLOOP. *Add any further fields from structure WA_PEBOCHDITMCST 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_PEBOCHDITMCST 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_PEBOCHDITMCST INTO WA_PEBOCHDITMCST. *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 COSTELEMENT CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PEBOCHDITMCST-COSTELEMENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PEBOCHDITMCST-COSTELEMENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit BEKNZ, internal->external for field CONTROLLINGDEBITCREDITCODE CALL FUNCTION 'CONVERSION_EXIT_BEKNZ_OUTPUT' EXPORTING input = WA_PEBOCHDITMCST-CONTROLLINGDEBITCREDITCODE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PEBOCHDITMCST-CONTROLLINGDEBITCREDITCODE.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

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

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

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

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

*Conversion exit ALPHA, internal->external for field SALESORDER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_PEBOCHDITMCST-SALESORDER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PEBOCHDITMCST-SALESORDER.
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_PEBOCHDITMCST_STR,
MANDT TYPE STRING,
COSTELEMENT TYPE STRING,
CTRLGORIGINCLASSIFICATION TYPE STRING,
CONTROLLINGDEBITCREDITCODE TYPE STRING,
MFGORDERBUSTRANSACTIONTYPE TYPE STRING,
ORIGINCOSTCENTER TYPE STRING,
ORIGINCOSTCTRACTIVITYTYPE TYPE STRING,
ORIGINBUSINESSPROCESS TYPE STRING,
ORIGINORDER TYPE STRING,
COSTORIGINTYPE TYPE STRING,
ORIGINOBJECT TYPE STRING,
COSTORIGINGROUP TYPE STRING,
PARTNERCOSTCENTER TYPE STRING,
PARTNERCOSTCTRACTIVITYTYPE TYPE STRING,
PARTNERBUSINESSPROCESS TYPE STRING,
PARTNERORDER TYPE STRING,
PARTNERCOSTOBJECT TYPE STRING,
UNITOFMEASURE TYPE STRING,
MATERIAL TYPE STRING,
ISLOTSIZEINDEPENDENT TYPE STRING,
SUBLEDGERACCTLINEITEMTYPE TYPE STRING,
RATIOUNIT TYPE STRING,
DISPLAYCURRENCY TYPE STRING,
CONTROLLINGAREA TYPE STRING,
COMPANYCODE TYPE STRING,
PROFITCENTER TYPE STRING,
RESPONSIBLECOSTCENTER TYPE STRING,
ORDERCATEGORY TYPE STRING,
ORDERTYPE TYPE STRING,
PLANT TYPE STRING,
SALESORDER TYPE STRING,
CHARTOFACCOUNTS TYPE STRING,
VALIDITYDATE TYPE STRING,
CREDITACTLCOSTINDSPCRCY TYPE STRING,
DEBITACTLCOSTINDSPCRCY TYPE STRING,
ACTLCOSTINDSPCRCY TYPE STRING,
CRDTACTLFXDCOSTINDSPCRCY TYPE STRING,
DEBITACTLFXDCOSTINDSPCRCY TYPE STRING,
ACTLFIXEDCOSTINDSPCRCY TYPE STRING,
CRDTACTLVARBLCOSTINDSPCRCY TYPE STRING,
DEBITACTLVARBLCOSTINDSPCRCY TYPE STRING,
ACTLVARBLCOSTINDSPCRCY TYPE STRING,
ACTUALQTYINCOSTSOURCEUNIT TYPE STRING,
CREDITPLANCOSTINDSPCRCY TYPE STRING,
DEBITPLANCOSTINDSPCRCY TYPE STRING,
PLANCOSTINDSPCRCY TYPE STRING,
CRDTPLNFXDCOSTINDSPCRCY TYPE STRING,
DEBITPLNFXDCOSTINDSPCRCY TYPE STRING,
PLANFIXEDCOSTINDSPCRCY TYPE STRING,
CRDTPLNVARBLCOSTINDSPCRCY TYPE STRING,
DEBITPLNVARBLCOSTINDSPCRCY TYPE STRING,
PLANVARBLCOSTINDSPCRCY TYPE STRING,
PLANQTYINCOSTSOURCEUNIT TYPE STRING,
CRDTTARGETCOSTINDSPCRCY TYPE STRING,
DEBITTARGETCOSTINDSPCRCY TYPE STRING,
TARGETCOSTINDSPCRCY TYPE STRING,
TARGETQTYINCOSTSOURCEUNIT TYPE STRING,
CRDTPLANCTRLCOSTINDSPCRCY TYPE STRING,
DEBITPLANCTRLCOSTINDSPCRCY TYPE STRING,
PLANCTRLCOSTINDSPCRCY TYPE STRING,
PLANCTRLQTYINCOSTSOURCEUNIT TYPE STRING,
CRDTACTLCTRLCOSTINDSPCRCY TYPE STRING,
DEBITACTLCTRLCOSTINDSPCRCY TYPE STRING,
ACTLCTRLCOSTINDSPCRCY TYPE STRING,
ACTLCTRLQTYINCOSTSOURCEUNIT TYPE STRING,
COSTVARIANCEINDSPCRCY TYPE STRING,
INPTPRVARCAMTINDSPCRCY TYPE STRING,
INPTQTYVARCAMTINDSPCRCY TYPE STRING,
RSCEUSGEVARCAMTINDSPCRCY TYPE STRING,
LOTSIZEVARCAMTINDSPCRCY TYPE STRING,
RMNGVARCAMTINDSPCRCY TYPE STRING,
WIPCOSTINDSPCRCY TYPE STRING,
UNRLZDCOSTRSRVAMTINDSPCRCY TYPE STRING,
TOTALWIPAMOUNTINDSPCRCY TYPE STRING,
WIPQUANTITY TYPE STRING,
DEBITACTLPLNDIFFCOSTINDSPCRCY TYPE STRING,
DEBITACTLPLANDIFFPERCENT TYPE STRING,
ACTLPLNDIFFCOSTINDSPCRCY TYPE STRING,
DSPCRCYACTLPLANDIFFPCT TYPE STRING,
ACTLPLANDIFFQUANTITY TYPE STRING,
ACTLPLANDIFFQTYPCT TYPE STRING,
DEBITACTLTGTDIFFCOSTINDSPCRCY TYPE STRING,
DEBITACTLTGTDIFFPERCENT TYPE STRING,
ACTLTGTDIFFCOSTINDSPCRCY TYPE STRING,
ACTLTGTDIFFQUANTITY TYPE STRING,
DSPCRCYACTLTGTDIFFPCT TYPE STRING,
ACTLTGTDIFFQTYPCT TYPE STRING,
PLNCTRLTGTDIFFCOSTINDSPCRCY TYPE STRING,
DSPCRCYPLNCTRLTGTDIFFPCT TYPE STRING,
ACTLCTRLTGTDIFFCOSTINDSPCRCY TYPE STRING,
DSPCRCYACTLCTRLTGTDIFFPCT TYPE STRING,
COSTCOMPONENT TYPE STRING,
COSTCOMPONENTGROUP TYPE STRING,
COSTCOMPONENTGROUPNAME TYPE STRING,
COSTCOMPONENTSTRUCTURE TYPE STRING,END OF T_EKKO_STR. DATA: WA_PEBOCHDITMCST_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_PEBOCHDITMCST_STR-MANDT sy-vline
WA_PEBOCHDITMCST_STR-COSTELEMENT sy-vline
WA_PEBOCHDITMCST_STR-CTRLGORIGINCLASSIFICATION sy-vline
WA_PEBOCHDITMCST_STR-CONTROLLINGDEBITCREDITCODE sy-vline
WA_PEBOCHDITMCST_STR-MFGORDERBUSTRANSACTIONTYPE sy-vline
WA_PEBOCHDITMCST_STR-ORIGINCOSTCENTER sy-vline
WA_PEBOCHDITMCST_STR-ORIGINCOSTCTRACTIVITYTYPE sy-vline
WA_PEBOCHDITMCST_STR-ORIGINBUSINESSPROCESS sy-vline
WA_PEBOCHDITMCST_STR-ORIGINORDER sy-vline
WA_PEBOCHDITMCST_STR-COSTORIGINTYPE sy-vline
WA_PEBOCHDITMCST_STR-ORIGINOBJECT sy-vline
WA_PEBOCHDITMCST_STR-COSTORIGINGROUP sy-vline
WA_PEBOCHDITMCST_STR-PARTNERCOSTCENTER sy-vline
WA_PEBOCHDITMCST_STR-PARTNERCOSTCTRACTIVITYTYPE sy-vline
WA_PEBOCHDITMCST_STR-PARTNERBUSINESSPROCESS sy-vline
WA_PEBOCHDITMCST_STR-PARTNERORDER sy-vline
WA_PEBOCHDITMCST_STR-PARTNERCOSTOBJECT sy-vline
WA_PEBOCHDITMCST_STR-UNITOFMEASURE sy-vline
WA_PEBOCHDITMCST_STR-MATERIAL sy-vline
WA_PEBOCHDITMCST_STR-ISLOTSIZEINDEPENDENT sy-vline
WA_PEBOCHDITMCST_STR-SUBLEDGERACCTLINEITEMTYPE sy-vline
WA_PEBOCHDITMCST_STR-RATIOUNIT sy-vline
WA_PEBOCHDITMCST_STR-DISPLAYCURRENCY sy-vline
WA_PEBOCHDITMCST_STR-CONTROLLINGAREA sy-vline
WA_PEBOCHDITMCST_STR-COMPANYCODE sy-vline
WA_PEBOCHDITMCST_STR-PROFITCENTER sy-vline
WA_PEBOCHDITMCST_STR-RESPONSIBLECOSTCENTER sy-vline
WA_PEBOCHDITMCST_STR-ORDERCATEGORY sy-vline
WA_PEBOCHDITMCST_STR-ORDERTYPE sy-vline
WA_PEBOCHDITMCST_STR-PLANT sy-vline
WA_PEBOCHDITMCST_STR-SALESORDER sy-vline
WA_PEBOCHDITMCST_STR-CHARTOFACCOUNTS sy-vline
WA_PEBOCHDITMCST_STR-VALIDITYDATE sy-vline
WA_PEBOCHDITMCST_STR-CREDITACTLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-CRDTACTLFXDCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLFXDCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTLFIXEDCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-CRDTACTLVARBLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLVARBLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTLVARBLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTUALQTYINCOSTSOURCEUNIT sy-vline
WA_PEBOCHDITMCST_STR-CREDITPLANCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITPLANCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-PLANCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-CRDTPLNFXDCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITPLNFXDCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-PLANFIXEDCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-CRDTPLNVARBLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITPLNVARBLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-PLANVARBLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-PLANQTYINCOSTSOURCEUNIT sy-vline
WA_PEBOCHDITMCST_STR-CRDTTARGETCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITTARGETCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-TARGETCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-TARGETQTYINCOSTSOURCEUNIT sy-vline
WA_PEBOCHDITMCST_STR-CRDTPLANCTRLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITPLANCTRLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-PLANCTRLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-PLANCTRLQTYINCOSTSOURCEUNIT sy-vline
WA_PEBOCHDITMCST_STR-CRDTACTLCTRLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLCTRLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTLCTRLCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTLCTRLQTYINCOSTSOURCEUNIT sy-vline
WA_PEBOCHDITMCST_STR-COSTVARIANCEINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-INPTPRVARCAMTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-INPTQTYVARCAMTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-RSCEUSGEVARCAMTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-LOTSIZEVARCAMTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-RMNGVARCAMTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-WIPCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-UNRLZDCOSTRSRVAMTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-TOTALWIPAMOUNTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-WIPQUANTITY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLPLNDIFFCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLPLANDIFFPERCENT sy-vline
WA_PEBOCHDITMCST_STR-ACTLPLNDIFFCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DSPCRCYACTLPLANDIFFPCT sy-vline
WA_PEBOCHDITMCST_STR-ACTLPLANDIFFQUANTITY sy-vline
WA_PEBOCHDITMCST_STR-ACTLPLANDIFFQTYPCT sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLTGTDIFFCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DEBITACTLTGTDIFFPERCENT sy-vline
WA_PEBOCHDITMCST_STR-ACTLTGTDIFFCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-ACTLTGTDIFFQUANTITY sy-vline
WA_PEBOCHDITMCST_STR-DSPCRCYACTLTGTDIFFPCT sy-vline
WA_PEBOCHDITMCST_STR-ACTLTGTDIFFQTYPCT sy-vline
WA_PEBOCHDITMCST_STR-PLNCTRLTGTDIFFCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DSPCRCYPLNCTRLTGTDIFFPCT sy-vline
WA_PEBOCHDITMCST_STR-ACTLCTRLTGTDIFFCOSTINDSPCRCY sy-vline
WA_PEBOCHDITMCST_STR-DSPCRCYACTLCTRLTGTDIFFPCT sy-vline
WA_PEBOCHDITMCST_STR-COSTCOMPONENT sy-vline
WA_PEBOCHDITMCST_STR-COSTCOMPONENTGROUP sy-vline
WA_PEBOCHDITMCST_STR-COSTCOMPONENTGROUPNAME sy-vline
WA_PEBOCHDITMCST_STR-COSTCOMPONENTSTRUCTURE sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.