ABAP Select data from SAP table P3671_ALL 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 P3671_ALL 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 P3671_ALL. 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 P3671_ALL 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_P3671_ALL TYPE STANDARD TABLE OF P3671_ALL,
      WA_P3671_ALL TYPE P3671_ALL,
      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: <P3671_ALL> TYPE P3671_ALL.

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

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

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM P3671_ALL
*  INTO TABLE @DATA(IT_P3671_ALL2).
*--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_P3671_ALL INDEX 1 INTO DATA(WA_P3671_ALL2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_P3671_ALL ASSIGNING <P3671_ALL>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<P3671_ALL>-PERNR = 1.
<P3671_ALL>-INFTY = 1.
<P3671_ALL>-SUBTY = 1.
<P3671_ALL>-OBJPS = 1.
<P3671_ALL>-SPRPS = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_P3671_ALL-ENDDA, sy-vline,
WA_P3671_ALL-BEGDA, sy-vline,
WA_P3671_ALL-SEQNR, sy-vline,
WA_P3671_ALL-AEDTM, sy-vline,
WA_P3671_ALL-UNAME, sy-vline,
WA_P3671_ALL-HISTO, sy-vline.
ENDLOOP. *Add any further fields from structure WA_P3671_ALL 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_P3671_ALL 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_P3671_ALL INTO WA_P3671_ALL. *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_P3671_ALL_STR,
PERNR TYPE STRING,
INFTY TYPE STRING,
SUBTY TYPE STRING,
OBJPS TYPE STRING,
SPRPS TYPE STRING,
ENDDA TYPE STRING,
BEGDA TYPE STRING,
SEQNR TYPE STRING,
AEDTM TYPE STRING,
UNAME TYPE STRING,
HISTO TYPE STRING,
ITXEX TYPE STRING,
REFEX TYPE STRING,
ORDEX TYPE STRING,
ITBLD TYPE STRING,
PREAS TYPE STRING,
FLAG1 TYPE STRING,
FLAG2 TYPE STRING,
FLAG3 TYPE STRING,
FLAG4 TYPE STRING,
RESE1 TYPE STRING,
RESE2 TYPE STRING,
GRPVL TYPE STRING,
SART0 TYPE STRING,
STATU TYPE STRING,
DTRID TYPE STRING,
GRP_PKT_DTA TYPE STRING,
REFN0 TYPE STRING,
REFU0 TYPE STRING,
MART0 TYPE STRING,
WMAIL_SUBTY TYPE STRING,
BSTRA TYPE STRING,
BPLZ0 TYPE STRING,
BORT0 TYPE STRING,
BLAND1 TYPE STRING,
DGPS0 TYPE STRING,
DGP00 TYPE STRING,
RB_EU_DG_T536C TYPE STRING,
RB_EU_DG_DIRECT TYPE STRING,
MOLGAE TYPE STRING,
ANKEYE TYPE STRING,
ANARTE TYPE STRING,
AGNA0 TYPE STRING,
AGSTR TYPE STRING,
AGLAND1 TYPE STRING,
AGPLZ TYPE STRING,
AGORT TYPE STRING,
AGTEL TYPE STRING,
AGMAIL TYPE STRING,
BBEG0 TYPE STRING,
BEND0 TYPE STRING,
BFEST TYPE STRING,
BFRIST TYPE STRING,
BBEGIN TYPE STRING,
ANABL TYPE STRING,
ANABLJ TYPE STRING,
BZEIT TYPE STRING,
BUEL0 TYPE STRING,
ANAT0 TYPE STRING,
ANATJ TYPE STRING,
BSTAAT TYPE STRING,
AGST0 TYPE STRING,
AGSTSL TYPE STRING,
CLUSTR_GUID TYPE STRING,
ANIV0 TYPE STRING,
AAKT0 TYPE STRING,
APNR0 TYPE STRING,
VSNA0 TYPE STRING,
RSTAT TYPE STRING,
TABS_INP TYPE STRING,
PERNRPSK TYPE STRING,
INFTYPSK TYPE STRING,
SUBTYPSK TYPE STRING,
OBJPSPSK TYPE STRING,
SPRPSPSK TYPE STRING,
ENDDAPSK TYPE STRING,
BEGDAPSK TYPE STRING,
SEQNRPSK TYPE STRING,
DGNA1 TYPE STRING,
BKNR1 TYPE STRING,
DGREFO1 TYPE STRING,
DGFBNR1 TYPE STRING,
DGSTR1 TYPE STRING,
DGLAND11 TYPE STRING,
DGPLZ1 TYPE STRING,
DGORT1 TYPE STRING,
DGTEL1 TYPE STRING,
DGMAIL1 TYPE STRING,
DGWS1 TYPE STRING,
DGNA2 TYPE STRING,
BKNR2 TYPE STRING,
DGREFO2 TYPE STRING,
DGFBNR2 TYPE STRING,
DGSTR2 TYPE STRING,
DGLAND12 TYPE STRING,
DGPLZ2 TYPE STRING,
DGORT2 TYPE STRING,
DGTEL2 TYPE STRING,
DGMAIL2 TYPE STRING,
DGWS2 TYPE STRING,
DGNA3 TYPE STRING,
BKNR3 TYPE STRING,
DGREFO3 TYPE STRING,
DGFBNR3 TYPE STRING,
DGSTR3 TYPE STRING,
DGLAND13 TYPE STRING,
DGPLZ3 TYPE STRING,
DGORT3 TYPE STRING,
DGTEL3 TYPE STRING,
DGMAIL3 TYPE STRING,
DGWS3 TYPE STRING,
DGNA4 TYPE STRING,
BKNR4 TYPE STRING,
DGREFO4 TYPE STRING,
DGFBNR4 TYPE STRING,
DGSTR4 TYPE STRING,
DGLAND14 TYPE STRING,
DGPLZ4 TYPE STRING,
DGORT4 TYPE STRING,
DGTEL4 TYPE STRING,
DGMAIL4 TYPE STRING,
DGWS4 TYPE STRING,
DGNA5 TYPE STRING,
BKNR5 TYPE STRING,
DGREFO5 TYPE STRING,
DGFBNR5 TYPE STRING,
DGSTR5 TYPE STRING,
DGLAND15 TYPE STRING,
DGPLZ5 TYPE STRING,
DGORT5 TYPE STRING,
DGTEL5 TYPE STRING,
DGMAIL5 TYPE STRING,
DGWS5 TYPE STRING,
MOLGASA1 TYPE STRING,
ANKEYSA1 TYPE STRING,
ANARTSA1 TYPE STRING,
STAB1 TYPE STRING,
STLAND11 TYPE STRING,
STJOB1 TYPE STRING,
STBLAND11 TYPE STRING,
STBEG1 TYPE STRING,
STEND1 TYPE STRING,
STREFO1 TYPE STRING,
STFNA1 TYPE STRING,
STSTR1 TYPE STRING,
STPLZ1 TYPE STRING,
STORT1 TYPE STRING,
STTEL1 TYPE STRING,
STMAIL1 TYPE STRING,
STSL1 TYPE STRING,
STBLAND1 TYPE STRING,
MOLGASA2 TYPE STRING,
ANKEYSA2 TYPE STRING,
ANARTSA2 TYPE STRING,
STAB2 TYPE STRING,
STLAND12 TYPE STRING,
STJOB2 TYPE STRING,
STBLAND12 TYPE STRING,
STBEG2 TYPE STRING,
STEND2 TYPE STRING,
STREFO2 TYPE STRING,
STFNA2 TYPE STRING,
STSTR2 TYPE STRING,
STPLZ2 TYPE STRING,
STORT2 TYPE STRING,
STTEL2 TYPE STRING,
STMAIL2 TYPE STRING,
STSL2 TYPE STRING,
STBLAND2 TYPE STRING,
MOLGASA3 TYPE STRING,
ANKEYSA3 TYPE STRING,
ANARTSA3 TYPE STRING,
STAB3 TYPE STRING,
STLAND13 TYPE STRING,
STJOB3 TYPE STRING,
STBLAND13 TYPE STRING,
STBEG3 TYPE STRING,
STEND3 TYPE STRING,
STREFO3 TYPE STRING,
STFNA3 TYPE STRING,
STSTR3 TYPE STRING,
STPLZ3 TYPE STRING,
STORT3 TYPE STRING,
STTEL3 TYPE STRING,
STMAIL3 TYPE STRING,
STSL3 TYPE STRING,
STBLAND3 TYPE STRING,
BART1 TYPE STRING,
ANKZ1 TYPE STRING,
STAATHB1 TYPE STRING,
BART2 TYPE STRING,
ANKZ2 TYPE STRING,
STAATHB2 TYPE STRING,
BART3 TYPE STRING,
ANKZ3 TYPE STRING,
STAATHB3 TYPE STRING,
BART4 TYPE STRING,
ANKZ4 TYPE STRING,
STAATHB4 TYPE STRING,
BART5 TYPE STRING,
ANKZ5 TYPE STRING,
STAATHB5 TYPE STRING,
REFN0DUP TYPE STRING,
REFU0DUP TYPE STRING,
MART0DUP TYPE STRING,
WTEL0 TYPE STRING,END OF T_EKKO_STR. DATA: WA_P3671_ALL_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_P3671_ALL_STR-PERNR sy-vline
WA_P3671_ALL_STR-INFTY sy-vline
WA_P3671_ALL_STR-SUBTY sy-vline
WA_P3671_ALL_STR-OBJPS sy-vline
WA_P3671_ALL_STR-SPRPS sy-vline
WA_P3671_ALL_STR-ENDDA sy-vline
WA_P3671_ALL_STR-BEGDA sy-vline
WA_P3671_ALL_STR-SEQNR sy-vline
WA_P3671_ALL_STR-AEDTM sy-vline
WA_P3671_ALL_STR-UNAME sy-vline
WA_P3671_ALL_STR-HISTO sy-vline
WA_P3671_ALL_STR-ITXEX sy-vline
WA_P3671_ALL_STR-REFEX sy-vline
WA_P3671_ALL_STR-ORDEX sy-vline
WA_P3671_ALL_STR-ITBLD sy-vline
WA_P3671_ALL_STR-PREAS sy-vline
WA_P3671_ALL_STR-FLAG1 sy-vline
WA_P3671_ALL_STR-FLAG2 sy-vline
WA_P3671_ALL_STR-FLAG3 sy-vline
WA_P3671_ALL_STR-FLAG4 sy-vline
WA_P3671_ALL_STR-RESE1 sy-vline
WA_P3671_ALL_STR-RESE2 sy-vline
WA_P3671_ALL_STR-GRPVL sy-vline
WA_P3671_ALL_STR-SART0 sy-vline
WA_P3671_ALL_STR-STATU sy-vline
WA_P3671_ALL_STR-DTRID sy-vline
WA_P3671_ALL_STR-GRP_PKT_DTA sy-vline
WA_P3671_ALL_STR-REFN0 sy-vline
WA_P3671_ALL_STR-REFU0 sy-vline
WA_P3671_ALL_STR-MART0 sy-vline
WA_P3671_ALL_STR-WMAIL_SUBTY sy-vline
WA_P3671_ALL_STR-BSTRA sy-vline
WA_P3671_ALL_STR-BPLZ0 sy-vline
WA_P3671_ALL_STR-BORT0 sy-vline
WA_P3671_ALL_STR-BLAND1 sy-vline
WA_P3671_ALL_STR-DGPS0 sy-vline
WA_P3671_ALL_STR-DGP00 sy-vline
WA_P3671_ALL_STR-RB_EU_DG_T536C sy-vline
WA_P3671_ALL_STR-RB_EU_DG_DIRECT sy-vline
WA_P3671_ALL_STR-MOLGAE sy-vline
WA_P3671_ALL_STR-ANKEYE sy-vline
WA_P3671_ALL_STR-ANARTE sy-vline
WA_P3671_ALL_STR-AGNA0 sy-vline
WA_P3671_ALL_STR-AGSTR sy-vline
WA_P3671_ALL_STR-AGLAND1 sy-vline
WA_P3671_ALL_STR-AGPLZ sy-vline
WA_P3671_ALL_STR-AGORT sy-vline
WA_P3671_ALL_STR-AGTEL sy-vline
WA_P3671_ALL_STR-AGMAIL sy-vline
WA_P3671_ALL_STR-BBEG0 sy-vline
WA_P3671_ALL_STR-BEND0 sy-vline
WA_P3671_ALL_STR-BFEST sy-vline
WA_P3671_ALL_STR-BFRIST sy-vline
WA_P3671_ALL_STR-BBEGIN sy-vline
WA_P3671_ALL_STR-ANABL sy-vline
WA_P3671_ALL_STR-ANABLJ sy-vline
WA_P3671_ALL_STR-BZEIT sy-vline
WA_P3671_ALL_STR-BUEL0 sy-vline
WA_P3671_ALL_STR-ANAT0 sy-vline
WA_P3671_ALL_STR-ANATJ sy-vline
WA_P3671_ALL_STR-BSTAAT sy-vline
WA_P3671_ALL_STR-AGST0 sy-vline
WA_P3671_ALL_STR-AGSTSL sy-vline
WA_P3671_ALL_STR-CLUSTR_GUID sy-vline
WA_P3671_ALL_STR-ANIV0 sy-vline
WA_P3671_ALL_STR-AAKT0 sy-vline
WA_P3671_ALL_STR-APNR0 sy-vline
WA_P3671_ALL_STR-VSNA0 sy-vline
WA_P3671_ALL_STR-RSTAT sy-vline
WA_P3671_ALL_STR-TABS_INP sy-vline
WA_P3671_ALL_STR-PERNRPSK sy-vline
WA_P3671_ALL_STR-INFTYPSK sy-vline
WA_P3671_ALL_STR-SUBTYPSK sy-vline
WA_P3671_ALL_STR-OBJPSPSK sy-vline
WA_P3671_ALL_STR-SPRPSPSK sy-vline
WA_P3671_ALL_STR-ENDDAPSK sy-vline
WA_P3671_ALL_STR-BEGDAPSK sy-vline
WA_P3671_ALL_STR-SEQNRPSK sy-vline
WA_P3671_ALL_STR-DGNA1 sy-vline
WA_P3671_ALL_STR-BKNR1 sy-vline
WA_P3671_ALL_STR-DGREFO1 sy-vline
WA_P3671_ALL_STR-DGFBNR1 sy-vline
WA_P3671_ALL_STR-DGSTR1 sy-vline
WA_P3671_ALL_STR-DGLAND11 sy-vline
WA_P3671_ALL_STR-DGPLZ1 sy-vline
WA_P3671_ALL_STR-DGORT1 sy-vline
WA_P3671_ALL_STR-DGTEL1 sy-vline
WA_P3671_ALL_STR-DGMAIL1 sy-vline
WA_P3671_ALL_STR-DGWS1 sy-vline
WA_P3671_ALL_STR-DGNA2 sy-vline
WA_P3671_ALL_STR-BKNR2 sy-vline
WA_P3671_ALL_STR-DGREFO2 sy-vline
WA_P3671_ALL_STR-DGFBNR2 sy-vline
WA_P3671_ALL_STR-DGSTR2 sy-vline
WA_P3671_ALL_STR-DGLAND12 sy-vline
WA_P3671_ALL_STR-DGPLZ2 sy-vline
WA_P3671_ALL_STR-DGORT2 sy-vline
WA_P3671_ALL_STR-DGTEL2 sy-vline
WA_P3671_ALL_STR-DGMAIL2 sy-vline
WA_P3671_ALL_STR-DGWS2 sy-vline
WA_P3671_ALL_STR-DGNA3 sy-vline
WA_P3671_ALL_STR-BKNR3 sy-vline
WA_P3671_ALL_STR-DGREFO3 sy-vline
WA_P3671_ALL_STR-DGFBNR3 sy-vline
WA_P3671_ALL_STR-DGSTR3 sy-vline
WA_P3671_ALL_STR-DGLAND13 sy-vline
WA_P3671_ALL_STR-DGPLZ3 sy-vline
WA_P3671_ALL_STR-DGORT3 sy-vline
WA_P3671_ALL_STR-DGTEL3 sy-vline
WA_P3671_ALL_STR-DGMAIL3 sy-vline
WA_P3671_ALL_STR-DGWS3 sy-vline
WA_P3671_ALL_STR-DGNA4 sy-vline
WA_P3671_ALL_STR-BKNR4 sy-vline
WA_P3671_ALL_STR-DGREFO4 sy-vline
WA_P3671_ALL_STR-DGFBNR4 sy-vline
WA_P3671_ALL_STR-DGSTR4 sy-vline
WA_P3671_ALL_STR-DGLAND14 sy-vline
WA_P3671_ALL_STR-DGPLZ4 sy-vline
WA_P3671_ALL_STR-DGORT4 sy-vline
WA_P3671_ALL_STR-DGTEL4 sy-vline
WA_P3671_ALL_STR-DGMAIL4 sy-vline
WA_P3671_ALL_STR-DGWS4 sy-vline
WA_P3671_ALL_STR-DGNA5 sy-vline
WA_P3671_ALL_STR-BKNR5 sy-vline
WA_P3671_ALL_STR-DGREFO5 sy-vline
WA_P3671_ALL_STR-DGFBNR5 sy-vline
WA_P3671_ALL_STR-DGSTR5 sy-vline
WA_P3671_ALL_STR-DGLAND15 sy-vline
WA_P3671_ALL_STR-DGPLZ5 sy-vline
WA_P3671_ALL_STR-DGORT5 sy-vline
WA_P3671_ALL_STR-DGTEL5 sy-vline
WA_P3671_ALL_STR-DGMAIL5 sy-vline
WA_P3671_ALL_STR-DGWS5 sy-vline
WA_P3671_ALL_STR-MOLGASA1 sy-vline
WA_P3671_ALL_STR-ANKEYSA1 sy-vline
WA_P3671_ALL_STR-ANARTSA1 sy-vline
WA_P3671_ALL_STR-STAB1 sy-vline
WA_P3671_ALL_STR-STLAND11 sy-vline
WA_P3671_ALL_STR-STJOB1 sy-vline
WA_P3671_ALL_STR-STBLAND11 sy-vline
WA_P3671_ALL_STR-STBEG1 sy-vline
WA_P3671_ALL_STR-STEND1 sy-vline
WA_P3671_ALL_STR-STREFO1 sy-vline
WA_P3671_ALL_STR-STFNA1 sy-vline
WA_P3671_ALL_STR-STSTR1 sy-vline
WA_P3671_ALL_STR-STPLZ1 sy-vline
WA_P3671_ALL_STR-STORT1 sy-vline
WA_P3671_ALL_STR-STTEL1 sy-vline
WA_P3671_ALL_STR-STMAIL1 sy-vline
WA_P3671_ALL_STR-STSL1 sy-vline
WA_P3671_ALL_STR-STBLAND1 sy-vline
WA_P3671_ALL_STR-MOLGASA2 sy-vline
WA_P3671_ALL_STR-ANKEYSA2 sy-vline
WA_P3671_ALL_STR-ANARTSA2 sy-vline
WA_P3671_ALL_STR-STAB2 sy-vline
WA_P3671_ALL_STR-STLAND12 sy-vline
WA_P3671_ALL_STR-STJOB2 sy-vline
WA_P3671_ALL_STR-STBLAND12 sy-vline
WA_P3671_ALL_STR-STBEG2 sy-vline
WA_P3671_ALL_STR-STEND2 sy-vline
WA_P3671_ALL_STR-STREFO2 sy-vline
WA_P3671_ALL_STR-STFNA2 sy-vline
WA_P3671_ALL_STR-STSTR2 sy-vline
WA_P3671_ALL_STR-STPLZ2 sy-vline
WA_P3671_ALL_STR-STORT2 sy-vline
WA_P3671_ALL_STR-STTEL2 sy-vline
WA_P3671_ALL_STR-STMAIL2 sy-vline
WA_P3671_ALL_STR-STSL2 sy-vline
WA_P3671_ALL_STR-STBLAND2 sy-vline
WA_P3671_ALL_STR-MOLGASA3 sy-vline
WA_P3671_ALL_STR-ANKEYSA3 sy-vline
WA_P3671_ALL_STR-ANARTSA3 sy-vline
WA_P3671_ALL_STR-STAB3 sy-vline
WA_P3671_ALL_STR-STLAND13 sy-vline
WA_P3671_ALL_STR-STJOB3 sy-vline
WA_P3671_ALL_STR-STBLAND13 sy-vline
WA_P3671_ALL_STR-STBEG3 sy-vline
WA_P3671_ALL_STR-STEND3 sy-vline
WA_P3671_ALL_STR-STREFO3 sy-vline
WA_P3671_ALL_STR-STFNA3 sy-vline
WA_P3671_ALL_STR-STSTR3 sy-vline
WA_P3671_ALL_STR-STPLZ3 sy-vline
WA_P3671_ALL_STR-STORT3 sy-vline
WA_P3671_ALL_STR-STTEL3 sy-vline
WA_P3671_ALL_STR-STMAIL3 sy-vline
WA_P3671_ALL_STR-STSL3 sy-vline
WA_P3671_ALL_STR-STBLAND3 sy-vline
WA_P3671_ALL_STR-BART1 sy-vline
WA_P3671_ALL_STR-ANKZ1 sy-vline
WA_P3671_ALL_STR-STAATHB1 sy-vline
WA_P3671_ALL_STR-BART2 sy-vline
WA_P3671_ALL_STR-ANKZ2 sy-vline
WA_P3671_ALL_STR-STAATHB2 sy-vline
WA_P3671_ALL_STR-BART3 sy-vline
WA_P3671_ALL_STR-ANKZ3 sy-vline
WA_P3671_ALL_STR-STAATHB3 sy-vline
WA_P3671_ALL_STR-BART4 sy-vline
WA_P3671_ALL_STR-ANKZ4 sy-vline
WA_P3671_ALL_STR-STAATHB4 sy-vline
WA_P3671_ALL_STR-BART5 sy-vline
WA_P3671_ALL_STR-ANKZ5 sy-vline
WA_P3671_ALL_STR-STAATHB5 sy-vline
WA_P3671_ALL_STR-REFN0DUP sy-vline
WA_P3671_ALL_STR-REFU0DUP sy-vline
WA_P3671_ALL_STR-MART0DUP sy-vline
WA_P3671_ALL_STR-WTEL0 sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.