cancel
Showing results for 
Search instead for 
Did you mean: 

Change Workflow-Instance-Container values

Former Member
0 Kudos

Hi Experts,

I would like to ask you how to change a value in a container of a Workflow-"Instance".

For e.g.:

I have a workflow-instance which contains a (bor-) Object "Switchdocument". This switchdocument contains also a (Bor-) Object "serviceprovider". And I would like to change the value of the parameter of "serviceprovider".

How is the relationship between the "father"-object and the "child"-object and where are the relationship saved?

I know the table "sww_cont" and "sww_contob". But these tables are not enough, aren't?

Because in the mentioned tables (sww_cont) I see the elements with their values of the container of the workflow-instance. I don't the elements with their values of the object (father-object) contained in the workflow-instance-container and also not the elements with their values of the object (child-object) in the father-object.

or (explanation as a list)

Workflow-Instance-Container:

1.element

2.element

3. Switchdocument (object) (father-object)

3.1 element of switchdocument

3.2 .....

3.3 Serviceprovider (object) (child-object)

3.3.1 element of serviceprovider <--- here I would like to change the value

I hope I explained the situation in a detail way

I apologize if I don't use the right terms!

If anyone has a hint or a way to get to the "child-object" I would be very thankfull.

Thanks a lot for your answers in advance!!!

with lovely regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

I think it is not possible to change the value of the attribute as it is key dependent or it is a constant that is evaluated using the code you have written for attribute. I will request you to may be store the value of attribute in a separate container element and then change its value.

Thanks

Arghadip

Former Member
0 Kudos

Hi all,

at first I thank you all for your answers!!!

As I understand the values are permanently saved in the subobjects. Like I said the subobject (Distributor) with the attribute, e.g. Serviceprovider in Own System = 'X' is contained in the Object Switchdocument.

That means for me that I have to retrieve the attribute of the subobject via a method for the special instance and change it, e.g. to set it blank.

I have forgotten to say that I am developing a report (se38) to change all attributes of workflow-instances with object/subobject.

As I said above in a condition step it is asked whether a "serviceprovider is in own system". if yes (means = "X") then the process has another way. And I have to change the "X" to "blank", so the workflow goes always the, in my case, second way.

For the next time, I will explain my problem in a more detail way

Thanks again.

with kind regards!

Former Member
0 Kudos

In addition:

I have to change the attribute-values of all "not-completed" workflows!

thanks a lot again.

with kind regards.

former_member185167
Active Contributor
0 Kudos

Helo,

So, is there still a problem?

To update the attributes of (sub)objects you will need to create a method to do so in the underlying tables.

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Hi,

I thank you very much for the detail information.

I hope I will be able to help other user like you

With kind regards.

Answers (2)

Answers (2)

surjith_kumar
Active Contributor
0 Kudos

Hi,

You want to read and change the container values right.

'Check the below Function Modules

CCM_BOR_WRAP_CONTAINER_GET returns the container of a CCPROC BOR object

CCM_BOR_WRAP_CONTAINER_SET sets the container of a CCPROC BOR object

CCM_BOR_WRAP_CONT_GET_ELEMENT element get from a container of a CCPROC BOR object

SWC_ELEMENTS_GET Read elements from container

SWC_ELEMENT_GET Read element from container

SWC_ELEMENT_SET Write ABAP field in container

SWC_ELEMENT_SET_NEXT Read element from container

SWC_ELEMENT_TYPEINFO_GET Read element from container

SWC_TABLE_GET Read internal table from container

Regards,

Surjith

Former Member
0 Kudos

Hi,

thank you very much for the fast answer.

I will try all given function modules.

Thank you all.

regards.

Former Member
0 Kudos

Hi Surjith and all,

oh man. I am not the expert like you. I am not able to handle with the mentioned function modules.

I only have a lot of Workflow-Instances with their IDs (TOP_WI_ID).

I thought that I use the ID and take all information from the table sww_cont for a workflow. But there are not all information. As I said the information of father-object and child-object are not contained in table sww_cont.

I also searched for functionl module which do the same job. And found for e.g.

SWW_WI_CONTAINER_READ

SWW_WI_CONTAINER_READ_OBJECTS

but as I said not all information are in.

Maybe I am not able to handle all that thing

But I am working and doing really hard to develop a report for my task.

thanks a lot!

kind regards.

former_member185167
Active Contributor
0 Kudos

Hello,

The reason why you can't find object instance attribute values in those tables is because an object is completely defined by object type and key, so there is no need to store the attributes.

You say you want to change an attribute of a subobject. Is this a permanent change? If yes, then (as I said before) you will have to write a method to do so and call it (from the workflow or anywhere else).

If the change isn't permanent then you should copy the attribute to a workflow container and just update that with a container operation.

If you're still unsure then maybe you could explain some more about the situation with an example.

regards

Rick Bakker

Hanabi Technology

former_member185167
Active Contributor
0 Kudos

Hello,

It sounds to me like you don't want to change the value of a workflow container element, but instead the value of an object instance's attribute. You'll have to find how that attribute gets its value (from a table, or a function module) and write a method to update it.

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Hi,

you are right. I want to change the value of an attribute of a, in my case, child-object in a wf-container.

This value is setting in the workflow-definition. It is setting withhin a containeroperation-step. for e.g. (wf-containerelement) spinwonsystem = 'X'. Later, this element will be asked in a condition-step. depend on the condition the workflow goes a different way.

And my task is related to all workflow instances which are in work (not completed).

As I understand you I don't have to change the container like (sww_cont). Instead I have to update the tables of the objects, which are contained in the workflow-container. is that right?

and the other question was: how is the relationship between father-object and child-object. look above please.

thanks a lot for the hints!!!

with kind regards.