cancel
Showing results for 
Search instead for 
Did you mean: 

Condition in Interface Determination based on TimeSent

former_member197445
Contributor
0 Kudos

I understand the basics of the Condition specification of the Interface Determination to send messages to different Operation Mappings based on the condition.  The twist with my dilemma is that I need to send it to different mappings based on time of day.  During off-business hours, I want to send it to one mapping and to a different mapping during the day.

There is no time stamp of any kind in the payload.  The payloads will not be different in any way during the two time periods.  Is there a way to evaluate the time during Interface Determination?  Should I be going about this a different way entirely?

Thanks, everyone!

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>During off-business hours, I want to send it to one mapping and to a different mapping during the day.There is no time stamp of any kind in the payload

Simple Suggestion: Why dont you handle using UDF in the mapping about this? Just an example

You can get the current time and see whether it is AM or PM and decide the mapping structure accordingly.

Example:

Refer this link

http://www.roseindia.net/java/example/java/util/currenttime.shtml

You retrieve value from the class Calendar.AM_PM.

If the value comes 1 then it is PM, otherwise 0 then it is AM.

Hope that helps

Note: Since PM also occurs in the afternoon, you can write logic to read the hour and PM or AM value. Accordingly you can decide the mapping for the off and peak business hours.

former_member197445
Contributor
0 Kudos

OK, I like that idea.  How would I then branch in the mapping to two different receivers/targets based on this time determination?

former_member184681
Active Contributor
0 Kudos

Hi,

Use the multimapping without BPM (so called mapping-based message split) to decide on the target structure at the mapping step. This way, you can use any condition that can be checked using mapping functions or UDFs to decide, including current date and time of course. Find more details on the concept here:

Regards,

Greg

baskar_gopalakrishnan2
Active Contributor
0 Kudos

The other downside of this approach is though you have same target structure, you have to treat like two different target structure. Basically you have to do enhanced interface determination. Two inbound interfaces in the operation mapping.

You might want to see this link for enhanced interface determination. THis is one approach.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

rajasekhar_reddy14
Active Contributor
0 Kudos

1)Use multimapping with out BPM concept.

OR

Develop two different interfaces and schedule sender adapter accordingly.

Best Regards,

Raj

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi,

Like Raj, as far as i know the condition editor only accepts payload tags,  the context objects are finally a payload tag also. The only way that i think now is changing the payload with a field with the timestamp.

Regards and good luck..

rajasekhar_reddy14
Active Contributor
0 Kudos

As per my knowledge it is not possible at Interface determination level.