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

Foreign key

Former Member
0 Likes
570

Hello all,

For example i had a form which have the department and position field.

Department - accounting, human resources etc

In different department there will be different position. Any idea how to use foreign key to make it in a way when i select accounting department i can only see the position available for accounting department. Thanks for helping.

5 REPLIES 5
Read only

Former Member
0 Likes
551

Place the primary key of the parrent table in as an inner join criteria (select quesry) for the two tables.

hope this helps.

Read only

Former Member
0 Likes
551

hi,

foreign key relationship is between a table and its fields.

but in your senario i suppose u need values assigned to perticular field.

you can do this by creating a master table for the department and its positions.

and in your coding , you can provide a f4 help by selecting values from this master table depending on perticular department , and you can show them as f4 help on screen.

i hope this will help u.

Read only

Former Member
0 Likes
551

Hi.

First you have to understand about Foreign key,Please this link.

http://www.sap-basis-abap.com/abap/primary-and-foreign-key-relationship.htm

Regards.

jay

Read only

Former Member
0 Likes
551

hi,

If you want the explanation of Foreign Key fields,just open any table and select the foreing key,Press F1 help on foreign key field type,you will get the clear explanation,and also for cardinality.

I hope this will help u.

Regards

Durga

Read only

Former Member
0 Likes
551

Hi.

Refer this link.

http://www.sap-img.com/ab012.htm

REgards.

jay