on 11-06-2007 8:32 AM
Hi All,
I need to invoke a static method of an ABAP class from JCo. Is this possible? I am new to JCo. Any help in this regard is highly appreciated.
Thanks,
Praneeth
Hello Praneeth,
i'm not sure about calling ABAP class method from JCo directly, but there is a possibility to call function module from SAP R3. And the shortest way to do so is described in thread, answered by me.
I guess there is no problem to call an class method from an function module.
Please consider rewording points if helpfull.
regards,
mz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maxim,
Thanks for your reply. However, I am aware of the fact that we can call function modules from JCo. I am interested to know if I can call a method of an ABAP class which is not wrapped around a function module. I guess I need to create a function module for each method of the ABAP class and have the import and export parameters same as those of the method.
Thanks,
Praneeth
Praneeth,
unfortunately i'm not aware of any way to do that. And i'm almost sure it's not possible. To call a class method, you have to create and maintain an class object instance. And it is not clear, where that instance should be maintained if you call it from outside of ABAP Runtime. That's why creating an class instance in a function module is probbably the right way to do it. In this case the life-circle of the object is driven by ABAP runtime.
regards,
mz
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.