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

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

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

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


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SCMB/MDL_BAPIMARA ASSIGNING </SCMB/MDL_BAPIMARA>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SCMB/MDL_BAPIMARA>-MATERIAL = 1.
</SCMB/MDL_BAPIMARA>-IND_SECTOR = 1.
</SCMB/MDL_BAPIMARA>-MATL_TYPE = 1.
</SCMB/MDL_BAPIMARA>-CREATED_ON = 1.
</SCMB/MDL_BAPIMARA>-CREATED_BY = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SCMB/MDL_BAPIMARA-LAST_CHNGE, sy-vline,
WA_/SCMB/MDL_BAPIMARA-CHANGED_BY, sy-vline,
WA_/SCMB/MDL_BAPIMARA-MAT_STATUS, sy-vline,
WA_/SCMB/MDL_BAPIMARA-MAINT_STAT, sy-vline,
WA_/SCMB/MDL_BAPIMARA-DEL_FLAG, sy-vline,
WA_/SCMB/MDL_BAPIMARA-MATL_GROUP, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SCMB/MDL_BAPIMARA 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_/SCMB/MDL_BAPIMARA 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_/SCMB/MDL_BAPIMARA INTO WA_/SCMB/MDL_BAPIMARA. *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 MATERIAL CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_/SCMB/MDL_BAPIMARA-MATERIAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMB/MDL_BAPIMARA-MATERIAL.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

*Conversion exit MATNL, internal->external for field HAZ_MAT_NO_EXTERNAL CALL FUNCTION 'CONVERSION_EXIT_MATNL_OUTPUT' EXPORTING input = WA_/SCMB/MDL_BAPIMARA-HAZ_MAT_NO_EXTERNAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMB/MDL_BAPIMARA-HAZ_MAT_NO_EXTERNAL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATNW, internal->external for field HAZ_MAT_NO_VERSION CALL FUNCTION 'CONVERSION_EXIT_MATNW_OUTPUT' EXPORTING input = WA_/SCMB/MDL_BAPIMARA-HAZ_MAT_NO_VERSION IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMB/MDL_BAPIMARA-HAZ_MAT_NO_VERSION.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATNL, internal->external for field INV_MAT_NO_EXTERNAL CALL FUNCTION 'CONVERSION_EXIT_MATNL_OUTPUT' EXPORTING input = WA_/SCMB/MDL_BAPIMARA-INV_MAT_NO_EXTERNAL IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMB/MDL_BAPIMARA-INV_MAT_NO_EXTERNAL.
WRITE:/ 'New Value:', ld_input.

