Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding sorted internal table

Former Member
0 Likes
334

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

1 REPLY 1
Read only

former_member583456
Active Participant
0 Likes
293

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