‎2006 Aug 31 5:14 AM
Hi GURUs,
My scenario is as follows:
SAP is receiving an IDOC from XI. I'll have to receive IDOC in SAP using option - with ALE service and processing by task, as i'll have to send various emails using workflow task.
But how to process the received IDOC from workflow to affect sales order change?
I am thinking of using the function module - IDOC_INPUT_ORDCHG to make the sales order change. But the problem is how to process IDOC and calling the function module to do the needful from workflow along with sending emails.
Thanks in advance,
Deep.
Message was edited by: Deep Chakrabarti
‎2006 Aug 31 6:42 AM
Hi,
In your process code settings give a workflow name rather than a task name. In the workflow, have a task which will link the method of either standard bus. obj. or ur zobject. In the method you`ll have to use macro coding to extract data from the idoc and change the sales order using bapi_salesorder_change. Pls remember on receipt of idoc in the agent`s box, on executing the same the idoc`s status only changes and no changes are affected onto the sales order. Thats the reason you`ll have to use your own method to change the bus. doc.
Reward if helpful.
Regards
‎2006 Aug 31 6:42 AM
Hi,
In your process code settings give a workflow name rather than a task name. In the workflow, have a task which will link the method of either standard bus. obj. or ur zobject. In the method you`ll have to use macro coding to extract data from the idoc and change the sales order using bapi_salesorder_change. Pls remember on receipt of idoc in the agent`s box, on executing the same the idoc`s status only changes and no changes are affected onto the sales order. Thats the reason you`ll have to use your own method to change the bus. doc.
Reward if helpful.
Regards
‎2006 Aug 31 7:07 AM
Hi Zapper,
thanks a lot for the helpful answer.
But let me elaborate on my process flow, so that you can help me more.
The flowchart is in this fashion :
Receive IDOC -> send mail notification for oder changes -> process IDOC/Call BAPI -> Reject? -> (if no) -> change sales order -> Send mail that orders are ready for reprocessing.
In we20 i have already added an inbound parameter with process code - ORDC, message type ORDCHG. But i'll have to use processing by task. So what's the standard message type and process code to use along with which standard standard workflow to use as identification. Or should I go for any custom process code?
Thanks in advance
Deep.
Message was edited by: Deep Chakrabarti
‎2006 Aug 31 7:44 AM
HI,
You can very well stay with the standard process code and your process code should point to a workflow. There are no standard workflow template available for ur scenario. Hence you`ll have to use a custom workflow template and you can very well use BUS2032 and ORDCHG for your application.
Now, in your workflow the flow of steps should be in the sequence by which you want the activities to flow. Every step should essentially bind a method of a bus. obj. If in your scenario, the changes in the sales order are to be carried out automatically use the BAPI else send mail to the corresponding agent and let him change the S.O. in VA02.
Reward points and be generous!!!!!!
Just kidding...
Regards