cancel
Showing results for 
Search instead for 
Did you mean: 

What is delegation in workflow???

Former Member
0 Kudos

Hi all,

can u give me a brief overview about delegation in workflow???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi,

In workflow Business object has an important role and delegation is used in business objects If the standard SAP events don't fulfill your purpose, new events/methods may be added to the given object type. SAP doesn't allow changes to its original object types. It permits changes by using the concept of delegation. it is technique of replacing an original object type by its subtype to which additional events/methods may be added.

Basically Business Object(BO) is a central framework integrated with other frameworks & models. Example :

A R/3 transaction can trigger a BO event ,

A BO event can trigger a workflow (template or a task),

A workflow can call a BO method ,

A BO method can call a R/3 Transaction or a function module,

when a workflow is triggered it starts from the transaction. when a user saves the transaction the data goes to a business object. Business objects are the active instance of object type.

By delegating a BO:

Customers use their own object extensions with the tasks , events , etc. supplied by SAP.

Without having to redefine existing tasks , we can use standard objects with customer extensions.

Transaction to be used-------SWO1 (Business Object Builder).

There u give name of your object type and then go to setting> delegate>new entries-->then give object type same as your supertype and in delegation type give your object name which u gave initally and then save.now if u see in that standard object ur functionality must be added which u have defined in ur object type. it means that BO is delegated. now u can use this in workflow according to your requirment.

Hope this will help you.

Best regards

Saurabh

Former Member
0 Kudos

Hi,

I am about half done, I have a question in regards to the task creation. In the ABAP tab I chose function module and then provided the FM name, I am just not sure about the other tabs?

In the general tab would I check all four options? Dialog, Synch, Result Parameter and Instance Independant? In tab result type what should I fill in there?

Aby help would be appreciated

Thanks.

Edited by: George LaingMSG on Mar 10, 2009 4:29 PM

Former Member
0 Kudos

Which options you choose depends on your need.

Instance independent means that the method can be executed without an instance of the business object. This can be used for utility methods that don't require an instance. This is similar to a static method in OO.

The syncronous box should be checked if your WF task should be syncronous and should not be checked if it is asyncronous. Similiar with dialog, depends on if the method will be a dialog task to interact with a user.

The result parameter is much like an export parameter on the method, only it is transfered back to wiresult in the task container and is modeled accordingly.

--Seth

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

go through this:

BUSINESS OBJECT

DELEGATION

Here we will Discuss how to delegate a Business Object & what is Delegation & why we use it?

Q1> Why we use Delegation?

Ans1> If the standard SAP events don't fulfill your purpose, new events/methods may be added to the given object type. SAP doesn't allow changes to its original object types. It permits changes by using the concept of delegation.

Q2>What is Delegation ?

Ans2>Delegation, as the name implies, is a technique of replacing an original object type by its subtype to which additional events/methods may be added.

Q3>What are the uses of Delegating a BO?

Ans3>By delegating a BO,

Customers use their own object extensions with the tasks , events , etc. supplied by SAP.

Without having to redefine existing tasks , we can use standard objects with customer extensions.

Transaction to be used-------SWO1 (Business Object Builder)

1)Create a business Object using transaction SWO1.

2)Now take super-type as BUS2012 which you want to delegate.

3)Save it in a u2018Zu2019 Package.

4)Click on Object type & go to EDIT. There change the release status of Object type to implement.

5) Again click on Object type & go to EDIT. Now change the release status of Object type to Release.

6)Now click on Methods & press create button.

7)One Pop-up will come & here click on u2018Nou2019.

Give the method name & description.

😎 After this click on method that you have created. Go to EDIT-Change Release Status. Here first implement the object type component & then release it.

9) Here you can notice both tick mark is coming in front of business object & method we have created. It means method is created successfully.

10) Now in this method , we can write our own code according to our requirement.

In my workflow I have created one method just to add US with DEVHYD.

For this I have created two parameter---ID , USID (under Parameter Tab)

11) Now click On Program tab for writing code in our method.

Here I have written Code for adding US with DEVHYD.

12)Now save & come back. we will come on SWO1 initial screen.

Here under Setting tab click on Delegate.

13) Choose object type as Bus 2012 & click on Details Tab.

14) In Delegation type , write your u2018zu2019 object name & then save it.

15) Now we can use it in any TASK. For this go to transaction PFTC.

Write Business object in object type category. Press F4, the method we have created will come.Now choose that. It means that in BO bus2012 delegation is done.

Former Member
0 Kudos

Hi,

Please search SDn you will get your answer.

Edited by: pr murthy on Oct 8, 2008 1:45 PM

Former Member
0 Kudos

Hi Ravi,

You can follow this link which gives you a clear understanding on the concept of Delegation.

[Delegation and redefining methods|https://wiki.sdn.sap.com/wiki/x/8YBVAw ]

Regards,

Swapna.

Former Member
0 Kudos

.