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

Table event

former_member498821
Participant
0 Likes
561

Hi,

Issue :

case 1) If an entry is present with employee group = *(all) , cost centre= C1 and WBS = W1 ,Then if user enters an entry having Employee group = A and other parameters same . then an error should be populated as Entry with key */C1/WBS1 already exists! Please use the appropriated key.

case 2) If an entry is present with employee group = A , cost centre= C1 and WBS = W1 ,Then if user enters an entry having Employee group = * and other parameters same . Then an error should be populated as Entry with key A/C2/WBS2 already exists! Please use the appropriated key.

Employee group

Cost center

WBS

system reaction

Case1

existing entry

*

C1

W1

new entry

A or others

C1

W1

Error: Entry with key */C1/WBS1 already exists! Please use the appropriated key

Case2

existing entry

A or others

C2

W2

new entry

*

C2

W2

Error: Entry with key A/C2/WBS2 already exists! Please use the appropriated key

For this table event is already created in our system.

I want to  write a logic(for above issue) for the table Event existing for a table ZALL_WBSEMP_INAC ,

How can I find the table event and where i should write the logic  ?

Regards,

Venkat Pradeep

3 REPLIES 3
Read only

Former Member
0 Likes
517

Hello Venkrat,

To find the events, go to SE11 to display/change the view.

Once in the view, follow menu path Utilities->Table Maintenance Generator.

In the next screen,  follow menu path Environment->Modification->Events.

Any events that have been customized will be listed.

Also, you can look at the drop down list for the table column "Table maintenance dialog event" for all possible events.

Regards,

Kim

Read only

kakshat
Product and Topic Expert
Product and Topic Expert
0 Likes
517

Hi Venkat,

You can follow this link for SAP's documentation on the various table maintenance events - http://help.sap.com/saphelp_nw70/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/content.htm.

As far as the logic is concerned, that should be easy. You need to check the value of Employee Group in the new record being added. If it's something other an asterisk (*), then you need to ensure that there is no existing record in the table where Employee Group = *  and Cost Center and WBS are equal to the values in the new record.

If it's an asterisk, then you need to ensure that there is no existing record where Cost Center and WBS are equal to the values in the new record.

Read only

gaurab_banerji
Active Participant
0 Likes
517

1. go to se11

2. open table

3. go to table maintenance generator

4. go to modification > events

5. select event 05 (create data) and provide method name create_data

6. click the code button beside it.

7. write form create_data. endform.

8. within the form / endform write your logic.