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: 

Custom table maintenance for a custom AGR table

0 Kudos
629

I have a custom table Z_AGR with 3 columns AGR_NAME, AGR_TEXT, NOTES.

I made maintenance view with maintenance generator, and created a transaction that calls SM30 so users can maintain Z_AGR.

Now I have to modify it as this:

- The user sould only be able to add AGR_NAME that is present is tables AGR_1251 or AGR_AGRS.

- When AGR_NAME is added, AGR_TEXT has to be filled automatically from AGR_TEXTS table.

- Notes should be filled by user.

Is this possible with SM30 or other standards or do I have to make a custom program for it?

3 REPLIES 3

moshenaveh
Community Manager
Community Manager
0 Kudos
582

Welcome to the SAP Community. Thank you for visiting us to get answers to your questions.

Since you're asking a question here for the first time, I'd like to offer some friendly advice on how to get the most out of your community membership and experience.

First, please see https://community.sap.com/resources/questions-and-answers, as this resource page provides tips for preparing questions that draw responses from our members. Second, feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html, as that will help you when submitting questions to the community.

I also recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html.

Now for some specific suggestions on how you might improve your question:

* Outline what steps you took to find answers (and why they weren't helpful) -- so members don't make suggestions that you've already tried.

* Share screenshots of what you've seen/done (if possible), as images always helps our members better understand your problem.

Should you wish, you can revise your question by selecting Actions, then Edit.

The more details you provide (in questions tagged correctly), the more likely it is that members will be able to respond.

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

matt
Active Contributor
582

- The user sould only be able to add AGR_NAME that is present is tables AGR_1251 or AGR_AGRS.

Foreign key, linking to either of those tables

- When AGR_NAME is added, AGR_TEXT has to be filled automatically from AGR_TEXTS table.

Check out TMG events. There's even a recent blog about it.

raymond_giuseppi
Active Contributor
582

As matthew.billingham wrote create the foreign key relations with the other table, you could also consider creating a maintenance view (with the text as read-only) and build the maintenance dialog on this view and remove the duplicated text field from your table.