cancel
Showing results for 
Search instead for 
Did you mean: 

How to put a dependency check

Former Member
0 Kudos

Hi,

suppose we are receiving event message from three different sources.

X from A'

Y from B

Z from C

and Z event message is evaluated as per the parameters received from event message Y.

So In this case, how can we put a dependency check that Z event message will only get processed, after Y event message is received in the system.

Regards,

Ratnakar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ratna,

Yes we can do that.

1. First, group those events in Expected event profile and make relative to Unique Event e-g check LTL_EE_OCEAN Expected Event profile

2. Config as per Vishnu suggestion IS_EVENT_REPORTED to check previous event and then if it is success.

3. Create custom activity function to retrieve param value from Y event message and perform validation.

4. If it is successful, then process Z event message.

Few challenges on this:

1. If you don't receive Y event message on time or never send and Z message comes into the system  before Y, then Z message will fail.

2. If parameter missing Y event message and Z message will fail as it checks dependency.

We had faced many issues in one of the project when made dependency and found most of the time previous events were not sent on time or never reached system due to many reasons.  At the outset, we forced to post Z though Y was not reported.

Regards

GGOPII

Former Member
0 Kudos

Hi all,

I thought..there might be a simple way to achieve it like partner check, location check or data check in the expected event profile.

Just like all event message will remain unprocessed , till corresponding event handler will get posted..

In the similar fashion, isn't it possible to keep an event msg in the unprocessed list till another event message arrives .. just thinking out of the box

Regards,

Ratnakar

Former Member
0 Kudos

Hi Ratnakar,

Once BAPI*MSG*POST is called to post event, we can only play around pre-processing section ( define criteria for message processing ) and ruleset.

Can you put somekind of pre-check in middleware before posting the events, assuming you have middleware?

If not, then ruleset is your best friend. Since you want something like "event remains unprocessed", the closest you can get is locking the event itself using Ruleset activity STOP_PROCESSING with parameter LogAsLocked = 'X'. Then your job /SAPTRX/PROCESS_LOCKED_EHS will pick it re-try at a later time depending on your job frequency.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Ratnakar,

In your ruleset, do the following:

1) Create a Rule Condition with Event Id = 'Z'

2) Create a multi-task activity which checks for Y and if not true, quits the processing of Z

3) Create a rule with the above condition and multi-task activity in your ruleset.

Additionally, you can use locations/senders/partner/dates to filter further.

Also, once you stop Z from processing, you need to make sure you have the ability to re-process or resend the Z from your source system.

Thanks,

Vishnu

Former Member
0 Kudos

You can also use buffering technology for Y and Z events and process them later using /SAPTRX/MI03.

Only thing you need to make sure is impact to the subsequent events and their overall updates to EH if you just make Y and Z as buffered events.

Thanks,

Vishnu