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

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

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

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


*Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL
LOOP AT IT_/SCWM/S_TW_TESTCOND_PUT ASSIGNING </SCWM/S_TW_TESTCOND_PUT>.
*To update a field value using a field symbol simply change the value via the field symbol pointer
</SCWM/S_TW_TESTCOND_PUT>-REF_EXCEL = 1.
</SCWM/S_TW_TESTCOND_PUT>-ID = 1.
</SCWM/S_TW_TESTCOND_PUT>-TWP_COEE = 1.
</SCWM/S_TW_TESTCOND_PUT>-TWP_COEE_CTRY = 1.
</SCWM/S_TW_TESTCOND_PUT>-TWP_COEE_REGI = 1.
ENDLOOP.

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

*Write selected data to screen/report before conversion.
  WRITE:/ sy-vline,   WA_/SCWM/S_TW_TESTCOND_PUT-TWP_LTW_LOC, sy-vline,
WA_/SCWM/S_TW_TESTCOND_PUT-TWP_LTW_CTRY, sy-vline,
WA_/SCWM/S_TW_TESTCOND_PUT-TWP_LTW_REGI, sy-vline,
WA_/SCWM/S_TW_TESTCOND_PUT-TWP_NTW_LOC, sy-vline,
WA_/SCWM/S_TW_TESTCOND_PUT-TWP_NTW_CTRY, sy-vline,
WA_/SCWM/S_TW_TESTCOND_PUT-TWP_NTW_REGI, sy-vline.
ENDLOOP. *Add any further fields from structure WA_/SCWM/S_TW_TESTCOND_PUT 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_/SCWM/S_TW_TESTCOND_PUT 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_/SCWM/S_TW_TESTCOND_PUT INTO WA_/SCWM/S_TW_TESTCOND_PUT. *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 BPMAP, internal->external for field TWP_COEE CALL FUNCTION 'CONVERSION_EXIT_BPMAP_OUTPUT' EXPORTING input = WA_/SCWM/S_TW_TESTCOND_PUT-TWP_COEE IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCWM/S_TW_TESTCOND_PUT-TWP_COEE.
WRITE:/ 'New Value:', ld_input.

*Conversion exit BPMAP, internal->external for field TWP_SHIPPER CALL FUNCTION 'CONVERSION_EXIT_BPMAP_OUTPUT' EXPORTING input = WA_/SCWM/S_TW_TESTCOND_PUT-TWP_SHIPPER IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCWM/S_TW_TESTCOND_PUT-TWP_SHIPPER.
WRITE:/ 'New Value:', ld_input.

*Conversion exit BPMAP, internal->external for field TWP_MCARR CALL FUNCTION 'CONVERSION_EXIT_BPMAP_OUTPUT' EXPORTING input = WA_/SCWM/S_TW_TESTCOND_PUT-TWP_MCARR IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCWM/S_TW_TESTCOND_PUT-TWP_MCARR.
WRITE:/ 'New Value:', ld_input.

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

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

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

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

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

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

