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: 

Maintanence View - text table without foreign key relationship

Former Member
0 Kudos

Hi,

I have two tables each with two text tables - let's say "A" with "AT" and "B" with "BT".

Now I have a third table "C" which use a key field from A and one key field from B, like:

| MANDT | A-KEY | B-KEY | ... | ... |

I would like to display the texts for A-KEY from table AT. Same thing for B-KEY. How can i do this? Table C has no relationsships to table A/AT or B/BT . Thanks!

9 REPLIES 9

bhagya_nayanala
Explorer
0 Kudos

Hi

you can create a search help and make use of it.

Regards

Bhagya

Former Member

Hi,

If I understand your requirement correctly, you need to create a database view in SE11 with tables C, AT, and BT. The relationship should look something like this:

0 Kudos

Thank your. Please read my answer below 🙂

Former Member
0 Kudos

Your answers are correct but I mean something different.

I want to use the view to add new entries.. If someone select an entry from A-Key via F4, I want to show the text in the next view field. The user should read the text without using F4 again.

Sandra_Rossi
Active Contributor
0 Kudos

+ With a view of type "maintenance", you may set the attribute "R" on read-only fields.

Sandra_Rossi
Active Contributor
0 Kudos

+ a maintenance view over a database view

Sandra_Rossi
Active Contributor
0 Kudos

It's a big issue that table C has no foreign keys to tables A and B. Why can't you create them?

Former Member
0 Kudos

Hi,

You need to create a Table Maintenance Generator for table C. Note that table C should include the field that will handle the text value. Then, inside the FILL_HIDDEN event, create a subroutine that will select the text from another table, say table A.

I can't answer your question in detail here for it will be too long and I know there are many great resources around about Table Maintenance Generator, but at least, you now have an idea on how to go about what you are trying to achieve.

This will be a good place to start: Table Maintenance Generator and its Events

raymond_giuseppi
Active Contributor
0 Kudos

Usually we use foreign relations for this, in a standard way you should have C -(check)-> A -(text)-> AT and C --> B --> BT so you could create a maintenance view in SE11 with the 3 tables and use it in the maintenance dialog.

Why didn't you create the foreign relation with the main tables, the 'Table C has no relationships to table A/AT or B/BT' would be considered an error on multiple if not most sites...

Else go for maintenance event handling and/or modification of dynpros (beware can be removed later inadvertently during regeneration if table changed)