ABAP Select data from SAP table P10_SHR_F_940PR 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_940PR 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_940PR. 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_940PR 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_940PR TYPE STANDARD TABLE OF P10_SHR_F_940PR, WA_P10_SHR_F_940PR TYPE P10_SHR_F_940PR, 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_940PR> TYPE P10_SHR_F_940PR. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_P10_SHR_F_940PR. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM P10_SHR_F_940PR INTO TABLE IT_P10_SHR_F_940PR. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM P10_SHR_F_940PR * INTO TABLE @DATA(IT_P10_SHR_F_940PR2). *--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_940PR INDEX 1 INTO DATA(WA_P10_SHR_F_940PR2). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_P10_SHR_F_940PR ASSIGNING <P10_SHR_F_940PR>.*To update a field value using a field symbol simply change the value via the field symbol pointer
<P10_SHR_F_940PR>-T5UTL_TXCMP = 1.
<P10_SHR_F_940PR>-T5UTL_LTEXT = 1.
<P10_SHR_F_940PR>-T5UTL_STRAS = 1.
<P10_SHR_F_940PR>-T5UTL_ORT01 = 1.
<P10_SHR_F_940PR>-T5UTL_STATE = 1.
ENDLOOP. LOOP AT IT_P10_SHR_F_940PR INTO WA_P10_SHR_F_940PR. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_P10_SHR_F_940PR-T5UTL_ZIPCD, sy-vline,
WA_P10_SHR_F_940PR-T5UTL_TELNR, sy-vline,
WA_P10_SHR_F_940PR-P0002_NACHN, sy-vline,
WA_P10_SHR_F_940PR-P0002_PERID, sy-vline,
WA_P10_SHR_F_940PR-P0002_PERNR, sy-vline,
WA_P10_SHR_F_940PR-P0002_VORNA, sy-vline.
ENDLOOP. *Add any further fields from structure WA_P10_SHR_F_940PR 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_940PR 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_940PR INTO WA_P10_SHR_F_940PR. *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_940PR_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,
CRAK TYPE STRING,
CRAL TYPE STRING,
CRAR TYPE STRING,
CRAZ TYPE STRING,
CRCA TYPE STRING,
CRCO TYPE STRING,
CRCT TYPE STRING,
CRDC TYPE STRING,
CRDE TYPE STRING,
CRFL TYPE STRING,
CRGA TYPE STRING,
CRHI TYPE STRING,
CRIA TYPE STRING,
CRID TYPE STRING,
CRIL TYPE STRING,
CRIN TYPE STRING,
CRKS TYPE STRING,
CRKY TYPE STRING,
CRLA TYPE STRING,
CRMA TYPE STRING,
CRMD TYPE STRING,
CRME TYPE STRING,
CRMI TYPE STRING,
CRMN TYPE STRING,
CRMO TYPE STRING,
CRMS TYPE STRING,
CRMT TYPE STRING,
CRNC TYPE STRING,
CRND TYPE STRING,
CRNE TYPE STRING,
CRNH TYPE STRING,
CRNJ TYPE STRING,
CRNM TYPE STRING,
CRNV TYPE STRING,
CRNY TYPE STRING,
CROH TYPE STRING,
CROK TYPE STRING,
CROR TYPE STRING,
CRPA TYPE STRING,
CRPR TYPE STRING,
CRRI TYPE STRING,
CRSC TYPE STRING,
CRSD TYPE STRING,
CRTN TYPE STRING,
CRTX TYPE STRING,
CRUT TYPE STRING,
CRVA TYPE STRING,
CRVI TYPE STRING,
CRVT TYPE STRING,
CRWA TYPE STRING,
CRWI TYPE STRING,
CRWV TYPE STRING,
CRWY TYPE STRING,
F001 TYPE STRING,
F002 TYPE STRING,
F003 TYPE STRING,
F004 TYPE STRING,
F005 TYPE STRING,
F007 TYPE STRING,
F009 TYPE STRING,
F011 TYPE STRING,
F023 TYPE STRING,
F026 TYPE STRING,
F027 TYPE STRING,
FCW1 TYPE STRING,
FCW2 TYPE STRING,
FFEN TYPE STRING,
FWS1 TYPE STRING,
FWS2 TYPE STRING,
L310 TYPE STRING,
Q002 TYPE STRING,
RRAK TYPE STRING,
RRAL TYPE STRING,
RRAR TYPE STRING,
RRAZ TYPE STRING,
RRCA TYPE STRING,
RRCO TYPE STRING,
RRCT TYPE STRING,
RRDC TYPE STRING,
RRDE TYPE STRING,
RRFL TYPE STRING,
RRGA TYPE STRING,
RRHI TYPE STRING,
RRIA TYPE STRING,
RRID TYPE STRING,
RRIL TYPE STRING,
RRIN TYPE STRING,
RRKS TYPE STRING,
RRKY TYPE STRING,
RRLA TYPE STRING,
RRMA TYPE STRING,
RRMD TYPE STRING,
RRME TYPE STRING,
RRMI TYPE STRING,
RRMN TYPE STRING,
RRMO TYPE STRING,
RRMS TYPE STRING,
RRMT TYPE STRING,
RRNC TYPE STRING,
RRND TYPE STRING,
RRNE TYPE STRING,
RRNH TYPE STRING,
RRNJ TYPE STRING,
RRNM TYPE STRING,
RRNV TYPE STRING,
RRNY TYPE STRING,
RROH TYPE STRING,
RROK TYPE STRING,
RROR TYPE STRING,
RRPA TYPE STRING,
RRPR TYPE STRING,
RRRI TYPE STRING,
RRSC TYPE STRING,
RRSD TYPE STRING,
RRTN TYPE STRING,
RRTX TYPE STRING,
RRUT TYPE STRING,
RRVA TYPE STRING,
RRVI TYPE STRING,
RRVT TYPE STRING,
RRWA TYPE STRING,
RRWI TYPE STRING,
RRWV TYPE STRING,
RRWY TYPE STRING,
TOCR TYPE STRING,
U001 TYPE STRING,
U002 TYPE STRING,
U003 TYPE STRING,
U004 TYPE STRING,
U005 TYPE STRING,
WGAK TYPE STRING,
WGAL TYPE STRING,
WGAR TYPE STRING,
WGAZ TYPE STRING,
WGCA TYPE STRING,
WGCO TYPE STRING,
WGCT TYPE STRING,
WGDC TYPE STRING,
WGDE TYPE STRING,
WGFL TYPE STRING,
WGGA TYPE STRING,
WGHI TYPE STRING,
WGIA TYPE STRING,
WGID TYPE STRING,
WGIL TYPE STRING,
WGIN TYPE STRING,
WGKS TYPE STRING,
WGKY TYPE STRING,
WGLA TYPE STRING,
WGMA TYPE STRING,
WGMD TYPE STRING,
WGME TYPE STRING,
WGMI TYPE STRING,
WGMN TYPE STRING,
WGMO TYPE STRING,
WGMS TYPE STRING,
WGMT TYPE STRING,
WGNC TYPE STRING,
WGND TYPE STRING,
WGNE TYPE STRING,
WGNH TYPE STRING,
WGNJ TYPE STRING,
WGNM TYPE STRING,
WGNV TYPE STRING,
WGNY TYPE STRING,
WGOH TYPE STRING,
WGOK TYPE STRING,
WGOR TYPE STRING,
WGPA TYPE STRING,
WGPR TYPE STRING,
WGRI TYPE STRING,
WGSC TYPE STRING,
WGSD TYPE STRING,
WGTN TYPE STRING,
WGTX TYPE STRING,
WGUT TYPE STRING,
WGVA TYPE STRING,
WGVI TYPE STRING,
WGVT TYPE STRING,
WGWA TYPE STRING,
WGWI TYPE STRING,
WGWV TYPE STRING,
WGWY TYPE STRING,END OF T_EKKO_STR. DATA: WA_P10_SHR_F_940PR_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_940PR_STR-T5UTL_TXCMP sy-vline
WA_P10_SHR_F_940PR_STR-T5UTL_LTEXT sy-vline
WA_P10_SHR_F_940PR_STR-T5UTL_STRAS sy-vline
WA_P10_SHR_F_940PR_STR-T5UTL_ORT01 sy-vline
WA_P10_SHR_F_940PR_STR-T5UTL_STATE sy-vline
WA_P10_SHR_F_940PR_STR-T5UTL_ZIPCD sy-vline
WA_P10_SHR_F_940PR_STR-T5UTL_TELNR sy-vline
WA_P10_SHR_F_940PR_STR-P0002_NACHN sy-vline
WA_P10_SHR_F_940PR_STR-P0002_PERID sy-vline
WA_P10_SHR_F_940PR_STR-P0002_PERNR sy-vline
WA_P10_SHR_F_940PR_STR-P0002_VORNA sy-vline
WA_P10_SHR_F_940PR_STR-P0002_FNAMK sy-vline
WA_P10_SHR_F_940PR_STR-P0002_MIDNM sy-vline
WA_P10_SHR_F_940PR_STR-P0002_NAME2 sy-vline
WA_P10_SHR_F_940PR_STR-P0002_NAMZU sy-vline
WA_P10_SHR_F_940PR_STR-P0006_LAND1 sy-vline
WA_P10_SHR_F_940PR_STR-P0006_LOCAT sy-vline
WA_P10_SHR_F_940PR_STR-P0006_ORT01 sy-vline
WA_P10_SHR_F_940PR_STR-P0006_PSTLZ sy-vline
WA_P10_SHR_F_940PR_STR-P0006_STATE sy-vline
WA_P10_SHR_F_940PR_STR-P0006_STRAS sy-vline
WA_P10_SHR_F_940PR_STR-CURKY sy-vline
WA_P10_SHR_F_940PR_STR-T005T_LANDX sy-vline
WA_P10_SHR_F_940PR_STR-CRAK sy-vline
WA_P10_SHR_F_940PR_STR-CRAL sy-vline
WA_P10_SHR_F_940PR_STR-CRAR sy-vline
WA_P10_SHR_F_940PR_STR-CRAZ sy-vline
WA_P10_SHR_F_940PR_STR-CRCA sy-vline
WA_P10_SHR_F_940PR_STR-CRCO sy-vline
WA_P10_SHR_F_940PR_STR-CRCT sy-vline
WA_P10_SHR_F_940PR_STR-CRDC sy-vline
WA_P10_SHR_F_940PR_STR-CRDE sy-vline
WA_P10_SHR_F_940PR_STR-CRFL sy-vline
WA_P10_SHR_F_940PR_STR-CRGA sy-vline
WA_P10_SHR_F_940PR_STR-CRHI sy-vline
WA_P10_SHR_F_940PR_STR-CRIA sy-vline
WA_P10_SHR_F_940PR_STR-CRID sy-vline
WA_P10_SHR_F_940PR_STR-CRIL sy-vline
WA_P10_SHR_F_940PR_STR-CRIN sy-vline
WA_P10_SHR_F_940PR_STR-CRKS sy-vline
WA_P10_SHR_F_940PR_STR-CRKY sy-vline
WA_P10_SHR_F_940PR_STR-CRLA sy-vline
WA_P10_SHR_F_940PR_STR-CRMA sy-vline
WA_P10_SHR_F_940PR_STR-CRMD sy-vline
WA_P10_SHR_F_940PR_STR-CRME sy-vline
WA_P10_SHR_F_940PR_STR-CRMI sy-vline
WA_P10_SHR_F_940PR_STR-CRMN sy-vline
WA_P10_SHR_F_940PR_STR-CRMO sy-vline
WA_P10_SHR_F_940PR_STR-CRMS sy-vline
WA_P10_SHR_F_940PR_STR-CRMT sy-vline
WA_P10_SHR_F_940PR_STR-CRNC sy-vline
WA_P10_SHR_F_940PR_STR-CRND sy-vline
WA_P10_SHR_F_940PR_STR-CRNE sy-vline
WA_P10_SHR_F_940PR_STR-CRNH sy-vline
WA_P10_SHR_F_940PR_STR-CRNJ sy-vline
WA_P10_SHR_F_940PR_STR-CRNM sy-vline
WA_P10_SHR_F_940PR_STR-CRNV sy-vline
WA_P10_SHR_F_940PR_STR-CRNY sy-vline
WA_P10_SHR_F_940PR_STR-CROH sy-vline
WA_P10_SHR_F_940PR_STR-CROK sy-vline
WA_P10_SHR_F_940PR_STR-CROR sy-vline
WA_P10_SHR_F_940PR_STR-CRPA sy-vline
WA_P10_SHR_F_940PR_STR-CRPR sy-vline
WA_P10_SHR_F_940PR_STR-CRRI sy-vline
WA_P10_SHR_F_940PR_STR-CRSC sy-vline
WA_P10_SHR_F_940PR_STR-CRSD sy-vline
WA_P10_SHR_F_940PR_STR-CRTN sy-vline
WA_P10_SHR_F_940PR_STR-CRTX sy-vline
WA_P10_SHR_F_940PR_STR-CRUT sy-vline
WA_P10_SHR_F_940PR_STR-CRVA sy-vline
WA_P10_SHR_F_940PR_STR-CRVI sy-vline
WA_P10_SHR_F_940PR_STR-CRVT sy-vline
WA_P10_SHR_F_940PR_STR-CRWA sy-vline
WA_P10_SHR_F_940PR_STR-CRWI sy-vline
WA_P10_SHR_F_940PR_STR-CRWV sy-vline
WA_P10_SHR_F_940PR_STR-CRWY sy-vline
WA_P10_SHR_F_940PR_STR-F001 sy-vline
WA_P10_SHR_F_940PR_STR-F002 sy-vline
WA_P10_SHR_F_940PR_STR-F003 sy-vline
WA_P10_SHR_F_940PR_STR-F004 sy-vline
WA_P10_SHR_F_940PR_STR-F005 sy-vline
WA_P10_SHR_F_940PR_STR-F007 sy-vline
WA_P10_SHR_F_940PR_STR-F009 sy-vline
WA_P10_SHR_F_940PR_STR-F011 sy-vline
WA_P10_SHR_F_940PR_STR-F023 sy-vline
WA_P10_SHR_F_940PR_STR-F026 sy-vline
WA_P10_SHR_F_940PR_STR-F027 sy-vline
WA_P10_SHR_F_940PR_STR-FCW1 sy-vline
WA_P10_SHR_F_940PR_STR-FCW2 sy-vline
WA_P10_SHR_F_940PR_STR-FFEN sy-vline
WA_P10_SHR_F_940PR_STR-FWS1 sy-vline
WA_P10_SHR_F_940PR_STR-FWS2 sy-vline
WA_P10_SHR_F_940PR_STR-L310 sy-vline
WA_P10_SHR_F_940PR_STR-Q002 sy-vline
WA_P10_SHR_F_940PR_STR-RRAK sy-vline
WA_P10_SHR_F_940PR_STR-RRAL sy-vline
WA_P10_SHR_F_940PR_STR-RRAR sy-vline
WA_P10_SHR_F_940PR_STR-RRAZ sy-vline
WA_P10_SHR_F_940PR_STR-RRCA sy-vline
WA_P10_SHR_F_940PR_STR-RRCO sy-vline
WA_P10_SHR_F_940PR_STR-RRCT sy-vline
WA_P10_SHR_F_940PR_STR-RRDC sy-vline
WA_P10_SHR_F_940PR_STR-RRDE sy-vline
WA_P10_SHR_F_940PR_STR-RRFL sy-vline
WA_P10_SHR_F_940PR_STR-RRGA sy-vline
WA_P10_SHR_F_940PR_STR-RRHI sy-vline
WA_P10_SHR_F_940PR_STR-RRIA sy-vline
WA_P10_SHR_F_940PR_STR-RRID sy-vline
WA_P10_SHR_F_940PR_STR-RRIL sy-vline
WA_P10_SHR_F_940PR_STR-RRIN sy-vline
WA_P10_SHR_F_940PR_STR-RRKS sy-vline
WA_P10_SHR_F_940PR_STR-RRKY sy-vline
WA_P10_SHR_F_940PR_STR-RRLA sy-vline
WA_P10_SHR_F_940PR_STR-RRMA sy-vline
WA_P10_SHR_F_940PR_STR-RRMD sy-vline
WA_P10_SHR_F_940PR_STR-RRME sy-vline
WA_P10_SHR_F_940PR_STR-RRMI sy-vline
WA_P10_SHR_F_940PR_STR-RRMN sy-vline
WA_P10_SHR_F_940PR_STR-RRMO sy-vline
WA_P10_SHR_F_940PR_STR-RRMS sy-vline
WA_P10_SHR_F_940PR_STR-RRMT sy-vline
WA_P10_SHR_F_940PR_STR-RRNC sy-vline
WA_P10_SHR_F_940PR_STR-RRND sy-vline
WA_P10_SHR_F_940PR_STR-RRNE sy-vline
WA_P10_SHR_F_940PR_STR-RRNH sy-vline
WA_P10_SHR_F_940PR_STR-RRNJ sy-vline
WA_P10_SHR_F_940PR_STR-RRNM sy-vline
WA_P10_SHR_F_940PR_STR-RRNV sy-vline
WA_P10_SHR_F_940PR_STR-RRNY sy-vline
WA_P10_SHR_F_940PR_STR-RROH sy-vline
WA_P10_SHR_F_940PR_STR-RROK sy-vline
WA_P10_SHR_F_940PR_STR-RROR sy-vline
WA_P10_SHR_F_940PR_STR-RRPA sy-vline
WA_P10_SHR_F_940PR_STR-RRPR sy-vline
WA_P10_SHR_F_940PR_STR-RRRI sy-vline
WA_P10_SHR_F_940PR_STR-RRSC sy-vline
WA_P10_SHR_F_940PR_STR-RRSD sy-vline
WA_P10_SHR_F_940PR_STR-RRTN sy-vline
WA_P10_SHR_F_940PR_STR-RRTX sy-vline
WA_P10_SHR_F_940PR_STR-RRUT sy-vline
WA_P10_SHR_F_940PR_STR-RRVA sy-vline
WA_P10_SHR_F_940PR_STR-RRVI sy-vline
WA_P10_SHR_F_940PR_STR-RRVT sy-vline
WA_P10_SHR_F_940PR_STR-RRWA sy-vline
WA_P10_SHR_F_940PR_STR-RRWI sy-vline
WA_P10_SHR_F_940PR_STR-RRWV sy-vline
WA_P10_SHR_F_940PR_STR-RRWY sy-vline
WA_P10_SHR_F_940PR_STR-TOCR sy-vline
WA_P10_SHR_F_940PR_STR-U001 sy-vline
WA_P10_SHR_F_940PR_STR-U002 sy-vline
WA_P10_SHR_F_940PR_STR-U003 sy-vline
WA_P10_SHR_F_940PR_STR-U004 sy-vline
WA_P10_SHR_F_940PR_STR-U005 sy-vline
WA_P10_SHR_F_940PR_STR-WGAK sy-vline
WA_P10_SHR_F_940PR_STR-WGAL sy-vline
WA_P10_SHR_F_940PR_STR-WGAR sy-vline
WA_P10_SHR_F_940PR_STR-WGAZ sy-vline
WA_P10_SHR_F_940PR_STR-WGCA sy-vline
WA_P10_SHR_F_940PR_STR-WGCO sy-vline
WA_P10_SHR_F_940PR_STR-WGCT sy-vline
WA_P10_SHR_F_940PR_STR-WGDC sy-vline
WA_P10_SHR_F_940PR_STR-WGDE sy-vline
WA_P10_SHR_F_940PR_STR-WGFL sy-vline
WA_P10_SHR_F_940PR_STR-WGGA sy-vline
WA_P10_SHR_F_940PR_STR-WGHI sy-vline
WA_P10_SHR_F_940PR_STR-WGIA sy-vline
WA_P10_SHR_F_940PR_STR-WGID sy-vline
WA_P10_SHR_F_940PR_STR-WGIL sy-vline
WA_P10_SHR_F_940PR_STR-WGIN sy-vline
WA_P10_SHR_F_940PR_STR-WGKS sy-vline
WA_P10_SHR_F_940PR_STR-WGKY sy-vline
WA_P10_SHR_F_940PR_STR-WGLA sy-vline
WA_P10_SHR_F_940PR_STR-WGMA sy-vline
WA_P10_SHR_F_940PR_STR-WGMD sy-vline
WA_P10_SHR_F_940PR_STR-WGME sy-vline
WA_P10_SHR_F_940PR_STR-WGMI sy-vline
WA_P10_SHR_F_940PR_STR-WGMN sy-vline
WA_P10_SHR_F_940PR_STR-WGMO sy-vline
WA_P10_SHR_F_940PR_STR-WGMS sy-vline
WA_P10_SHR_F_940PR_STR-WGMT sy-vline
WA_P10_SHR_F_940PR_STR-WGNC sy-vline
WA_P10_SHR_F_940PR_STR-WGND sy-vline
WA_P10_SHR_F_940PR_STR-WGNE sy-vline
WA_P10_SHR_F_940PR_STR-WGNH sy-vline
WA_P10_SHR_F_940PR_STR-WGNJ sy-vline
WA_P10_SHR_F_940PR_STR-WGNM sy-vline
WA_P10_SHR_F_940PR_STR-WGNV sy-vline
WA_P10_SHR_F_940PR_STR-WGNY sy-vline
WA_P10_SHR_F_940PR_STR-WGOH sy-vline
WA_P10_SHR_F_940PR_STR-WGOK sy-vline
WA_P10_SHR_F_940PR_STR-WGOR sy-vline
WA_P10_SHR_F_940PR_STR-WGPA sy-vline
WA_P10_SHR_F_940PR_STR-WGPR sy-vline
WA_P10_SHR_F_940PR_STR-WGRI sy-vline
WA_P10_SHR_F_940PR_STR-WGSC sy-vline
WA_P10_SHR_F_940PR_STR-WGSD sy-vline
WA_P10_SHR_F_940PR_STR-WGTN sy-vline
WA_P10_SHR_F_940PR_STR-WGTX sy-vline
WA_P10_SHR_F_940PR_STR-WGUT sy-vline
WA_P10_SHR_F_940PR_STR-WGVA sy-vline
WA_P10_SHR_F_940PR_STR-WGVI sy-vline
WA_P10_SHR_F_940PR_STR-WGVT sy-vline
WA_P10_SHR_F_940PR_STR-WGWA sy-vline
WA_P10_SHR_F_940PR_STR-WGWI sy-vline
WA_P10_SHR_F_940PR_STR-WGWV sy-vline
WA_P10_SHR_F_940PR_STR-WGWY sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.