ABAP Select data from SAP table CATS_ESA_TIMERECORD_IN 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 CATS_ESA_TIMERECORD_IN 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 CATS_ESA_TIMERECORD_IN. 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 CATS_ESA_TIMERECORD_IN 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_CATS_ESA_TIMERECORD_IN TYPE STANDARD TABLE OF CATS_ESA_TIMERECORD_IN,
      WA_CATS_ESA_TIMERECORD_IN TYPE CATS_ESA_TIMERECORD_IN,
      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: <CATS_ESA_TIMERECORD_IN> TYPE CATS_ESA_TIMERECORD_IN.

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

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

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM CATS_ESA_TIMERECORD_IN
*  INTO TABLE @DATA(IT_CATS_ESA_TIMERECORD_IN2).
*--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_CATS_ESA_TIMERECORD_IN INDEX 1 INTO DATA(WA_CATS_ESA_TIMERECORD_IN2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_CATS_ESA_TIMERECORD_IN ASSIGNING <CATS_ESA_TIMERECORD_IN>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
<CATS_ESA_TIMERECORD_IN>-ACTION = 1.
<CATS_ESA_TIMERECORD_IN>-COUNTER = 1.
<CATS_ESA_TIMERECORD_IN>-EXTSYSTEM = 1.
<CATS_ESA_TIMERECORD_IN>-EXTAPPLICATION = 1.
<CATS_ESA_TIMERECORD_IN>-EXTDOCUMENTNO = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_CATS_ESA_TIMERECORD_IN-EXTSYSTEM_OLD, sy-vline,
WA_CATS_ESA_TIMERECORD_IN-EXTAPPLICATION_OLD, sy-vline,
WA_CATS_ESA_TIMERECORD_IN-EXTDOCUMENTNO_OLD, sy-vline,
WA_CATS_ESA_TIMERECORD_IN-WORKDATE, sy-vline,
WA_CATS_ESA_TIMERECORD_IN-PERNR, sy-vline,
WA_CATS_ESA_TIMERECORD_IN-SKOSTL, sy-vline.
ENDLOOP. *Add any further fields from structure WA_CATS_ESA_TIMERECORD_IN 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_CATS_ESA_TIMERECORD_IN 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_CATS_ESA_TIMERECORD_IN INTO WA_CATS_ESA_TIMERECORD_IN. *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 EXTSYSTEM CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_CATS_ESA_TIMERECORD_IN-EXTSYSTEM IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_CATS_ESA_TIMERECORD_IN-EXTSYSTEM.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

*Conversion exit NUMCV, internal->external for field VORNR_RAUFNR CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_CATS_ESA_TIMERECORD_IN-VORNR_RAUFNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_CATS_ESA_TIMERECORD_IN-VORNR_RAUFNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit NUMCV, internal->external for field UVORN_RAUFNR CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_CATS_ESA_TIMERECORD_IN-UVORN_RAUFNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_CATS_ESA_TIMERECORD_IN-UVORN_RAUFNR.
WRITE:/ 'New Value:', ld_input.

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

*Conversion exit NUMCV, internal->external for field VORNR_RNPLNR CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_CATS_ESA_TIMERECORD_IN-VORNR_RNPLNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_CATS_ESA_TIMERECORD_IN-VORNR_RNPLNR.
WRITE:/ 'New Value:', ld_input.

*Conversion exit NUMCV, internal->external for field UVORN_RNPLNR CALL FUNCTION 'CONVERSION_EXIT_NUMCV_OUTPUT' EXPORTING input = WA_CATS_ESA_TIMERECORD_IN-UVORN_RNPLNR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_CATS_ESA_TIMERECORD_IN-UVORN_RNPLNR.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

*Conversion exit CUNIT, internal->external for field UNIT CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_CATS_ESA_TIMERECORD_IN-UNIT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_CATS_ESA_TIMERECORD_IN-UNIT.
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_CATS_ESA_TIMERECORD_IN_STR,
ACTION TYPE STRING,
COUNTER TYPE STRING,
EXTSYSTEM TYPE STRING,
EXTAPPLICATION TYPE STRING,
EXTDOCUMENTNO TYPE STRING,
EXTSYSTEM_OLD TYPE STRING,
EXTAPPLICATION_OLD TYPE STRING,
EXTDOCUMENTNO_OLD TYPE STRING,
WORKDATE TYPE STRING,
PERNR TYPE STRING,
SKOSTL TYPE STRING,
LSTAR TYPE STRING,
SPRZNR TYPE STRING,
SEBELN TYPE STRING,
SEBELP TYPE STRING,
LSTNR TYPE STRING,
RKOSTL TYPE STRING,
RAUFNR TYPE STRING,
VORNR_RAUFNR TYPE STRING,
UVORN_RAUFNR TYPE STRING,
ARBPL TYPE STRING,
KAPAR TYPE STRING,
SPLIT TYPE STRING,
RNPLNR TYPE STRING,
VORNR_RNPLNR TYPE STRING,
UVORN_RNPLNR TYPE STRING,
POSID TYPE STRING,
RKDAUF TYPE STRING,
RKDPOS TYPE STRING,
RKSTR TYPE STRING,
RPRZNR TYPE STRING,
FUND TYPE STRING,
FUNC_AREA TYPE STRING,
GRANT_NBR TYPE STRING,
S_FUND TYPE STRING,
S_FUNC_AREA TYPE STRING,
S_GRANT_NBR TYPE STRING,
SBUDGET_PD TYPE STRING,
BUDGET_PD TYPE STRING,
STATKEYFIG TYPE STRING,
AWART TYPE STRING,
LGART TYPE STRING,
REINR TYPE STRING,
VERSL TYPE STRING,
WTART TYPE STRING,
BWGRL TYPE STRING,
WAERS TYPE STRING,
AUFKZ TYPE STRING,
TRFGR TYPE STRING,
TRFST TYPE STRING,
PRAKN TYPE STRING,
PRAKZ TYPE STRING,
OTYPE TYPE STRING,
PLANS TYPE STRING,
KOKRS TYPE STRING,
TCURR TYPE STRING,
PRICE TYPE STRING,
WERKS TYPE STRING,
BEMOT TYPE STRING,
CATSHOURS TYPE STRING,
MEINH TYPE STRING,
BEGUZ TYPE STRING,
ENDUZ TYPE STRING,
VTKEN TYPE STRING,
ALLDF TYPE STRING,
OFMNW TYPE STRING,
PEDD TYPE STRING,
AUERU TYPE STRING,
LTXA1 TYPE STRING,
ERUZU TYPE STRING,
CATSQUANTITY TYPE STRING,
UNIT TYPE STRING,
CATSAMOUNT TYPE STRING,
LONGTEXT TYPE STRING,
TASKTYPE TYPE STRING,
TASKLEVEL TYPE STRING,
TASKCOMPONENT TYPE STRING,
CPR_GUID TYPE STRING,
CPR_EXTID TYPE STRING,
CPR_OBJGUID TYPE STRING,
CPR_OBJGEXTID TYPE STRING,
CPR_OBJTYPE TYPE STRING,END OF T_EKKO_STR. DATA: WA_CATS_ESA_TIMERECORD_IN_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_CATS_ESA_TIMERECORD_IN_STR-ACTION sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-COUNTER sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-EXTSYSTEM sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-EXTAPPLICATION sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-EXTDOCUMENTNO sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-EXTSYSTEM_OLD sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-EXTAPPLICATION_OLD sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-EXTDOCUMENTNO_OLD sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-WORKDATE sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-PERNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-SKOSTL sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-LSTAR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-SPRZNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-SEBELN sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-SEBELP sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-LSTNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RKOSTL sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RAUFNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-VORNR_RAUFNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-UVORN_RAUFNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-ARBPL sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-KAPAR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-SPLIT sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RNPLNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-VORNR_RNPLNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-UVORN_RNPLNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-POSID sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RKDAUF sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RKDPOS sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RKSTR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-RPRZNR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-FUND sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-FUNC_AREA sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-GRANT_NBR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-S_FUND sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-S_FUNC_AREA sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-S_GRANT_NBR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-SBUDGET_PD sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-BUDGET_PD sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-STATKEYFIG sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-AWART sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-LGART sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-REINR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-VERSL sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-WTART sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-BWGRL sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-WAERS sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-AUFKZ sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-TRFGR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-TRFST sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-PRAKN sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-PRAKZ sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-OTYPE sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-PLANS sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-KOKRS sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-TCURR sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-PRICE sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-WERKS sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-BEMOT sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CATSHOURS sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-MEINH sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-BEGUZ sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-ENDUZ sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-VTKEN sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-ALLDF sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-OFMNW sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-PEDD sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-AUERU sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-LTXA1 sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-ERUZU sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CATSQUANTITY sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-UNIT sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CATSAMOUNT sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-LONGTEXT sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-TASKTYPE sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-TASKLEVEL sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-TASKCOMPONENT sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CPR_GUID sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CPR_EXTID sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CPR_OBJGUID sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CPR_OBJGEXTID sy-vline
WA_CATS_ESA_TIMERECORD_IN_STR-CPR_OBJTYPE sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.