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: 

"foreign key check" for non-dictionary fields

Former Member
0 Kudos

Hi,

I have a table (ZT1) like MANDT, ID, KUNNR, F1,F2.... and KUNNR field is defined as foreign key . FK Cardinality is set to 1:CN and "check required" box is checked.

And i have a itab like ZT1.

When i place this field into the dialog screen (Open screen painter's "Dictinary/Program Fields Windows", type ZT1-KUNNR and place into the screen), I can see and control the "foreign key check" property in the Attributes windows.

But if i place the itab-kunnr (Open screen painter's "Dictinary/Program Fields Windows", type ITAB-KUNNR and place into the screen), the "foreign key check" property is disabled.

How can i enable foreign check for itab-kunnr?

Thank you.

6 REPLIES 6

Former Member
0 Kudos

Hi,

That foreign key check attribute is only for DDIC field reference I guess... Why not using one of the many search help for KUNNR instead (e.g. C_KUNNR) and code a small select single for existence check in your PAI? That would do the trick...

Kr,

Manu.

0 Kudos

I wonder if i can use this attribute for itab fields too. İf I can't, I will have to write "select check" in PAI as you said.

Thank you.

0 Kudos

You can use Foreign Key check only if it is a dictionary reference field. Otehrwise you have to write code in PAI

0 Kudos

OK. Thank to all.

kesavadas_thekkillath
Active Contributor
0 Kudos

Donot provide ITAB-KUNNR, instead WA-KUNNR . I think this should solve your problem.

Kesav

former_member311451
Discoverer
0 Kudos

Hi,

Please check if you have provided Check table at all the places for your field, I had similar issue and i found out missing check table in my main structure.

Thanks and Regards

Naincy