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

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

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

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


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SAPAPO/EXT_MATKEY ASSIGNING </SAPAPO/EXT_MATKEY>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SAPAPO/EXT_MATKEY>-METHOD = 1.
</SAPAPO/EXT_MATKEY>-EXT_MATNR = 1.
</SAPAPO/EXT_MATKEY>-PRODUCT_TYPE = 1.
</SAPAPO/EXT_MATKEY>-MATGUID = 1.
</SAPAPO/EXT_MATKEY>-MATNRLONG = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SAPAPO/EXT_MATKEY-MATVERS, sy-vline,
WA_/SAPAPO/EXT_MATKEY-MEINS, sy-vline,
WA_/SAPAPO/EXT_MATKEY-ATTYP, sy-vline,
WA_/SAPAPO/EXT_MATKEY-LOGUNIT, sy-vline,
WA_/SAPAPO/EXT_MATKEY-CWREL, sy-vline,
WA_/SAPAPO/EXT_MATKEY-TY2TQ, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SAPAPO/EXT_MATKEY 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_/SAPAPO/EXT_MATKEY 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_/SAPAPO/EXT_MATKEY INTO WA_/SAPAPO/EXT_MATKEY. *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 MATN1, internal->external for field MATNRLONG CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-MATNRLONG IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-MATNRLONG.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

*Conversion exit TSTRG, internal->external for field SHELF_LIFE_DUR CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-SHELF_LIFE_DUR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-SHELF_LIFE_DUR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTRG, internal->external for field MATURITY_DUR CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-MATURITY_DUR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-MATURITY_DUR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTRG, internal->external for field SHLF_LFE_REQ_MIN CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-SHLF_LFE_REQ_MIN IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-SHLF_LFE_REQ_MIN.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTRG, internal->external for field SHLF_LFE_REQ_MAX CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-SHLF_LFE_REQ_MAX IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-SHLF_LFE_REQ_MAX.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTLC, internal->external for field DATA_CHECK_AT CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-DATA_CHECK_AT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-DATA_CHECK_AT.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

