06-29-2006 1:03 PM
Hi everyone,
I ahve defined one custom table.
whose key is referring to some other tabl.
Tha cardinality i set is 1:N >
the table is gettinmg modified only through the program.
even if the check table filed don't have that value then also the record is getting inserted into table through the program? how to overcome this problem? what is required to do?
06-29-2006 1:06 PM
Hi
The checktable is triggered only in selection-screen or in the dynpro, if you have to update by a program you should insert a control:
SELECT SINGLE * FROM <ZCHECKTABLE> WHERE .....
IF SY-SUBRC = 0.
INSERT ...
ENDIF.
Max
06-29-2006 1:17 PM
I have to apply constraint on DDIC table itself.
I don't have to write the select statement.
06-29-2006 1:20 PM
Hi
You can't do it in the dictionary, you can only set a checktable for a field there, but you can't avoid that a program insert a record there isn't in the check table.
For example:
Z1 is check table of Z2
If the record A isn't in check table Z1, but however I can insert it if I run a program like this
Z2 = A
INSERT Z2.
No controls can be triggered automatically by dictionary.
Max
06-29-2006 1:22 PM