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

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

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

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


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SCF/SMIMON_HDR_STR ASSIGNING </SCF/SMIMON_HDR_STR>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SCF/SMIMON_HDR_STR>-LOCATION = 1.
</SCF/SMIMON_HDR_STR>-LOCNO = 1.
</SCF/SMIMON_HDR_STR>-DESCR40 = 1.
</SCF/SMIMON_HDR_STR>-DUNS4 = 1.
</SCF/SMIMON_HDR_STR>-GLN = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SCF/SMIMON_HDR_STR-PARTNER_GUID, sy-vline,
WA_/SCF/SMIMON_HDR_STR-TZONE, sy-vline,
WA_/SCF/SMIMON_HDR_STR-ADRNUMMER, sy-vline,
WA_/SCF/SMIMON_HDR_STR-LOCTYPE, sy-vline,
WA_/SCF/SMIMON_HDR_STR-STCAL, sy-vline,
WA_/SCF/SMIMON_HDR_STR-SDCAL, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SCF/SMIMON_HDR_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_/SCF/SMIMON_HDR_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_/SCF/SMIMON_HDR_STR INTO WA_/SCF/SMIMON_HDR_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 ALPHA, internal->external for field ADRNUMMER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-ADRNUMMER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-ADRNUMMER.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

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

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

*Conversion exit ISOLA, internal->external for field LANGU CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-LANGU IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-LANGU.
WRITE:/ 'New Value:', ld_input.

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

*Conversion exit ISOLA, internal->external for field LANGU_CREA CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-LANGU_CREA IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-LANGU_CREA.
WRITE:/ 'New Value:', ld_input.

*Conversion exit SXIDN, internal->external for field SMTP_ADDR CALL FUNCTION 'CONVERSION_EXIT_SXIDN_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-SMTP_ADDR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-SMTP_ADDR.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

*Conversion exit ISOLA, internal->external for field LANGU CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-LANGU IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-LANGU.
WRITE:/ 'New Value:', ld_input.

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

*Conversion exit ISOLA, internal->external for field LANGU_CREA CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-LANGU_CREA IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-LANGU_CREA.
WRITE:/ 'New Value:', ld_input.

*Conversion exit SXIDN, internal->external for field SMTP_ADDR CALL FUNCTION 'CONVERSION_EXIT_SXIDN_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-SMTP_ADDR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-SMTP_ADDR.
WRITE:/ 'New Value:', ld_input.

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

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

