ABAP Select data from SAP table /SCMTMS/S_TOR_Q_RESULT 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 /SCMTMS/S_TOR_Q_RESULT 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 /SCMTMS/S_TOR_Q_RESULT. 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 /SCMTMS/S_TOR_Q_RESULT 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_/SCMTMS/S_TOR_Q_RESULT TYPE STANDARD TABLE OF /SCMTMS/S_TOR_Q_RESULT,
      WA_/SCMTMS/S_TOR_Q_RESULT TYPE /SCMTMS/S_TOR_Q_RESULT,
      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: </SCMTMS/S_TOR_Q_RESULT> TYPE /SCMTMS/S_TOR_Q_RESULT.

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

SELECT *
*restrict ABAP select to first 10 rows
 UP TO 10 ROWS      
  FROM /SCMTMS/S_TOR_Q_RESULT
  INTO TABLE IT_/SCMTMS/S_TOR_Q_RESULT.

*Select data and declare internal table using in-line method @DATA
*SELECT *
*  FROM /SCMTMS/S_TOR_Q_RESULT
*  INTO TABLE @DATA(IT_/SCMTMS/S_TOR_Q_RESULT2).
*--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_/SCMTMS/S_TOR_Q_RESULT INDEX 1 INTO DATA(WA_/SCMTMS/S_TOR_Q_RESULT2).


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SCMTMS/S_TOR_Q_RESULT ASSIGNING </SCMTMS/S_TOR_Q_RESULT>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SCMTMS/S_TOR_Q_RESULT>-DB_KEY = 1.
</SCMTMS/S_TOR_Q_RESULT>-FIRST_STOP_LOG_LOC_UUID = 1.
</SCMTMS/S_TOR_Q_RESULT>-FIRST_STOP_LOG_LOC_ID = 1.
</SCMTMS/S_TOR_Q_RESULT>-FIRST_STOP_LOG_LOC_ADDRESSE = 1.
</SCMTMS/S_TOR_Q_RESULT>-FIRST_STOP_LOG_LOC_COUNTRY = 1.
ENDLOOP.

LOOP AT IT_/SCMTMS/S_TOR_Q_RESULT INTO WA_/SCMTMS/S_TOR_Q_RESULT.
*Write horizonal line to screen report.
  WRITE:/ sy-uline.

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_LOG_LOC_REGION, sy-vline,
WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_LOG_LOC_CITY, sy-vline,
WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_LOG_LOC_ZIP, sy-vline,
WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_ADR_LOC_UUID, sy-vline,
WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_ACC_START, sy-vline,
WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_REQ_START, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SCMTMS/S_TOR_Q_RESULT 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_/SCMTMS/S_TOR_Q_RESULT 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_/SCMTMS/S_TOR_Q_RESULT INTO WA_/SCMTMS/S_TOR_Q_RESULT. *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 ID004, internal->external for field FIRST_STOP_LOG_LOC_UUID CALL FUNCTION 'CONVERSION_EXIT_ID004_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_LOG_LOC_UUID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_LOG_LOC_UUID.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ID004, internal->external for field FIRST_STOP_ADR_LOC_UUID CALL FUNCTION 'CONVERSION_EXIT_ID004_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_ADR_LOC_UUID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-FIRST_STOP_ADR_LOC_UUID.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ID004, internal->external for field LAST_STOP_LOG_LOC_UUID CALL FUNCTION 'CONVERSION_EXIT_ID004_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-LAST_STOP_LOG_LOC_UUID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-LAST_STOP_LOG_LOC_UUID.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ID004, internal->external for field LAST_STOP_ADR_LOC_UUID CALL FUNCTION 'CONVERSION_EXIT_ID004_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-LAST_STOP_ADR_LOC_UUID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-LAST_STOP_ADR_LOC_UUID.
WRITE:/ 'New Value:', ld_input.

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

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

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

*Conversion exit FUBRU, internal->external for field FUBR_KEY CALL FUNCTION 'CONVERSION_EXIT_FUBRU_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-FUBR_KEY IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-FUBR_KEY.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTLC, internal->external for field DLV_CREATED_ON CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-DLV_CREATED_ON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-DLV_CREATED_ON.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTLC, internal->external for field DLV_CONF_RCVD_ON CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-DLV_CONF_RCVD_ON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-DLV_CONF_RCVD_ON.
WRITE:/ 'New Value:', ld_input.

