1

Sorry if my title doesn't make sense but I found it hard to describe! I have a Z table in SAP TM:

Z table

With a foreign key relationship to the standard table /SAPAPO/LOC

/SAPAPO/LOC

But I want to have an SM30 maintenance where the user populates the /SAPAPO/LOC-LOCNO field (i.e. the depot) and the LOCID is hidden and auto populated. Is this possible? Here is my view:

View

But in SM30 the depot is blanked out after entering. I think I can get it to work by messing around with the auto-generated screen but I would prefer to follow SAP standard.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
mmgro27
  • 475
  • 1
  • 8
  • 18
  • 1
    Changing the auto-generated screen is completely OK. In the maintenance view there are some events (you'll find them in the menu), you can add own logic there. – József Szikszai Oct 19 '21 at 08:56
  • You must have the field in the screen, you may at least make it display only (I don't know if "H" means the field is in the screen but hidden, or not present at all), and then you can find or create a Search Help which automatically fills LOCNO from table based on value entered in LOCID (you need to assign the Search Help to your table). – Sandra Rossi Oct 19 '21 at 11:38

2 Answers2

0

I decided to go a different route by having LOCNO in my Z table instead of LOCID and then creating a custom check table (copied from /SAPAPO/LOCNO_V). So the user enters the depot name and this is validated against /SAPAPO/LOC.

mmgro27
  • 475
  • 1
  • 8
  • 18
0

Foreign key relationship does not make auto-population in maintenance view, what it does is will make an input check when you enter LOCID manually in the maintenance screen.

Answering your question: yes, it is possible.

You need to utilize maintenance view events, particularly event 05 Creating a new entry and code this population yourself.

Tutorial for events: https://saptechnical.com/Tutorials/ABAP/TableMaintenance/events.htm

Suncatcher
  • 10,355
  • 10
  • 52
  • 90