Skip to Content
0
Nov 18, 2019 at 07:35 AM

Determine order of IDOCs to be processed

24 Views

Hello all,


We integrate Hybris Marketing with SAP CRM.


The Communication between those 2 systems is done via IDOCs.
We want to create
- a) NEW lead document (CRMXIF_ORDER_SAVE_M)
- b) NEW partner (CRMXIF_PARTNER_SAVE_M)
the new partner of b) shall be linked to the document of a)

Problem is now, that

- sometimes a) is processed first, and

- references an IDOC of b) (which is not available in the CRM-System yet).


Then we get an error.
Our current solution is, that we said in transation WE20, that in inbound options
a) CRMXIF_ORDER_SAVE_M shall be "Triggered by background program" (runs every 10 minutes)
b) CRMXIF_PARTNER_SAVE_M shall be "Trigger immediately"
This works in 99% of the cases, but if the situation occurs, that a new a)IDOC is sent and the background job is executed at the same time, a) might be processed BEFORE b).
This leads to an error.

Is there any clean solution, how we could handle our problem in a better way?

Thanks for your help in advance!
Regards,
Andreas