*Conversion exit CM_ID, internal->external for field CM_ID CALL FUNCTION 'CONVERSION_EXIT_CM_ID_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-CM_ID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-CM_ID.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTLC, internal->external for field CREATED_ON CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-CREATED_ON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-CREATED_ON.
WRITE:/ 'New Value:', ld_input.

*Conversion exit TSTLC, internal->external for field CHANGED_ON CALL FUNCTION 'CONVERSION_EXIT_TSTLC_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-CHANGED_ON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-CHANGED_ON.
WRITE:/ 'New Value:', ld_input.

*Conversion exit ID001, internal->external for field TSP CALL FUNCTION 'CONVERSION_EXIT_ID001_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-TSP IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-TSP.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

*Conversion exit ALPHA, internal->external for field ERP_SHPM_LOGSYS CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/SCMTMS/S_TOR_Q_RESULT-ERP_SHPM_LOGSYS IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_TOR_Q_RESULT-ERP_SHPM_LOGSYS.
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_/SCMTMS/S_TOR_Q_RESULT_STR,
DB_KEY TYPE STRING,
FIRST_STOP_LOG_LOC_UUID TYPE STRING,
FIRST_STOP_LOG_LOC_ID TYPE STRING,
FIRST_STOP_LOG_LOC_ADDRESSE TYPE STRING,
FIRST_STOP_LOG_LOC_COUNTRY TYPE STRING,
FIRST_STOP_LOG_LOC_REGION TYPE STRING,
FIRST_STOP_LOG_LOC_CITY TYPE STRING,
FIRST_STOP_LOG_LOC_ZIP TYPE STRING,
FIRST_STOP_ADR_LOC_UUID TYPE STRING,
FIRST_STOP_ACC_START TYPE STRING,
FIRST_STOP_REQ_START TYPE STRING,
FIRST_STOP_REQ_END TYPE STRING,
FIRST_STOP_ACC_END TYPE STRING,
FIRST_ACTIVITY TYPE STRING,
LAST_STOP_LOG_LOC_UUID TYPE STRING,
LAST_STOP_LOG_LOC_ID TYPE STRING,
LAST_STOP_LOG_LOC_ADDRESSE TYPE STRING,
LAST_STOP_LOG_LOC_COUNTRY TYPE STRING,
LAST_STOP_LOG_LOC_REGION TYPE STRING,
LAST_STOP_LOG_LOC_CITY TYPE STRING,
LAST_STOP_LOG_LOC_ZIP TYPE STRING,
LAST_STOP_ADR_LOC_UUID TYPE STRING,
LAST_STOP_ACC_START TYPE STRING,
LAST_STOP_REQ_START TYPE STRING,
LAST_STOP_REQ_END TYPE STRING,
LAST_STOP_ACC_END TYPE STRING,
LAST_ACTIVITY TYPE STRING,
PLAN_TRANS_START TYPE STRING,
PLAN_TRANS_END TYPE STRING,
MAIN_ITEM_CAT TYPE STRING,
SCHED_KEY TYPE STRING,
SCHED_DEP TYPE STRING,
MTR TYPE STRING,
MOT TYPE STRING,
MOT_CAT TYPE STRING,
FLIGHT_CODE TYPE STRING,
VOYAGE_ID TYPE STRING,
VESSEL_ID TYPE STRING,
IMO_ID TYPE STRING,
COUNTRY TYPE STRING,
SERVICE_LVL_PL TYPE STRING,
PORT_OF_LOADING TYPE STRING,
CARGO_CUTOFF TYPE STRING,
VESSEL_SAIL_DATE TYPE STRING,
PORT_OF_DISCHARGE TYPE STRING,
EXP_TIME_ARRIVAL TYPE STRING,
CARGO_TAKEOVER_TIME TYPE STRING,
QUERY_NODE_DB_KEY TYPE STRING,
TCC_INV_STATUS TYPE STRING,
TCC_CALC_STATUS TYPE STRING,
TCC_INV_LEVEL TYPE STRING,
SHIPPED_ON_BOARD TYPE STRING,
SHIPPING_TYPE TYPE STRING,
TRQ_ID TYPE STRING,
VOYAGE_ID_PROP TYPE STRING,
VESSEL_ID_PROP TYPE STRING,
FLIGHT_CODE_PROP TYPE STRING,
IMO_ID_PROP TYPE STRING,
MOT_PROP TYPE STRING,
EXEC_ORG_ID_PROP TYPE STRING,
TSP_ID_PROP TYPE STRING,
MTR_PROP TYPE STRING,
DISCREPANCY TYPE STRING,
TOR_CAT TYPE STRING,
TOR_ID TYPE STRING,
TOR_TYPE TYPE STRING,
CREATION_TYPE TYPE STRING,
BLOCK_REASON TYPE STRING,
INV_BLOCK_REASON TYPE STRING,
BRC_EXEC TYPE STRING,
BRC_PLAN TYPE STRING,
LABELTXT TYPE STRING,
PARTNER_REF_ID TYPE STRING,
PARTNER_MBL_RCVD TYPE STRING,
BL_NUMBER TYPE STRING,
BL_NUMBER_STATUS TYPE STRING,
BL_NUMBER_FIN TYPE STRING,
BL_NODE_KEY TYPE STRING,
RESP_PERSON TYPE STRING,
DGO_INDICATOR TYPE STRING,
FIXATION TYPE STRING,
MANIFESTED TYPE STRING,
AUTO_PLAN TYPE STRING,
TRANSSRVLVL_CODE TYPE STRING,
BLK_PLAN TYPE STRING,
BLK_EXEC TYPE STRING,
PREDEC_BLK_PLAN TYPE STRING,
PREDEC_BLK_EXEC TYPE STRING,
INV_BLOCK TYPE STRING,
EXEC_ORG_ID TYPE STRING,
EXEC_GRP_ID TYPE STRING,
PURCH_ORG_ID TYPE STRING,
PURCH_GRP_ID TYPE STRING,
ARCHIVING TYPE STRING,
LIFECYCLE TYPE STRING,
LC_COMP_SET_MAN TYPE STRING,
SHPM_TRANSM TYPE STRING,
PLAN_STATUS_ROOT TYPE STRING,
EXECUTION TYPE STRING,
COMPLIANCE TYPE STRING,
DELIVERY TYPE STRING,
INVDISP_RESOLUTION TYPE STRING,
DG_STATUS TYPE STRING,
FUBR_KEY TYPE STRING,
TRQ_CAT TYPE STRING,
TRQ_UNIQUE TYPE STRING,
EST_MA_DATE TYPE STRING,
ARRIVAL_DATE TYPE STRING,
FOLLOWUP_TRQ_EXP TYPE STRING,
EXCL_FU_FROM_PLN TYPE STRING,
FU_FIX TYPE STRING,
DLV_CREATED_ON TYPE STRING,
BALOG_EXTNO TYPE STRING,
DLV_PRIO TYPE STRING,
DLV_BLOCKED TYPE STRING,
DLV_CONF_RCVD_ON TYPE STRING,
PROC_RESULT_CODE TYPE STRING,
MSG_DLV_COUNTER TYPE STRING,
CONFIRMATION TYPE STRING,
SUBCONTRACTING TYPE STRING,
CM_ID TYPE STRING,
CS_EXECUTED TYPE STRING,
TEND_EXECUTED TYPE STRING,
DATETIME_CHSCS TYPE STRING,
USER_ID_CHSCS TYPE STRING,
DATETIME_CHSCC TYPE STRING,
USER_ID_CHSCC TYPE STRING,
FREIGHT_TERM TYPE STRING,
MULTI_INV_PTY TYPE STRING,
MULTI_EXE_PTY TYPE STRING,
PYMT_IND TYPE STRING,
FAG_KEY TYPE STRING,
FAG_ITEM_KEY TYPE STRING,
CREATED_BY TYPE STRING,
CREATED_ON TYPE STRING,
CHANGED_BY TYPE STRING,
CHANGED_ON TYPE STRING,
TSP TYPE STRING,
SHIPPERID TYPE STRING,
CONSIGNEEID TYPE STRING,
TSPID TYPE STRING,
ERP_SHPM_BTDID TYPE STRING,
ERP_SHPM_LOGSYS TYPE STRING,
ERP_SHPM_TYPE TYPE STRING,
CUSTOMS TYPE STRING,
MAX_UTIL_MASS TYPE STRING,
MAX_UTIL_VOLUME TYPE STRING,
DENSITY_FACTOR TYPE STRING,
BOOKING_TRMO TYPE STRING,
REQ_DRV_CNT TYPE STRING,
DRV_ASSGN_STATUS TYPE STRING,
DRV_ASSGN_TYPE TYPE STRING,
TSP_SCAC TYPE STRING,
RES_KEY TYPE STRING,
RES_ID TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SCMTMS/S_TOR_Q_RESULT_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_/SCMTMS/S_TOR_Q_RESULT_STR-DB_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_UUID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_ADDRESSE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_COUNTRY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_REGION sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_CITY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_LOG_LOC_ZIP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_ADR_LOC_UUID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_ACC_START sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_REQ_START sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_REQ_END sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_STOP_ACC_END sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIRST_ACTIVITY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_UUID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_ADDRESSE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_COUNTRY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_REGION sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_CITY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_LOG_LOC_ZIP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_ADR_LOC_UUID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_ACC_START sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_REQ_START sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_REQ_END sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_STOP_ACC_END sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LAST_ACTIVITY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PLAN_TRANS_START sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PLAN_TRANS_END sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MAIN_ITEM_CAT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SCHED_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SCHED_DEP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MTR sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MOT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MOT_CAT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FLIGHT_CODE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-VOYAGE_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-VESSEL_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-IMO_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-COUNTRY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SERVICE_LVL_PL sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PORT_OF_LOADING sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CARGO_CUTOFF sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-VESSEL_SAIL_DATE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PORT_OF_DISCHARGE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EXP_TIME_ARRIVAL sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CARGO_TAKEOVER_TIME sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-QUERY_NODE_DB_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TCC_INV_STATUS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TCC_CALC_STATUS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TCC_INV_LEVEL sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SHIPPED_ON_BOARD sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SHIPPING_TYPE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TRQ_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-VOYAGE_ID_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-VESSEL_ID_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FLIGHT_CODE_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-IMO_ID_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MOT_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EXEC_ORG_ID_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TSP_ID_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MTR_PROP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DISCREPANCY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TOR_CAT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TOR_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TOR_TYPE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CREATION_TYPE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BLOCK_REASON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-INV_BLOCK_REASON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BRC_EXEC sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BRC_PLAN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LABELTXT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PARTNER_REF_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PARTNER_MBL_RCVD sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BL_NUMBER sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BL_NUMBER_STATUS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BL_NUMBER_FIN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BL_NODE_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-RESP_PERSON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DGO_INDICATOR sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FIXATION sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MANIFESTED sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-AUTO_PLAN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TRANSSRVLVL_CODE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BLK_PLAN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BLK_EXEC sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PREDEC_BLK_PLAN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PREDEC_BLK_EXEC sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-INV_BLOCK sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EXEC_ORG_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EXEC_GRP_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PURCH_ORG_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PURCH_GRP_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-ARCHIVING sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LIFECYCLE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-LC_COMP_SET_MAN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SHPM_TRANSM sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PLAN_STATUS_ROOT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EXECUTION sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-COMPLIANCE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DELIVERY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-INVDISP_RESOLUTION sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DG_STATUS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FUBR_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TRQ_CAT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TRQ_UNIQUE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EST_MA_DATE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-ARRIVAL_DATE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FOLLOWUP_TRQ_EXP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-EXCL_FU_FROM_PLN sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FU_FIX sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DLV_CREATED_ON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BALOG_EXTNO sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DLV_PRIO sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DLV_BLOCKED sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DLV_CONF_RCVD_ON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PROC_RESULT_CODE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MSG_DLV_COUNTER sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CONFIRMATION sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SUBCONTRACTING sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CM_ID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CS_EXECUTED sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TEND_EXECUTED sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DATETIME_CHSCS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-USER_ID_CHSCS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DATETIME_CHSCC sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-USER_ID_CHSCC sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FREIGHT_TERM sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MULTI_INV_PTY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MULTI_EXE_PTY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-PYMT_IND sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FAG_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-FAG_ITEM_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CREATED_BY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CREATED_ON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CHANGED_BY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CHANGED_ON sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TSP sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-SHIPPERID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CONSIGNEEID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TSPID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-ERP_SHPM_BTDID sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-ERP_SHPM_LOGSYS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-ERP_SHPM_TYPE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-CUSTOMS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MAX_UTIL_MASS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-MAX_UTIL_VOLUME sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DENSITY_FACTOR sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-BOOKING_TRMO sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-REQ_DRV_CNT sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DRV_ASSGN_STATUS sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-DRV_ASSGN_TYPE sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-TSP_SCAC sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-RES_KEY sy-vline
WA_/SCMTMS/S_TOR_Q_RESULT_STR-RES_ID sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.