05-14-2022 12:53 PM
Hi all,
when i am trying to select an internal table getting following error. can you please help how to correct the error.
The table is a sorted table.
Regards,
kiran rachamalla.
05-14-2022 2:53 PM
05-14-2022 6:23 PM
05-15-2022 1:07 AM
So here is the details for example
line type ( structure )
Table Type
with line type above strcuture with properties
DATA: lref_test TYPE REF TO data,
lref_test1 TYPE REF TO data.
FIELD-SYMBOLS:<it_target_sheet_data> TYPE INDEX TABLE.
CREATE DATA lref_test TYPE zex_table_type.
ASSIGN lref_test->* TO <it_target_sheet_data>.
CREATE DATA lref_test1 TYPE LINE OF zex_table_type.
ASSIGN lref_test1->* TO FIELD-SYMBOL(<lwa_sheet_data>).
DATA(lv_from) = |@<IT_TARGET_SHEET_DATA> AS ABC|.
DATA(lv_where) = |ABC~CELEM = 'PQR' AND ABC~COUNTRY = 'IN'|.
SELECT SINGLE FROM (lv_from) "#EC CI_DYNTAB
FIELDS *
WHERE (LV_where) "#EC CI_DYNWHERE
INTO CORRESPONDING FIELDS OF @<lwa_sheet_data>.<br>
Here the key component is CDERC without mandt.
Now i cannot add mandt to that keycomponent as it is already deliverd.
even if i somehow added that mandt to table type then it is giving
ERROR: "
The field "CELEM" in "<IT_TARGET_SHEET_DATA>" is in the wrong place in the
primary key definition or it is missing.
"
i cannot give whole key structure in that primary key. so we have any other option ?
Regards,
kiran rachamalla.