ABAP Select data from SAP table PS0235 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 PS0235 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 PS0235. 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 PS0235 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_PS0235 TYPE STANDARD TABLE OF PS0235,
      WA_PS0235 TYPE PS0235,
      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: <PS0235> TYPE PS0235.

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

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

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM PS0235
*  INTO TABLE @DATA(IT_PS02352).
*--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_PS0235 INDEX 1 INTO DATA(WA_PS02352).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_PS0235 ASSIGNING <PS0235>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<PS0235>-TAURT = 1.
<PS0235>-TYP01 = 1.
<PS0235>-FRM01 = 1.
<PS0235>-EXP01 = 1.
<PS0235>-TYP02 = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_PS0235-FRM02, sy-vline,
WA_PS0235-EXP02, sy-vline,
WA_PS0235-TYP03, sy-vline,
WA_PS0235-FRM03, sy-vline,
WA_PS0235-EXP03, sy-vline,
WA_PS0235-TYP04, sy-vline.
ENDLOOP. *Add any further fields from structure WA_PS0235 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_PS0235 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_PS0235 INTO WA_PS0235. *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 TXTYP, internal->external for field TYP01 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP01 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP01.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM01 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM01 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM01.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP02 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP02 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP02.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM02 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM02 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM02.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP03 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP03 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP03.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM03 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM03 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM03.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP04 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP04 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP04.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM04 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM04 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM04.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP05 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP05 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP05.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM05 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM05 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM05.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP06 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP06 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP06.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM06 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM06 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM06.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP07 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP07 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP07.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM07 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM07 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM07.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP08 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP08 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP08.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM08 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM08 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM08.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP09 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP09 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP09.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM09 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM09 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM09.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP10 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP10 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP10.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM10 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM10 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM10.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP11 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP11 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP11.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM11 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM11 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM11.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP12 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP12 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP12.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM12 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM12 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM12.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP13 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP13 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP13.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM13 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM13 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM13.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP14 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP14 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP14.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM14 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM14 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM14.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP15 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP15 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP15.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM15 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM15 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM15.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP16 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP16 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP16.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM16 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM16 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM16.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP17 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP17 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP17.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM17 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM17 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM17.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP18 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP18 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP18.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM18 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM18 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM18.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP19 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP19 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP19.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM19 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM19 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM19.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP20 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP20 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP20.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM20 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM20 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM20.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP21 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP21 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP21.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM21 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM21 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM21.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP22 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP22 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP22.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM22 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM22 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM22.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP23 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP23 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP23.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM23 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM23 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM23.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP24 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP24 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP24.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM24 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM24 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM24.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP25 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP25 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP25.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM25 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM25 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM25.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP26 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP26 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP26.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM26 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM26 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM26.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP27 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP27 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP27.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM27 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM27 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM27.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP28 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP28 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP28.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM28 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM28 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM28.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP29 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP29 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP29.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM29 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM29 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM29.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TXTYP, internal->external for field TYP30 CALL FUNCTION 'CONVERSION_EXIT_TXTYP_OUTPUT' EXPORTING input = WA_PS0235-TYP30 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-TYP30.
WRITE:/ 'New Value:', ld_input.