*Conversion exit TSTRN, internal->external for field DURAT CALL FUNCTION 'CONVERSION_EXIT_TSTRN_OUTPUT' EXPORTING input = WA_/SCF/SMIMON_HDR_STR-DURAT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCF/SMIMON_HDR_STR-DURAT.
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_/SCF/SMIMON_HDR_STR_STR,
LOCATION TYPE STRING,
LOCNO TYPE STRING,
DESCR40 TYPE STRING,
DUNS4 TYPE STRING,
GLN TYPE STRING,
PARTNER_GUID TYPE STRING,
TZONE TYPE STRING,
ADRNUMMER TYPE STRING,
LOCTYPE TYPE STRING,
STCAL TYPE STRING,
SDCAL TYPE STRING,
RCCAL TYPE STRING,
PRODUCT TYPE STRING,
MATNR TYPE STRING,
MEINS TYPE STRING,
MAKTX TYPE STRING,
EAN11 TYPE STRING,
INACTIVE TYPE STRING,
APN TYPE STRING,
GRP TYPE STRING,
LOCPROD TYPE STRING,
VRSIOID TYPE STRING,
MEINS TYPE STRING,
PLANNER_SMI TYPE STRING,
MSDP_SB_METHOD TYPE STRING,
MAXSTOCK TYPE STRING,
SAFTY TYPE STRING,
TARGET_DUR TYPE STRING,
SVTTY TYPE STRING,
LSUOM TYPE STRING,
BSTFE TYPE STRING,
BSTRF TYPE STRING,
BSTMI TYPE STRING,
BSTMA TYPE STRING,
INACTIVE TYPE STRING,
UPC_STATUS_DES TYPE STRING,
ISPROM TYPE STRING,
UPC_STATUS TYPE STRING,
STOCK TYPE STRING,
INV TYPE STRING,
INVUOM TYPE STRING,
CUSTOMER TYPE STRING,
PARTNER_GUID TYPE STRING,
PARTNER TYPE STRING,
PRTDESC TYPE STRING,
TYPE TYPE STRING,
GLN TYPE STRING,
DUNS TYPE STRING,
SCAC TYPE STRING,
DATE_FROM TYPE STRING,
DATE_TO TYPE STRING,
TITLE TYPE STRING,
NAME1 TYPE STRING,
NAME2 TYPE STRING,
NAME3 TYPE STRING,
NAME4 TYPE STRING,
NAME_TXT TYPE STRING,
NAME_CO TYPE STRING,
CITY1 TYPE STRING,
CITY2 TYPE STRING,
CITY_CODE TYPE STRING,
CITYP_CODE TYPE STRING,
HOME_CITY TYPE STRING,
CITYH_CODE TYPE STRING,
CHCKSTATUS TYPE STRING,
REGIOGROUP TYPE STRING,
POST_CODE1 TYPE STRING,
POST_CODE2 TYPE STRING,
POST_CODE3 TYPE STRING,
PCODE1_EXT TYPE STRING,
PCODE2_EXT TYPE STRING,
PCODE3_EXT TYPE STRING,
PO_BOX TYPE STRING,
DONT_USE_P TYPE STRING,
PO_BOX_NUM TYPE STRING,
PO_BOX_LOC TYPE STRING,
CITY_CODE2 TYPE STRING,
PO_BOX_REG TYPE STRING,
PO_BOX_CTY TYPE STRING,
POSTALAREA TYPE STRING,
TRANSPZONE TYPE STRING,
STREET TYPE STRING,
DONT_USE_S TYPE STRING,
STREETCODE TYPE STRING,
STREETABBR TYPE STRING,
HOUSE_NUM1 TYPE STRING,
HOUSE_NUM2 TYPE STRING,
HOUSE_NUM3 TYPE STRING,
STR_SUPPL1 TYPE STRING,
STR_SUPPL2 TYPE STRING,
STR_SUPPL3 TYPE STRING,
LOCATION TYPE STRING,
BUILDING TYPE STRING,
FLOOR TYPE STRING,
ROOMNUMBER TYPE STRING,
COUNTRY TYPE STRING,
LANGU TYPE STRING,
REGION TYPE STRING,
SORT1 TYPE STRING,
SORT2 TYPE STRING,
SORT_PHN TYPE STRING,
ADDRORIGIN TYPE STRING,
EXTENSION1 TYPE STRING,
EXTENSION2 TYPE STRING,
TIME_ZONE TYPE STRING,
TAXJURCODE TYPE STRING,
ADDRESS_ID TYPE STRING,
REMARK TYPE STRING,
LANGU_CREA TYPE STRING,
DEFLT_COMM TYPE STRING,
TEL_NUMBER TYPE STRING,
TEL_EXTENS TYPE STRING,
FAX_NUMBER TYPE STRING,
FAX_EXTENS TYPE STRING,
SMTP_ADDR TYPE STRING,
ADDRNUMBER TYPE STRING,
SCACD TYPE STRING,
SUPPLIER TYPE STRING,
PARTNER_GUID TYPE STRING,
PARTNER TYPE STRING,
PRTDESC TYPE STRING,
TYPE TYPE STRING,
GLN TYPE STRING,
DUNS TYPE STRING,
SCAC TYPE STRING,
DATE_FROM TYPE STRING,
DATE_TO TYPE STRING,
TITLE TYPE STRING,
NAME1 TYPE STRING,
NAME2 TYPE STRING,
NAME3 TYPE STRING,
NAME4 TYPE STRING,
NAME_TXT TYPE STRING,
NAME_CO TYPE STRING,
CITY1 TYPE STRING,
CITY2 TYPE STRING,
CITY_CODE TYPE STRING,
CITYP_CODE TYPE STRING,
HOME_CITY TYPE STRING,
CITYH_CODE TYPE STRING,
CHCKSTATUS TYPE STRING,
REGIOGROUP TYPE STRING,
POST_CODE1 TYPE STRING,
POST_CODE2 TYPE STRING,
POST_CODE3 TYPE STRING,
PCODE1_EXT TYPE STRING,
PCODE2_EXT TYPE STRING,
PCODE3_EXT TYPE STRING,
PO_BOX TYPE STRING,
DONT_USE_P TYPE STRING,
PO_BOX_NUM TYPE STRING,
PO_BOX_LOC TYPE STRING,
CITY_CODE2 TYPE STRING,
PO_BOX_REG TYPE STRING,
PO_BOX_CTY TYPE STRING,
POSTALAREA TYPE STRING,
TRANSPZONE TYPE STRING,
STREET TYPE STRING,
DONT_USE_S TYPE STRING,
STREETCODE TYPE STRING,
STREETABBR TYPE STRING,
HOUSE_NUM1 TYPE STRING,
HOUSE_NUM2 TYPE STRING,
HOUSE_NUM3 TYPE STRING,
STR_SUPPL1 TYPE STRING,
STR_SUPPL2 TYPE STRING,
STR_SUPPL3 TYPE STRING,
LOCATION TYPE STRING,
BUILDING TYPE STRING,
FLOOR TYPE STRING,
ROOMNUMBER TYPE STRING,
COUNTRY TYPE STRING,
LANGU TYPE STRING,
REGION TYPE STRING,
SORT1 TYPE STRING,
SORT2 TYPE STRING,
SORT_PHN TYPE STRING,
ADDRORIGIN TYPE STRING,
EXTENSION1 TYPE STRING,
EXTENSION2 TYPE STRING,
TIME_ZONE TYPE STRING,
TAXJURCODE TYPE STRING,
ADDRESS_ID TYPE STRING,
REMARK TYPE STRING,
LANGU_CREA TYPE STRING,
DEFLT_COMM TYPE STRING,
TEL_NUMBER TYPE STRING,
TEL_EXTENS TYPE STRING,
FAX_NUMBER TYPE STRING,
FAX_EXTENS TYPE STRING,
SMTP_ADDR TYPE STRING,
ADDRNUMBER TYPE STRING,
SCACD TYPE STRING,
LOCFR TYPE STRING,
LOCNO TYPE STRING,
DESCR40 TYPE STRING,
DUNS4 TYPE STRING,
GLN TYPE STRING,
PARTNER_GUID TYPE STRING,
TZONE TYPE STRING,
ADRNUMMER TYPE STRING,
LOCTYPE TYPE STRING,
STCAL TYPE STRING,
SDCAL TYPE STRING,
RCCAL TYPE STRING,
MESSAGES_TMSP TYPE STRING,
LOCID TYPE STRING,
MATID TYPE STRING,
ASNUPD TYPE STRING,
STOCKUPD TYPE STRING,
DEMUPD TYPE STRING,
CUSTPLANUPD TYPE STRING,
CUSTORDRUPD TYPE STRING,
SUPPLANUPD TYPE STRING,
SUPORDRUPD TYPE STRING,
PSUPD TYPE STRING,
PSBDUPD TYPE STRING,
FRUPD TYPE STRING,
NSFRUPD TYPE STRING,
LANE TYPE STRING,
TRPID TYPE STRING,
TRMID TYPE STRING,
VRSIOID TYPE STRING,
LOCFR TYPE STRING,
LOCTO TYPE STRING,
MATID TYPE STRING,
TTYPE TYPE STRING,
VALFR TYPE STRING,
VALTO TYPE STRING,
TTYPETXT TYPE STRING,
PROCESS_TYPE_ICH TYPE STRING,
DURAT TYPE STRING,
EBELN TYPE STRING,
EBELP TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SCF/SMIMON_HDR_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_/SCF/SMIMON_HDR_STR_STR-LOCATION sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCNO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DESCR40 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DUNS4 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-GLN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PARTNER_GUID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TZONE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADRNUMMER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCTYPE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STCAL sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SDCAL sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-RCCAL sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PRODUCT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MATNR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MEINS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MAKTX sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EAN11 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-INACTIVE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-APN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-GRP sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCPROD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-VRSIOID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MEINS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PLANNER_SMI sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MSDP_SB_METHOD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MAXSTOCK sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SAFTY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TARGET_DUR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SVTTY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LSUOM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-BSTFE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-BSTRF sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-BSTMI sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-BSTMA sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-INACTIVE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-UPC_STATUS_DES sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ISPROM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-UPC_STATUS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STOCK sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-INV sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-INVUOM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CUSTOMER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PARTNER_GUID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PARTNER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PRTDESC sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TYPE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-GLN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DUNS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SCAC sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DATE_FROM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DATE_TO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TITLE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME4 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME_TXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME_CO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY_CODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITYP_CODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOME_CITY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITYH_CODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CHCKSTATUS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-REGIOGROUP sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POST_CODE1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POST_CODE2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POST_CODE3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PCODE1_EXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PCODE2_EXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PCODE3_EXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DONT_USE_P sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_NUM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_LOC sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY_CODE2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_REG sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_CTY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POSTALAREA sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TRANSPZONE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STREET sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DONT_USE_S sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STREETCODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STREETABBR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOUSE_NUM1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOUSE_NUM2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOUSE_NUM3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STR_SUPPL1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STR_SUPPL2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STR_SUPPL3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCATION sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-BUILDING sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FLOOR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ROOMNUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-COUNTRY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LANGU sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-REGION sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SORT1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SORT2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SORT_PHN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADDRORIGIN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EXTENSION1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EXTENSION2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TIME_ZONE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TAXJURCODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADDRESS_ID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-REMARK sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LANGU_CREA sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DEFLT_COMM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TEL_NUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TEL_EXTENS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FAX_NUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FAX_EXTENS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SMTP_ADDR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADDRNUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SCACD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SUPPLIER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PARTNER_GUID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PARTNER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PRTDESC sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TYPE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-GLN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DUNS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SCAC sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DATE_FROM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DATE_TO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TITLE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME4 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME_TXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NAME_CO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY_CODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITYP_CODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOME_CITY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITYH_CODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CHCKSTATUS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-REGIOGROUP sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POST_CODE1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POST_CODE2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POST_CODE3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PCODE1_EXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PCODE2_EXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PCODE3_EXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DONT_USE_P sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_NUM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_LOC sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CITY_CODE2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_REG sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PO_BOX_CTY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-POSTALAREA sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TRANSPZONE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STREET sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DONT_USE_S sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STREETCODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STREETABBR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOUSE_NUM1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOUSE_NUM2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-HOUSE_NUM3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STR_SUPPL1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STR_SUPPL2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STR_SUPPL3 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCATION sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-BUILDING sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FLOOR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ROOMNUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-COUNTRY sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LANGU sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-REGION sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SORT1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SORT2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SORT_PHN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADDRORIGIN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EXTENSION1 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EXTENSION2 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TIME_ZONE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TAXJURCODE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADDRESS_ID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-REMARK sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LANGU_CREA sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DEFLT_COMM sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TEL_NUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TEL_EXTENS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FAX_NUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FAX_EXTENS sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SMTP_ADDR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADDRNUMBER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SCACD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCFR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCNO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DESCR40 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DUNS4 sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-GLN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PARTNER_GUID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TZONE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ADRNUMMER sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCTYPE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STCAL sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SDCAL sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-RCCAL sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MESSAGES_TMSP sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MATID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-ASNUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-STOCKUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DEMUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CUSTPLANUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-CUSTORDRUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SUPPLANUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-SUPORDRUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PSUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PSBDUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-FRUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-NSFRUPD sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LANE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TRPID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TRMID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-VRSIOID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCFR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-LOCTO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-MATID sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TTYPE sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-VALFR sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-VALTO sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-TTYPETXT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-PROCESS_TYPE_ICH sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-DURAT sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EBELN sy-vline
WA_/SCF/SMIMON_HDR_STR_STR-EBELP sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.