10-07-2008 10:08 AM
Dear all,
I need to trigger an outbound Standard IDoc - ORDRSP. The scenario is described blow.
System-A gets an inbound IDoc from System-B. Based on the information in this IDoc, an SO is created in System-A. Once this SO is created, automatically a Delivery Block is set. This block is then manually removed.
Now, the requirement is when this Delivery Block is removed, an IDoc - ORDRSP - should get triggered.
Second requirement is, if values of any of the fields of SO: delivery quantity,Ordered quantity & Confirmed quantity is changed, an IDoc should be resent - multiple times.
What is the solution? Can the settings be done through output type (NACE/SPRO)?
10-07-2008 1:48 PM
Hello,
Here is the Step by Step procedure to Trigger the ORDRSP Idoc.
1. Configure the Output Type using the Transaction VK01 in which you can define Access Sequences & Output Type.
3. Maintain Partner Profiles for the ORDRSP Message Type & for the IDoc Type ORDERS05.
4. Maintain Condition Records for the Output Type using NACE Transaction.
5. If required, you'll have to write Code in the Transaction VOFM in which you'll check some Conditions whether the Delivery Block is removed. If it is, then Set the SY-SUBRC = 0 else SY-SUBRC = 4.
6. The Outbound Function Module IDOC_OUTPUT_ORDRSP will be already assigned to the Process Code SD10.
7. Just maintain Condition Records & Partner Profiles and the IDoc will be generated Automatically.
Hope this was helpful.
Thanks and Regards,
Venkat Phani Prasad Konduri
10-08-2008 11:18 AM
Dear Venkat,
Thanks for the detail steps :).
But this has solved only the 1st problem.
My seond problem is the IDoc should be triggered MULTIPLE TIMES, if following fields in the SO are changed:
1. Delivery quantity
2. Ordered quantity
3. Confirmed quantity
How can this be done?
Abhishek.
10-08-2008 12:48 PM
10-08-2008 1:39 PM
you have to use output type definition.
1. goto SPRO
2. goto outputtype definition for sales orders
3. look for changedocument reportname and form-routine.
4. we20 -> partnerprofile -> outputcontrol -> put flag at changedocument
maybe it´s useful !
10-09-2008 6:33 PM
Hello,
If you would like to Resend the IDoc whenever some of the Fields in Sales Order change, then you can go for defining an Output Requirement Routine in which you'll have the values in Communication Structures. Also, look for XVBAP & YVBAP Structures in which XVBAP will have the Old Values & YVBAP will have the new Values before they are updated in SAP Database. You can compare the two structures and if there are any Changes in the Quantities or any other fields that you want in your requirement, you can set the SY-SUBRC value to 0 which will trgger the Output Type & the IDoc.
Go to the Transaction VOFM and under Requirements -> Output Control, define a Routine in which you'll have to check the Communiction Structure KOMPBV1 in which you'll have the Current Values. Assign the Requirement Routine Number to the Output Type / Output Determination Procedure.
Option - B : Go to the include MV45AFZZ in the Standard Sales Order Program in which you can validate the Old & New Values in the XVBAP & YVBAP structues.
Hope it was helpful.
Thanks and Regards,
Venkat Phani Prasad Konduri
10-13-2008 8:53 AM
Dear Venkata,
The fields that I need to Check are from VBEP table - Schedule Lines level - VBEP u2013 EDATU (delivery quantity) , VBEP u2013 WMENG (Ordered quantity) & VBEP u2013 BMENG (Confirmed quantity).
Is there any structure like XVBAP for VBEP table as well? Which progroam/Exit/Routine will I have to use for this?
Regards,
Abhishek Thodge.
10-13-2008 9:53 AM
Hello,
For all the Structures / Fields / Tables associated with the Sales Order, you'll have the X & Y Structures. Some of them are,
XVBAK & YVBAK
XVBAP & YVBAP
XVBEP & YVBEP
XVBKD & YVBKD etc.
Thanks and Regards,
Venkat Phani Prasad Konduri
10-13-2008 1:55 PM
Dear Venkata,
Thank you so much for your replies.
My SD Consultant created Z Output type for me. I attached 'Change Output' routine to this. This has solved my 1st problem.
I used KOMKBV1 structure to check if the value of delivery block flag is changed, and if it is then if the flag is initial. If this is the case then it means that delivery block is removed and I set sy-subrc = 0 and the IDoc is triggered.
On the same lines, I tried to use the strucure KOMPBV1 structure to check line item data. But the structure was empty. I manually added my Z output type for SO items, Now sometimes the structure is having line item data & sometimes it does not have any data.
What can be the reason for this?
Best Regards,
Abhishek.
10-13-2008 5:30 PM
Go to the transaction NACE,
Select the required output type and double click on it.
Output Type details will be shown.
Go to chnage mode and CHECK(Select) the MULTIPLE ISSUING checkbox. This will allows you to issue the same output multiple times For E.g; if you have done a change to the item of a sale order.
Regards,
Kiran Bobbala
10-14-2008 8:15 AM
Dear Kiran,
I have already done the said thing. The IDoc is getting triggered multiple times, so taht's not a problem.
The problem is, in my CHANGE ROUTINE in NACE, values get reflected only for Header structure - KOMKBV1, but not in Item structure - KOMPBV1.
If this structure gets filled with the SO item data at runtime, I can check some fileds and conditionally trigger an IDoc.
10-14-2008 9:11 AM
Hi
In NACE, General Data Tab, Fill
-->Program: FM06AEND
-->Form Routine: CHANGE_FLAG.
And Check
-->Access to conditions
-->Multiple Issuing
And in WE20, Message Control tab,
Create another entry (copy of the previous entry V1 BA00 SD10 [v]) with CHANGE MESSAGE field Checked.
11-17-2008 8:21 PM
Hello Asik,
I was reading your response to Abhishek's question. I have the same issue. I want to automatically trigger BA00 when something on the sales order changes. I have configured the partner profile with 2 BA00 records - one with the change checkbox checked. In NACE I have checked Multiple issuing and put in the Change program FM06AEND and form CHANGE_FLAG. However, when I change the sales order (increase quantity) I don't get any idoc at all. I tried to put a breakpoint in CHANGE_FLAG but it doesn't stop there (should it?). We are on 4.7 - does this functionality still work for 4.7?
Thank you for any suggestions.
Joy Mills
11-17-2008 9:17 PM
Hello Asik again,
Nevermind. For some reason everything is OK now. Don't know what happened.
Thanks anyway!
Joy Mills
01-14-2011 4:24 AM
Hi Abhishek,
I have also the same requirement as your's first requirement - trigger order response when delivery block is removed in SO.
Which requirement routine have you used to resolve the issue, standard 450 routine(Check delivery Block) or have you created a custom routine?
Please let me know.
Regards,
Sravan Guduru.