Application Development and Automation 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: 
Read only

SAP Maintenace Generator

Madeleine74
Discoverer
1,019

I have created a custom table with a category and description. The description field is not editable and depends on what category is entered.

When I create a new entry, the correct description is displayed, but when I change the category, the new description is not displayed after I press enter. Only after I have saved and exited the screen and go back in, the new description is displayed.

I've tried events 1, 2 and 5. No luck. I've tried adding code in the PAI code via a module, but still no luck. Ps. What is the event for pressing enter? I get space, not U, I or D.

Looking forward to some help. Thank you in advance.

I have created a custom table with a category and description. The description field is not editable and depends on what category is entered.

When I create a new entry, the correct description is displayed, but when I change the category, the new description is not displayed after I press enter. Only after I have saved and exited the screen and go back in, the new description is displayed.

I've tried events 1, 2 and 5. No luck. I've tried adding code in the PAI code via a module, but still no luck. Ps. What is the event for pressing enter? I get space, not U, I or D.

Looking forward to some help. Thank you in advance.

3 REPLIES 3
Read only

roberto_forti
Contributor
864

Hi,

Debugging check when It is saved and exited to understand how it works.

List of Events available in Table maintenance:

01 Before saving the data in the database
02 After saving the data in the database
03 Before deleting the data displayed
04 After deleting the data displayed
05 Creating a new entry
06 After completely performing the function 'Get original'
07 Before correcting the contents of a selected field
08 After correcting the contents of a selected field
09 After getting the original of an entry
10 After creating the header entries for the change task (E071)
11 After changing a key entry for the change task (E071K)
12 After changing the key entries for the change task (E071K)
13 Exit editing (exit main function module)
14 After lock/unlock in the main function module
15 Before retrieving deleted entries
16 After retrieving deleted entries
17 Do not use. Before print: Event 26
18 After checking whether the data has changed
19 After initializing global variables, field symbols, etc.
20 after input in date sub screen (time-dep. tab. /views)
21 Fill hidden fields
22 Go to long text maintenance for other languages
23 Before calling address maintenance screen
24 After restricting an entry (time-dep. tab./views)
25 Individual authorization checks
26 Before creating a list
27 After creation or copying a GUID (not a key field)
28 After entering a date restriction for time-dep. views
AA Instead of the standard data read routine
AB Instead of the standard database change routine
AC Instead of the standard 'Get original' routine
AD Instead of the standard RO field read routine
AE Instead of standard positioning coding
AF Instead of reading texts in other languages
AG Instead of 'Get original' for texts in other languages
AH Instead of DB change for texts in other languages
ST GUI menu main program name
AI Internal use only

Read only

Madeleine74
Discoverer
0 Likes
864

Hi Roberto

I tried event 21, and it worked. Had to add some code as well - modify table and commit work, but now the fields display new and updated values as they are being entered.

Read only

Sandra_Rossi
Active Contributor
864

The right way to do it (what SAP does), is :

- removing the column "description" from the table

- define the possible category descriptions in another table, a "text" table (or in the DDIC domain possible values) and define a foreign key to link the 2 tables

- creating a View to join the 2 tables

- creating a Maintenance View on that view, and make read-only the "description" column

You won't need events.