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: 

Problem in creating a class programmatically

ankur_sharma16
Active Participant
0 Kudos
502

Hello Experts,

I want to create a class and its methods programatically, so for that i am looking for any FM or Method.

FMs i got are:

Function Group                         Function Module

SEOY                                      seo_clif_multi_insert

SEOD                                      oo_class_create

SICL                                         rpy_clif_multi_insert

Problems in that is either pop-ups are coming Or modeled class is being created. So please suggest me some other method or way.

Regards,

Ankur Sharma

8 REPLIES 8

ThomasZloch
Active Contributor
0 Kudos
400

I think you can learn a lot of techniques for your tool from the SAPLink project.

Not sure what the latest homepage is, but you can try here:

http://code.google.com/p/saplink/

There is a class for each object type that it handles, and in method CREATEOBJECTFROMIXMLDOC you will find how it creates the objects in the target system.

For classes, it is using function module SEO_CLASS_CREATE_COMPLETE, which has a very complex interface.

Try installing SAPLink in your sandbox and study how it downloads and uploads the different object types.

Thomas

0 Kudos
400

Hello Thomas,

Can you please tell me more about this SAPlink. I heard it for first time. So please help me understand what actually it is.

Regards,

Ankur Sharma

0 Kudos
400

Hello Thomas,

SEO_CLASS_CREATE_COMPLETE FM also creates modeled class. So i won't be able to define the methods part. Any suggestions ?

Regards,

Ankur Sharma

ankur_sharma16
Active Participant
0 Kudos
400

Any suggestions ???

0 Kudos
400

Hi Ankur,

Try traversing in the function group SEOK and its function modules, may be you will get an idea.

I'm not much sure, but there is a function module to create methods dynamically if I remember.

Hope this helps.

Regards,

Manjesh.

0 Kudos
400

Thanks Manjesh, but still the FM in SEOK shows error.

ankur_sharma16
Active Participant
0 Kudos
400

Any suggestions ?

ankur_sharma16
Active Participant
0 Kudos
400

Function module SEO_CLASS_CREATE did the work for me. For other FMs, may be i was missing some parameter.