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: 

screen painter foreign key check with different tables

former_member620231
Participant
0 Kudos

Hello,

I have a popup (modal dialog box) with some input fields and two buttons in the application toolbar, OK and Cancel.

The input fields have foreign key check. Let's say the input fields are for dtab1-field1, dtab1-field2 and dtab2-field1.

The two fields from dtab1 work good. However, when I press OK or Cancel, the foreign key check fails for dtab2-field1 if it is not empty.

For this, I would need to fill dtab2-field2 (which is not an input field for the user) with the value from dtab1-field2.

The problem is that I don't know how to make this dtab2-field2 = dtab1-field2 since the PAI not triggered because the foregin key error occurs first. Is it possible to do this, or do I have to do the check manually in PAI?

Thank you,

Alex

1 ACCEPTED SOLUTION

former_member620231
Participant

sandra.rossi I ended up doing a new structure with all the fields, checks and value helps in it.

Thanks!

3 REPLIES 3

Sandra_Rossi
Active Contributor

If you want a quick and simple solution, remove the flag "required" from the foreign key and do the check yourself...

Otherwise, I think that you must define the names of both fields with same DDIC table or structure and link the dynpro fields to the DDIC (as proposed). The foreign key must contain both fields.

former_member620231
Participant

sandra.rossi I ended up doing a new structure with all the fields, checks and value helps in it.

Thanks!

Sandra_Rossi
Active Contributor
0 Kudos

Thx for the feedback. I think it's better that you convert your comment into an answer and accept it, because I was unsure of my answer, yours is more precise and you tested it ! 🙂