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

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

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

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


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SCMTMS/S_RES_ROOT ASSIGNING </SCMTMS/S_RES_ROOT>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SCMTMS/S_RES_ROOT>-TMSRESUID = 1.
</SCMTMS/S_RES_ROOT>-RES_ID = 1.
</SCMTMS/S_RES_ROOT>-RESUID = 1.
</SCMTMS/S_RES_ROOT>-IS_EQUI_TYPE_RES = 1.
</SCMTMS/S_RES_ROOT>-RESTYPE = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SCMTMS/S_RES_ROOT-TZONE, sy-vline,
WA_/SCMTMS/S_RES_ROOT-WORKCAL_CODE, sy-vline,
WA_/SCMTMS/S_RES_ROOT-OWNER, sy-vline,
WA_/SCMTMS/S_RES_ROOT-OWNERUID, sy-vline,
WA_/SCMTMS/S_RES_ROOT-ENTITLED, sy-vline,
WA_/SCMTMS/S_RES_ROOT-ENTITLEDUID, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SCMTMS/S_RES_ROOT 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_RES_ROOT 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_RES_ROOT INTO WA_/SCMTMS/S_RES_ROOT. *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 OWNER CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = WA_/SCMTMS/S_RES_ROOT-OWNER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_RES_ROOT-OWNER.
WRITE:/ 'New Value:', ld_input.

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

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

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

*Conversion exit ID001, internal->external for field DFLT_DRIVER_UID CALL FUNCTION 'CONVERSION_EXIT_ID001_OUTPUT' EXPORTING input = WA_/SCMTMS/S_RES_ROOT-DFLT_DRIVER_UID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_RES_ROOT-DFLT_DRIVER_UID.
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_RES_ROOT-CHANGED_ON IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_RES_ROOT-CHANGED_ON.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

