Cloud for Customer Integration – Sending IDOCs from Quotes and Orders
When master data such as customer or material data are created or changed in SAP ECC, IDOCs are generated and send out through periodically scheduled jobs. For business documents such as the sales quote or sales order, the event to trigger an IDOC based outbound message is different.
For sales order or sales quotes the outbound message is generated through the SAP ECC output management. In this blog I will share with you some details on what needs to be considered setting it up.
When a sales quote or sales order is changed or created, typically documents such as a sales quote form or an order confirmation need to be send out. This is handled through the output management in SAP ECC. The output management is also responsible to generate the IDOC for the integration with C4C. There are two different scenarios/message types to be considered:
- Quote Update Confirmation (Message Type: COD_OPPT_CONF).
This message type is relevant to send a confirmation back to C4C for the following scenarios
C4C Opportunity –> ERP Quote
C4C Opportunity –> ERP Sales Order
C4C Quote –> ERP Sales Order
- Sales Order Replication (Message Type: COD_REPLICATE_SALES_ORDER).
This message type is relevant for replication scenarios
ERP Quote –> C4C Quote
ERP Sales Order –> C4C Sales Order
For these scenarios, it is now necessary to trigger the output for the relevant IDOCs in the sales quote or sales order using the output determination
Setting up the output determination for integration with Cloud for Customer:
Output Types The Output types specifies the output media in our example it is the IDOC and contains the logic to generate the output. The output type is assigned in the outbound parameters of the message type.
Message Type COD_OPPT_CONF – Standard Output Type COD1
Message Type COD_REPLICATE_SALES_ORDER – Standard Output Type COD4
In the screenshot you will recognize that an individual output type “ZBF4” has been used in the COD_REPLICATE_SALES_ORDER message type. This output type is a copy of the standard output type COD4 that is configured in the standard for this scenario. The copy of the output type was necessary in my landscape as I have multiple logical systems connected using the same scenario. When using the same output type in the message type for multiple logical systems the system is not able to determine during the output determination the right target system resulting into an error message in the processing log of the output determination of the sales order.
Hence you need to set up an individual output type for each connected logical system for that output type.
This issue does not occur in the message type for the opportunity confirmation as that message is resulting as a confirmation from an inbound message where the sending logical system is known.
The output type is predefined and can be maintained and copied in the SAP ECC IMG (customizing).
Transaction: SPRO -> Integration with Other SAP Components -> Integration with SAP Hybris Cloud for Customer -> Communication Setup -> Manually Adjust Integration Setting for Data Exchange -> Maintain Output Types
Here you can copy the standard output type
In the output procedure a sequence is maintained on which output types can be determined in a business document. The copied/standard output types need to be maintained here. In the standard setup the procedure, V10000 is extended with the standard C4C output types. In case you are using a customer specific output procedure make sure that the relevant output types for the quote confirmation and order output are added
Transaction: SPRO -> Integration with Other SAP Components -> Integration with SAP Hybris Cloud for Customer -> Communication Setup -> Manually Adjust Integration Setting for Data Exchange > Maintain Output Determination Procedure
Maintain Condition Record
In order to make the determination of the output type in a sales document effective you have to create/maintain a “condition record” for your output types assigned to the sales document types (for example OR for Order) you want the output being generated. The maintenance of the condition record is considered as master data maintenance and can be done through transaction VV11 (Create) or VV12 (Change)
SAP Menu -> Logisitcs-> Sales and Distribution -> Output à Sales Document -> VV11 Create
Output Determination when creating/changing a business document
Once the setup is complete the output determination can be checked in the business document. Following shows an example in a sales order (transcation: VA02)
Transaction VA02: SAP Menu -> Logistics -> Sales -> Order -> VA02 (Change) Navigate to Extras -> Output -> Header -> Edit
This will show the result of the output determination in that document. Here you should find your output types with a green status when the output IDOC is properly generated upon create or change.
In change mode of the sales document you can check the details of the output determination steps by clicking on the i-icon on the header line. This is helpful to find the reason why an output was not determined as expected.
Client depending customizing (such as the definition of the output types COD1, COD4) is delivered in the customer’s 000 client. Please check the following wiki to find more details on how the customizing can be copied from client 000 into the actual business client:
Great job as always !
Please add the following config as well.
IMG- Sales and Distribution -Basic Functions - Output Control
Depending if is for Maintain Output Determination for Sales Documents or for Maintain Output Determination for Billing Documents
If you can help me with condition record creation for COD1, please help here.
Anyone created a specific logic in order to filter the Sales order replication (only the one created from a SO in C4C for instance)
We would like to avoid to replicare the SO created as a follow up document