Professional Documents
Culture Documents
Business Object without Super type Here my BO is completely customized. It does not refer to any standard BO available in the SAP system. Now in the slides down we will see step by step approach to create a BO without a supertype.
Scenario We have a Z table by the name ZEMPDETAIL. This table has three fields, Employee Number (PERNR), start date(BEGDA) and end date(ENDDA).Whenever a record is entered in this table ,the start date (BEGDA) should be saved as the sy-datum (current date) automatically and mail should be triggered stating that a new entry has been created into the table to a particular user . We will first see the creation of the table and its table maintenance step by step
1.) The table is created as per the below screenshot via SE11
2.) Table Maintenance is also created for the table in the same transaction.
4.) There are many events available for table maintenance and we will choose the event create new entry to suit a purpose and write a code for the same
6.) The code is to change the start date to sy-datum and create an event using the function module SAP_WAPI_CREATE_EVENT. Once the event is created it is linked to workflow.
Now the table part is over. We will see the step by step approach to create a business object and the linkage to a workflow.
Step 3 Business object without a super type is now created. Existence check and Display methods are the default methods available in all sorts of Business objects. IFSAP is the standard interface used across all the business objects. These get automatically appended to our business object as soon as we create them.
Step 4 Creating an event in the Business object so that it can be linked to the table maintenance event and called as workflow start event.
STEP 5 The business object has to be implemented. First the object components are implemented and then the business object is implemented.
STEP 6 - The business object has to be released. First the object is released and then the business object components are released.
The business object ZTAB_CHG is ready for and can be used in the workflow. Step 1 -> Workflow builder SWDD
Step6 -> Event linkage is now available from our workflow definition side
Step 8 -> Email step in a workflow Here we enter the user id, the subject of the mail and the mail content as per the screenshot below.
Step 10 -> Now we have to notify the system whenever the event ZCHANGE_DATA occurs this workflow should be called. The Transaction code is SWETYPV
Step 11 -> Check for a duplicate entry for the same object BO type.
OUTPUT Output at the business workplace (Transaction SBWP) of user specified in the workflow:
And the mail content in the inbox of the user is shown in the screenshot below.