2022 Jun 19 3:33 PM
Hi, i have made 2 custom tables with emp data. 1 is master table and 1 is value table with foreign key on emp id.
I have entered values also through TMG. Till here everything is fine. But when i am creating maintenance view and selecting master table and going on relationship to select custom table then nothing is happening. The view table on clicking relation is showing under 'Relationship with unsuitable cardinality'. What does that mean? How can i get both the tables so that i can go ahead with maintenance view? When i am trying this with SAP tables then everything is working fine so i am unable to understand the problem and there are no error generated too.
Hi, i have made 2 custom tables with emp data. 1 is master table and 1 is value table with foreign key on emp id.
I have entered values also through TMG. Till here everything is fine. But when i am creating maintenance view and selecting master table and going on relationship to select custom table then nothing is happening. The view table on clicking relation is showing under 'Relationship with unsuitable cardinality'. What does that mean? How can i get both the tables so that i can go ahead with maintenance view? When i am trying this with SAP tables then everything is working fine so i am unable to understand the problem and there are no error generated too.
2022 Jun 19 4:09 PM
Hi,
Try this.
While creating maintenance view, first enter the table which have foreign key then enter master table.
Regards,
Anuja Kawadiwale
2022 Jun 19 4:40 PM
Yes I tried that also but it is showing the same message. I don't know if this message holds any relevance but i am just assuming because otherwise I don't find any error in table or contents or the process and also there are no error messages to debug.
2022 Jun 19 5:09 PM
Hi,
I think wrong relationship is define between two tables. if first table is your master table having key field as Employee id and second table with foreign key on employee id.
First thing no need to define second table as value table for the first table. Both tables are already related to each other by defining the foreign key.
So if you remove value table as second table then you will be able to create maintenance view.
Second thing if you want value table then master table should be the value table for employee id in master table only.
I hope this is helpful.
Regards,
Anuja Kawadiwale
2022 Jun 19 5:17 PM
I did not define it as value table separately I named it as emp_valuetable to distinguish from master table then it should work??
2022 Jun 19 5:23 PM
Hi Shivangi,
Ok. I thought you have defined second table as Value Table.
Can you please share screenshot of both the tables. Also the screenshot of foreign key relationship where you define.
2022 Jun 19 5:36 PM
Hi,
While defining foreign key cardinality needs to mentioned. check this one.

2022 Jun 20 4:21 AM
Hi, I am new to abap so could you guide me how to do the above with steps???
2022 Jun 20 5:10 AM
Hi Shivangi,
Can you please share screenshot of both the tables. Also the screenshot of foreign key relationship where you define so that will be able to help you.
2022 Jun 20 8:50 AM
2022 Jun 20 12:33 PM
Also, I have one more question. Can i replace any field value of a table which is having tmg? I mean for example I have entered country as india and now I want to change it to us in one of the field? Can i do this without events and coding or they are required for doing any changes in table?
2022 Jun 20 12:38 PM
2022 Jun 20 2:21 PM
@ anuja can you let me know how can i replace the value without events?
2022 Jun 20 3:36 PM
Hi Shivangi,
for example except primary key all the other fields are editable. So i directly go to Utilities and then create entries then i can edit existing entries.

2022 Jun 20 4:18 PM
@Anuja- got it thanks. Also, i have shared the screenshots if you could chec
2022 Jun 20 7:28 AM
Please show the details how you defined your foreign key, your source field (where you attached the foreign key), and the key fields of the value table you referred to in the foreign key.
2022 Jun 20 8:51 AM
2022 Jun 20 1:31 PM
The tables shown below 'Relationship with unsuitable cardinality' are those with foreign key not being 1:1, 1:C or text table.
2022 Jun 20 2:19 PM
@ sandra but the table I made os standard table and if I am not wrong in standard table we do not have to maintain any relationship. Pls correct me if I am wrong.
2022 Jun 20 3:21 PM
You must not modify the standard, you may just extend it.
Please explain with real names, not just "master table" and "value table", because I don't understand which one is custom, which one is standard.
I guess the master table is custom, you defined a foreign key to the value table, which is standard.
So, the foreign key is defined in the custom table, not the standard one.
Please correct me if I'm wrong.
2022 Jun 20 4:15 PM
2022 Jun 20 4:16 PM
Emp id is primary key in mtable and foreign key is established on this in vtable.maintview.png
2022 Jun 20 4:32 PM
No, the most important thing is missing, the definition of the foreign key for YEMP_MTABLE-EID, to point to YEMP_VTABLE, and its cardinality.
2022 Jun 20 4:50 PM
Hi Shivangi,
Have you created foreign key ? If not please follow below steps to create foreign key.
Because tables grouped in maintenance view must be joined using foreign key. Once you define foreign key you will be able to create maintenance view.
Step 1: Click on key icon.

Step 2: Enter your master table name and click on create proposal.
It will show you the field on which table will be join using foreign key.

Step 3: Click on Copy.
Here foreign key is created. Just activate the table. Then try to create maintenance view.
2022 Jun 20 6:47 PM
yes Anuja i created foreign key also. These are the steps which I followed
2022 Jun 20 9:00 PM
Step 1: Create a table by name ‘mtable’ with records.
Step 2: Create another table by name vtable with records.
Step 3: Create the foreign key relation as below
1. Open the table vtable
2. Select eid field
3. Click on foreign keys button or Icon
4. Provide the check table name as mtable(master data table)
5. Click on generate proposal button
6. Click on copy button
7. Save and activate
2022 Jun 20 6:48 PM
@ Sandra sorry my system has stopped working suddenly I don't know why. I am sharing the steps though which I followed to generate foreign key
2022 Jun 20 8:51 PM
2022 Jun 20 8:59 PM
Step 1: Create a table by name ‘mtable’ with records.
Step 2: Create another table by name vtable with records.
Step 3: Create the foreign key relation as below
1. Open the table vtable
2. Select eid field
3. Click on foreign keys button or Icon
4. Provide the check table name as mtable(master data table)
5. Click on generate proposal button
6. Click on copy button
7. Save and activate
2022 Jun 21 1:28 AM
foreign-key.png
sandra.rossi anujawani2426 pls check the foreign key relation.
2022 Jun 21 8:06 AM
OK, do you see what the issue is, now? (check what I said previously, I won't repeat myself)
Anuja also told you: "cardinality needs to mentioned".
2022 Jun 21 3:58 PM
@ sandra @anuja thanks a lot for all the guidance and support. I will try this and check the same.
2022 Jun 21 5:55 PM
If you want to target someone, if this person has posted an Answer, use the button COMMENT, if this person is the Original Poster of the question he/she will be automatically informed, otherwise copy/paste their hyperlinked name so that the person receives a warning (NB: @ doesn't work/but typing this character will suggest hyperlinked names). e.g. good way: shivangi_pant
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |