cancel
Showing results for 
Search instead for 
Did you mean: 

SWW_WI_START_SIMPLE and BOR-objects in container

Former Member
0 Kudos

Hello,

i want to start a customer-workflow with BOR-objects in the container.

after reading several threads here i made it so far, that the WF is triggered and the first task is started. But the parameters dont reach the input fields.

When i try the WF in transaction SWDD i need to enter 2 parameters obligatory BUSINESSPARTNER and ISUACCOUNT and they are BOR-objects.

I tried to fill the container that simple way:

swc_create_object o_isupartner 'Businesspartner' o_isupartner_key-partner.

move: 'BUSINESSPARTNER' to CONTAINER-element,

            '90' TO CONTAINER-ELEMLENGTH,

            'o' TO CONTAINER-type,

            '0080000008' to CONTAINER-value.

           append CONTAINER.

           CLEAR  CONTAINER.

when i do this, the workflow is triggered, but nothing happens.

when i add (first time accidently) a letter in front of the container-value the first task starts, but like mentioned, the businesspartner doesnt reach the input-field. ISUACCOUNT i foll the same way, but there no letter is needed to start the first task, but the value doesnt reach the task either.

MOVE: 'BUSINESSPARTNER' TO container-element,

            '90' TO container-elemlength,

            'o' TO container-type,

            's0080000008' TO container-value.

APPEND container.

CLEAR  container.

Now I'm pretty confused.

I'm thankful for every hint.

Cheers Martin

PS:

I tried SAP_WAPI_START_WORKFLOW filled with

ls_container-element = 'BUSINESSPARTNER'.

ls_container-value   = '80000088'.

APPEND ls_container to container.

but it says the object type and value for element BUSINESSPARTNER are missing (translated from german)

But i only have element and value... where should i put the object type? and why does it say, the value is missing?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for the reply

All the given BOR I have considered are used in the WF, and are Created, Changed, Deactivated...

But i have to create an installmentplan and these events are... too late.

Would it be a solution to create a simple BOR with an Event, enter this into the Trigger Event-Tab in the WF and trigger that event in ABAP?

Cheers

Martin

sbl
Active Contributor
0 Kudos

Hi

I agree with workflcow should only be started with event.

An event is linked to an object (BOR or CL )

You can build your own event if you want to .

If you need two different BOR in your workflow, well you can have one as lead (and so this is the one linked to the event, it should be the only import mandatory BOR in your workflow)

And you can use the SAP provided task for BOR :SYSTEM Method GENERICINSTANTIATE

( use task 1200240)  to generate and assign the second BOR object to your container

Cheers

Stephane

Former Member
0 Kudos

Hello,

i had to d another short term task, so i wasnt able to continue here.

I have atm a problem. i dont have a transport to add the starting event to the workflow, but im on it.

But i wanted to ask you something to my initial question:

i debugged till container is completely prepared for the Workflow and when I try it in SWDD the container in the class CL_SWF_RUN_WIM_FLOW in method _EXECUTE contains my data in a structure type SIBFLPORB and my structure type is SWOTOBJID. I think this comes from

'o' TO container-type,

that i got from here:

Maybe this is the problem. Do you know, how I can get the SIBFLPORB?

Cheers Martin

ronen_weisz
Active Contributor
0 Kudos

A few points:

  • Workflows should be started by events, not directly.
  • There usually is one main object, for example if I want to start a workflow for a loan request, I might have another object in the workflow for the employee, but my process is loan approval. The main object instance should be transferred from the event binding. As for creating the second object (the employee in this example) - you can create it as an attribute of the main object.  
  • Don't use 'move' for setting container elements, there are macros: swc_set_element contianer 'element' 'value'
Former Member
0 Kudos

Hi, thank you for your Information.

i have to admit, that i am new to workflows, so I am in the... experimental phase. I got my code snippets from boards till i got it to "work".

I'll check the Events again, but from the names i have seen they are not suitable to start the werkflow, because they look all like they are set after the first task.

The workflow is used in the CIC and can be found started in the transaction ENVD. Is that an information, i can use?