Duh... a little extra piece of information: Object type Syste m - method GenericInstantiate .... it drives me crazy, yeah-yeah

Dart, Jocelyn jocelyn.dart at sap.com
Mon Oct 14 03:10:31 EDT 2002


Hi Kjetil,
You can have one task for all so long as you keep everything in it
generic.  But I would still suggest creating your own centrally used
task for such a central generic purpose and not reusing a task that
was created to fit a very specific scenario in a specific standard SAP template.
Jocelyn
 
-----Original Message-----
From: Kjetil Kilhavn [mailto:kjetilk at statoil.com]
Sent: Monday, 14 October 2002 5:01 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Duh... a little extra piece of information: Object type
System - method GenericInstantiate .... it drives me crazy, yeah-yeah
 
 
I found another task and used it successfully.  The strange thing is that
the definitions of these two tasks are almost identical. The only
difference is the initial value definition. None of them have specified the
object type of the exported parameter. I checked that before I sent the
first message ...
 
The task that doesn't work is PE_OREF_01 (TS01200205)
The task that works is PE_OREF_02 (TS01200240)
 
Maybe I should still create my own task, but that is another discussion.
Anyway, since I sometimes have BUS2081 objects and other times BKPF objects
I would then have to create two tasks. Creating separate tasks for every
use of a generic method kind of ruins the elegance of having this generic
method in my view.
--
Kjetil Kilhavn
 
 
 
 
 
                    "Dart, Jocelyn"
                    <jocelyn.dart at sap.co        To:     SAP-WUG at MITVMA.MIT.EDU
                    m>                          cc:     (bcc: Kjetil Kilhavn)
                    Sent by: SAP                Subject:     Re: Duh... a little extra piece of information: Object type Syste              m -
                    Workflow                    method GenericInstantiate  .... it drives me crazy, yeah-yeah
                    <Owner-SAP-WUG at MITVM
                    A.MIT.EDU>
 
 
                    14.10.2002 04:30
                    Please respond to
                    "SAP Workflow Users'
                    Group"
 
 
 
 
 
 
Kjetil,
Create your own task.
If its the existing one it probably not only has an initial value
defined, but also a predefined container element referencing USR01DOHR
which it uses in its task-method binding since the existing one is designed
to
bring back a USR01DOHR object.
 
If you create your own task with your own container element referencing
BKPF
it will be fine.
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
 
-----Original Message-----
From: Kjetil Kilhavn [mailto:kjetilk at statoil.com]
Sent: Friday, 11 October 2002 6:50 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Duh... a little extra piece of information: Object type System
- method GenericInstantiate .... it drives me crazy, yeah-yeah
 
 
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.
 
 
 
 
 
-------------------------------------------------------------------
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