on 10-17-2008 4:25 AM
Hello,
In our project we have a requirement to notify multiple buyers when PO is created. I have created a new triggering event in ZBUS2012 and developed a new WF for this notification.
Step1- PO created - triggering event.
Ste2: Get buyer from Ztable
Step3: Display PO
i have created a container element in workflow & task called 'ZUSER' of type SWHACTOR ( import,export and multiline)
in the step 2: i have implemented the below logic to get the list of buyers from ztable.
DATA: wa_ekpo TYPE ekpo,
wa_eban TYPE eban,
wa_prno type eban-ebeln,
wa_cust type zptb_cust_tb_enh,
pr_agent TYPE eban-ernam.
DATA:it_cust LIKE zptb_cust_tb_enh occurs 0 with header line.
DATA:c_frice TYPE ZFRICEID VALUE 'P-RE-FS-E-0005',
c_active TYPE c VALUE 'X',
c_zcode TYPE zcode_10 VALUE 'BUYER',
c_otype type char2 value 'US'.
DATA:zagents like swhactor occurs 0 with header line,
ZUSER like swhactor occurs 0 with header line.
SWC_CONTAINER it_event_container.
SWC_CREATE_CONTAINER it_event_container.
SELECT SINGLE * FROM EKPO
INTO wa_ekpo
WHERE ebeln = object-key-purchaseorder.
IF SY-SUBRC = 0.
wa_prno = wa_ekpo-banfn.
SELECT SINGLE * FROM EBAN
INTO wa_eban
WHERE BANFN = wa_prno.
IF SY-SUBRC = 0.
pr_agent = wa_eban-ernam.
zagents-otype = c_otype.
zagents-objid = pr_agent.
APPEND zagents.
ENDIF.
ENDIF.
SELECT * FROM ZPTB_CUST_TB_ENH
INTO TABLE it_cust
WHERE ZPTB_FRICEID = c_frice
AND ZPTB_BUKRS = wa_ekpo-bukrs
AND ZPTB_WERKS = wa_ekpo-werks
AND ZCODE = c_zcode
AND ACTIVE = c_active.
Loop at it_cust into wa_cust.
zagents-otype = c_otype.
zagents-objid = wa_cust-zuser .
APPEND zagents.
CLEAR wa_cust.
endloop.
CLEAR: wa_ekpo,
wa_eban,
wa_prno,
pr_agent.
zuser[] = zagents[].
SWC_SET_TABLE it_event_container 'ZUSER' zagents.
After this step is been executed
Step 3: task with PO display method is been called. here i have called agent expression as 'ZUSER'.
I have did all the bindings from step2 to step3. ZUSER table is not getting passed in the task. Cna you please help me out to fix this issue.
If you have any other logic to achieve this multiple agents, please pass on the info to me. I would be greatful for you. thanks
Regards,
Paris.
006-0142603230.
The requirement is not clear. If you want that all the Users will receive a workitem and all will display the PO then i recommend to use Prallelk processing in which each single notifier will receive 1 workitem and on clicking on this will display the PO> Search the forum for Prallel processing and you will get your answer.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
. thanks for the reply..yes already i have done that in my code. Issue is Binding is not happening. main issue is my agent values are not getting passed back to workflow. I did swc_set_table to pass back the value, also container is available in workflow. But when i checked it in workflow log, workflow container is not getting populated.
Is this working fine when you are executing the method in the Business Object level from SWO1
If yes then I think you need to do a object(PO:BUS2012) to object(PO:BUS2012) binding from Workflow to task. Also make sure you are using the same Business Object in both Workflow and Task which means if you are using BUS2012 then in task also it should be BUS2012 and you can refer to custom BO by delegation.
Thanks
Arghadip
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.