ABAP Select data from SAP table /SCDL/MP_DR_SORT_SUBITEM_STR 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 /SCDL/MP_DR_SORT_SUBITEM_STR 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 /SCDL/MP_DR_SORT_SUBITEM_STR. 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 /SCDL/MP_DR_SORT_SUBITEM_STR 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_/SCDL/MP_DR_SORT_SUBITEM_STR TYPE STANDARD TABLE OF /SCDL/MP_DR_SORT_SUBITEM_STR,
      WA_/SCDL/MP_DR_SORT_SUBITEM_STR TYPE /SCDL/MP_DR_SORT_SUBITEM_STR,
      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: </SCDL/MP_DR_SORT_SUBITEM_STR> TYPE /SCDL/MP_DR_SORT_SUBITEM_STR.

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

SELECT *
*restrict ABAP select to first 10 rows
 UP TO 10 ROWS      
  FROM /SCDL/MP_DR_SORT_SUBITEM_STR
  INTO TABLE IT_/SCDL/MP_DR_SORT_SUBITEM_STR.

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM /SCDL/MP_DR_SORT_SUBITEM_STR
*  INTO TABLE @DATA(IT_/SCDL/MP_DR_SORT_SUBITEM_STR2).
*--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_/SCDL/MP_DR_SORT_SUBITEM_STR INDEX 1 INTO DATA(WA_/SCDL/MP_DR_SORT_SUBITEM_STR2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SCDL/MP_DR_SORT_SUBITEM_STR ASSIGNING </SCDL/MP_DR_SORT_SUBITEM_STR>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SCDL/MP_DR_SORT_SUBITEM_STR>-ITEM = 1.
</SCDL/MP_DR_SORT_SUBITEM_STR>-S_CTRL = 1.
</SCDL/MP_DR_SORT_SUBITEM_STR>-ACTION_CODE = 1.
</SCDL/MP_DR_SORT_SUBITEM_STR>-UPD_CTRL = 1.
</SCDL/MP_DR_SORT_SUBITEM_STR>-QTY = 1.
ENDLOOP.

LOOP AT IT_/SCDL/MP_DR_SORT_SUBITEM_STR INTO WA_/SCDL/MP_DR_SORT_SUBITEM_STR.
*Write horizonal line to screen report.
  WRITE:/ sy-uline.

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SCDL/MP_DR_SORT_SUBITEM_STR-ADDMEAS, sy-vline,
WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCT, sy-vline,
WA_/SCDL/MP_DR_SORT_SUBITEM_STR-STOCK, sy-vline,
WA_/SCDL/MP_DR_SORT_SUBITEM_STR-SAPEXT, sy-vline,
WA_/SCDL/MP_DR_SORT_SUBITEM_STR-DELTERM, sy-vline,
WA_/SCDL/MP_DR_SORT_SUBITEM_STR-HIERARCHY, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SCDL/MP_DR_SORT_SUBITEM_STR 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_/SCDL/MP_DR_SORT_SUBITEM_STR 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_/SCDL/MP_DR_SORT_SUBITEM_STR INTO WA_/SCDL/MP_DR_SORT_SUBITEM_STR. *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 TSTPS, internal->external for field CRETST CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-CRETST IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-CRETST.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTPS, internal->external for field CHGTST CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-CHGTST IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-CHGTST.
WRITE:/ 'New Value:', ld_input.

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

*Conversion exit SCDL1, internal->external for field PRODUCTNO_EXT CALL FUNCTION 'CONVERSION_EXIT_SCDL1_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTNO_EXT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTNO_EXT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit SCDL1, internal->external for field PRODUCTENT CALL FUNCTION 'CONVERSION_EXIT_SCDL1_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit BPMAP, internal->external for field STOCK_OWNER CALL FUNCTION 'CONVERSION_EXIT_BPMAP_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-STOCK_OWNER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-STOCK_OWNER.
WRITE:/ 'New Value:', ld_input.

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

*Conversion exit TSTPS, internal->external for field TSTFRPD CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTFRPD IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTFRPD.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTPS, internal->external for field TSTTOPD CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTTOPD IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTTOPD.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTPS, internal->external for field TSTFRBB CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTFRBB IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTFRBB.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTPS, internal->external for field TSTTOBB CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTTOBB IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTTOBB.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTPS, internal->external for field TSTFRSE CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTFRSE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTFRSE.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTPS, internal->external for field TSTTOSE CALL FUNCTION 'CONVERSION_EXIT_TSTPS_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTTOSE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-TSTTOSE.
WRITE:/ 'New Value:', ld_input.

*Conversion exit PSID, internal->external for field PACKSPEC CALL FUNCTION 'CONVERSION_EXIT_PSID_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PACKSPEC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PACKSPEC.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

*Conversion exit BPMAP, internal->external for field STOCK_OWNER CALL FUNCTION 'CONVERSION_EXIT_BPMAP_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-STOCK_OWNER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-STOCK_OWNER.
WRITE:/ 'New Value:', ld_input.

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

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

*Conversion exit SCDL1, internal->external for field PRODUCTNO_EXT CALL FUNCTION 'CONVERSION_EXIT_SCDL1_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTNO_EXT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTNO_EXT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit SCDL1, internal->external for field PRODUCTENT CALL FUNCTION 'CONVERSION_EXIT_SCDL1_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTENT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-PRODUCTENT.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ALPHA, internal->external for field ITEMNO CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/SCDL/MP_DR_SORT_SUBITEM_STR-ITEMNO IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCDL/MP_DR_SORT_SUBITEM_STR-ITEMNO.
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_/SCDL/MP_DR_SORT_SUBITEM_STR_STR,
ITEM TYPE STRING,
S_CTRL TYPE STRING,
ACTION_CODE TYPE STRING,
UPD_CTRL TYPE STRING,
QTY TYPE STRING,
ADDMEAS TYPE STRING,
PRODUCT TYPE STRING,
STOCK TYPE STRING,
SAPEXT TYPE STRING,
DELTERM TYPE STRING,
HIERARCHY TYPE STRING,
PARTYLOC TYPE STRING,
PARTNER_ADRESS TYPE STRING,
DATES TYPE STRING,
CHVAL TYPE STRING,
TEXTS TYPE STRING,
SERIAL TYPE STRING,
EEW TYPE STRING,
T_KEYMAP_ITEM TYPE STRING,
V_ITEMCAT TYPE STRING,
V_ITEMTYPE TYPE STRING,
S_ADMIN TYPE STRING,
CRETST TYPE STRING,
CREUSR TYPE STRING,
CHGTST TYPE STRING,
CHGUSR TYPE STRING,
CHGVERSION TYPE STRING,
T_PARTYLOC TYPE STRING,
S_PRODUCT TYPE STRING,
PRODUCTID TYPE STRING,
PRODUCTNO TYPE STRING,
BATCHNO TYPE STRING,
PRODUCTNO_EXT TYPE STRING,
PRODUCTENT TYPE STRING,
PRODUCT_TEXT TYPE STRING,
T_PRODUCT_EXT TYPE STRING,
T_REFDOC TYPE STRING,
T_DATE TYPE STRING,
T_ADDMEAS TYPE STRING,
T_STATUS TYPE STRING,
S_DELTERM TYPE STRING,
TOL_UNDERPCT TYPE STRING,
TOL_OVERPCT TYPE STRING,
TOL_OVERUNLTD TYPE STRING,
PART_DEL_NUM TYPE STRING,
PART_DEL_UNLTD TYPE STRING,
PRIORITY TYPE STRING,
SERVICE_LEVEL TYPE STRING,
S_STOCK TYPE STRING,
STOCK_USAGE TYPE STRING,
STOCK_CATEGORY TYPE STRING,
STOCK_OWNER TYPE STRING,
STOCK_OWNER_ROLE TYPE STRING,
STOCK_CAT_IND TYPE STRING,
STOCK_REL TYPE STRING,
T_ACCOUNT TYPE STRING,
T_HIERARCHY TYPE STRING,
S_QTY TYPE STRING,
QTY TYPE STRING,
UOM TYPE STRING,
S_EEW TYPE STRING,
/SCDL/DR_ITEM TYPE STRING,
S_SAPEXT TYPE STRING,
SAP TYPE STRING,
TZONEPD TYPE STRING,
TSTFRPD TYPE STRING,
TSTTOPD TYPE STRING,
TZONEBB TYPE STRING,
TSTFRBB TYPE STRING,
TSTTOBB TYPE STRING,
TZONESE TYPE STRING,
TSTFRSE TYPE STRING,
TSTTOSE TYPE STRING,
PACKSPEC TYPE STRING,
PACKSPECNO TYPE STRING,
OCOUNTRY TYPE STRING,
PRODMD_CHANGENO TYPE STRING,
BATCHNO_IND TYPE STRING,
ENTITLED TYPE STRING,
ENTITLED_ROLE TYPE STRING,
STOCK_DOCCAT TYPE STRING,
STOCK_DOCNO TYPE STRING,
STOCK_ITMNO TYPE STRING,
/SCWM/WAVEPRIO TYPE STRING,
/SCWM/PACKCONS TYPE STRING,
/SCWM/SCRAPPIND TYPE STRING,
/SCWM/INVOICE_GI TYPE STRING,
/SCWM/FLUP_BLOCK TYPE STRING,
/SCWM/FLUP_CNTRL TYPE STRING,
/SCWM/CUOBJ_BT TYPE STRING,
/SCWM/CLASS_BT TYPE STRING,
/SCWM/TOL_REF TYPE STRING,
/SCWM/MEDI_PROC TYPE STRING,
/SCWM/PSA TYPE STRING,
/SCWM/PSA_IND TYPE STRING,
/SCWM/POD_REL TYPE STRING,
/SCWM/CREA_PROCESS TYPE STRING,
QTY_NUM_REF TYPE STRING,
QTY_DENOM_REF TYPE STRING,
/SCWM/RCLOC TYPE STRING,
/SCWM/GOODS_RECIPIENT TYPE STRING,
ROUTE_ID TYPE STRING,
STOCK_TO TYPE STRING,
STOCK_USAGE TYPE STRING,
STOCK_CATEGORY TYPE STRING,
STOCK_OWNER TYPE STRING,
STOCK_OWNER_ROLE TYPE STRING,
STOCK_CAT_IND TYPE STRING,
STOCK_REL TYPE STRING,
ENTITLED TYPE STRING,
ENTITLED_ROLE TYPE STRING,
STOCK_DOCCAT TYPE STRING,
STOCK_DOCNO TYPE STRING,
STOCK_ITMNO TYPE STRING,
PRODUCT_TO TYPE STRING,
PRODUCTID TYPE STRING,
PRODUCTNO TYPE STRING,
BATCHNO TYPE STRING,
PRODUCTNO_EXT TYPE STRING,
PRODUCTENT TYPE STRING,
PRODUCT_TEXT TYPE STRING,
PRODUCT_DET_TO TYPE STRING,
PRODMD_CHANGENO TYPE STRING,
VALI_ERR_ERP TYPE STRING,
TEXT_HEADER TYPE STRING,
TEXT_LINES TYPE STRING,
PARTNER_ADRESS TYPE STRING,
CHCLASS_IN TYPE STRING,
BATCH_ATTRIBUTES TYPE STRING,
BATCH_VALUES_CHAR TYPE STRING,
BATCH_VALUES_CURR TYPE STRING,
BATCH_VALUES_NUM TYPE STRING,
FOLLOW_UP_CODE TYPE STRING,
T_SERIDS TYPE STRING,
CHVAL_BATCH TYPE STRING,
CLASS_TYPE TYPE STRING,
CLASS TYPE STRING,
STATUS TYPE STRING,
OBJECTKEY_BT TYPE STRING,
VAL_CHAR TYPE STRING,
VAL_NUM TYPE STRING,
VAL_CURR TYPE STRING,
PROCESSED TYPE STRING,
ITEMID TYPE STRING,
ITEMNO TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SCDL/MP_DR_SORT_SUBITEM_STR_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_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ITEM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_CTRL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ACTION_CODE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-UPD_CTRL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-QTY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ADDMEAS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-SAPEXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-DELTERM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-HIERARCHY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PARTYLOC sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PARTNER_ADRESS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-DATES sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CHVAL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TEXTS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-SERIAL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-EEW sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_KEYMAP_ITEM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-V_ITEMCAT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-V_ITEMTYPE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_ADMIN sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CRETST sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CREUSR sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CHGTST sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CHGUSR sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CHGVERSION sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_PARTYLOC sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_PRODUCT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTID sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCHNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTNO_EXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTENT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCT_TEXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_PRODUCT_EXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_REFDOC sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_DATE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_ADDMEAS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_STATUS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_DELTERM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TOL_UNDERPCT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TOL_OVERPCT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TOL_OVERUNLTD sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PART_DEL_NUM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PART_DEL_UNLTD sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRIORITY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-SERVICE_LEVEL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_STOCK sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_USAGE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_CATEGORY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_OWNER sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_OWNER_ROLE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_CAT_IND sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_REL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_ACCOUNT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_HIERARCHY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_QTY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-QTY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-UOM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_EEW sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCDL/DR_ITEM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-S_SAPEXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-SAP sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TZONEPD sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TSTFRPD sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TSTTOPD sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TZONEBB sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TSTFRBB sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TSTTOBB sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TZONESE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TSTFRSE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TSTTOSE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PACKSPEC sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PACKSPECNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-OCOUNTRY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODMD_CHANGENO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCHNO_IND sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ENTITLED sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ENTITLED_ROLE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_DOCCAT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_DOCNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_ITMNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/WAVEPRIO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/PACKCONS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/SCRAPPIND sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/INVOICE_GI sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/FLUP_BLOCK sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/FLUP_CNTRL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/CUOBJ_BT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/CLASS_BT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/TOL_REF sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/MEDI_PROC sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/PSA sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/PSA_IND sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/POD_REL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/CREA_PROCESS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-QTY_NUM_REF sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-QTY_DENOM_REF sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/RCLOC sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-/SCWM/GOODS_RECIPIENT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ROUTE_ID sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_TO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_USAGE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_CATEGORY sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_OWNER sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_OWNER_ROLE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_CAT_IND sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_REL sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ENTITLED sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ENTITLED_ROLE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_DOCCAT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_DOCNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STOCK_ITMNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCT_TO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTID sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCHNO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTNO_EXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCTENT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCT_TEXT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODUCT_DET_TO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PRODMD_CHANGENO sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-VALI_ERR_ERP sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TEXT_HEADER sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-TEXT_LINES sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PARTNER_ADRESS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CHCLASS_IN sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCH_ATTRIBUTES sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCH_VALUES_CHAR sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCH_VALUES_CURR sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-BATCH_VALUES_NUM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-FOLLOW_UP_CODE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-T_SERIDS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CHVAL_BATCH sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CLASS_TYPE sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-CLASS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-STATUS sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-OBJECTKEY_BT sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-VAL_CHAR sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-VAL_NUM sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-VAL_CURR sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-PROCESSED sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ITEMID sy-vline
WA_/SCDL/MP_DR_SORT_SUBITEM_STR_STR-ITEMNO sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.