ABAP Select data from SAP table /DMBE/SP_MAPPED_HEADER_SD 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_HEADER_SD 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_HEADER_SD. 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_HEADER_SD 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_HEADER_SD TYPE STANDARD TABLE OF /DMBE/SP_MAPPED_HEADER_SD, WA_/DMBE/SP_MAPPED_HEADER_SD TYPE /DMBE/SP_MAPPED_HEADER_SD, 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_HEADER_SD> TYPE /DMBE/SP_MAPPED_HEADER_SD. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_/DMBE/SP_MAPPED_HEADER_SD. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM /DMBE/SP_MAPPED_HEADER_SD INTO TABLE IT_/DMBE/SP_MAPPED_HEADER_SD. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM /DMBE/SP_MAPPED_HEADER_SD * INTO TABLE @DATA(IT_/DMBE/SP_MAPPED_HEADER_SD2). *--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_HEADER_SD INDEX 1 INTO DATA(WA_/DMBE/SP_MAPPED_HEADER_SD2). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_/DMBE/SP_MAPPED_HEADER_SD ASSIGNING </DMBE/SP_MAPPED_HEADER_SD>.*To update a field value using a field symbol simply change the value via the field symbol pointer
</DMBE/SP_MAPPED_HEADER_SD>-REFOBJTYPE = 1.
</DMBE/SP_MAPPED_HEADER_SD>-REFOBJKEY = 1.
</DMBE/SP_MAPPED_HEADER_SD>-REFDOCTYPE = 1.
</DMBE/SP_MAPPED_HEADER_SD>-DOC_TYPE = 1.
</DMBE/SP_MAPPED_HEADER_SD>-COLLECT_NO = 1.
ENDLOOP. LOOP AT IT_/DMBE/SP_MAPPED_HEADER_SD INTO WA_/DMBE/SP_MAPPED_HEADER_SD. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_/DMBE/SP_MAPPED_HEADER_SD-SALES_ORG, sy-vline,
WA_/DMBE/SP_MAPPED_HEADER_SD-DISTR_CHAN, sy-vline,
WA_/DMBE/SP_MAPPED_HEADER_SD-DIVISION, sy-vline,
WA_/DMBE/SP_MAPPED_HEADER_SD-SALES_GRP, sy-vline,
WA_/DMBE/SP_MAPPED_HEADER_SD-SALES_OFF, sy-vline,
WA_/DMBE/SP_MAPPED_HEADER_SD-REQ_DATE_H, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/DMBE/SP_MAPPED_HEADER_SD 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_HEADER_SD 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_HEADER_SD INTO WA_/DMBE/SP_MAPPED_HEADER_SD. *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 AUART, internal->external for field DOC_TYPE CALL FUNCTION 'CONVERSION_EXIT_AUART_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-DOC_TYPE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-DOC_TYPE.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field REF_DOC CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-REF_DOC IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-REF_DOC.
WRITE:/ 'New Value:', ld_input.
*Conversion exit EXCRT, internal->external for field EXRATE_FI CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-EXRATE_FI IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-EXRATE_FI.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field DOC_NUM_FI CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-DOC_NUM_FI IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-DOC_NUM_FI.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field MAST_CONTR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-MAST_CONTR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-MAST_CONTR.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field NOTIF_NO CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-NOTIF_NO IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-NOTIF_NO.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ABPSN, internal->external for field WBS_ELEM CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-WBS_ELEM IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-WBS_ELEM.
WRITE:/ 'New Value:', ld_input.
*Conversion exit EXCRT, internal->external for field EXCH_RATE_FI_V CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-EXCH_RATE_FI_V IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-EXCH_RATE_FI_V.
WRITE:/ 'New Value:', ld_input.
*Conversion exit ALPHA, internal->external for field BUSINESS_PARTNER_NO CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/DMBE/SP_MAPPED_HEADER_SD-BUSINESS_PARTNER_NO IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/DMBE/SP_MAPPED_HEADER_SD-BUSINESS_PARTNER_NO.
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_/DMBE/SP_MAPPED_HEADER_SD_STR,
REFOBJTYPE TYPE STRING,
REFOBJKEY TYPE STRING,
REFDOCTYPE TYPE STRING,
DOC_TYPE 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_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_C 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,
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,
PMTGAR_PRO TYPE STRING,
DEPARTM_NO TYPE STRING,
REC_POINT 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,
CURR_ISO TYPE STRING,
CREATED_BY TYPE STRING,
TAXDEP_CTY TYPE STRING,
TAXDST_CTY TYPE STRING,
EUTRI_DEAL TYPE STRING,
MAST_CONTR TYPE STRING,
REF_PROC TYPE STRING,
CHKPRTAUTH TYPE STRING,
CMLQTY_DAT TYPE STRING,
VERSION TYPE STRING,
NOTIF_NO TYPE STRING,
WBS_ELEM TYPE STRING,
EXCH_RATE_FI_V TYPE STRING,
EXCHG_RATE_V TYPE STRING,
FKK_CONACCT TYPE STRING,
CAMPAIGN TYPE STRING,
DOC_CLASS TYPE STRING,
H_CURR TYPE STRING,
H_CURR_ISO TYPE STRING,
SHIP_TYPE TYPE STRING,
S_PROC_IND TYPE STRING,
REF_DOC_L_LONG TYPE STRING,
LINE_TIME TYPE STRING,
CALC_MOTIVE 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,
SD_DOC_CAT_LONG TYPE STRING,
REFDOC_CAT_LONG TYPE STRING,
INCOTERMSV TYPE STRING,
INCOTERMS2L TYPE STRING,
INCOTERMS3L TYPE STRING,END OF T_EKKO_STR. DATA: WA_/DMBE/SP_MAPPED_HEADER_SD_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_HEADER_SD_STR-REFOBJTYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REFOBJKEY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REFDOCTYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DOC_TYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-COLLECT_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SALES_ORG sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DISTR_CHAN sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DIVISION sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SALES_GRP sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SALES_OFF sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REQ_DATE_H sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DATE_TYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PURCH_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PO_METHOD sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PO_SUPPLEM sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REF_1 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-NAME sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TELEPHONE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PRICE_GRP sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CUST_GROUP sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SALES_DIST sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PRICE_LIST sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-INCOTERMS1 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-INCOTERMS2 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PMNTTRMS sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DLV_BLOCK sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-BILL_BLOCK sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-ORD_REASON sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-COMPL_DLV sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PRICE_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-QT_VALID_F sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-QT_VALID_T sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CT_VALID_F sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CT_VALID_T sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CUST_GRP1 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CUST_GRP2 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CUST_GRP3 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CUST_GRP4 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CUST_GRP5 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PURCH_NO_C sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PURCH_NO_S sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PO_DAT_S sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PO_METH_S sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REF_1_S sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SD_DOC_CAT sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DOC_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-WAR_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SHIP_COND sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PP_SEARCH sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DUN_COUNT sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DUN_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DLVSCHDUSE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PLDLVSTYP sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REF_DOC sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-COMP_CDE_B sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-ALTTAX_CLS sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS2 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS3 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS4 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS5 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS6 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS7 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS8 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAX_CLASS9 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REF_DOC_L sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-ASS_NUMBER sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REFDOC_CAT sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-ORDCOMB_IN sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-BILL_SCHED sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-INVO_SCHED sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-MN_INVOICE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-EXRATE_FI sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-ADD_VAL_DY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-FIX_VAL_DY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PYMT_METH sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-ACCNT_ASGN sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-EXCHG_RATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-BILL_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SERV_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DUNN_KEY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DUNN_BLOCK sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PMTGAR_PRO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DEPARTM_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REC_POINT sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DOC_NUM_FI sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CSTCNDGRP1 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CSTCNDGRP2 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CSTCNDGRP3 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CSTCNDGRP4 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CSTCNDGRP5 sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DLV_TIME sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CURRENCY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CURR_ISO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CREATED_BY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAXDEP_CTY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TAXDST_CTY sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-EUTRI_DEAL sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-MAST_CONTR sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REF_PROC sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CHKPRTAUTH sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CMLQTY_DAT sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-VERSION sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-NOTIF_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-WBS_ELEM sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-EXCH_RATE_FI_V sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-EXCHG_RATE_V sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-FKK_CONACCT sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CAMPAIGN sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-DOC_CLASS sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-H_CURR sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-H_CURR_ISO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SHIP_TYPE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-S_PROC_IND sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REF_DOC_L_LONG sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-LINE_TIME sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CALC_MOTIVE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PSM_PSTNG_DATE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-TREASURY_ACC_SYMBOL sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-BUSINESS_EVENT_TCODE sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-MODIFICATION_ALLOWED sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-CANCELLATION_ALLOWED sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-PAYMENT_METHODS sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-BUSINESS_PARTNER_NO sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REPORTING_FREQ sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SEPA_MANDATE_ID sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-SD_DOC_CAT_LONG sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-REFDOC_CAT_LONG sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-INCOTERMSV sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-INCOTERMS2L sy-vline
WA_/DMBE/SP_MAPPED_HEADER_SD_STR-INCOTERMS3L sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.