*Conversion exit MATNW, internal->external for field INV_MAT_NO_VERSION CALL FUNCTION 'CONVERSION_EXIT_MATNW_OUTPUT' EXPORTING input = WA_/SCMB/MDL_BAPIMARA-INV_MAT_NO_VERSION IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMB/MDL_BAPIMARA-INV_MAT_NO_VERSION.
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_/SCMB/MDL_BAPIMARA_STR,
MATERIAL TYPE STRING,
IND_SECTOR TYPE STRING,
MATL_TYPE TYPE STRING,
CREATED_ON TYPE STRING,
CREATED_BY TYPE STRING,
LAST_CHNGE TYPE STRING,
CHANGED_BY TYPE STRING,
MAT_STATUS TYPE STRING,
MAINT_STAT TYPE STRING,
DEL_FLAG TYPE STRING,
MATL_GROUP TYPE STRING,
OLD_MAT_NO TYPE STRING,
BASE_UOM TYPE STRING,
BASE_UOM_ISO TYPE STRING,
PO_UNIT TYPE STRING,
PO_UNIT_ISO TYPE STRING,
DOCUMENT TYPE STRING,
DOC_TYPE TYPE STRING,
DOC_VERS TYPE STRING,
DOC_FORMAT TYPE STRING,
DOC_CHG_NO TYPE STRING,
PAGE_NO TYPE STRING,
NO_SHEETS TYPE STRING,
PROD_MEMO TYPE STRING,
PAGEFORMAT TYPE STRING,
SIZE_DIM TYPE STRING,
BASIC_MATL TYPE STRING,
STD_DESCR TYPE STRING,
DSN_OFFICE TYPE STRING,
PUR_VALKEY TYPE STRING,
NET_WEIGHT TYPE STRING,
UNIT_OF_WT TYPE STRING,
UNIT_OF_WT_ISO TYPE STRING,
CONTAINER TYPE STRING,
STOR_CONDS TYPE STRING,
TEMP_CONDS TYPE STRING,
TRANS_GRP TYPE STRING,
HAZ_MAT_NO TYPE STRING,
DIVISION TYPE STRING,
COMPETITOR TYPE STRING,
QTY_GR_GI TYPE STRING,
PROC_RULE TYPE STRING,
SUP_SOURCE TYPE STRING,
SEASON TYPE STRING,
LABEL_TYPE TYPE STRING,
LABEL_FORM TYPE STRING,
PROD_HIER TYPE STRING,
CAD_ID TYPE STRING,
ALLOWED_WT TYPE STRING,
PACK_WT_UN TYPE STRING,
PACK_WT_UN_ISO TYPE STRING,
ALLWD_VOL TYPE STRING,
PACK_VO_UN TYPE STRING,
PACK_VO_UN_ISO TYPE STRING,
WT_TOL_LT TYPE STRING,
VOL_TOL_LT TYPE STRING,
VAR_ORD_UN TYPE STRING,
CONFIGURED TYPE STRING,
BATCH_MGMT TYPE STRING,
SH_MAT_TYP TYPE STRING,
FILL_LEVEL TYPE STRING,
STACK_FACT TYPE STRING,
MAT_GRP_SM TYPE STRING,
AUTHORITYGROUP TYPE STRING,
QM_PROCMNT TYPE STRING,
CATPROFILE TYPE STRING,
MINREMLIFE TYPE STRING,
SHELF_LIFE TYPE STRING,
STOR_PCT TYPE STRING,
CONF_MATL TYPE STRING,
CO_PRODUCT TYPE STRING,
PR_REF_MAT TYPE STRING,
PUR_STATUS TYPE STRING,
SAL_STATUS TYPE STRING,
PVALIDFROM TYPE STRING,
SVALIDFROM TYPE STRING,
ENVT_RLVT TYPE STRING,
PROD_ALLOC TYPE STRING,
QUAL_DIK TYPE STRING,
MANU_MAT TYPE STRING,
MFR_NO TYPE STRING,
INV_MAT_NO TYPE STRING,
MANUF_PROF TYPE STRING,
HAZMATPROF TYPE STRING,
HIGH_VISC TYPE STRING,
LOOSEORLIQ TYPE STRING,
CLOSED_BOX TYPE STRING,
APPD_B_REC TYPE STRING,
MATCMPLLVL TYPE STRING,
PAR_EFF TYPE STRING,
ROUND_UP_RULE_EXPIRATION_DATE TYPE STRING,
PERIOD_IND_EXPIRATION_DATE TYPE STRING,
PROD_COMPOSITION_ON_PACKAGING TYPE STRING,
ITEM_CAT TYPE STRING,
HAZ_MAT_NO_EXTERNAL TYPE STRING,
HAZ_MAT_NO_GUID TYPE STRING,
HAZ_MAT_NO_VERSION TYPE STRING,
INV_MAT_NO_EXTERNAL TYPE STRING,
INV_MAT_NO_GUID TYPE STRING,
INV_MAT_NO_VERSION TYPE STRING,
MATERIAL_FIXED TYPE STRING,
CM_RELEVANCE_FLAG TYPE STRING,
SLED_BBD TYPE STRING,
GTIN_VARIANT TYPE STRING,
SERIALIZATION_LEVEL TYPE STRING,
PL_REF_MAT TYPE STRING,
EXTMATLGRP TYPE STRING,
UOMUSAGE TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SCMB/MDL_BAPIMARA_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_/SCMB/MDL_BAPIMARA_STR-MATERIAL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-IND_SECTOR sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MATL_TYPE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CREATED_ON sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CREATED_BY sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-LAST_CHNGE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CHANGED_BY sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MAT_STATUS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MAINT_STAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DEL_FLAG sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MATL_GROUP sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-OLD_MAT_NO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-BASE_UOM sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-BASE_UOM_ISO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PO_UNIT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PO_UNIT_ISO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DOCUMENT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DOC_TYPE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DOC_VERS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DOC_FORMAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DOC_CHG_NO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PAGE_NO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-NO_SHEETS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PROD_MEMO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PAGEFORMAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SIZE_DIM sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-BASIC_MATL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-STD_DESCR sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DSN_OFFICE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PUR_VALKEY sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-NET_WEIGHT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-UNIT_OF_WT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-UNIT_OF_WT_ISO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CONTAINER sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-STOR_CONDS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-TEMP_CONDS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-TRANS_GRP sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-HAZ_MAT_NO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-DIVISION sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-COMPETITOR sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-QTY_GR_GI sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PROC_RULE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SUP_SOURCE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SEASON sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-LABEL_TYPE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-LABEL_FORM sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PROD_HIER sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CAD_ID sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-ALLOWED_WT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PACK_WT_UN sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PACK_WT_UN_ISO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-ALLWD_VOL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PACK_VO_UN sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PACK_VO_UN_ISO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-WT_TOL_LT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-VOL_TOL_LT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-VAR_ORD_UN sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CONFIGURED sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-BATCH_MGMT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SH_MAT_TYP sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-FILL_LEVEL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-STACK_FACT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MAT_GRP_SM sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-AUTHORITYGROUP sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-QM_PROCMNT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CATPROFILE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MINREMLIFE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SHELF_LIFE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-STOR_PCT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CONF_MATL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CO_PRODUCT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PR_REF_MAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PUR_STATUS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SAL_STATUS sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PVALIDFROM sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SVALIDFROM sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-ENVT_RLVT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PROD_ALLOC sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-QUAL_DIK sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MANU_MAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MFR_NO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-INV_MAT_NO sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MANUF_PROF sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-HAZMATPROF sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-HIGH_VISC sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-LOOSEORLIQ sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CLOSED_BOX sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-APPD_B_REC sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MATCMPLLVL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PAR_EFF sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-ROUND_UP_RULE_EXPIRATION_DATE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PERIOD_IND_EXPIRATION_DATE sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PROD_COMPOSITION_ON_PACKAGING sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-ITEM_CAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-HAZ_MAT_NO_EXTERNAL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-HAZ_MAT_NO_GUID sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-HAZ_MAT_NO_VERSION sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-INV_MAT_NO_EXTERNAL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-INV_MAT_NO_GUID sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-INV_MAT_NO_VERSION sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-MATERIAL_FIXED sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-CM_RELEVANCE_FLAG sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SLED_BBD sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-GTIN_VARIANT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-SERIALIZATION_LEVEL sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-PL_REF_MAT sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-EXTMATLGRP sy-vline
WA_/SCMB/MDL_BAPIMARA_STR-UOMUSAGE sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.