Duh... a little extra piece of information: Object type System - method GenericInstantiate .... it drives me crazy, yeah-yeah
Kjetil Kilhavn
kjetilk at statoil.com
Fri Oct 11 04:50:25 EDT 2002
The task I use is an existing one. It has an initial value definition of
objecttype which (of course) corresponds very well with the "unwanted"
object type returned. But since the object type is an importing parameter
this shouldn't matter - or should it?
I would have written this in the previous message had I remembered
yesterday or today to check the initial value settings.
--
Kjetil Kilhavn
----- Forwarded by Kjetil Kilhavn on 11.10.2002 10:46 -----
I get the weirdest errors....
The neverending story about invoices blocked for payment is moving forward.
Now I am struggling with a solution to handle the reversal of invoices for
which payment release is rejected. The reporting system reference object
(ZCABDOC) comes in as a parameter. There are two virtual attributes for
this object type for SAPObjectType and SAPObjectKey respectively.
Creating a reference to the real object should thus simply be a matter of
using a task which calls system=>GenericInstantiate (there, I finally got
to use something from the ABAP Objects course :-)
For unknown reasons the object returned to the task is of a different type
than the object type I request, and a different result from what I get when
I test the method.
Object type ZCABDOC - instance for an FI invoice
SAPObjectType = BKPF
SAPObjectKey = 100019000006372002
Object type SYSTEM method GenericInstantiate
parameter objectkey -> 100019000006372002
parameter objecttype -> BKPF
result <- BKPF 100019000006372002
Now the relevant workflow log excerpt (sorry, but the readability here will
probably be limited even if I have tried to use indenting - view with fixed
width font and no wrapping)
2002-10-11 10:21:02 TMBind Binding from task
to method
2002-10-11 10:21:02 ContBindExecute G Binding: Direction
E with index 0
Export binding
Content of target container
Name Type Value
OBJECTKEY C070
100019000006372002*new*
OBJECTTYPE C010 BKPF*new*
Content of source container
Name Type Value
OBJECTKEY C070
100019000006372002
OBJECTTYPE C010 BKPF
_WORKITEM o090 D03CLI205
BATCHITEM 000000783188
Error messages - none
OBJECTKEY <=== &OBJECTKEY&
OBJECTTYPE <=== &OBJECTTYPE&
2002-10-11 10:21:02 MTBind Binding from method
to task
2002-10-11 10:21:02 ContBindExecute G Binding: Direction
I with index 0
Import binding
Content of target container
Name Type Value
OBJECTKEY C070
100019000006372002
OBJECTTYPE C010 BKPF
_WORKITEM o090 D03CLI205
BATCHITEM 000000783188
Content of source container
Name Type Value
OBJECTINSTANCE o090 D03CLI205 BKPF
100019000006372002
OBJECTKEY C070
100019000006372002
OBJECTTYPE C010 BKPF
_WI_OBJECT_ID o090 D03CLI205 SYSTEM
Error messages
I052(W8) 1 errors occurred in binding assignment to
OBJECTINSTANCE3
I163(W8) Object types BKPF and USR01DOHR are not
compatible
OBJECTINSTANCE ===> &OBJECTINSTANCE&
2002-10-11 10:21:02 ContBindErrors G 1 errors occurred
in binding assignment to &OBJECTINSTANCE&
--
Kjetil Kilhavn
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.
More information about the SAP-WUG
mailing list