*Conversion exit CUNIT, internal->external for field AXGRP_WEIGHT_UOM_03 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_/SCMTMS/S_RES_ROOT-AXGRP_WEIGHT_UOM_03 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCMTMS/S_RES_ROOT-AXGRP_WEIGHT_UOM_03.
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_RES_ROOT_STR,
TMSRESUID TYPE STRING,
RES_ID TYPE STRING,
RESUID TYPE STRING,
IS_EQUI_TYPE_RES TYPE STRING,
RESTYPE TYPE STRING,
TZONE TYPE STRING,
WORKCAL_CODE TYPE STRING,
OWNER TYPE STRING,
OWNERUID TYPE STRING,
ENTITLED TYPE STRING,
ENTITLEDUID TYPE STRING,
COSTCENTRE TYPE STRING,
PLATENUMBER TYPE STRING,
PLATECOUNTRY TYPE STRING,
MULTI_RES_FLG TYPE STRING,
NUMBER_MULTI TYPE STRING,
MINREQSEALS TYPE STRING,
MTRTCO062_I TYPE STRING,
TRATY_PASSIVE TYPE STRING,
TRMODCODE TYPE STRING,
BUILDDATE TYPE STRING,
INSERVICEDATE TYPE STRING,
HOMELOCATION TYPE STRING,
REFMAT TYPE STRING,
REFMATID TYPE STRING,
VALID_FROM TYPE STRING,
VALID_TO TYPE STRING,
DFLT_DRIVER TYPE STRING,
DFLT_DRIVER_UID TYPE STRING,
DFLT_TRAILER TYPE STRING,
DFLT_TRAILER_UID TYPE STRING,
INT_ORG_ID TYPE STRING,
LOCK_MULTIRES TYPE STRING,
RES_CLASS TYPE STRING,
DESCRIPTION TYPE STRING,
EM_RELEVANCE TYPE STRING,
TYPE_CLASS TYPE STRING,
SHIPPER_OWNED TYPE STRING,
ADR_LIMIT_REL TYPE STRING,
LOCATION TYPE STRING,
PLN_BLOCK TYPE STRING,
OWNERSHIP_CODE TYPE STRING,
LEASE_CONTRACT_REF TYPE STRING,
RESOURCE_CONDITION TYPE STRING,
SPECIAL_INSTRUCTION TYPE STRING,
CMPROFILE TYPE STRING,
RES_SPEC_CMPROFILE TYPE STRING,
COMB_RES TYPE STRING,
CHANGED_BY TYPE STRING,
CHANGED_ON TYPE STRING,
EQUITYPE TYPE STRING,
EQUISZTP TYPE STRING,
EQUISUPPL TYPE STRING,
COUNTRY_VEHIC_ID TYPE STRING,
PAYLOAD_WEIGHT TYPE STRING,
PAYLOAD_WGHT_UOM TYPE STRING,
CUBIC_CAPACITY TYPE STRING,
CUBIC_CAPA_UOM TYPE STRING,
INTERNAL_LENGTH TYPE STRING,
INTERNAL_WIDTH TYPE STRING,
INTERNAL_HEIGHT TYPE STRING,
INTERNAL_LWH_UOM TYPE STRING,
QUAN_UNITS TYPE STRING,
QUAN_UNITS_UOM TYPE STRING,
ALT_QUAN_UNITS TYPE STRING,
ALT_QUAN_UNITS_UOM TYPE STRING,
MAX_GROSS_WEIGHT TYPE STRING,
MAX_GROSS_WEIGHT_UOM TYPE STRING,
TARE_WEIGHT TYPE STRING,
TARE_WEIGHT_UOM TYPE STRING,
TARE_VOLUME TYPE STRING,
TARE_VOLUME_UOM TYPE STRING,
TEMP_CONTROL TYPE STRING,
TEMP_CTRL_MIN TYPE STRING,
TEMP_CTRL_MAX TYPE STRING,
TEMP_UOM TYPE STRING,
VENTILATED TYPE STRING,
MAX_LENGTH TYPE STRING,
MAX_WIDTH TYPE STRING,
MAX_HEIGHT TYPE STRING,
MAX_LWH_UOM TYPE STRING,
PLATFORM_HEIGHT TYPE STRING,
PLATFORM_HEIGHT_UOM TYPE STRING,
TOPDECK_HEIGHT TYPE STRING,
TOPDECK_HEIGHT_UOM TYPE STRING,
WHEEL_DIAMETER TYPE STRING,
WHEEL_DIAMETER_UOM TYPE STRING,
AXLE_COUNT TYPE STRING,
AXLE_SPACNG_DIST TYPE STRING,
AXLE_SPACNG_DIST_UOM TYPE STRING,
MAX_AXLE_WEIGHT TYPE STRING,
MAX_AXLE_WEIGHT_UOM TYPE STRING,
COUPLERSTYLE TYPE STRING,
WHEEL_BEARNG_TYPE TYPE STRING,
DRAFT_GEAR_TYPE TYPE STRING,
CARGO_BODY_DIST TYPE STRING,
CONNECTOR_DIST TYPE STRING,
CONNECTOR_MAX_WGHT TYPE STRING,
KINGPIN_DIST TYPE STRING,
KINGPIN_MAX_WGHT TYPE STRING,
SPLITDECK_POSN TYPE STRING,
SPLITDECK_MAX_WGHT TYPE STRING,
TECHN_DIST_UOM TYPE STRING,
WGHT_LOADING_UOM TYPE STRING,
MAX_TRAILING_LOAD TYPE STRING,
MAX_TRAIL_LOAD_UOM TYPE STRING,
FOOD_GRADE_IND TYPE STRING,
VEHLOADPROFILE TYPE STRING,
ATTEQUIPROFILE TYPE STRING,
AXLE_TYPE_01 TYPE STRING,
AXLE_SPACE_DIST_01 TYPE STRING,
AXGRP_POSN_01 TYPE STRING,
AXGRP_DIST_UOM_01 TYPE STRING,
AXGRP_MAX_WEIGHT_01 TYPE STRING,
AXGRP_EMPTY_WEIGHT_01 TYPE STRING,
AXGRP_WEIGHT_UOM_01 TYPE STRING,
AXLE_DRIVING_IND_01 TYPE STRING,
AXLE_STEERING_IND_01 TYPE STRING,
AXLE_TYPE_02 TYPE STRING,
AXLE_SPACE_DIST_02 TYPE STRING,
AXGRP_POSN_02 TYPE STRING,
AXGRP_DIST_UOM_02 TYPE STRING,
AXGRP_MAX_WEIGHT_02 TYPE STRING,
AXGRP_EMPTY_WEIGHT_02 TYPE STRING,
AXGRP_WEIGHT_UOM_02 TYPE STRING,
AXLE_DRIVING_IND_02 TYPE STRING,
AXLE_STEERING_IND_02 TYPE STRING,
AXLE_TYPE_03 TYPE STRING,
AXLE_SPACE_DIST_03 TYPE STRING,
AXGRP_POSN_03 TYPE STRING,
AXGRP_DIST_UOM_03 TYPE STRING,
AXGRP_MAX_WEIGHT_03 TYPE STRING,
AXGRP_EMPTY_WEIGHT_03 TYPE STRING,
AXGRP_WEIGHT_UOM_03 TYPE STRING,
AXLE_DRIVING_IND_03 TYPE STRING,
AXLE_STEERING_IND_03 TYPE STRING,
EEW_TMSRES_AATR TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SCMTMS/S_RES_ROOT_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_RES_ROOT_STR-TMSRESUID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-RES_ID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-RESUID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-IS_EQUI_TYPE_RES sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-RESTYPE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TZONE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-WORKCAL_CODE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-OWNER sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-OWNERUID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-ENTITLED sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-ENTITLEDUID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-COSTCENTRE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PLATENUMBER sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PLATECOUNTRY sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MULTI_RES_FLG sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-NUMBER_MULTI sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MINREQSEALS sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MTRTCO062_I sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TRATY_PASSIVE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TRMODCODE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-BUILDDATE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-INSERVICEDATE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-HOMELOCATION sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-REFMAT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-REFMATID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-VALID_FROM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-VALID_TO sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-DFLT_DRIVER sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-DFLT_DRIVER_UID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-DFLT_TRAILER sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-DFLT_TRAILER_UID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-INT_ORG_ID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-LOCK_MULTIRES sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-RES_CLASS sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-DESCRIPTION sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-EM_RELEVANCE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TYPE_CLASS sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-SHIPPER_OWNED sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-ADR_LIMIT_REL sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-LOCATION sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PLN_BLOCK sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-OWNERSHIP_CODE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-LEASE_CONTRACT_REF sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-RESOURCE_CONDITION sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-SPECIAL_INSTRUCTION sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CMPROFILE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-RES_SPEC_CMPROFILE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-COMB_RES sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CHANGED_BY sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CHANGED_ON sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-EQUITYPE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-EQUISZTP sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-EQUISUPPL sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-COUNTRY_VEHIC_ID sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PAYLOAD_WEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PAYLOAD_WGHT_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CUBIC_CAPACITY sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CUBIC_CAPA_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-INTERNAL_LENGTH sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-INTERNAL_WIDTH sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-INTERNAL_HEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-INTERNAL_LWH_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-QUAN_UNITS sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-QUAN_UNITS_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-ALT_QUAN_UNITS sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-ALT_QUAN_UNITS_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_GROSS_WEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_GROSS_WEIGHT_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TARE_WEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TARE_WEIGHT_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TARE_VOLUME sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TARE_VOLUME_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TEMP_CONTROL sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TEMP_CTRL_MIN sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TEMP_CTRL_MAX sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TEMP_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-VENTILATED sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_LENGTH sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_WIDTH sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_HEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_LWH_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PLATFORM_HEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-PLATFORM_HEIGHT_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TOPDECK_HEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TOPDECK_HEIGHT_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-WHEEL_DIAMETER sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-WHEEL_DIAMETER_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_COUNT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_SPACNG_DIST sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_SPACNG_DIST_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_AXLE_WEIGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_AXLE_WEIGHT_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-COUPLERSTYLE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-WHEEL_BEARNG_TYPE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-DRAFT_GEAR_TYPE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CARGO_BODY_DIST sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CONNECTOR_DIST sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-CONNECTOR_MAX_WGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-KINGPIN_DIST sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-KINGPIN_MAX_WGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-SPLITDECK_POSN sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-SPLITDECK_MAX_WGHT sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-TECHN_DIST_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-WGHT_LOADING_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_TRAILING_LOAD sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-MAX_TRAIL_LOAD_UOM sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-FOOD_GRADE_IND sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-VEHLOADPROFILE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-ATTEQUIPROFILE sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_TYPE_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_SPACE_DIST_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_POSN_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_DIST_UOM_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_MAX_WEIGHT_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_EMPTY_WEIGHT_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_WEIGHT_UOM_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_DRIVING_IND_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_STEERING_IND_01 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_TYPE_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_SPACE_DIST_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_POSN_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_DIST_UOM_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_MAX_WEIGHT_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_EMPTY_WEIGHT_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_WEIGHT_UOM_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_DRIVING_IND_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_STEERING_IND_02 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_TYPE_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_SPACE_DIST_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_POSN_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_DIST_UOM_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_MAX_WEIGHT_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_EMPTY_WEIGHT_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXGRP_WEIGHT_UOM_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_DRIVING_IND_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-AXLE_STEERING_IND_03 sy-vline
WA_/SCMTMS/S_RES_ROOT_STR-EEW_TMSRES_AATR sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.