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: 

Getting reference of an external local object.

Former Member
0 Kudos

Hello,

Is there a way you can use the class definition/implementation of a local class, from a different program? For example, you have function group A, which has class CLASS1 defined. From function group B, I want to be able to be able to use this same class definition.

Copying the local class to a global one is not an option in my scenario, because it is an SAP local class that I want to use and want to prevent any future complications since it would be used in a critical user-exit.

Any help appreciated.

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

No, you can't do that, that is why it is a "Local" class. If you want reuseability, you must make it a global class.

Regards,

Rich Heilman

0 Kudos

Thanks for your reply Rich.

I was hoping there would be some way to do this. Specifically I am trying to get a reference of the local class lcl_migo_screenmodification in function group MIGO so I can reuse the methods in the badi MB_MIGO_BADI. I may need to just copy the code if there are no alternatives.