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: 

TMG Validations

0 Kudos

Hi,

Created Ztable with 2fields, ( F1 and F2) and created TMG and Tcode

need to validate F2 value is available on  another table or not when press SAVE button.

Write logic in PAI... when save it is triggering error

Probelm:

When press enter its accepting value and when press SAVE throwing error but fileds are in disable mode to change.

if multiple values also it should work.

i tried with event but i will get multiple values to to get values from screen.

wrote for one filed but given dump for dynprogram invalid

any solution...

5 REPLIES 5

kakshat
Advisor
Advisor
0 Kudos

Hi R K,

What do you mean by "multiple values to get values from screen"? I think in one of the structures you do get the current value also.

Regards,

KA

Former Member
0 Kudos

You have created TMG so use events of TMG. Use 01 event (before saving data to database) and write a select statement to check whether the value exists in another table and display message if not.

suggestion: If you just want to check whether the value exists in another table just make that field as foreign key field for that check table in which you want to check the value. This will not allow any other value except the value present in other table to save.

vinoth_aruldass
Contributor
0 Kudos

hi,

Check your code if there s any inconsistancy.

better to use foreign key relation to the field F2.

Former Member
0 Kudos

Hello RK,

I think you need to do loop at screen command and then enable the field for change.

I am assuming that you have used select single or select up to one rows achieve this requirement.

Where have you written your code ? on TMG events or on Function Group?

Regards,

Deepti

Former Member
0 Kudos

Hi,

If you just need to check if value is available in another table for the field, Why cant you do a foreign key check?

Why do you need to add it to an event?