ABAP Select data from SAP table MCVBRKB 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 MCVBRKB 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 MCVBRKB. 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 MCVBRKB 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_MCVBRKB TYPE STANDARD TABLE OF MCVBRKB,
      WA_MCVBRKB TYPE MCVBRKB,
      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: <MCVBRKB> TYPE MCVBRKB.

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

SELECT *
*restrict ABAP select to first 10 rows
 UP TO 10 ROWS      
  FROM MCVBRKB
  INTO TABLE IT_MCVBRKB.

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM MCVBRKB
*  INTO TABLE @DATA(IT_MCVBRKB2).
*--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_MCVBRKB INDEX 1 INTO DATA(WA_MCVBRKB2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_MCVBRKB ASSIGNING <MCVBRKB>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<MCVBRKB>-SUPKZ = 1.
<MCVBRKB>-MANDT = 1.
<MCVBRKB>-VBELN = 1.
<MCVBRKB>-FKART = 1.
<MCVBRKB>-FKTYP = 1.
ENDLOOP.

LOOP AT IT_MCVBRKB INTO WA_MCVBRKB.
*Write horizonal line to screen report.
  WRITE:/ sy-uline.

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_MCVBRKB-VBTYP, sy-vline,
WA_MCVBRKB-WAERK, sy-vline,
WA_MCVBRKB-VKORG, sy-vline,
WA_MCVBRKB-VTWEG, sy-vline,
WA_MCVBRKB-KALSM, sy-vline,
WA_MCVBRKB-KNUMV, sy-vline.
ENDLOOP. *Add any further fields from structure WA_MCVBRKB 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_MCVBRKB 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_MCVBRKB INTO WA_MCVBRKB. *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 VBELN CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_MCVBRKB-VBELN IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_MCVBRKB-VBELN.
WRITE:/ 'New Value:', ld_input.

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

*Conversion exit GJAHR, internal->external for field GJAHR CALL FUNCTION 'CONVERSION_EXIT_GJAHR_OUTPUT' EXPORTING input = WA_MCVBRKB-GJAHR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_MCVBRKB-GJAHR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit EXCRT, internal->external for field KURRF CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT' EXPORTING input = WA_MCVBRKB-KURRF IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_MCVBRKB-KURRF.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

*Conversion exit EXCRT, internal->external for field CMKUF CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT' EXPORTING input = WA_MCVBRKB-CMKUF IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_MCVBRKB-CMKUF.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

*Conversion exit EXCRT, internal->external for field AKKUR CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT' EXPORTING input = WA_MCVBRKB-AKKUR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_MCVBRKB-AKKUR.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

*Conversion exit ALPHA, internal->external for field MCBIW CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_MCVBRKB-MCBIW IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_MCVBRKB-MCBIW.
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_MCVBRKB_STR,
SUPKZ TYPE STRING,
MANDT TYPE STRING,
VBELN TYPE STRING,
FKART TYPE STRING,
FKTYP TYPE STRING,
VBTYP TYPE STRING,
WAERK TYPE STRING,
VKORG TYPE STRING,
VTWEG TYPE STRING,
KALSM TYPE STRING,
KNUMV TYPE STRING,
VSBED TYPE STRING,
FKDAT TYPE STRING,
BELNR TYPE STRING,
GJAHR TYPE STRING,
POPER TYPE STRING,
KONDA TYPE STRING,
KDGRP TYPE STRING,
BZIRK TYPE STRING,
PLTYP TYPE STRING,
INCO1 TYPE STRING,
INCO2 TYPE STRING,
RFBSK TYPE STRING,
MRNKZ TYPE STRING,
KURRF TYPE STRING,
CPKUR TYPE STRING,
VALTG TYPE STRING,
VALDT TYPE STRING,
ZTERM TYPE STRING,
ZLSCH TYPE STRING,
KTGRD TYPE STRING,
LAND1 TYPE STRING,
REGIO TYPE STRING,
COUNC TYPE STRING,
CITYC TYPE STRING,
BUKRS TYPE STRING,
TAXK1 TYPE STRING,
TAXK2 TYPE STRING,
TAXK3 TYPE STRING,
TAXK4 TYPE STRING,
TAXK5 TYPE STRING,
TAXK6 TYPE STRING,
TAXK7 TYPE STRING,
TAXK8 TYPE STRING,
TAXK9 TYPE STRING,
NETWR TYPE STRING,
ZUKRI TYPE STRING,
ERNAM TYPE STRING,
ERZET TYPE STRING,
ERDAT TYPE STRING,
STAFO TYPE STRING,
KUNRG TYPE STRING,
KUNAG TYPE STRING,
MABER TYPE STRING,
STWAE TYPE STRING,
STCEG TYPE STRING,
AEDAT TYPE STRING,
SFAKN TYPE STRING,
KNUMA TYPE STRING,
FKART_RL TYPE STRING,
FKDAT_RL TYPE STRING,
KURST TYPE STRING,
MSCHL TYPE STRING,
MANSP TYPE STRING,
SPART TYPE STRING,
KKBER TYPE STRING,
KNKLI TYPE STRING,
CMWAE TYPE STRING,
CMKUF TYPE STRING,
HITYP_PR TYPE STRING,
BSTNK_VF TYPE STRING,
VBUND TYPE STRING,
FKART_AB TYPE STRING,
KAPPL TYPE STRING,
LANDTX TYPE STRING,
STCEG_H TYPE STRING,
STCEG_L TYPE STRING,
XBLNR TYPE STRING,
ZUONR TYPE STRING,
MWSBK TYPE STRING,
LOGSYS TYPE STRING,
FKSTO TYPE STRING,
XEGDR TYPE STRING,
RPLNR TYPE STRING,
J_1AFITP TYPE STRING,
KURRF_DAT TYPE STRING,
KIDNO TYPE STRING,
BVTYP TYPE STRING,
NUMPG TYPE STRING,
BUPLA TYPE STRING,
VKONT TYPE STRING,
FKK_DOCSTAT TYPE STRING,
NRZAS TYPE STRING,
SPE_BILLING_IND TYPE STRING,
VTREF TYPE STRING,
FK_SOURCE_SYS TYPE STRING,
FKTYP_CRM TYPE STRING,
STGRD TYPE STRING,
CHANGED_ON TYPE STRING,
EXPKZ TYPE STRING,
EXNUM TYPE STRING,
AKWAE TYPE STRING,
AKKUR TYPE STRING,
LCNUM TYPE STRING,
_DATAAGING TYPE STRING,
BUCHK TYPE STRING,
GBSTK TYPE STRING,
RELIK TYPE STRING,
UVALS TYPE STRING,
UVPRS TYPE STRING,
CLRST TYPE STRING,
FKSAK TYPE STRING,
FKARA TYPE STRING,
VF_STATUS TYPE STRING,
VF_TODO TYPE STRING,
BDR_STATUS TYPE STRING,
BDR_REF TYPE STRING,
BDR_REF_LOGSYS TYPE STRING,
BDR_REF_VBTYP TYPE STRING,
PBD_STATUS TYPE STRING,
ABSTK TYPE STRING,
DRAFT TYPE STRING,
ACTIVEDOCUMENT TYPE STRING,
GRWCU TYPE STRING,
BLART TYPE STRING,
INTRA_REL TYPE STRING,
INTRA_EXCL TYPE STRING,
ACCRREL TYPE STRING,
PSPSD TYPE STRING,
APM_APPROVAL_STATUS TYPE STRING,
APM_APPROVAL_REASON TYPE STRING,
SRCEDOC_EXT_COMM_SYST_TYPE TYPE STRING,
ICO_LIFNR TYPE STRING,
J_1TPBUPL TYPE STRING,
INCOV TYPE STRING,
INCO2_L TYPE STRING,
INCO3_L TYPE STRING,
SDM_VERSION TYPE STRING,
DUMMY_BILLINGDOC_INCL_EEW_PS TYPE STRING,
GLO_LOG_REF1_HD TYPE STRING,
ZAPCGKH TYPE STRING,
APCGK_EXTENDH TYPE STRING,
ZABDATH TYPE STRING,
DPC_REL TYPE STRING,
AD01BASDOC TYPE STRING,
AD01FAREG TYPE STRING,
VCHRNMBR TYPE STRING,
J_3GKBAUL TYPE STRING,
J_3GKENIE TYPE STRING,
KUNWE TYPE STRING,
MNDID TYPE STRING,
PAY_TYPE TYPE STRING,
SEPON TYPE STRING,
MNDVG TYPE STRING,
SPPAYM TYPE STRING,
SPPORD TYPE STRING,
HWAER TYPE STRING,
RFBSK_OLD TYPE STRING,
PERIV_CM TYPE STRING,
PKUNAG TYPE STRING,
PKUNWE TYPE STRING,
PKUNRE TYPE STRING,
PKUNRG TYPE STRING,
PSPDNR TYPE STRING,
PVRTNR TYPE STRING,
PLAAG TYPE STRING,
PLAWE TYPE STRING,
PLARE TYPE STRING,
PLARG TYPE STRING,
PLASP TYPE STRING,
PLAVE TYPE STRING,
PABLA TYPE STRING,
PZONE TYPE STRING,
PDUMMY TYPE STRING,
PZPERS TYPE STRING,
PLAZM TYPE STRING,
HIEZU01 TYPE STRING,
HIEZU02 TYPE STRING,
HIEZU03 TYPE STRING,
HIEZU04 TYPE STRING,
HIEZU05 TYPE STRING,
HIEZU06 TYPE STRING,
HIEZU07 TYPE STRING,
HIEZU08 TYPE STRING,
HIEZU09 TYPE STRING,
HIEZU10 TYPE STRING,
DUMMY TYPE STRING,
MCBONUS TYPE STRING,
MCFINANZ TYPE STRING,
MCPROJEKT TYPE STRING,
MCKREDIT TYPE STRING,
MCCAS TYPE STRING,
MCKOUPD TYPE STRING,
MCLIPLAN TYPE STRING,
MCWERTKON TYPE STRING,
MCBIW TYPE STRING,END OF T_EKKO_STR. DATA: WA_MCVBRKB_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_MCVBRKB_STR-SUPKZ sy-vline
WA_MCVBRKB_STR-MANDT sy-vline
WA_MCVBRKB_STR-VBELN sy-vline
WA_MCVBRKB_STR-FKART sy-vline
WA_MCVBRKB_STR-FKTYP sy-vline
WA_MCVBRKB_STR-VBTYP sy-vline
WA_MCVBRKB_STR-WAERK sy-vline
WA_MCVBRKB_STR-VKORG sy-vline
WA_MCVBRKB_STR-VTWEG sy-vline
WA_MCVBRKB_STR-KALSM sy-vline
WA_MCVBRKB_STR-KNUMV sy-vline
WA_MCVBRKB_STR-VSBED sy-vline
WA_MCVBRKB_STR-FKDAT sy-vline
WA_MCVBRKB_STR-BELNR sy-vline
WA_MCVBRKB_STR-GJAHR sy-vline
WA_MCVBRKB_STR-POPER sy-vline
WA_MCVBRKB_STR-KONDA sy-vline
WA_MCVBRKB_STR-KDGRP sy-vline
WA_MCVBRKB_STR-BZIRK sy-vline
WA_MCVBRKB_STR-PLTYP sy-vline
WA_MCVBRKB_STR-INCO1 sy-vline
WA_MCVBRKB_STR-INCO2 sy-vline
WA_MCVBRKB_STR-RFBSK sy-vline
WA_MCVBRKB_STR-MRNKZ sy-vline
WA_MCVBRKB_STR-KURRF sy-vline
WA_MCVBRKB_STR-CPKUR sy-vline
WA_MCVBRKB_STR-VALTG sy-vline
WA_MCVBRKB_STR-VALDT sy-vline
WA_MCVBRKB_STR-ZTERM sy-vline
WA_MCVBRKB_STR-ZLSCH sy-vline
WA_MCVBRKB_STR-KTGRD sy-vline
WA_MCVBRKB_STR-LAND1 sy-vline
WA_MCVBRKB_STR-REGIO sy-vline
WA_MCVBRKB_STR-COUNC sy-vline
WA_MCVBRKB_STR-CITYC sy-vline
WA_MCVBRKB_STR-BUKRS sy-vline
WA_MCVBRKB_STR-TAXK1 sy-vline
WA_MCVBRKB_STR-TAXK2 sy-vline
WA_MCVBRKB_STR-TAXK3 sy-vline
WA_MCVBRKB_STR-TAXK4 sy-vline
WA_MCVBRKB_STR-TAXK5 sy-vline
WA_MCVBRKB_STR-TAXK6 sy-vline
WA_MCVBRKB_STR-TAXK7 sy-vline
WA_MCVBRKB_STR-TAXK8 sy-vline
WA_MCVBRKB_STR-TAXK9 sy-vline
WA_MCVBRKB_STR-NETWR sy-vline
WA_MCVBRKB_STR-ZUKRI sy-vline
WA_MCVBRKB_STR-ERNAM sy-vline
WA_MCVBRKB_STR-ERZET sy-vline
WA_MCVBRKB_STR-ERDAT sy-vline
WA_MCVBRKB_STR-STAFO sy-vline
WA_MCVBRKB_STR-KUNRG sy-vline
WA_MCVBRKB_STR-KUNAG sy-vline
WA_MCVBRKB_STR-MABER sy-vline
WA_MCVBRKB_STR-STWAE sy-vline
WA_MCVBRKB_STR-STCEG sy-vline
WA_MCVBRKB_STR-AEDAT sy-vline
WA_MCVBRKB_STR-SFAKN sy-vline
WA_MCVBRKB_STR-KNUMA sy-vline
WA_MCVBRKB_STR-FKART_RL sy-vline
WA_MCVBRKB_STR-FKDAT_RL sy-vline
WA_MCVBRKB_STR-KURST sy-vline
WA_MCVBRKB_STR-MSCHL sy-vline
WA_MCVBRKB_STR-MANSP sy-vline
WA_MCVBRKB_STR-SPART sy-vline
WA_MCVBRKB_STR-KKBER sy-vline
WA_MCVBRKB_STR-KNKLI sy-vline
WA_MCVBRKB_STR-CMWAE sy-vline
WA_MCVBRKB_STR-CMKUF sy-vline
WA_MCVBRKB_STR-HITYP_PR sy-vline
WA_MCVBRKB_STR-BSTNK_VF sy-vline
WA_MCVBRKB_STR-VBUND sy-vline
WA_MCVBRKB_STR-FKART_AB sy-vline
WA_MCVBRKB_STR-KAPPL sy-vline
WA_MCVBRKB_STR-LANDTX sy-vline
WA_MCVBRKB_STR-STCEG_H sy-vline
WA_MCVBRKB_STR-STCEG_L sy-vline
WA_MCVBRKB_STR-XBLNR sy-vline
WA_MCVBRKB_STR-ZUONR sy-vline
WA_MCVBRKB_STR-MWSBK sy-vline
WA_MCVBRKB_STR-LOGSYS sy-vline
WA_MCVBRKB_STR-FKSTO sy-vline
WA_MCVBRKB_STR-XEGDR sy-vline
WA_MCVBRKB_STR-RPLNR sy-vline
WA_MCVBRKB_STR-J_1AFITP sy-vline
WA_MCVBRKB_STR-KURRF_DAT sy-vline
WA_MCVBRKB_STR-KIDNO sy-vline
WA_MCVBRKB_STR-BVTYP sy-vline
WA_MCVBRKB_STR-NUMPG sy-vline
WA_MCVBRKB_STR-BUPLA sy-vline
WA_MCVBRKB_STR-VKONT sy-vline
WA_MCVBRKB_STR-FKK_DOCSTAT sy-vline
WA_MCVBRKB_STR-NRZAS sy-vline
WA_MCVBRKB_STR-SPE_BILLING_IND sy-vline
WA_MCVBRKB_STR-VTREF sy-vline
WA_MCVBRKB_STR-FK_SOURCE_SYS sy-vline
WA_MCVBRKB_STR-FKTYP_CRM sy-vline
WA_MCVBRKB_STR-STGRD sy-vline
WA_MCVBRKB_STR-CHANGED_ON sy-vline
WA_MCVBRKB_STR-EXPKZ sy-vline
WA_MCVBRKB_STR-EXNUM sy-vline
WA_MCVBRKB_STR-AKWAE sy-vline
WA_MCVBRKB_STR-AKKUR sy-vline
WA_MCVBRKB_STR-LCNUM sy-vline
WA_MCVBRKB_STR-_DATAAGING sy-vline
WA_MCVBRKB_STR-BUCHK sy-vline
WA_MCVBRKB_STR-GBSTK sy-vline
WA_MCVBRKB_STR-RELIK sy-vline
WA_MCVBRKB_STR-UVALS sy-vline
WA_MCVBRKB_STR-UVPRS sy-vline
WA_MCVBRKB_STR-CLRST sy-vline
WA_MCVBRKB_STR-FKSAK sy-vline
WA_MCVBRKB_STR-FKARA sy-vline
WA_MCVBRKB_STR-VF_STATUS sy-vline
WA_MCVBRKB_STR-VF_TODO sy-vline
WA_MCVBRKB_STR-BDR_STATUS sy-vline
WA_MCVBRKB_STR-BDR_REF sy-vline
WA_MCVBRKB_STR-BDR_REF_LOGSYS sy-vline
WA_MCVBRKB_STR-BDR_REF_VBTYP sy-vline
WA_MCVBRKB_STR-PBD_STATUS sy-vline
WA_MCVBRKB_STR-ABSTK sy-vline
WA_MCVBRKB_STR-DRAFT sy-vline
WA_MCVBRKB_STR-ACTIVEDOCUMENT sy-vline
WA_MCVBRKB_STR-GRWCU sy-vline
WA_MCVBRKB_STR-BLART sy-vline
WA_MCVBRKB_STR-INTRA_REL sy-vline
WA_MCVBRKB_STR-INTRA_EXCL sy-vline
WA_MCVBRKB_STR-ACCRREL sy-vline
WA_MCVBRKB_STR-PSPSD sy-vline
WA_MCVBRKB_STR-APM_APPROVAL_STATUS sy-vline
WA_MCVBRKB_STR-APM_APPROVAL_REASON sy-vline
WA_MCVBRKB_STR-SRCEDOC_EXT_COMM_SYST_TYPE sy-vline
WA_MCVBRKB_STR-ICO_LIFNR sy-vline
WA_MCVBRKB_STR-J_1TPBUPL sy-vline
WA_MCVBRKB_STR-INCOV sy-vline
WA_MCVBRKB_STR-INCO2_L sy-vline
WA_MCVBRKB_STR-INCO3_L sy-vline
WA_MCVBRKB_STR-SDM_VERSION sy-vline
WA_MCVBRKB_STR-DUMMY_BILLINGDOC_INCL_EEW_PS sy-vline
WA_MCVBRKB_STR-GLO_LOG_REF1_HD sy-vline
WA_MCVBRKB_STR-ZAPCGKH sy-vline
WA_MCVBRKB_STR-APCGK_EXTENDH sy-vline
WA_MCVBRKB_STR-ZABDATH sy-vline
WA_MCVBRKB_STR-DPC_REL sy-vline
WA_MCVBRKB_STR-AD01BASDOC sy-vline
WA_MCVBRKB_STR-AD01FAREG sy-vline
WA_MCVBRKB_STR-VCHRNMBR sy-vline
WA_MCVBRKB_STR-J_3GKBAUL sy-vline
WA_MCVBRKB_STR-J_3GKENIE sy-vline
WA_MCVBRKB_STR-KUNWE sy-vline
WA_MCVBRKB_STR-MNDID sy-vline
WA_MCVBRKB_STR-PAY_TYPE sy-vline
WA_MCVBRKB_STR-SEPON sy-vline
WA_MCVBRKB_STR-MNDVG sy-vline
WA_MCVBRKB_STR-SPPAYM sy-vline
WA_MCVBRKB_STR-SPPORD sy-vline
WA_MCVBRKB_STR-HWAER sy-vline
WA_MCVBRKB_STR-RFBSK_OLD sy-vline
WA_MCVBRKB_STR-PERIV_CM sy-vline
WA_MCVBRKB_STR-PKUNAG sy-vline
WA_MCVBRKB_STR-PKUNWE sy-vline
WA_MCVBRKB_STR-PKUNRE sy-vline
WA_MCVBRKB_STR-PKUNRG sy-vline
WA_MCVBRKB_STR-PSPDNR sy-vline
WA_MCVBRKB_STR-PVRTNR sy-vline
WA_MCVBRKB_STR-PLAAG sy-vline
WA_MCVBRKB_STR-PLAWE sy-vline
WA_MCVBRKB_STR-PLARE sy-vline
WA_MCVBRKB_STR-PLARG sy-vline
WA_MCVBRKB_STR-PLASP sy-vline
WA_MCVBRKB_STR-PLAVE sy-vline
WA_MCVBRKB_STR-PABLA sy-vline
WA_MCVBRKB_STR-PZONE sy-vline
WA_MCVBRKB_STR-PDUMMY sy-vline
WA_MCVBRKB_STR-PZPERS sy-vline
WA_MCVBRKB_STR-PLAZM sy-vline
WA_MCVBRKB_STR-HIEZU01 sy-vline
WA_MCVBRKB_STR-HIEZU02 sy-vline
WA_MCVBRKB_STR-HIEZU03 sy-vline
WA_MCVBRKB_STR-HIEZU04 sy-vline
WA_MCVBRKB_STR-HIEZU05 sy-vline
WA_MCVBRKB_STR-HIEZU06 sy-vline
WA_MCVBRKB_STR-HIEZU07 sy-vline
WA_MCVBRKB_STR-HIEZU08 sy-vline
WA_MCVBRKB_STR-HIEZU09 sy-vline
WA_MCVBRKB_STR-HIEZU10 sy-vline
WA_MCVBRKB_STR-DUMMY sy-vline
WA_MCVBRKB_STR-MCBONUS sy-vline
WA_MCVBRKB_STR-MCFINANZ sy-vline
WA_MCVBRKB_STR-MCPROJEKT sy-vline
WA_MCVBRKB_STR-MCKREDIT sy-vline
WA_MCVBRKB_STR-MCCAS sy-vline
WA_MCVBRKB_STR-MCKOUPD sy-vline
WA_MCVBRKB_STR-MCLIPLAN sy-vline
WA_MCVBRKB_STR-MCWERTKON sy-vline
WA_MCVBRKB_STR-MCBIW sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.