role resolution and container binding problems

Question: Hi All,

I have written a role ( function module ) for finding the approver of the posting document . the approver should be the owner of the cost center of the line item in the document.

I did the following .

added costcenter as workflow container, also in role container.

got the cost center form the wf coatiner using the macro get_element

get the resp person from table csks by a simple query.get the corresponding user id of the person who has to approve from the custom table where in costcenter owner and userid/ position is maintained and assign them to actor_tab-otype and actor_tab-objid.

if this query results in negative Deptt manger will have to approve..

i have checked the code and syntax is ok and when checked as a function module, its returning a hard coded value of deptt manager and it may return correct values once the bindings are done properly.

can some body please let me know what exactly is the binding we are required to do and how do i pass the agent from role to workflow / task or any other inricaies involved here

thanks in advance,

Riphat.

Answer:
Hi,
If you have tested your Rule/Role and you have already defined the import elements in the role container(which you would have already done), put the rule/role in the agent determination column of the control tab. Then the system will automatically generate all binding. Even manual generatkon is also possible. There is no need of binding for actor_tab...
Regards,
Sam

Answer:
Thanks Sam.

I did it and tested the role and its working fine.

I have another pressing issue now.

I have created a multi line virtual attrribute for the object ZFIPP which will return the the attributes like item no in the document, cost center, wbs center for each line item and also one attribute for the document type which has reference to the database filed.

i have executed this at object level and its returning the line items with desired fields.

now what are the things i am supposed to do at the workflow container level? I need to capture these values in the workflow container.

when i test the workflow in 'swus' and check the technical attributes , the conatiner instance is having the current values in the multiline element 'items'. does that mean that these values are already available in the workflow container, we dont need to create multiline container element in the workflow container again?

i need to enter the value of the multi line element in the 'others' tab. when i do the f4 i dont find this 'items' multiline element there as this is an attribute of the fippid which is not a multiline element.

i have to send the cost center to the role/rule for finding the agents as each line item may have a different approver based on the cost center ?

Thanks in advance.

riphat

Answer:
hi

i wanted to give another info also.

while creating the virtual attributes i had to give 'fipp' as the reference object as i was not knowing any other object for this pupose ( in the sap help doc the reference for creating a multiline virtual attribute is taken as VBAP for sales items,i am not sure whether there is any object for document line items) and the object i am trying to enhance is fipp itself. will this lead to any problems in binding ?

thanks .

riphat.
Copyright ?2007 - 2008 www.jt77.com