ABAP Select data from SAP table P10_SHR_F_W2_PR 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 P10_SHR_F_W2_PR 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 P10_SHR_F_W2_PR. 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 P10_SHR_F_W2_PR 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_P10_SHR_F_W2_PR TYPE STANDARD TABLE OF P10_SHR_F_W2_PR,
      WA_P10_SHR_F_W2_PR TYPE P10_SHR_F_W2_PR,
      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: <P10_SHR_F_W2_PR> TYPE P10_SHR_F_W2_PR.

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

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

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM P10_SHR_F_W2_PR
*  INTO TABLE @DATA(IT_P10_SHR_F_W2_PR2).
*--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_P10_SHR_F_W2_PR INDEX 1 INTO DATA(WA_P10_SHR_F_W2_PR2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_P10_SHR_F_W2_PR ASSIGNING <P10_SHR_F_W2_PR>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<P10_SHR_F_W2_PR>-T5UTL_TXCMP = 1.
<P10_SHR_F_W2_PR>-T5UTL_LTEXT = 1.
<P10_SHR_F_W2_PR>-T5UTL_STRAS = 1.
<P10_SHR_F_W2_PR>-T5UTL_ORT01 = 1.
<P10_SHR_F_W2_PR>-T5UTL_STATE = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_P10_SHR_F_W2_PR-T5UTL_ZIPCD, sy-vline,
WA_P10_SHR_F_W2_PR-T5UTL_TELNR, sy-vline,
WA_P10_SHR_F_W2_PR-P0002_NACHN, sy-vline,
WA_P10_SHR_F_W2_PR-P0002_PERID, sy-vline,
WA_P10_SHR_F_W2_PR-P0002_PERNR, sy-vline,
WA_P10_SHR_F_W2_PR-P0002_VORNA, sy-vline.
ENDLOOP. *Add any further fields from structure WA_P10_SHR_F_W2_PR 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_P10_SHR_F_W2_PR 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_P10_SHR_F_W2_PR INTO WA_P10_SHR_F_W2_PR. *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_P10_SHR_F_W2_PR_STR,
T5UTL_TXCMP TYPE STRING,
T5UTL_LTEXT TYPE STRING,
T5UTL_STRAS TYPE STRING,
T5UTL_ORT01 TYPE STRING,
T5UTL_STATE TYPE STRING,
T5UTL_ZIPCD TYPE STRING,
T5UTL_TELNR TYPE STRING,
P0002_NACHN TYPE STRING,
P0002_PERID TYPE STRING,
P0002_PERNR TYPE STRING,
P0002_VORNA TYPE STRING,
P0002_FNAMK TYPE STRING,
P0002_MIDNM TYPE STRING,
P0002_NAME2 TYPE STRING,
P0002_NAMZU TYPE STRING,
P0006_LAND1 TYPE STRING,
P0006_LOCAT TYPE STRING,
P0006_ORT01 TYPE STRING,
P0006_PSTLZ TYPE STRING,
P0006_STATE TYPE STRING,
P0006_STRAS TYPE STRING,
CURKY TYPE STRING,
T005T_LANDX TYPE STRING,
BDAY TYPE STRING,
BMON TYPE STRING,
BYEA TYPE STRING,
D000 TYPE STRING,
ERAS TYPE STRING,
ERDS TYPE STRING,
ERHP TYPE STRING,
ERMC TYPE STRING,
EROC TYPE STRING,
EROD TYPE STRING,
EROM TYPE STRING,
ERQP TYPE STRING,
EWGP TYPE STRING,
MBOX TYPE STRING,
PREN TYPE STRING,
Q002 TYPE STRING,
SBOX TYPE STRING,
T000 TYPE STRING,
T001 TYPE STRING,
T002 TYPE STRING,
T003 TYPE STRING,
T004 TYPE STRING,
T005 TYPE STRING,
T006 TYPE STRING,
T007 TYPE STRING,
T014 TYPE STRING,
T01B TYPE STRING,
T121 TYPE STRING,
T123 TYPE STRING,
T127 TYPE STRING,
T130 TYPE STRING,
T131 TYPE STRING,
T132 TYPE STRING,
T133 TYPE STRING,
T134 TYPE STRING,
T135 TYPE STRING,
T136 TYPE STRING,
T137 TYPE STRING,
T141 TYPE STRING,
T142 TYPE STRING,
T143 TYPE STRING,
T144 TYPE STRING,
T145 TYPE STRING,
T146 TYPE STRING,
T147 TYPE STRING,
T148 TYPE STRING,
T149 TYPE STRING,
T150 TYPE STRING,
TCNR TYPE STRING,
TCOR TYPE STRING,
TDUP TYPE STRING,
TEXA TYPE STRING,
TEXC TYPE STRING,
TFNM TYPE STRING,
TLNM TYPE STRING,
TNCN TYPE STRING,
TSSN TYPE STRING,
TSSS TYPE STRING,
TXA1 TYPE STRING,
TXA2 TYPE STRING,
TXA3 TYPE STRING,
TXC1 TYPE STRING,
TXC2 TYPE STRING,
TXC3 TYPE STRING,
DEWGP TYPE STRING,
DT001 TYPE STRING,
DT002 TYPE STRING,
DT003 TYPE STRING,
DT004 TYPE STRING,
DT005 TYPE STRING,
DT006 TYPE STRING,
DT007 TYPE STRING,
DT014 TYPE STRING,
DT01B TYPE STRING,
DT121 TYPE STRING,
DT123 TYPE STRING,
DT127 TYPE STRING,
DT130 TYPE STRING,
DT131 TYPE STRING,
DT132 TYPE STRING,
DT133 TYPE STRING,
DT134 TYPE STRING,
DT135 TYPE STRING,
DT136 TYPE STRING,
DT137 TYPE STRING,
DT141 TYPE STRING,
DT142 TYPE STRING,
DT143 TYPE STRING,
DT144 TYPE STRING,
DT145 TYPE STRING,
DT146 TYPE STRING,
DT147 TYPE STRING,
DT148 TYPE STRING,
DT149 TYPE STRING,
DT150 TYPE STRING,
DTEXA TYPE STRING,
DTXA1 TYPE STRING,
DTXA2 TYPE STRING,
DTXA3 TYPE STRING,
OBDAY TYPE STRING,
OBMON TYPE STRING,
OBYEA TYPE STRING,
OD000 TYPE STRING,
OERAS TYPE STRING,
OERDS TYPE STRING,
OERHP TYPE STRING,
OERMC TYPE STRING,
OEROC TYPE STRING,
OEROD TYPE STRING,
OEROM TYPE STRING,
OERQP TYPE STRING,
OEWGP TYPE STRING,
OMBOX TYPE STRING,
OPREN TYPE STRING,
OQ002 TYPE STRING,
OSBOX TYPE STRING,
OT000 TYPE STRING,
OT001 TYPE STRING,
OT002 TYPE STRING,
OT003 TYPE STRING,
OT004 TYPE STRING,
OT005 TYPE STRING,
OT006 TYPE STRING,
OT007 TYPE STRING,
OT014 TYPE STRING,
OT01B TYPE STRING,
OT121 TYPE STRING,
OT123 TYPE STRING,
OT127 TYPE STRING,
OT130 TYPE STRING,
OT131 TYPE STRING,
OT132 TYPE STRING,
OT133 TYPE STRING,
OT134 TYPE STRING,
OT135 TYPE STRING,
OT136 TYPE STRING,
OT137 TYPE STRING,
OT141 TYPE STRING,
OT142 TYPE STRING,
OT143 TYPE STRING,
OT144 TYPE STRING,
OT145 TYPE STRING,
OT146 TYPE STRING,
OT147 TYPE STRING,
OT148 TYPE STRING,
OT149 TYPE STRING,
OT150 TYPE STRING,
OTCNR TYPE STRING,
OTCOR TYPE STRING,
OTDUP TYPE STRING,
OTEXA TYPE STRING,
OTEXC TYPE STRING,
OTFNM TYPE STRING,
OTLNM TYPE STRING,
OTNCN TYPE STRING,
OTSSN TYPE STRING,
OTSSS TYPE STRING,
OTXA1 TYPE STRING,
OTXA2 TYPE STRING,
OTXA3 TYPE STRING,
OTXC1 TYPE STRING,
OTXC2 TYPE STRING,
OTXC3 TYPE STRING,END OF T_EKKO_STR. DATA: WA_P10_SHR_F_W2_PR_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_P10_SHR_F_W2_PR_STR-T5UTL_TXCMP sy-vline
WA_P10_SHR_F_W2_PR_STR-T5UTL_LTEXT sy-vline
WA_P10_SHR_F_W2_PR_STR-T5UTL_STRAS sy-vline
WA_P10_SHR_F_W2_PR_STR-T5UTL_ORT01 sy-vline
WA_P10_SHR_F_W2_PR_STR-T5UTL_STATE sy-vline
WA_P10_SHR_F_W2_PR_STR-T5UTL_ZIPCD sy-vline
WA_P10_SHR_F_W2_PR_STR-T5UTL_TELNR sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_NACHN sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_PERID sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_PERNR sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_VORNA sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_FNAMK sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_MIDNM sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_NAME2 sy-vline
WA_P10_SHR_F_W2_PR_STR-P0002_NAMZU sy-vline
WA_P10_SHR_F_W2_PR_STR-P0006_LAND1 sy-vline
WA_P10_SHR_F_W2_PR_STR-P0006_LOCAT sy-vline
WA_P10_SHR_F_W2_PR_STR-P0006_ORT01 sy-vline
WA_P10_SHR_F_W2_PR_STR-P0006_PSTLZ sy-vline
WA_P10_SHR_F_W2_PR_STR-P0006_STATE sy-vline
WA_P10_SHR_F_W2_PR_STR-P0006_STRAS sy-vline
WA_P10_SHR_F_W2_PR_STR-CURKY sy-vline
WA_P10_SHR_F_W2_PR_STR-T005T_LANDX sy-vline
WA_P10_SHR_F_W2_PR_STR-BDAY sy-vline
WA_P10_SHR_F_W2_PR_STR-BMON sy-vline
WA_P10_SHR_F_W2_PR_STR-BYEA sy-vline
WA_P10_SHR_F_W2_PR_STR-D000 sy-vline
WA_P10_SHR_F_W2_PR_STR-ERAS sy-vline
WA_P10_SHR_F_W2_PR_STR-ERDS sy-vline
WA_P10_SHR_F_W2_PR_STR-ERHP sy-vline
WA_P10_SHR_F_W2_PR_STR-ERMC sy-vline
WA_P10_SHR_F_W2_PR_STR-EROC sy-vline
WA_P10_SHR_F_W2_PR_STR-EROD sy-vline
WA_P10_SHR_F_W2_PR_STR-EROM sy-vline
WA_P10_SHR_F_W2_PR_STR-ERQP sy-vline
WA_P10_SHR_F_W2_PR_STR-EWGP sy-vline
WA_P10_SHR_F_W2_PR_STR-MBOX sy-vline
WA_P10_SHR_F_W2_PR_STR-PREN sy-vline
WA_P10_SHR_F_W2_PR_STR-Q002 sy-vline
WA_P10_SHR_F_W2_PR_STR-SBOX sy-vline
WA_P10_SHR_F_W2_PR_STR-T000 sy-vline
WA_P10_SHR_F_W2_PR_STR-T001 sy-vline
WA_P10_SHR_F_W2_PR_STR-T002 sy-vline
WA_P10_SHR_F_W2_PR_STR-T003 sy-vline
WA_P10_SHR_F_W2_PR_STR-T004 sy-vline
WA_P10_SHR_F_W2_PR_STR-T005 sy-vline
WA_P10_SHR_F_W2_PR_STR-T006 sy-vline
WA_P10_SHR_F_W2_PR_STR-T007 sy-vline
WA_P10_SHR_F_W2_PR_STR-T014 sy-vline
WA_P10_SHR_F_W2_PR_STR-T01B sy-vline
WA_P10_SHR_F_W2_PR_STR-T121 sy-vline
WA_P10_SHR_F_W2_PR_STR-T123 sy-vline
WA_P10_SHR_F_W2_PR_STR-T127 sy-vline
WA_P10_SHR_F_W2_PR_STR-T130 sy-vline
WA_P10_SHR_F_W2_PR_STR-T131 sy-vline
WA_P10_SHR_F_W2_PR_STR-T132 sy-vline
WA_P10_SHR_F_W2_PR_STR-T133 sy-vline
WA_P10_SHR_F_W2_PR_STR-T134 sy-vline
WA_P10_SHR_F_W2_PR_STR-T135 sy-vline
WA_P10_SHR_F_W2_PR_STR-T136 sy-vline
WA_P10_SHR_F_W2_PR_STR-T137 sy-vline
WA_P10_SHR_F_W2_PR_STR-T141 sy-vline
WA_P10_SHR_F_W2_PR_STR-T142 sy-vline
WA_P10_SHR_F_W2_PR_STR-T143 sy-vline
WA_P10_SHR_F_W2_PR_STR-T144 sy-vline
WA_P10_SHR_F_W2_PR_STR-T145 sy-vline
WA_P10_SHR_F_W2_PR_STR-T146 sy-vline
WA_P10_SHR_F_W2_PR_STR-T147 sy-vline
WA_P10_SHR_F_W2_PR_STR-T148 sy-vline
WA_P10_SHR_F_W2_PR_STR-T149 sy-vline
WA_P10_SHR_F_W2_PR_STR-T150 sy-vline
WA_P10_SHR_F_W2_PR_STR-TCNR sy-vline
WA_P10_SHR_F_W2_PR_STR-TCOR sy-vline
WA_P10_SHR_F_W2_PR_STR-TDUP sy-vline
WA_P10_SHR_F_W2_PR_STR-TEXA sy-vline
WA_P10_SHR_F_W2_PR_STR-TEXC sy-vline
WA_P10_SHR_F_W2_PR_STR-TFNM sy-vline
WA_P10_SHR_F_W2_PR_STR-TLNM sy-vline
WA_P10_SHR_F_W2_PR_STR-TNCN sy-vline
WA_P10_SHR_F_W2_PR_STR-TSSN sy-vline
WA_P10_SHR_F_W2_PR_STR-TSSS sy-vline
WA_P10_SHR_F_W2_PR_STR-TXA1 sy-vline
WA_P10_SHR_F_W2_PR_STR-TXA2 sy-vline
WA_P10_SHR_F_W2_PR_STR-TXA3 sy-vline
WA_P10_SHR_F_W2_PR_STR-TXC1 sy-vline
WA_P10_SHR_F_W2_PR_STR-TXC2 sy-vline
WA_P10_SHR_F_W2_PR_STR-TXC3 sy-vline
WA_P10_SHR_F_W2_PR_STR-DEWGP sy-vline
WA_P10_SHR_F_W2_PR_STR-DT001 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT002 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT003 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT004 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT005 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT006 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT007 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT014 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT01B sy-vline
WA_P10_SHR_F_W2_PR_STR-DT121 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT123 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT127 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT130 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT131 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT132 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT133 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT134 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT135 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT136 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT137 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT141 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT142 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT143 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT144 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT145 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT146 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT147 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT148 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT149 sy-vline
WA_P10_SHR_F_W2_PR_STR-DT150 sy-vline
WA_P10_SHR_F_W2_PR_STR-DTEXA sy-vline
WA_P10_SHR_F_W2_PR_STR-DTXA1 sy-vline
WA_P10_SHR_F_W2_PR_STR-DTXA2 sy-vline
WA_P10_SHR_F_W2_PR_STR-DTXA3 sy-vline
WA_P10_SHR_F_W2_PR_STR-OBDAY sy-vline
WA_P10_SHR_F_W2_PR_STR-OBMON sy-vline
WA_P10_SHR_F_W2_PR_STR-OBYEA sy-vline
WA_P10_SHR_F_W2_PR_STR-OD000 sy-vline
WA_P10_SHR_F_W2_PR_STR-OERAS sy-vline
WA_P10_SHR_F_W2_PR_STR-OERDS sy-vline
WA_P10_SHR_F_W2_PR_STR-OERHP sy-vline
WA_P10_SHR_F_W2_PR_STR-OERMC sy-vline
WA_P10_SHR_F_W2_PR_STR-OEROC sy-vline
WA_P10_SHR_F_W2_PR_STR-OEROD sy-vline
WA_P10_SHR_F_W2_PR_STR-OEROM sy-vline
WA_P10_SHR_F_W2_PR_STR-OERQP sy-vline
WA_P10_SHR_F_W2_PR_STR-OEWGP sy-vline
WA_P10_SHR_F_W2_PR_STR-OMBOX sy-vline
WA_P10_SHR_F_W2_PR_STR-OPREN sy-vline
WA_P10_SHR_F_W2_PR_STR-OQ002 sy-vline
WA_P10_SHR_F_W2_PR_STR-OSBOX sy-vline
WA_P10_SHR_F_W2_PR_STR-OT000 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT001 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT002 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT003 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT004 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT005 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT006 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT007 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT014 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT01B sy-vline
WA_P10_SHR_F_W2_PR_STR-OT121 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT123 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT127 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT130 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT131 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT132 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT133 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT134 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT135 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT136 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT137 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT141 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT142 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT143 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT144 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT145 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT146 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT147 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT148 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT149 sy-vline
WA_P10_SHR_F_W2_PR_STR-OT150 sy-vline
WA_P10_SHR_F_W2_PR_STR-OTCNR sy-vline
WA_P10_SHR_F_W2_PR_STR-OTCOR sy-vline
WA_P10_SHR_F_W2_PR_STR-OTDUP sy-vline
WA_P10_SHR_F_W2_PR_STR-OTEXA sy-vline
WA_P10_SHR_F_W2_PR_STR-OTEXC sy-vline
WA_P10_SHR_F_W2_PR_STR-OTFNM sy-vline
WA_P10_SHR_F_W2_PR_STR-OTLNM sy-vline
WA_P10_SHR_F_W2_PR_STR-OTNCN sy-vline
WA_P10_SHR_F_W2_PR_STR-OTSSN sy-vline
WA_P10_SHR_F_W2_PR_STR-OTSSS sy-vline
WA_P10_SHR_F_W2_PR_STR-OTXA1 sy-vline
WA_P10_SHR_F_W2_PR_STR-OTXA2 sy-vline
WA_P10_SHR_F_W2_PR_STR-OTXA3 sy-vline
WA_P10_SHR_F_W2_PR_STR-OTXC1 sy-vline
WA_P10_SHR_F_W2_PR_STR-OTXC2 sy-vline
WA_P10_SHR_F_W2_PR_STR-OTXC3 sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.