2008 Jan 04 11:28 AM
i created two ztables ...
maintaned foreign key relation for one field.but if i insert some entries other than the entries in check table it is taking those entries. there is no error message....pls explain.
2008 Jan 04 11:36 AM
i created two ztables ...
maintaned foreign key relation for one field.but if i insert some entries other than the entries in check table it is taking those entries. there is no error message....pls explain.
2008 Jan 04 11:36 AM
2008 Jan 04 11:39 AM
Hi,
1. Foreign key relation ships,
in SAP abap,
allow to BYPASS IT.
2. They are just meant
for showing master list
in ABAP Module pool.
3. It won't DO ANY CHECK
while directly entering in table.
Regards,
Omkar.
2008 Jan 04 2:28 PM
Hi,
I just created 2 tables for your reqt and tested .its working fine.
I have created ZEMP table with fields
empno --> char 4 --> Pkey
ename --> char20 --> not pkey
deptno --> char2 --> not pkey
i created 1 more table ZDEPT table with fields
deptno --> char2 --> pkey
dname --> char15 --> not pkey
Maintain technical settings for 2 tables like
Data class: Appl0,
size category: 0
and activate both the tables.
In each table atleast 1 field should be pkey.otherwise u will get error that you can see in activation log when you do activation.
Maintaining foreign key relation ship:
goto ZEMP table and place cursor on deptno and press Foreign key button (after newrows 1 button is there na that button ).
then enter ZDEPT in the place of check table text box ,short text and press "Generate proposal" button.
you will get proposal and just press " Copy " button or enter button.no need to enter other values in this screen if not required specifically.
Testing:::::::::::
Now maintain table maitenance generator using
Utilities->TMG->enter auth grp as &NC&.
and go back and again goto
utilities-->Table contents->create entries.
now you give some values.
you will get error there itself.because you didnt maintain entries in ZDEPT table as it is check table ZEMp table.
Regds
Sivaparvathi
Please dont forget to reward points if helpfull
2008 Jan 04 6:39 PM
hai ..i did the same thing... i insert some entries for deptno in dep table first.and i insert someother entries which r not in dept table it accepts for deptno in emp table..
and i am using 4.7 version..
2008 Jan 07 6:46 AM
Hi,
you want to check the field deptno in dep Table while entering values in Field deptno of other Table.
so that it won't alow the duplicate values. Right?
But validations are not possible at table level. that's why when ur entering the deptno diffrent from actual no also, it is storing in the database.(it will not check the value in the dept table).
validations can be defined at the application. we can
validate the screen field(Ex:deptno) before entering value into the database table.
we have to write a small code for that.
If u want to do ..
1. U must have defined DOMAIN
thru se11.
2. In that there is one TAB (Value Range)
3. At the bottom most,
There is a VALUE TABLE.
4. In that Enter the MASTER Table.
Regards,
Omkar.
2008 Jan 07 8:53 AM
Hi
Instead of just giving the check table fields, just generate a proposal and then activate the table. I guess this will work for u. Also check if u have given the messsage class number correctly.
with regards,
hema.
2008 Jan 07 9:27 AM
create a table maintenance generator path is utilities--> table maintenance generator. and then maintain the values using sm30. u will have a reference check
awrd if helpful
Edited by: prasanth kasturi on Jan 7, 2008 10:27 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |