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: 

my perform in the method ( BADI)

Former Member
0 Kudos
202

Hi,

i want to write my subroutine to fetch some value from some table, but it says internal subroutines are not allowed in global class, how to write my subroutine in the std method which has my implementation...

Regards

Gunjan

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
89

You can put the FORM routine in a subroutine pool(a separate program) and then call it within your METHOD like this.

perform some_form in program ZSUB_POOL.

You can create this subroutine pool using SE38, and selecting the appropriate program type.

Regards

RIch Heilman

0 Kudos
89

thx Rich...

how can i pass the parameters using option in the above scenario?

Regards

Gunjan

0 Kudos
89

Same way that you do any other FORM routine using the TABLES and USING extenstions of the PERFORM statement.

Regards,

Rich Heilman

Clemenss
Active Contributor
0 Kudos
89

Hi Gunjan,

as you started to do OO, you may continue. Create a (private) method in your class as you created the form before. Only difference is you have to specify the parameters explicitly.

If you succeed once, you'll never be afraid again.

Rich's solution with external perform works but does not make too much sense.

Regards,

Clemens