instantiate an object and attach it to a workflow? - FICA

Paul.Bakker@osr.treasury.qld.gov.au Paul.Bakker at osr.treasury.qld.gov.au
Thu Jun 15 03:54:20 EDT 2006


Mark,

Thanks for that. I've solved the problem now, but in a fairly ugly way.. I
put a 'Requested Start' of  "+1 minute" on the workitem that does the
instantiation. By the time ithe workitem executes, the CA_DOC has been
created and the instantation works.

FYI: the object CA_DOC is specific to Contract Accounting (or PSCD)

cheers - and thanks,
Paul B



|---------+---------------------------->
|         |           "Mark Pyc"       |
|         |           <mark.pyc at gmail.c|
|         |           om>              |
|         |           Sent by:         |
|         |           sap-wug-bounces at m|
|         |           it.edu           |
|         |                            |
|         |                            |
|         |           15/06/2006 17:42 |
|         |           Please respond to|
|         |           "SAP Workflow    |
|         |           Users' Group"    |
|         |                            |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       "SAP Workflow Users' Group" <sap-wug at mit.edu>                                                                |
  |       cc:                                                                                                                    |
  |       Subject:  Re: instantiate an object and attach it to a workflow? - FICA                                                |
  >------------------------------------------------------------------------------------------------------------------------------|




G'day Paul,

You're on the right path. I don't seem to have an object type of CA_DOC in
my ECC system so I can't comment on specifics.

Have you tried just testing the SYSTEM method from SWO1?? If you've got the
key right you should be get an object link back that you can double click
into to confirm that it's worked happily.

Good luck,
Mark


On 6/15/06, Paul.Bakker at osr.treasury.qld.gov.au <
Paul.Bakker at osr.treasury.qld.gov.au> wrote:
Workflow Gurus,

I have a custom workflow which, after seeking agent approval, creates an
object (a document of type CA_DOC).

I would like to attach an instance of the created object to the workflow,
so that 'object services' can be used later.

To do this, I added a custom step which calls the method
SYSTEM.GENERICINSTANTIATE . Apparently if you pass the object key (and
object type) to this method, it instantiates the object. This is then
passed back to the workflow container.

At least, that's what I hoped it would do! In practice the workflow goes
into error with message OL808: "Object with runtime number '0' not defined"

When I try to view the new CA_DOC object (via FPE3), it does not exist. I
suspect this is because the workflow went into error... it didn't get a
chance to save the document.

And yet, if I run the workflow without the extra GENERECINSTANTIATE step,
it works fine.

Does anyone have any idea what the problem is? Could it be that a 'COMMIT
WORK' needs to be done before trying to instantiate the new object? Is
there a workflow step for doing that?

Or am I just being stupid. Is there a much easier way to attach an object
to a workflow via a background step?

merci
Paul Bakker
Brisbane


******************************************************************************************************************************************************


Only an individual or entity who is intended to be a recipient of this
e-mail may access or use the information contained in this e-mail or any of
its attachments.  Opinions contained in this e-mail or any of its
attachments do not necessarily reflect the opinions of Queensland Treasury.

The contents of this e-mail and any attachments are confidential and may be
legally privileged and the subject of copyright.  If you have received this
e-mail in error, please notify Queensland Treasury immediately and erase
all copies of the e-mail and the attachments.  Queensland Treasury uses
virus scanning software.  However, it is not liable for viruses present in
this e-mail or in any attachment.

******************************************************************************************************************************************************


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug






More information about the SAP-WUG mailing list