‎2011 Jul 18 8:45 AM
Hi Experts,
Please see the following code :
data: t_marc type SORTED TABLE OF marc with UNIQUE key matnr,werks.
data: w_marc LIKE LINE OF t_marc.
select *
from marc
into table t_marc
UP TO 100 rows.
read TABLE t_marc into w_marc WITH table KEY matnr = 'XYZ' werks = '600'.
When I am checking this code , I am getting the error as " Component WERKS is not contained in the table T_MARC or the key is not statically declared.
WERKS is already specified as the key field in MARC . But even then I am getting the error.
Please do the needful....
Thanks
Sravani.K
‎2011 Jul 18 8:52 AM
Hi Sravani,
delete the comma in the line "data: t_marc type SORTED TABLE OF marc with UNIQUE key matnr,werks."
then it will work.
Best regards
Thomas