*Conversion exit TSTLC, internal->external for field CREATEUTC CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-CREATEUTC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-CREATEUTC.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTLC, internal->external for field CHANGEUTC CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SAPAPO/EXT_MATKEY-CHANGEUTC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SAPAPO/EXT_MATKEY-CHANGEUTC.
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_/SAPAPO/EXT_MATKEY_STR,
METHOD TYPE STRING,
EXT_MATNR TYPE STRING,
PRODUCT_TYPE TYPE STRING,
MATGUID TYPE STRING,
MATNRLONG TYPE STRING,
MATVERS TYPE STRING,
MEINS TYPE STRING,
ATTYP TYPE STRING,
LOGUNIT TYPE STRING,
CWREL TYPE STRING,
TY2TQ TYPE STRING,
BRGEW TYPE STRING,
NTGEW TYPE STRING,
GEWEI TYPE STRING,
VOLUM TYPE STRING,
VOLEH TYPE STRING,
SHELF_LIFE_FLAG TYPE STRING,
SHELF_LIFE_DUR TYPE STRING,
MATURITY_DUR TYPE STRING,
SHLF_LFE_REQ_MIN TYPE STRING,
SHLF_LFE_REQ_MAX TYPE STRING,
MHDLP TYPE STRING,
IPRKZ TYPE STRING,
SLED_BBD TYPE STRING,
SLDRND TYPE STRING,
ATT01 TYPE STRING,
ATT02 TYPE STRING,
ATT03 TYPE STRING,
ATT04 TYPE STRING,
ATT05 TYPE STRING,
BOD_DEPLVL TYPE STRING,
EXCL_EXPEDITE TYPE STRING,
PROD_PAOOPT TYPE STRING,
RESTRICT_INVBAL TYPE STRING,
DRP_GL_STOCK TYPE STRING,
MATKL TYPE STRING,
COMPL TYPE STRING,
STFAC TYPE STRING,
TRAGR TYPE STRING,
TS_SDP_USE TYPE STRING,
PRDHA TYPE STRING,
GTIN_IND TYPE STRING,
DISPLAY TYPE STRING,
HERKL TYPE STRING,
BATCH_REQ TYPE STRING,
KITCOMP TYPE STRING,
PRDSET_IND TYPE STRING,
SERIAL TYPE STRING,
DATA_CHECK_BY TYPE STRING,
DATA_CHECK_AT TYPE STRING,
KOSCH TYPE STRING,
KOSCH_GRP TYPE STRING,
VMIKOSCH TYPE STRING,
VMIKOSCH_GRP TYPE STRING,
TEMPRPBLOCK TYPE STRING,
TEMPRPFROM TYPE STRING,
TEMPRPTO TYPE STRING,
MAXW TYPE STRING,
MAXW_UOM TYPE STRING,
MAXW_TOL TYPE STRING,
MAXV TYPE STRING,
MAXV_UOM TYPE STRING,
MAXV_TOL TYPE STRING,
PMTYP TYPE STRING,
CLOSED_PM TYPE STRING,
MAX_FILL_UP TYPE STRING,
HUTYP TYPE STRING,
TARE_VAR TYPE STRING,
MAXC TYPE STRING,
MAXC_TOL TYPE STRING,
MAXL TYPE STRING,
MAXB TYPE STRING,
MAXH TYPE STRING,
MAXDIM_UOM TYPE STRING,
PS_SMARTFORM TYPE STRING,
PS_PDF_FORM TYPE STRING,
PILFERABLE TYPE STRING,
WHMATGR TYPE STRING,
WHSTC TYPE STRING,
HNDLCODE TYPE STRING,
ENVREL TYPE STRING,
DGPROFL TYPE STRING,
HAZMAT TYPE STRING,
ITMTPG TYPE STRING,
MFRGR TYPE STRING,
QQTIME TYPE STRING,
QQTIMEUOM TYPE STRING,
QGRP TYPE STRING,
CWTOLGR TYPE STRING,
CWPROC TYPE STRING,
MEDI_APROF TYPE STRING,
PUOM TYPE STRING,
CLASS TYPE STRING,
KLART TYPE STRING,
PLANT_BATCH_HANDLING TYPE STRING,
NEWPROD_INDI TYPE STRING,
NEWMODEL_INDI TYPE STRING,
PRD_STARTDT TYPE STRING,
PRD_ENDDT TYPE STRING,
WTY_STARTDT TYPE STRING,
WTY_ENDDT TYPE STRING,
RECALL_STARTDT TYPE STRING,
RECALL_ENDDT TYPE STRING,
FLDFIX_STARTDT TYPE STRING,
FLDFIX_ENDDT TYPE STRING,
LASTPO TYPE STRING,
RETQTY_HOR TYPE STRING,
RETGRPID TYPE STRING,
OBSLTIND TYPE STRING,
NOSRPLNG_DT TYPE STRING,
SORSELDOS TYPE STRING,
DATA_CHECKED TYPE STRING,
CUOBJ_TYPE TYPE STRING,
CUOBJ_ID TYPE STRING,
SATNR TYPE STRING,
KZKFG TYPE STRING,
CFGSYS TYPE STRING,
DISST TYPE STRING,
MATVERS_HEAD TYPE STRING,
MATVERS_TYPE TYPE STRING,
MATVERS_CHNR TYPE STRING,
EXTRMATP TYPE STRING,
PACKGR TYPE STRING,
HUTYP_DFLT TYPE STRING,
CREATEUSER TYPE STRING,
CREATEUTC TYPE STRING,
CHANGEUSER TYPE STRING,
CHANGEUTC TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SAPAPO/EXT_MATKEY_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_/SAPAPO/EXT_MATKEY_STR-METHOD sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-EXT_MATNR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PRODUCT_TYPE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATGUID sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATNRLONG sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATVERS sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MEINS sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ATTYP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-LOGUNIT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CWREL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TY2TQ sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-BRGEW sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-NTGEW sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-GEWEI sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-VOLUM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-VOLEH sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SHELF_LIFE_FLAG sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SHELF_LIFE_DUR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATURITY_DUR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SHLF_LFE_REQ_MIN sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SHLF_LFE_REQ_MAX sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MHDLP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-IPRKZ sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SLED_BBD sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SLDRND sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ATT01 sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ATT02 sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ATT03 sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ATT04 sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ATT05 sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-BOD_DEPLVL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-EXCL_EXPEDITE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PROD_PAOOPT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-RESTRICT_INVBAL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DRP_GL_STOCK sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATKL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-COMPL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-STFAC sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TRAGR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TS_SDP_USE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PRDHA sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-GTIN_IND sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DISPLAY sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-HERKL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-BATCH_REQ sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-KITCOMP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PRDSET_IND sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SERIAL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DATA_CHECK_BY sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DATA_CHECK_AT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-KOSCH sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-KOSCH_GRP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-VMIKOSCH sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-VMIKOSCH_GRP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TEMPRPBLOCK sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TEMPRPFROM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TEMPRPTO sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXW sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXW_UOM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXW_TOL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXV sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXV_UOM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXV_TOL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PMTYP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CLOSED_PM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAX_FILL_UP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-HUTYP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-TARE_VAR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXC sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXC_TOL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXB sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXH sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MAXDIM_UOM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PS_SMARTFORM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PS_PDF_FORM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PILFERABLE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-WHMATGR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-WHSTC sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-HNDLCODE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ENVREL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DGPROFL sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-HAZMAT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-ITMTPG sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MFRGR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-QQTIME sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-QQTIMEUOM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-QGRP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CWTOLGR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CWPROC sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MEDI_APROF sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PUOM sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CLASS sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-KLART sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PLANT_BATCH_HANDLING sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-NEWPROD_INDI sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-NEWMODEL_INDI sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PRD_STARTDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PRD_ENDDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-WTY_STARTDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-WTY_ENDDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-RECALL_STARTDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-RECALL_ENDDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-FLDFIX_STARTDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-FLDFIX_ENDDT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-LASTPO sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-RETQTY_HOR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-RETGRPID sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-OBSLTIND sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-NOSRPLNG_DT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SORSELDOS sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DATA_CHECKED sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CUOBJ_TYPE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CUOBJ_ID sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-SATNR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-KZKFG sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CFGSYS sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-DISST sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATVERS_HEAD sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATVERS_TYPE sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-MATVERS_CHNR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-EXTRMATP sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-PACKGR sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-HUTYP_DFLT sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CREATEUSER sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CREATEUTC sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CHANGEUSER sy-vline
WA_/SAPAPO/EXT_MATKEY_STR-CHANGEUTC sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.