Application Development 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: 

The declaration for key field "cust_id" is incomplete.

0 Kudos

I have created a custom table for customer information and customer bank information. using that table im trying to do classical ALV report. but this error has occurred screenshot-50.png

The declaration for key field "cust_id" is incomplete. however, "cust_id" is contained in the key of table "it_bi" and must be filled

3 REPLIES 3

shilpabasavaraj
Participant
0 Kudos

Hi Anand,

There are few changes to be done in your code.

You are reading it_bi INTO wa_bi and giving the condition as cust_name = wa_bi-cust_name. This is wrong.

One more thing is the table key might be cust_id. Hope this might be the piece of code you want:

READ TABLE it_bi INTO wa_bi WITH TABLE KEY cust_id = wa_final-cust-id.

Please check. Also make sure you use the work area properly in the code.

ArthurParisius
Contributor
0 Kudos

If you don't want to read the table based on all the key fields you should use WITH KEY instead of WITH TABLE KEY. If you looked at the help for the read table statement you would have seen this.

matt
Active Contributor
0 Kudos

Use pretty print to get your programs nicely indented. That way they're far more readable.

And FORM? That's obsolete.

Also, when you post code, use the code button (and paste using right-click post as plain text).

Finally, without knowing how you've defined the internal table, it's kind of hard to answer your question with any certainty.