*Conversion exit MATN1, internal->external for field TWP_PMAT CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' EXPORTING input = WA_/SCWM/S_TW_TESTCOND_PUT-TWP_PMAT IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_/SCWM/S_TW_TESTCOND_PUT-TWP_PMAT.
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_/SCWM/S_TW_TESTCOND_PUT_STR,
REF_EXCEL TYPE STRING,
ID TYPE STRING,
TWP_COEE TYPE STRING,
TWP_COEE_CTRY TYPE STRING,
TWP_COEE_REGI TYPE STRING,
TWP_LTW_LOC TYPE STRING,
TWP_LTW_CTRY TYPE STRING,
TWP_LTW_REGI TYPE STRING,
TWP_NTW_LOC TYPE STRING,
TWP_NTW_CTRY TYPE STRING,
TWP_NTW_REGI TYPE STRING,
TWP_SHIPPER TYPE STRING,
TWP_SHIPPER_CTRY TYPE STRING,
TWP_SHIPPER_REGI TYPE STRING,
TWP_PROCTY_ACTTY TYPE STRING,
TWP_DA_GOODS TYPE STRING,
TWP_HV_GOODS TYPE STRING,
TWP_OS_GOODS TYPE STRING,
TWP_TO_CLARIFY TYPE STRING,
TWP_DOOR TYPE STRING,
TWP_PROCTY_TRART TYPE STRING,
TWP_SORC_LGTYP TYPE STRING,
TWP_SORC_LGBER TYPE STRING,
TWP_SORC_LGPLA TYPE STRING,
TWP_NO_UNPACK TYPE STRING,
TWP_BONDED_CARGO TYPE STRING,
TWP_AIR_CRG_SECU TYPE STRING,
TWP_NOT_STACK TYPE STRING,
TWP_DG_LWDG TYPE STRING,
TWP_DG_DGCL TYPE STRING,
TWP_DG_TKUI TYPE STRING,
TWP_DG_DGNU TYPE STRING,
TWP_DG_HNU TYPE STRING,
TWP_DG_HPN1 TYPE STRING,
TWP_DG_HPN2 TYPE STRING,
TWP_DG_HPN3 TYPE STRING,
TWP_DG_HPN4 TYPE STRING,
TWP_DG_CARR_TYPE TYPE STRING,
TWP_DG_PGRO TYPE STRING,
TWP_MCARR TYPE STRING,
TWP_DAMAGED TYPE STRING,
TWP_PTW_LOC TYPE STRING,
TWP_PTW_CTRY TYPE STRING,
TWP_PTW_POCO TYPE STRING,
TWP_PTW_REGI TYPE STRING,
G_WEIGHT TYPE STRING,
N_WEIGHT TYPE STRING,
UNIT_GW TYPE STRING,
T_WEIGHT TYPE STRING,
UNIT_TW TYPE STRING,
G_VOLUME TYPE STRING,
N_VOLUME TYPE STRING,
UNIT_GV TYPE STRING,
T_VOLUME TYPE STRING,
UNIT_TV TYPE STRING,
G_CAPA TYPE STRING,
N_CAPA TYPE STRING,
T_CAPA TYPE STRING,
LENGTH TYPE STRING,
WIDTH TYPE STRING,
HEIGHT TYPE STRING,
UNIT_LWH TYPE STRING,
MAX_WEIGHT TYPE STRING,
TOLW TYPE STRING,
TARE_VAR TYPE STRING,
MAX_VOLUME TYPE STRING,
TOLV TYPE STRING,
MAX_CAPA TYPE STRING,
TOLC TYPE STRING,
MAX_LENGTH TYPE STRING,
MAX_WIDTH TYPE STRING,
MAX_HEIGHT TYPE STRING,
UNIT_MAX_LWH TYPE STRING,
TWP_LGNUM TYPE STRING,
TWP_CLOSED_PACK TYPE STRING,
TWP_HUTYP TYPE STRING,
TWP_PMTYP TYPE STRING,
TWP_PACKGR TYPE STRING,
TWP_PMAT TYPE STRING,
TWP_PROCTY TYPE STRING,
TWP_HUTYPGRP TYPE STRING,
TWP_COEE_POCO TYPE STRING,
TWP_LTW_POCO TYPE STRING,
TWP_NTW_POCO TYPE STRING,
TWP_SHIPPER_POCO TYPE STRING,
TWP_PUT_ACS TYPE STRING,
TWP_ACS_CURRENT TYPE STRING,
TWP_ACS_TARGET TYPE STRING,
TWP_ACS_CSS TYPE STRING,
TWP_ACS_CSS_CTRY TYPE STRING,
COM_I_DUMMY TYPE STRING,
CONTAINER_HU TYPE STRING,
TWP_DEST_LGTYP TYPE STRING,
TWP_DEST_LGBER TYPE STRING,
TWP_DEST_LGPLA TYPE STRING,
TWP_DEST_LPTYP TYPE STRING,
TWP_LOG_COND TYPE STRING,
TWP_COND_SEQ TYPE STRING,END OF T_EKKO_STR. DATA: WA_/SCWM/S_TW_TESTCOND_PUT_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_/SCWM/S_TW_TESTCOND_PUT_STR-REF_EXCEL sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-ID sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_COEE sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_COEE_CTRY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_COEE_REGI sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_LTW_LOC sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_LTW_CTRY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_LTW_REGI sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_NTW_LOC sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_NTW_CTRY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_NTW_REGI sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SHIPPER sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SHIPPER_CTRY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SHIPPER_REGI sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PROCTY_ACTTY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DA_GOODS sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_HV_GOODS sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_OS_GOODS sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_TO_CLARIFY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DOOR sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PROCTY_TRART sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SORC_LGTYP sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SORC_LGBER sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SORC_LGPLA sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_NO_UNPACK sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_BONDED_CARGO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_AIR_CRG_SECU sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_NOT_STACK sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_LWDG sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_DGCL sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_TKUI sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_DGNU sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_HNU sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_HPN1 sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_HPN2 sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_HPN3 sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_HPN4 sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_CARR_TYPE sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DG_PGRO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_MCARR sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DAMAGED sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PTW_LOC sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PTW_CTRY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PTW_POCO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PTW_REGI sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-G_WEIGHT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-N_WEIGHT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-UNIT_GW sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-T_WEIGHT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-UNIT_TW sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-G_VOLUME sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-N_VOLUME sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-UNIT_GV sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-T_VOLUME sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-UNIT_TV sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-G_CAPA sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-N_CAPA sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-T_CAPA sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-LENGTH sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-WIDTH sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-HEIGHT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-UNIT_LWH sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-MAX_WEIGHT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TOLW sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TARE_VAR sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-MAX_VOLUME sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TOLV sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-MAX_CAPA sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TOLC sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-MAX_LENGTH sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-MAX_WIDTH sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-MAX_HEIGHT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-UNIT_MAX_LWH sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_LGNUM sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_CLOSED_PACK sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_HUTYP sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PMTYP sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PACKGR sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PMAT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PROCTY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_HUTYPGRP sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_COEE_POCO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_LTW_POCO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_NTW_POCO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_SHIPPER_POCO sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_PUT_ACS sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_ACS_CURRENT sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_ACS_TARGET sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_ACS_CSS sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_ACS_CSS_CTRY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-COM_I_DUMMY sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-CONTAINER_HU sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DEST_LGTYP sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DEST_LGBER sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DEST_LGPLA sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_DEST_LPTYP sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_LOG_COND sy-vline
WA_/SCWM/S_TW_TESTCOND_PUT_STR-TWP_COND_SEQ sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.