10-05-2017 10:23 AM
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!
10-05-2017 10:52 AM
Hi
you can create a search help and make use of it.
Regards
Bhagya
10-05-2017 11:25 AM
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:
10-05-2017 11:51 AM
10-05-2017 11:51 AM
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.
10-05-2017 12:02 PM
+ With a view of type "maintenance", you may set the attribute "R" on read-only fields.
10-05-2017 1:04 PM
10-05-2017 1:31 PM
It's a big issue that table C has no foreign keys to tables A and B. Why can't you create them?
10-06-2017 2:56 AM
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
10-06-2017 6:32 AM
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)