Application Development 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: 

Create Custom method in a Implemented Badi

Former Member
0 Kudos

Hello Folks,

I am writing code in a badi but some part of code is repeating, as there is no provision for creating perform statements, I would like to create a method and put the code in that method so that the code in the badi will look modularized.

But i don't have much idea on how to do this.

Can anyone help me how we can do it.

Thanks for your help.

Regards,

Raj

1 ACCEPTED SOLUTION

former_member186099
Contributor
0 Kudos

Hi,

This should be very straight forward,

when you go to transaction SE19 with a particular BADI, then you can find a class attached to that BADI starting with Z, go into the class in edit mode, and add a method u want and then code it to your need. and you can call the same method from any of your BADI method with CALL METHOD me->xyz.

Regards,

Prasanna

3 REPLIES 3

deepak_dhamat
Active Contributor
0 Kudos

Hi ,

YOu can add your condition when to execute Code .

using IF endif.

regards

Deepak.

former_member186099
Contributor
0 Kudos

Hi,

This should be very straight forward,

when you go to transaction SE19 with a particular BADI, then you can find a class attached to that BADI starting with Z, go into the class in edit mode, and add a method u want and then code it to your need. and you can call the same method from any of your BADI method with CALL METHOD me->xyz.

Regards,

Prasanna

0 Kudos

Thanks Prasanna.

I will check and and let You know..

Regards,

Raj