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: 

Alternate way to Sub-Routeins

Former Member
0 Kudos

Hi Friends,

Inside BADI and FM Exit, we can not use Form and Perform statement... Is tr any other alternate solution other than using Form and Perform?

Points will be rewarded....

9 REPLIES 9

Former Member
0 Kudos

Hi,

You can use INCLUDE also.

0 Kudos

Hoew to use include? i need to make use of SAP generated internal tables like XLIPS... Is this Internal tables accessable inside the include as well?

0 Kudos

Hi, create Public methods in the implementing class and call using Call method me->method instead of perform.

Reward points if useful.

Raj.

0 Kudos

Hi,

Write your code inside the include.The include must be at the proper place in the code.You can access standard internal tables and structures of SAP.

0 Kudos

Hi,

yes they are very much accessible inside includes.

0 Kudos

Hi Raj,

Can u plz give the detailed explaination on creating Public method and calling the same with an example...

0 Kudos

Hi,

I think you can use Macros Concept...

It does work same as PERFORMS.

Thanks,

Anon

0 Kudos

Hi,

In case of Badi implementation. when u implement in a badi, a implementation class is created in which we do the coding. In order to create a method. just type Call method ME->Method_name and double click on it, it will create a method in that implementation class. Add the parameters and write the logic in that method and u can start using it in ur BADI.

Rewards points if useful

Raj

Former Member
0 Kudos

Hi,

Is it possible we can write a perform statement in BADI?

Sure it is possible, you just have to reference the program in which the FORM exists. Since the call is in a method, where do you put the actual FORM, well you need to put it in a separate program or subroutine pool, then you can call it from within the method.

perform some_form in program zsubroutine_pool

Please reward points if it hle[s

Thanks

VIkranth