Create an Instance of an ABAP OO Class Object in WF

RomanWeise@gmx.net RomanWeise at gmx.net
Tue Dec 20 12:12:05 EST 2005


Hallo,

after using static methods of ABAP classes in workflow steps I now wanted to
give instance methods a try, which resulted in quite a lot of unexpected
problems.

I build an ABAP class including the IF_WORKFLOW interface on a 6.40 system.
The object is supposed to be anonymous that means I do not use the
persistency service or even a key as it's just supposed a helper class (my
document on ABAP Class in WF says that is an allowed technique). Then I
defined an element of the workflow container of this class type.

First I tried to create the workflow instance by using TS51900010 (generic
instanciate) but of course that does only work for BOR objects. So I looked
for a standard task doing this for ABAP Class objects without any success.

Next try was calling the BI_PERSISTENT~FIND_BY_LPOR of the object in a
container step which resulted in an error message that the value I handed
for the LPOR importing parameter had the wrong type although they have the
same type.

Then I tried to use a special get_instance method at my ABAP class as
wrapper for BI_PERSISTENT~FIND_BY_LPOR w/o importing parameter as I need no
key for the object. But this only works if the return value of this method
is typed like the classtype. If I use BI_PERSISTENT the workflow builder
says the type does not exist.

Ok, this at least made the workflow passing this step and putting an
instance of my object in the workflow container. But the next step which
executes a method of the instance ends in error state. I debugged the
workflow for about 2 or 3 hours but just found out that there seems to be a
lot of mess in there as the workflow lacks a SIBFLPOR key of the object.

I am really desperated as the worklow is supposed to run till the end of the
week. I know that all of that sounds like opening a lot of OSS messages but
I dont think I'll get a solution this year.

If someone knows a standard task to create the instance or a set of
workarounds to get this running, please share your knowledge.

Thanks a lot

Roman Weise
Tech Consultant 
 

-- 
GMX DSL-Flatrate 1 Jahr kostenlos* + WLAN-Router ab 0,- Euro*
Bis 31.12.2005 einsteigen! Infos unter: http://www.gmx.net/de/go/dsl



More information about the SAP-WUG mailing list