cancel
Showing results for 
Search instead for 
Did you mean: 

read and set BOR-attribute / WF_INITIATOR

Former Member
0 Kudos

Hi,

how is it possible to read WF_INITIATOR (oder BOR-attribute) within BOR-method and append it in a container table element?

Any idea.

Thanks in advance.

Michael

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I think I see two scenarios here - either you want WF_INITIATOR or an attribute of a Business Object.

First WF_INITIATOR is not the same type as SOXNA-FULLNAME, so you have some work to do to get a full name from WF_INITIATOR. You have to strip off the first two characters to get the User Id, and then from the User Id you have to look up the full name.

But before that, create in import parameter for your method, same type as WF_INITIATOR, and simply bind WF_INITIATOR from the WF Container to the Task Container (of the Standard Task of your custom method).

Then just translate it to a full name.

If its the attribute of the business object you want, then is it safe to say that for your statement

swc_get_property object-materialobject 'UserName' v_user.

that object-materialobject is not SELF and that it was also instantiated earlier.

If object-materialobject is really SELF then use that object reference in your SWC_GET_PROPERTY statement, otherwise you need to create an instance of it before using it.

Oh, and another thing, it appears that there is a type conflict between v_user and OBJECT-RECEIVER. Was that your intention.

Hope all this is relevant . . . Apologies if not.

Tom Carruth

Former Member
0 Kudos

Hi,

There is a element WF_Initiator in containor already so you can bind and pass it to the method where you want update...

or any thing else you are looking for ?

Best regards Dev..

Former Member
0 Kudos

Hi,

but how can i do this? My object is a copy of MSEG.

...

data: v_user like mkpf-usnam.

swc_get_property object-materialobject 'UserName' v_user.

append v_user to object-receiver.

SWC_SET_TABLE CONTAINER 'Receiver' OBJECT-RECEIVER.

...

I tried the above code but it doesnt work. RECEIVER is a attribute (data: RECEIVER TYPE SOXNA-FULLNAME OCCURS 0).

Michael

Former Member
0 Kudos

Hi,

you have no need to bind from metnod to task you can find initiator id at task container directly.

Regards,

Purvesh Patel.

Former Member
0 Kudos

hi,

i donno why you want to do this way. It's very simple to do the Binding of WFINITIATOR cont. element from Wflow container to the task container that you are using to execute your method. And then in the method, use

"SWC_GET_ELEMENT container "Initiator" l_wf_init." statement.

Hope this helps

venu