ABAP Select data from SAP table FGL_BCF_S_PRE 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 FGL_BCF_S_PRE 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 FGL_BCF_S_PRE. 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 FGL_BCF_S_PRE 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_FGL_BCF_S_PRE TYPE STANDARD TABLE OF FGL_BCF_S_PRE,
      WA_FGL_BCF_S_PRE TYPE FGL_BCF_S_PRE,
      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: <FGL_BCF_S_PRE> TYPE FGL_BCF_S_PRE.

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

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

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM FGL_BCF_S_PRE
*  INTO TABLE @DATA(IT_FGL_BCF_S_PRE2).
*--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_FGL_BCF_S_PRE INDEX 1 INTO DATA(WA_FGL_BCF_S_PRE2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_FGL_BCF_S_PRE ASSIGNING <FGL_BCF_S_PRE>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<FGL_BCF_S_PRE>-RCLNT = 1.
<FGL_BCF_S_PRE>-BELNR = 1.
<FGL_BCF_S_PRE>-DOCLN = 1.
<FGL_BCF_S_PRE>-XBILK = 1.
<FGL_BCF_S_PRE>-RLDNR = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_FGL_BCF_S_PRE-RYEAR, sy-vline,
WA_FGL_BCF_S_PRE-RBUKRS, sy-vline,
WA_FGL_BCF_S_PRE-AWTYP, sy-vline,
WA_FGL_BCF_S_PRE-BLART, sy-vline,
WA_FGL_BCF_S_PRE-BTTYPE, sy-vline,
WA_FGL_BCF_S_PRE-CO_OSL, sy-vline.
ENDLOOP. *Add any further fields from structure WA_FGL_BCF_S_PRE 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_FGL_BCF_S_PRE 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_FGL_BCF_S_PRE INTO WA_FGL_BCF_S_PRE. *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 BELNR CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_FGL_BCF_S_PRE-BELNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_FGL_BCF_S_PRE-BELNR.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

*Conversion exit ABPSP, internal->external for field MAT_PSPNR CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT' EXPORTING input = WA_FGL_BCF_S_PRE-MAT_PSPNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_FGL_BCF_S_PRE-MAT_PSPNR.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

*Conversion exit ABPSN, internal->external for field PS_POSID CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT' EXPORTING input = WA_FGL_BCF_S_PRE-PS_POSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_FGL_BCF_S_PRE-PS_POSID.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ABPSN, internal->external for field PPS_POSID CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT' EXPORTING input = WA_FGL_BCF_S_PRE-PPS_POSID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_FGL_BCF_S_PRE-PPS_POSID.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

*Conversion exit ALPHA, internal->external for field RECID CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_FGL_BCF_S_PRE-RECID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_FGL_BCF_S_PRE-RECID.
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_FGL_BCF_S_PRE_STR,
RCLNT TYPE STRING,
BELNR TYPE STRING,
DOCLN TYPE STRING,
XBILK TYPE STRING,
RLDNR TYPE STRING,
RYEAR TYPE STRING,
RBUKRS TYPE STRING,
AWTYP TYPE STRING,
BLART TYPE STRING,
BTTYPE TYPE STRING,
CO_OSL TYPE STRING,
EPRCTR TYPE STRING,
GLACCOUNT_TYPE TYPE STRING,
HSL TYPE STRING,
KOART TYPE STRING,
KOKRS TYPE STRING,
KSL TYPE STRING,
KTOP2 TYPE STRING,
KTOPL TYPE STRING,
KTOSL TYPE STRING,
KUNNR TYPE STRING,
LIFNR TYPE STRING,
LOKKT TYPE STRING,
MATNR TYPE STRING,
MSL TYPE STRING,
ORG_ACCOUNT TYPE STRING,
OSL TYPE STRING,
PERIV TYPE STRING,
PFSL TYPE STRING,
PPRCTR TYPE STRING,
PRCTR TYPE STRING,
KTEXT TYPE STRING,
PSEGMENT TYPE STRING,
PSL TYPE STRING,
QUANT1 TYPE STRING,
QUANT2 TYPE STRING,
QUANT3 TYPE STRING,
QUNIT1 TYPE STRING,
QUNIT2 TYPE STRING,
QUNIT3 TYPE STRING,
RACCT TYPE STRING,
RASSC TYPE STRING,
RBUSA TYPE STRING,
RCNTR TYPE STRING,
RCO_OCUR TYPE STRING,
RFAREA TYPE STRING,
RHCUR TYPE STRING,
RHOART TYPE STRING,
RKCUR TYPE STRING,
RMVCT TYPE STRING,
ROCUR TYPE STRING,
RRCTY TYPE STRING,
RTCUR TYPE STRING,
RUNIT TYPE STRING,
RVUNIT TYPE STRING,
RVCUR TYPE STRING,
RWCUR TYPE STRING,
SBUSA TYPE STRING,
SCNTR TYPE STRING,
SEGMENT TYPE STRING,
NAME TYPE STRING,
SFAREA TYPE STRING,
SLALITTYPE TYPE STRING,
TEXT_RACCT TYPE STRING,
TSL TYPE STRING,
VMSL TYPE STRING,
VORGN TYPE STRING,
VRGNG TYPE STRING,
VSL TYPE STRING,
WSL TYPE STRING,
XOPVW TYPE STRING,
BUKRS TYPE STRING,
LCURR TYPE STRING,
GCURR TYPE STRING,
OCURR TYPE STRING,
KALNR TYPE STRING,
KZBWS TYPE STRING,
XOBEW TYPE STRING,
SOBKZ TYPE STRING,
MAT_KDAUF TYPE STRING,
MAT_KDPOS TYPE STRING,
MAT_PSPNR TYPE STRING,
MAT_LIFNR TYPE STRING,
BWTAR TYPE STRING,
BWKEY TYPE STRING,
AFABE TYPE STRING,
ANBWA TYPE STRING,
ANLN1 TYPE STRING,
ANLN2 TYPE STRING,
MOVCAT TYPE STRING,
ANLGR TYPE STRING,
ANLGR2 TYPE STRING,
PS_POSID TYPE STRING,
PPS_POSID TYPE STRING,
KDAUF TYPE STRING,
KDPOS TYPE STRING,
PKDAUF TYPE STRING,
PKDPOS TYPE STRING,
FIKRS TYPE STRING,
FISTL TYPE STRING,
MEASURE TYPE STRING,
RFUND TYPE STRING,
RGRANT_NBR TYPE STRING,
RBUDGET_PD TYPE STRING,
VNAME TYPE STRING,
EGRUP TYPE STRING,
RECID TYPE STRING,
OPECL TYPE STRING,
ACDOC_EEW_DUMMY TYPE STRING,
OPEN_VSL TYPE STRING,
OPEN_VMSL TYPE STRING,
OPEN_PSL TYPE STRING,
OPEN_PFSL TYPE STRING,
OPEN_CO_OSL TYPE STRING,
OPEN_WSL TYPE STRING,
OPEN_MSL TYPE STRING,
OPEN_OSL TYPE STRING,
OPEN_KSL TYPE STRING,
OPEN_HSL TYPE STRING,
OPEN_TSL TYPE STRING,
CH_VSL TYPE STRING,
CH_VMSL TYPE STRING,
CH_PSL TYPE STRING,
CH_PFSL TYPE STRING,
CH_CO_OSL TYPE STRING,
CH_WSL TYPE STRING,
CH_MSL TYPE STRING,
CH_OSL TYPE STRING,
CH_KSL TYPE STRING,
CH_HSL TYPE STRING,
CH_TSL TYPE STRING,END OF T_EKKO_STR. DATA: WA_FGL_BCF_S_PRE_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_FGL_BCF_S_PRE_STR-RCLNT sy-vline
WA_FGL_BCF_S_PRE_STR-BELNR sy-vline
WA_FGL_BCF_S_PRE_STR-DOCLN sy-vline
WA_FGL_BCF_S_PRE_STR-XBILK sy-vline
WA_FGL_BCF_S_PRE_STR-RLDNR sy-vline
WA_FGL_BCF_S_PRE_STR-RYEAR sy-vline
WA_FGL_BCF_S_PRE_STR-RBUKRS sy-vline
WA_FGL_BCF_S_PRE_STR-AWTYP sy-vline
WA_FGL_BCF_S_PRE_STR-BLART sy-vline
WA_FGL_BCF_S_PRE_STR-BTTYPE sy-vline
WA_FGL_BCF_S_PRE_STR-CO_OSL sy-vline
WA_FGL_BCF_S_PRE_STR-EPRCTR sy-vline
WA_FGL_BCF_S_PRE_STR-GLACCOUNT_TYPE sy-vline
WA_FGL_BCF_S_PRE_STR-HSL sy-vline
WA_FGL_BCF_S_PRE_STR-KOART sy-vline
WA_FGL_BCF_S_PRE_STR-KOKRS sy-vline
WA_FGL_BCF_S_PRE_STR-KSL sy-vline
WA_FGL_BCF_S_PRE_STR-KTOP2 sy-vline
WA_FGL_BCF_S_PRE_STR-KTOPL sy-vline
WA_FGL_BCF_S_PRE_STR-KTOSL sy-vline
WA_FGL_BCF_S_PRE_STR-KUNNR sy-vline
WA_FGL_BCF_S_PRE_STR-LIFNR sy-vline
WA_FGL_BCF_S_PRE_STR-LOKKT sy-vline
WA_FGL_BCF_S_PRE_STR-MATNR sy-vline
WA_FGL_BCF_S_PRE_STR-MSL sy-vline
WA_FGL_BCF_S_PRE_STR-ORG_ACCOUNT sy-vline
WA_FGL_BCF_S_PRE_STR-OSL sy-vline
WA_FGL_BCF_S_PRE_STR-PERIV sy-vline
WA_FGL_BCF_S_PRE_STR-PFSL sy-vline
WA_FGL_BCF_S_PRE_STR-PPRCTR sy-vline
WA_FGL_BCF_S_PRE_STR-PRCTR sy-vline
WA_FGL_BCF_S_PRE_STR-KTEXT sy-vline
WA_FGL_BCF_S_PRE_STR-PSEGMENT sy-vline
WA_FGL_BCF_S_PRE_STR-PSL sy-vline
WA_FGL_BCF_S_PRE_STR-QUANT1 sy-vline
WA_FGL_BCF_S_PRE_STR-QUANT2 sy-vline
WA_FGL_BCF_S_PRE_STR-QUANT3 sy-vline
WA_FGL_BCF_S_PRE_STR-QUNIT1 sy-vline
WA_FGL_BCF_S_PRE_STR-QUNIT2 sy-vline
WA_FGL_BCF_S_PRE_STR-QUNIT3 sy-vline
WA_FGL_BCF_S_PRE_STR-RACCT sy-vline
WA_FGL_BCF_S_PRE_STR-RASSC sy-vline
WA_FGL_BCF_S_PRE_STR-RBUSA sy-vline
WA_FGL_BCF_S_PRE_STR-RCNTR sy-vline
WA_FGL_BCF_S_PRE_STR-RCO_OCUR sy-vline
WA_FGL_BCF_S_PRE_STR-RFAREA sy-vline
WA_FGL_BCF_S_PRE_STR-RHCUR sy-vline
WA_FGL_BCF_S_PRE_STR-RHOART sy-vline
WA_FGL_BCF_S_PRE_STR-RKCUR sy-vline
WA_FGL_BCF_S_PRE_STR-RMVCT sy-vline
WA_FGL_BCF_S_PRE_STR-ROCUR sy-vline
WA_FGL_BCF_S_PRE_STR-RRCTY sy-vline
WA_FGL_BCF_S_PRE_STR-RTCUR sy-vline
WA_FGL_BCF_S_PRE_STR-RUNIT sy-vline
WA_FGL_BCF_S_PRE_STR-RVUNIT sy-vline
WA_FGL_BCF_S_PRE_STR-RVCUR sy-vline
WA_FGL_BCF_S_PRE_STR-RWCUR sy-vline
WA_FGL_BCF_S_PRE_STR-SBUSA sy-vline
WA_FGL_BCF_S_PRE_STR-SCNTR sy-vline
WA_FGL_BCF_S_PRE_STR-SEGMENT sy-vline
WA_FGL_BCF_S_PRE_STR-NAME sy-vline
WA_FGL_BCF_S_PRE_STR-SFAREA sy-vline
WA_FGL_BCF_S_PRE_STR-SLALITTYPE sy-vline
WA_FGL_BCF_S_PRE_STR-TEXT_RACCT sy-vline
WA_FGL_BCF_S_PRE_STR-TSL sy-vline
WA_FGL_BCF_S_PRE_STR-VMSL sy-vline
WA_FGL_BCF_S_PRE_STR-VORGN sy-vline
WA_FGL_BCF_S_PRE_STR-VRGNG sy-vline
WA_FGL_BCF_S_PRE_STR-VSL sy-vline
WA_FGL_BCF_S_PRE_STR-WSL sy-vline
WA_FGL_BCF_S_PRE_STR-XOPVW sy-vline
WA_FGL_BCF_S_PRE_STR-BUKRS sy-vline
WA_FGL_BCF_S_PRE_STR-LCURR sy-vline
WA_FGL_BCF_S_PRE_STR-GCURR sy-vline
WA_FGL_BCF_S_PRE_STR-OCURR sy-vline
WA_FGL_BCF_S_PRE_STR-KALNR sy-vline
WA_FGL_BCF_S_PRE_STR-KZBWS sy-vline
WA_FGL_BCF_S_PRE_STR-XOBEW sy-vline
WA_FGL_BCF_S_PRE_STR-SOBKZ sy-vline
WA_FGL_BCF_S_PRE_STR-MAT_KDAUF sy-vline
WA_FGL_BCF_S_PRE_STR-MAT_KDPOS sy-vline
WA_FGL_BCF_S_PRE_STR-MAT_PSPNR sy-vline
WA_FGL_BCF_S_PRE_STR-MAT_LIFNR sy-vline
WA_FGL_BCF_S_PRE_STR-BWTAR sy-vline
WA_FGL_BCF_S_PRE_STR-BWKEY sy-vline
WA_FGL_BCF_S_PRE_STR-AFABE sy-vline
WA_FGL_BCF_S_PRE_STR-ANBWA sy-vline
WA_FGL_BCF_S_PRE_STR-ANLN1 sy-vline
WA_FGL_BCF_S_PRE_STR-ANLN2 sy-vline
WA_FGL_BCF_S_PRE_STR-MOVCAT sy-vline
WA_FGL_BCF_S_PRE_STR-ANLGR sy-vline
WA_FGL_BCF_S_PRE_STR-ANLGR2 sy-vline
WA_FGL_BCF_S_PRE_STR-PS_POSID sy-vline
WA_FGL_BCF_S_PRE_STR-PPS_POSID sy-vline
WA_FGL_BCF_S_PRE_STR-KDAUF sy-vline
WA_FGL_BCF_S_PRE_STR-KDPOS sy-vline
WA_FGL_BCF_S_PRE_STR-PKDAUF sy-vline
WA_FGL_BCF_S_PRE_STR-PKDPOS sy-vline
WA_FGL_BCF_S_PRE_STR-FIKRS sy-vline
WA_FGL_BCF_S_PRE_STR-FISTL sy-vline
WA_FGL_BCF_S_PRE_STR-MEASURE sy-vline
WA_FGL_BCF_S_PRE_STR-RFUND sy-vline
WA_FGL_BCF_S_PRE_STR-RGRANT_NBR sy-vline
WA_FGL_BCF_S_PRE_STR-RBUDGET_PD sy-vline
WA_FGL_BCF_S_PRE_STR-VNAME sy-vline
WA_FGL_BCF_S_PRE_STR-EGRUP sy-vline
WA_FGL_BCF_S_PRE_STR-RECID sy-vline
WA_FGL_BCF_S_PRE_STR-OPECL sy-vline
WA_FGL_BCF_S_PRE_STR-ACDOC_EEW_DUMMY sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_VSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_VMSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_PSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_PFSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_CO_OSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_WSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_MSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_OSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_KSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_HSL sy-vline
WA_FGL_BCF_S_PRE_STR-OPEN_TSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_VSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_VMSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_PSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_PFSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_CO_OSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_WSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_MSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_OSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_KSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_HSL sy-vline
WA_FGL_BCF_S_PRE_STR-CH_TSL sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.