Application Development and Automation 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: 
Read only

Create Global Class Definition using Local Class Source Code

Former Member
0 Likes
1,044

I would like to be able to automate the creation of global class definitions using source code that is defined in a text file (one example: convert a local class def to a global class def).

Does SAP deliver this functionality? (I'm already aware of the various classes that can be used to create global classes and how those classes can be implemented in a program to generate new classes. I'm hoping to avoid having to create a custom solution.)

Thanks in advance!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
814

All:

Uwe's tip is helpful to me for one of my requirements but I'm still trying to find out if SAP provides a function/class that can import a local class definition (without XML tags) and convert it to a global class definition.

All attempts to help are appreciated!

5 REPLIES 5
Read only

uwe_schieferstein
Active Contributor
0 Likes
814

Hello Larry

Are you aware of <a href="https://forums.sdn.sap.com/click.jspa?searchID=542333&messageID=2859885">ZSAPLINK</a> ?

<b>ZSAPLINK</b> allows you to download and upload various program objects including classes. The sources are downloaded as <b>XML</b>. Thus, you could analyze the XML document using an XML editor and see if this is a way to generate your global classes.

Regards

Uwe

Read only

Former Member
0 Likes
814

Hi Uwe,

Thanks for the speedy response.

I don't think that ZSAPLINK is exactly what I'm looking for in this instance, but it may have applicability to a different requirement that I have.

Thanks again!

Read only

Former Member
0 Likes
815

All:

Uwe's tip is helpful to me for one of my requirements but I'm still trying to find out if SAP provides a function/class that can import a local class definition (without XML tags) and convert it to a global class definition.

All attempts to help are appreciated!

Read only

0 Likes
814

Larry, the funcntionality that you require is a part of SE24. Say that you define the local class in a report program, you can convert it to a global class from se24.

Go to SE24, from the menu, choose Object Type -> Import -> Local classes in program.

Regards,

RIch Heilman

Read only

0 Likes
814

We have a winner!

Thanks Rich!

It's not a 100% solution - I was hoping to be able to generate global classes/interfaces using source code alone, without requiring user intervention.

It <i>is</i> however, a 90-95% solution because debugging SE24 reveals that by using a combination of the FM's SCAN_ABAP_OBJECTS_CLASSES & SEO_CLIF_MULTI_IMPORT, I should be able to <u>quickly</u> put together that custom application that I was trying to avoid.

I knew about the existance of SEO_CLIF_MULTI_IMPORT but I did not know about SCAN_ABAP_OBJECTS_CLASSES. I'm very happy to learn that I'm not going to have to write a parser!