ABAP Select data from SAP table BPC_SPC_COMP 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 BPC_SPC_COMP 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 BPC_SPC_COMP. 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 BPC_SPC_COMP 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_BPC_SPC_COMP TYPE STANDARD TABLE OF BPC_SPC_COMP, WA_BPC_SPC_COMP TYPE BPC_SPC_COMP, 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: <BPC_SPC_COMP> TYPE BPC_SPC_COMP. *Process all fields in table header/work area as string values PERFORM process_as_string_field_values CHANGING wa_BPC_SPC_COMP. SELECT * *restrict ABAP select to first 10 rows UP TO 10 ROWS FROM BPC_SPC_COMP INTO TABLE IT_BPC_SPC_COMP. *Select data and declare internal table using in-line method @DATA *SELECT * * FROM BPC_SPC_COMP * INTO TABLE @DATA(IT_BPC_SPC_COMP2). *--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_BPC_SPC_COMP INDEX 1 INTO DATA(WA_BPC_SPC_COMP2). *Demonstrate how to loop at an internal table and update values using a FIELD-SYMBOL LOOP AT IT_BPC_SPC_COMP ASSIGNING <BPC_SPC_COMP>.*To update a field value using a field symbol simply change the value via the field symbol pointer
<BPC_SPC_COMP>-I_MANDT = 1.
<BPC_SPC_COMP>-I_SPEC_EXTERNALID = 1.
<BPC_SPC_COMP>-I_SPEC_PRP_TYPE = 1.
<BPC_SPC_COMP>-I_ALRGE_EXCEP_VAL1 = 1.
<BPC_SPC_COMP>-I_ALRGE_EXCEP_VAL10 = 1.
ENDLOOP. LOOP AT IT_BPC_SPC_COMP INTO WA_BPC_SPC_COMP. *Write horizonal line to screen report. WRITE:/ sy-uline. *Write selected data to screen/report before conversion. WRITE:/ sy-vline, WA_BPC_SPC_COMP-I_ALRGE_EXCEP_VAL11, sy-vline,
WA_BPC_SPC_COMP-I_ALRGE_EXCEP_VAL12, sy-vline,
WA_BPC_SPC_COMP-I_ALRGE_EXCEP_VAL13, sy-vline,
WA_BPC_SPC_COMP-I_ALRGE_EXCEP_VAL14, sy-vline,
WA_BPC_SPC_COMP-I_ALRGE_EXCEP_VAL15, sy-vline,
WA_BPC_SPC_COMP-I_ALRGE_EXCEP_VAL2, sy-vline.
ENDLOOP. *Add any further fields from structure WA_BPC_SPC_COMP 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_BPC_SPC_COMP 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_BPC_SPC_COMP INTO WA_BPC_SPC_COMP. *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 SPEC1, internal->external for field I_SPEC_EXTERNALID CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_EXTERNALID IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_EXTERNALID.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM1 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM1 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM1.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM10 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM10 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM10.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM11 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM11 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM11.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM12 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM12 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM12.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM13 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM13 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM13.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM14 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM14 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM14.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM15 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM15 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM15.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM2 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM2 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM2.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM3 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM3 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM3.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM4 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM4 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM4.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM5 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM5 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM5.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM6 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM6 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM6.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM7 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM7 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM7.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM8 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM8 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM8.
WRITE:/ 'New Value:', ld_input.
*Conversion exit SPEC1, internal->external for field I_SPEC_CPM_ITM9 CALL FUNCTION 'CONVERSION_EXIT_SPEC1_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_CPM_ITM9 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_CPM_ITM9.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT1 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT1 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT1.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT10 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT10 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT10.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT11 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT11 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT11.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT12 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT12 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT12.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT13 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT13 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT13.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT14 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT14 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT14.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT15 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT15 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT15.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT2 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT2 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT2.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT3 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT3 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT3.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT4 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT4 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT4.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT5 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT5 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT5.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT6 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT6 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT6.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT7 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT7 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT7.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT8 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT8 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT8.
WRITE:/ 'New Value:', ld_input.
*Conversion exit CUNIT, internal->external for field I_SPEC_POS_UNIT9 CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT' EXPORTING input = WA_BPC_SPC_COMP-I_SPEC_POS_UNIT9 IMPORTING output = ld_input.
WRITE:/ 'Org Value:', WA_BPC_SPC_COMP-I_SPEC_POS_UNIT9.
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_BPC_SPC_COMP_STR,
I_MANDT TYPE STRING,
I_SPEC_EXTERNALID TYPE STRING,
I_SPEC_PRP_TYPE TYPE STRING,
I_ALRGE_EXCEP_VAL1 TYPE STRING,
I_ALRGE_EXCEP_VAL10 TYPE STRING,
I_ALRGE_EXCEP_VAL11 TYPE STRING,
I_ALRGE_EXCEP_VAL12 TYPE STRING,
I_ALRGE_EXCEP_VAL13 TYPE STRING,
I_ALRGE_EXCEP_VAL14 TYPE STRING,
I_ALRGE_EXCEP_VAL15 TYPE STRING,
I_ALRGE_EXCEP_VAL2 TYPE STRING,
I_ALRGE_EXCEP_VAL3 TYPE STRING,
I_ALRGE_EXCEP_VAL4 TYPE STRING,
I_ALRGE_EXCEP_VAL5 TYPE STRING,
I_ALRGE_EXCEP_VAL6 TYPE STRING,
I_ALRGE_EXCEP_VAL7 TYPE STRING,
I_ALRGE_EXCEP_VAL8 TYPE STRING,
I_ALRGE_EXCEP_VAL9 TYPE STRING,
I_SORT_SEQUANCE TYPE STRING,
I_SPEC_COMP_TYPE1 TYPE STRING,
I_SPEC_COMP_TYPE10 TYPE STRING,
I_SPEC_COMP_TYPE11 TYPE STRING,
I_SPEC_COMP_TYPE12 TYPE STRING,
I_SPEC_COMP_TYPE13 TYPE STRING,
I_SPEC_COMP_TYPE14 TYPE STRING,
I_SPEC_COMP_TYPE15 TYPE STRING,
I_SPEC_COMP_TYPE2 TYPE STRING,
I_SPEC_COMP_TYPE3 TYPE STRING,
I_SPEC_COMP_TYPE4 TYPE STRING,
I_SPEC_COMP_TYPE5 TYPE STRING,
I_SPEC_COMP_TYPE6 TYPE STRING,
I_SPEC_COMP_TYPE7 TYPE STRING,
I_SPEC_COMP_TYPE8 TYPE STRING,
I_SPEC_COMP_TYPE9 TYPE STRING,
I_SPEC_CPM_ITM1 TYPE STRING,
I_SPEC_CPM_ITM10 TYPE STRING,
I_SPEC_CPM_ITM11 TYPE STRING,
I_SPEC_CPM_ITM12 TYPE STRING,
I_SPEC_CPM_ITM13 TYPE STRING,
I_SPEC_CPM_ITM14 TYPE STRING,
I_SPEC_CPM_ITM15 TYPE STRING,
I_SPEC_CPM_ITM2 TYPE STRING,
I_SPEC_CPM_ITM3 TYPE STRING,
I_SPEC_CPM_ITM4 TYPE STRING,
I_SPEC_CPM_ITM5 TYPE STRING,
I_SPEC_CPM_ITM6 TYPE STRING,
I_SPEC_CPM_ITM7 TYPE STRING,
I_SPEC_CPM_ITM8 TYPE STRING,
I_SPEC_CPM_ITM9 TYPE STRING,
I_SPEC_CPM_QUN1 TYPE STRING,
I_SPEC_CPM_QUN10 TYPE STRING,
I_SPEC_CPM_QUN11 TYPE STRING,
I_SPEC_CPM_QUN12 TYPE STRING,
I_SPEC_CPM_QUN13 TYPE STRING,
I_SPEC_CPM_QUN14 TYPE STRING,
I_SPEC_CPM_QUN15 TYPE STRING,
I_SPEC_CPM_QUN2 TYPE STRING,
I_SPEC_CPM_QUN3 TYPE STRING,
I_SPEC_CPM_QUN4 TYPE STRING,
I_SPEC_CPM_QUN5 TYPE STRING,
I_SPEC_CPM_QUN6 TYPE STRING,
I_SPEC_CPM_QUN7 TYPE STRING,
I_SPEC_CPM_QUN8 TYPE STRING,
I_SPEC_CPM_QUN9 TYPE STRING,
I_SPEC_POS_UNIT1 TYPE STRING,
I_SPEC_POS_UNIT10 TYPE STRING,
I_SPEC_POS_UNIT11 TYPE STRING,
I_SPEC_POS_UNIT12 TYPE STRING,
I_SPEC_POS_UNIT13 TYPE STRING,
I_SPEC_POS_UNIT14 TYPE STRING,
I_SPEC_POS_UNIT15 TYPE STRING,
I_SPEC_POS_UNIT2 TYPE STRING,
I_SPEC_POS_UNIT3 TYPE STRING,
I_SPEC_POS_UNIT4 TYPE STRING,
I_SPEC_POS_UNIT5 TYPE STRING,
I_SPEC_POS_UNIT6 TYPE STRING,
I_SPEC_POS_UNIT7 TYPE STRING,
I_SPEC_POS_UNIT8 TYPE STRING,
I_SPEC_POS_UNIT9 TYPE STRING,END OF T_EKKO_STR. DATA: WA_BPC_SPC_COMP_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_BPC_SPC_COMP_STR-I_MANDT sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_EXTERNALID sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_PRP_TYPE sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL1 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL10 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL11 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL12 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL13 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL14 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL15 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL2 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL3 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL4 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL5 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL6 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL7 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL8 sy-vline
WA_BPC_SPC_COMP_STR-I_ALRGE_EXCEP_VAL9 sy-vline
WA_BPC_SPC_COMP_STR-I_SORT_SEQUANCE sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE1 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE10 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE11 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE12 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE13 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE14 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE15 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE2 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE3 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE4 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE5 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE6 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE7 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE8 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_COMP_TYPE9 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM1 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM10 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM11 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM12 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM13 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM14 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM15 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM2 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM3 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM4 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM5 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM6 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM7 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM8 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_ITM9 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN1 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN10 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN11 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN12 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN13 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN14 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN15 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN2 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN3 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN4 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN5 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN6 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN7 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN8 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_CPM_QUN9 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT1 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT10 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT11 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT12 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT13 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT14 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT15 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT2 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT3 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT4 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT5 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT6 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT7 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT8 sy-vline
WA_BPC_SPC_COMP_STR-I_SPEC_POS_UNIT9 sy-vline INTO ld_text SEPARATED BY SPACE. *Add any further fields from structure WA_EKKO_STR you want to CONCATENATE... ENDLOOP. ENDFORM.