*Conversion exit P10FM, internal->external for field FRM30 CALL FUNCTION 'CONVERSION_EXIT_P10FM_OUTPUT' EXPORTING input = WA_PS0235-FRM30 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_PS0235-FRM30.
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_PS0235_STR,
TAURT TYPE STRING,
TYP01 TYPE STRING,
FRM01 TYPE STRING,
EXP01 TYPE STRING,
TYP02 TYPE STRING,
FRM02 TYPE STRING,
EXP02 TYPE STRING,
TYP03 TYPE STRING,
FRM03 TYPE STRING,
EXP03 TYPE STRING,
TYP04 TYPE STRING,
FRM04 TYPE STRING,
EXP04 TYPE STRING,
TYP05 TYPE STRING,
FRM05 TYPE STRING,
EXP05 TYPE STRING,
TYP06 TYPE STRING,
FRM06 TYPE STRING,
EXP06 TYPE STRING,
TYP07 TYPE STRING,
FRM07 TYPE STRING,
EXP07 TYPE STRING,
TYP08 TYPE STRING,
FRM08 TYPE STRING,
EXP08 TYPE STRING,
TYP09 TYPE STRING,
FRM09 TYPE STRING,
EXP09 TYPE STRING,
TYP10 TYPE STRING,
FRM10 TYPE STRING,
EXP10 TYPE STRING,
TYP11 TYPE STRING,
FRM11 TYPE STRING,
EXP11 TYPE STRING,
TYP12 TYPE STRING,
FRM12 TYPE STRING,
EXP12 TYPE STRING,
TYP13 TYPE STRING,
FRM13 TYPE STRING,
EXP13 TYPE STRING,
TYP14 TYPE STRING,
FRM14 TYPE STRING,
EXP14 TYPE STRING,
TYP15 TYPE STRING,
FRM15 TYPE STRING,
EXP15 TYPE STRING,
TYP16 TYPE STRING,
FRM16 TYPE STRING,
EXP16 TYPE STRING,
TYP17 TYPE STRING,
FRM17 TYPE STRING,
EXP17 TYPE STRING,
TYP18 TYPE STRING,
FRM18 TYPE STRING,
EXP18 TYPE STRING,
TYP19 TYPE STRING,
FRM19 TYPE STRING,
EXP19 TYPE STRING,
TYP20 TYPE STRING,
FRM20 TYPE STRING,
EXP20 TYPE STRING,
TYP21 TYPE STRING,
FRM21 TYPE STRING,
EXP21 TYPE STRING,
TYP22 TYPE STRING,
FRM22 TYPE STRING,
EXP22 TYPE STRING,
TYP23 TYPE STRING,
FRM23 TYPE STRING,
EXP23 TYPE STRING,
TYP24 TYPE STRING,
FRM24 TYPE STRING,
EXP24 TYPE STRING,
TYP25 TYPE STRING,
FRM25 TYPE STRING,
EXP25 TYPE STRING,
TYP26 TYPE STRING,
FRM26 TYPE STRING,
EXP26 TYPE STRING,
TYP27 TYPE STRING,
FRM27 TYPE STRING,
EXP27 TYPE STRING,
TYP28 TYPE STRING,
FRM28 TYPE STRING,
EXP28 TYPE STRING,
TYP29 TYPE STRING,
FRM29 TYPE STRING,
EXP29 TYPE STRING,
TYP30 TYPE STRING,
FRM30 TYPE STRING,
EXP30 TYPE STRING,END OF T_EKKO_STR. DATA: WA_PS0235_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_PS0235_STR-TAURT sy-vline
WA_PS0235_STR-TYP01 sy-vline
WA_PS0235_STR-FRM01 sy-vline
WA_PS0235_STR-EXP01 sy-vline
WA_PS0235_STR-TYP02 sy-vline
WA_PS0235_STR-FRM02 sy-vline
WA_PS0235_STR-EXP02 sy-vline
WA_PS0235_STR-TYP03 sy-vline
WA_PS0235_STR-FRM03 sy-vline
WA_PS0235_STR-EXP03 sy-vline
WA_PS0235_STR-TYP04 sy-vline
WA_PS0235_STR-FRM04 sy-vline
WA_PS0235_STR-EXP04 sy-vline
WA_PS0235_STR-TYP05 sy-vline
WA_PS0235_STR-FRM05 sy-vline
WA_PS0235_STR-EXP05 sy-vline
WA_PS0235_STR-TYP06 sy-vline
WA_PS0235_STR-FRM06 sy-vline
WA_PS0235_STR-EXP06 sy-vline
WA_PS0235_STR-TYP07 sy-vline
WA_PS0235_STR-FRM07 sy-vline
WA_PS0235_STR-EXP07 sy-vline
WA_PS0235_STR-TYP08 sy-vline
WA_PS0235_STR-FRM08 sy-vline
WA_PS0235_STR-EXP08 sy-vline
WA_PS0235_STR-TYP09 sy-vline
WA_PS0235_STR-FRM09 sy-vline
WA_PS0235_STR-EXP09 sy-vline
WA_PS0235_STR-TYP10 sy-vline
WA_PS0235_STR-FRM10 sy-vline
WA_PS0235_STR-EXP10 sy-vline
WA_PS0235_STR-TYP11 sy-vline
WA_PS0235_STR-FRM11 sy-vline
WA_PS0235_STR-EXP11 sy-vline
WA_PS0235_STR-TYP12 sy-vline
WA_PS0235_STR-FRM12 sy-vline
WA_PS0235_STR-EXP12 sy-vline
WA_PS0235_STR-TYP13 sy-vline
WA_PS0235_STR-FRM13 sy-vline
WA_PS0235_STR-EXP13 sy-vline
WA_PS0235_STR-TYP14 sy-vline
WA_PS0235_STR-FRM14 sy-vline
WA_PS0235_STR-EXP14 sy-vline
WA_PS0235_STR-TYP15 sy-vline
WA_PS0235_STR-FRM15 sy-vline
WA_PS0235_STR-EXP15 sy-vline
WA_PS0235_STR-TYP16 sy-vline
WA_PS0235_STR-FRM16 sy-vline
WA_PS0235_STR-EXP16 sy-vline
WA_PS0235_STR-TYP17 sy-vline
WA_PS0235_STR-FRM17 sy-vline
WA_PS0235_STR-EXP17 sy-vline
WA_PS0235_STR-TYP18 sy-vline
WA_PS0235_STR-FRM18 sy-vline
WA_PS0235_STR-EXP18 sy-vline
WA_PS0235_STR-TYP19 sy-vline
WA_PS0235_STR-FRM19 sy-vline
WA_PS0235_STR-EXP19 sy-vline
WA_PS0235_STR-TYP20 sy-vline
WA_PS0235_STR-FRM20 sy-vline
WA_PS0235_STR-EXP20 sy-vline
WA_PS0235_STR-TYP21 sy-vline
WA_PS0235_STR-FRM21 sy-vline
WA_PS0235_STR-EXP21 sy-vline
WA_PS0235_STR-TYP22 sy-vline
WA_PS0235_STR-FRM22 sy-vline
WA_PS0235_STR-EXP22 sy-vline
WA_PS0235_STR-TYP23 sy-vline
WA_PS0235_STR-FRM23 sy-vline
WA_PS0235_STR-EXP23 sy-vline
WA_PS0235_STR-TYP24 sy-vline
WA_PS0235_STR-FRM24 sy-vline
WA_PS0235_STR-EXP24 sy-vline
WA_PS0235_STR-TYP25 sy-vline
WA_PS0235_STR-FRM25 sy-vline
WA_PS0235_STR-EXP25 sy-vline
WA_PS0235_STR-TYP26 sy-vline
WA_PS0235_STR-FRM26 sy-vline
WA_PS0235_STR-EXP26 sy-vline
WA_PS0235_STR-TYP27 sy-vline
WA_PS0235_STR-FRM27 sy-vline
WA_PS0235_STR-EXP27 sy-vline
WA_PS0235_STR-TYP28 sy-vline
WA_PS0235_STR-FRM28 sy-vline
WA_PS0235_STR-EXP28 sy-vline
WA_PS0235_STR-TYP29 sy-vline
WA_PS0235_STR-FRM29 sy-vline
WA_PS0235_STR-EXP29 sy-vline
WA_PS0235_STR-TYP30 sy-vline
WA_PS0235_STR-FRM30 sy-vline
WA_PS0235_STR-EXP30 sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.