2013 Mar 15 10:33 AM
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
2013 Mar 18 9:21 PM
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
2013 Mar 19 3:31 AM
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.
2013 Mar 19 9:38 AM
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.