cancel
Showing results for 
Search instead for 
Did you mean: 

delegation

Former Member
0 Kudos

Hi ,

what is the use of delegation . we can copy the same as supertype object , and implement our own methods .

so why we need to delegate object instead of just copy and add own methods .

regards

kiran

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi ,

There are two ways of creating bussiness object

1. If the standard BO is not meeting your requirement then need to create our own BO

2. If Standard BO is Partially full filling our requirement then need to create our own BO by refering super type as Standard BO

In this case we use Deligation , All the cases not mandatory to make the deligation

For example :

new BO : ZMaterial

Supertype : BUS1001006

BUS1001006 -> Event -> CREATED

If there is any problem in Trigerring an event then in all the logs it will show the Business object name as BUS1001006

instead of Zmaterial.

If we deloped a Workflow by using the ZMaterial BO Then we know error from which BO it caused

But after some time if some others are using the workflow then they will check for Bus1001006 Instead of BO ZMaterial , because all logs are showing Standard bussiness object name

If we deligate the BO then we will refer the standard BO name instead of Z***** BO.

So mean while if there is any problem then it will show the standard BO name in all logs then it is easy to find the error

Mainly to avoid the confusion we need Deligation .

Former Member
0 Kudos

Hi ,

Deligation means replacing of orginal object type by its subtype. for example you have a BO BUS1001006 which will be triggered while a material is created , if you want to add a method to this standard one it will not allow to do, instead of that i will

do deligation with a Z name and there you can create your own method.when you generate this BO, then you can find this newly created method in you standard BO.

Please let me know if you still need any more help.

Thanks and regards,

Rajeshwar.

surjith_kumar
Active Contributor
0 Kudos

HI,

If you delegate it, no need to refer the custom BO. Then the custom method and BO Created in the Custom BO will come to Std. BO during the execution.

Check this [Link1|https://wiki.sdn.sap.com/wiki/x/JQD1Aw] [Link2|https://wiki.sdn.sap.com/wiki/x/8YBVAw] & [Link3|https://wiki.sdn.sap.com/wiki/x/moOmAw].

Regards,

Surjith

former_member185167
Active Contributor
0 Kudos

Hello,

If you delegate eg ZBUS2012 to BUS2012 then you can make use of everything that uses BUS2012 without having to change every reference to ZBUS2012. Also, if there is ever a change to BUS2012 in future upgrades, you will have the benefit of them automatically. It's best practice to use SAP standards whenever possible.

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Hi Kumar,

If delegation is not done there will not be communication between the standard and custom object type. Workflow systems find two business object types.

If the standard SAP BO 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. Change in the standard object type can be done by the help of Delegation.

You can create the custom BO and once delegation is done you can call the standard BO with the custom methods/events added to the custom BO.

Search SDN for mode details on Business Object Delegation.

Regards,

Deepa Kulkarni