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

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

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

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


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/DMBE/SP_MAPPED_HEADERX_SD_UPD ASSIGNING </DMBE/SP_MAPPED_HEADERX_SD_UPD>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</DMBE/SP_MAPPED_HEADERX_SD_UPD>-UPDATEFLAG = 1.
</DMBE/SP_MAPPED_HEADERX_SD_UPD>-COLLECT_NO = 1.
</DMBE/SP_MAPPED_HEADERX_SD_UPD>-SALES_ORG = 1.
</DMBE/SP_MAPPED_HEADERX_SD_UPD>-DISTR_CHAN = 1.
</DMBE/SP_MAPPED_HEADERX_SD_UPD>-DIVISION = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD-SALES_GRP, sy-vline,
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD-SALES_OFF, sy-vline,
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD-REQ_DATE_H, sy-vline,
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD-DATE_TYPE, sy-vline,
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD-PURCH_NO_C, sy-vline,
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD-PURCH_DATE, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD 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_/DMBE/SP_MAPPED_HEADERX_SD_UPD 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_/DMBE/SP_MAPPED_HEADERX_SD_UPD INTO WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD. *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.
ENDFORM. *&---------------------------------------------------------------------* *& Form process_as_string_field_values *&---------------------------------------------------------------------* FORM process_as_string_field_values CHANGING p_EKKO LIKE wa_EKKO. TYPES: BEGIN OF T_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR,
UPDATEFLAG TYPE STRING,
COLLECT_NO TYPE STRING,
SALES_ORG TYPE STRING,
DISTR_CHAN TYPE STRING,
DIVISION TYPE STRING,
SALES_GRP TYPE STRING,
SALES_OFF TYPE STRING,
REQ_DATE_H TYPE STRING,
DATE_TYPE TYPE STRING,
PURCH_NO_C TYPE STRING,
PURCH_DATE TYPE STRING,
PO_METHOD TYPE STRING,
PO_SUPPLEM TYPE STRING,
REF_1 TYPE STRING,
NAME TYPE STRING,
TELEPHONE TYPE STRING,
PRICE_GRP TYPE STRING,
CUST_GROUP TYPE STRING,
SALES_DIST TYPE STRING,
PRICE_LIST TYPE STRING,
INCOTERMS1 TYPE STRING,
INCOTERMS2 TYPE STRING,
PMNTTRMS TYPE STRING,
DLV_BLOCK TYPE STRING,
BILL_BLOCK TYPE STRING,
ORD_REASON TYPE STRING,
COMPL_DLV TYPE STRING,
PRICE_DATE TYPE STRING,
QT_VALID_F TYPE STRING,
QT_VALID_T TYPE STRING,
CT_VALID_F TYPE STRING,
CT_VALID_T TYPE STRING,
CUST_GRP1 TYPE STRING,
CUST_GRP2 TYPE STRING,
CUST_GRP3 TYPE STRING,
CUST_GRP4 TYPE STRING,
CUST_GRP5 TYPE STRING,
PURCH_NO_S TYPE STRING,
PO_DAT_S TYPE STRING,
PO_METH_S TYPE STRING,
REF_1_S TYPE STRING,
SD_DOC_CAT TYPE STRING,
DOC_DATE TYPE STRING,
WAR_DATE TYPE STRING,
SHIP_COND TYPE STRING,
PP_SEARCH TYPE STRING,
DUN_COUNT TYPE STRING,
DUN_DATE TYPE STRING,
COSTCENTER TYPE STRING,
WBS_ELEM TYPE STRING,
DLVSCHDUSE TYPE STRING,
PLDLVSTYP TYPE STRING,
REF_DOC TYPE STRING,
COMP_CDE_B TYPE STRING,
ALTTAX_CLS TYPE STRING,
TAX_CLASS2 TYPE STRING,
TAX_CLASS3 TYPE STRING,
TAX_CLASS4 TYPE STRING,
TAX_CLASS5 TYPE STRING,
TAX_CLASS6 TYPE STRING,
TAX_CLASS7 TYPE STRING,
TAX_CLASS8 TYPE STRING,
TAX_CLASS9 TYPE STRING,
REF_DOC_L TYPE STRING,
ASS_NUMBER TYPE STRING,
REFDOC_CAT TYPE STRING,
ORDCOMB_IN TYPE STRING,
BILL_SCHED TYPE STRING,
INVO_SCHED TYPE STRING,
MN_INVOICE TYPE STRING,
EXRATE_FI TYPE STRING,
ADD_VAL_DY TYPE STRING,
FIX_VAL_DY TYPE STRING,
PYMT_METH TYPE STRING,
ACCNT_ASGN TYPE STRING,
EXCHG_RATE TYPE STRING,
BILL_DATE TYPE STRING,
SERV_DATE TYPE STRING,
DUNN_KEY TYPE STRING,
DUNN_BLOCK TYPE STRING,
PROMOTION TYPE STRING,
PMTGAR_PRO TYPE STRING,
DEPARTM_NO TYPE STRING,
REC_POINT TYPE STRING,
POITM_NO_S TYPE STRING,
DOC_NUM_FI TYPE STRING,
CSTCNDGRP1 TYPE STRING,
CSTCNDGRP2 TYPE STRING,
CSTCNDGRP3 TYPE STRING,
CSTCNDGRP4 TYPE STRING,
CSTCNDGRP5 TYPE STRING,
DLV_TIME TYPE STRING,
CURRENCY TYPE STRING,
FKK_CONACCT TYPE STRING,
CAMPAIGN TYPE STRING,
DOC_CLASS TYPE STRING,
H_CURR TYPE STRING,
SHIP_TYPE TYPE STRING,
S_PROC_IND TYPE STRING,
VERSION TYPE STRING,
PSM_PSTNG_DATE TYPE STRING,
TREASURY_ACC_SYMBOL TYPE STRING,
BUSINESS_EVENT_TCODE TYPE STRING,
MODIFICATION_ALLOWED TYPE STRING,
CANCELLATION_ALLOWED TYPE STRING,
PAYMENT_METHODS TYPE STRING,
BUSINESS_PARTNER_NO TYPE STRING,
REPORTING_FREQ TYPE STRING,
SEPA_MANDATE_ID TYPE STRING,
INCOTERMSV TYPE STRING,
INCOTERMS2L TYPE STRING,
INCOTERMS3L TYPE STRING,
SD_DOC_CAT_LONG TYPE STRING,
REFDOC_CAT_LONG TYPE STRING,END OF T_EKKO_STR. DATA: WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_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_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-UPDATEFLAG sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-COLLECT_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SALES_ORG sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DISTR_CHAN sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DIVISION sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SALES_GRP sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SALES_OFF sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REQ_DATE_H sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DATE_TYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PURCH_NO_C sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PURCH_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PO_METHOD sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PO_SUPPLEM sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REF_1 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-NAME sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TELEPHONE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PRICE_GRP sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CUST_GROUP sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SALES_DIST sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PRICE_LIST sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-INCOTERMS1 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-INCOTERMS2 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PMNTTRMS sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DLV_BLOCK sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-BILL_BLOCK sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-ORD_REASON sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-COMPL_DLV sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PRICE_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-QT_VALID_F sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-QT_VALID_T sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CT_VALID_F sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CT_VALID_T sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CUST_GRP1 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CUST_GRP2 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CUST_GRP3 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CUST_GRP4 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CUST_GRP5 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PURCH_NO_S sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PO_DAT_S sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PO_METH_S sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REF_1_S sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SD_DOC_CAT sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DOC_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-WAR_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SHIP_COND sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PP_SEARCH sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DUN_COUNT sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DUN_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-COSTCENTER sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-WBS_ELEM sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DLVSCHDUSE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PLDLVSTYP sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REF_DOC sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-COMP_CDE_B sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-ALTTAX_CLS sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS2 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS3 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS4 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS5 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS6 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS7 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS8 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TAX_CLASS9 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REF_DOC_L sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-ASS_NUMBER sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REFDOC_CAT sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-ORDCOMB_IN sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-BILL_SCHED sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-INVO_SCHED sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-MN_INVOICE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-EXRATE_FI sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-ADD_VAL_DY sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-FIX_VAL_DY sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PYMT_METH sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-ACCNT_ASGN sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-EXCHG_RATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-BILL_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SERV_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DUNN_KEY sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DUNN_BLOCK sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PROMOTION sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PMTGAR_PRO sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DEPARTM_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REC_POINT sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-POITM_NO_S sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DOC_NUM_FI sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CSTCNDGRP1 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CSTCNDGRP2 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CSTCNDGRP3 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CSTCNDGRP4 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CSTCNDGRP5 sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DLV_TIME sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CURRENCY sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-FKK_CONACCT sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CAMPAIGN sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-DOC_CLASS sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-H_CURR sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SHIP_TYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-S_PROC_IND sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-VERSION sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PSM_PSTNG_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-TREASURY_ACC_SYMBOL sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-BUSINESS_EVENT_TCODE sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-MODIFICATION_ALLOWED sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-CANCELLATION_ALLOWED sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-PAYMENT_METHODS sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-BUSINESS_PARTNER_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REPORTING_FREQ sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SEPA_MANDATE_ID sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-INCOTERMSV sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-INCOTERMS2L sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-INCOTERMS3L sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-SD_DOC_CAT_LONG sy-vline
WA_/DMBE/SP_MAPPED_HEADERX_SD_UPD_STR-REFDOC_CAT_LONG sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.