cancel
Showing results for 
Search instead for 
Did you mean: 

Conditions at Interface Determination

harish_babu5
Participant
0 Kudos

Hi guys,

I have a scenario.

We are clubbing two interfaces. It's an Idoc to File scenario. The same Idoc is sent in both cases. The Idoc is sent to an FTP server.

In first case, the Idoc has to be processed only if the value of EKORG is 001.

In the second scenariio, the Idoc is sent as it is to the receiver. There is no condition.

The receiver structures are different and both have two different Data Types.

I have created two Interface Mappings for both receivers. In ID, in Interface Determination, I have configured both receivers. It's asking for the condition. Now here the problem lies.

I don't have any condition for the second scenario. I can give EKORG = 1 for the first interface. But if I give EKORG not equal to zero then, the Idoc in first scenario which doesn't have EKORG = 1 and the second Idoc both goes to second interface.

How to solve this ? Would it work if I put condition ONLY for first and no condition for second.

Please give some inputs

Regards

Harish Babu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Harish,

This can be handled in a couple of way; however doing the way you are doing;

so first condition is if xyz = 1 and receiver name

second time do the rerverse if xyz != 1 receiver name

regards

harish_babu5
Participant
0 Kudos

Hi

I thought as much.

But the prob is if I use that condition, there is a possibility that the second interface receives both Idocs.

The first Idoc can have EKORG either one or two. If its two, then it would go to second interface. Again the second Idoc that's received will also go to that interface as it doesn't have the value one.

I am not able to get a unique condition. The issue is there is no condition in the second scenario and this is all complicated as we are clubbing two interfaces

Thanks for your reply

Harish

Former Member
0 Kudos

Harish,

a) First Scenario;

E1ABC = 001

Go to 'FTP SERVER ONE'

b) Second Scenario;

E1ABC notEQUAL 001

Go to 'FTP Server TWO'

I don't see any probelm with this?

Edited by: mimranacc on May 17, 2010 2:17 PM

harish_babu5
Participant
0 Kudos

Thanks Shabarish, mimranacc

I guess the solution suggested by Shabarish will work. I am going to do it that way !

Thanks for the input guys

Harish Babu

Former Member
0 Kudos

sorry dude but that won't work

Because you want to send to A only when the value of abc = 1 and for everything else you want it to go to B

so what will happen is everything will go to B even when value of abc is = 1

only way you can achieve what you want is:

if abc = 1 then go to A

if abc notEqual 1 then go to B

rest upto you

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Harish,

What I have understood from the query you have, that you want to dynamically send the IDOC to the different receivers checking some condition.

For the above, you have to use a field in your IDOC structure as a flag to be set ,through what you can check the necessary condition and send the IDOC to the specific receivers.

In Receiver determination part of your ID go to 'Configured Receivers' section and do the following.....

In condition one, set the value of the flag and as well as the receiver you want to receive your file.

For the Condition two also do the same process, I mean you can set a different condtion and a different file receiver.

I think answer will be helpful to you.

Thanks,

Soumen

Shabarish_Nair
Active Contributor
0 Kudos

>

> I don't have any condition for the second scenario. I can give EKORG = 1 for the first interface. But if I give EKORG not equal to zero then, the Idoc in first scenario which doesn't have EKORG = 1 and the second Idoc both goes to second interface.

for the first one give the condition as source field = 001, for the second receiver dont give any condition

harish_babu5
Participant
0 Kudos

Hi Shabarish,

It doesn't work that way

It will go to first interface when the value is 1. When the value is not one, it goes to second interface which I dont want to happen.

However, when the second interface gets executed without errors

Any input guys ?

Former Member
0 Kudos

Harish,

My answer is above there and I told you the other day it won't work. So if you don't mind can you please try what I have asked you to do.

regards,

Former Member
0 Kudos

Hi Harish,

Can you explain the requirement clearly?

If value is 001, it should go to receiver 1.

For receiver 2, whether all message will go or depending on some condition will go?

BTW, conditions shold be given in receiver determination as you have 2 diff receivers, not is interface determination?

Or is it, same receiver but depending upone value, diff inbound interface to be called?

Regards

Sushil

harish_babu5
Participant
0 Kudos

Hi Mimran

It is not what I want to be done.

If its not equal then I don't want it to go to other interface !

Hi Sushil,

I have clubbed two interfaces and its an Idoc to File scenario. Receiver is an FTP server. I don't have two receivers. The structure of receivers are different.

The first situation has a condition :

If EKORG = 2, then it should be processed by first interface. But if the value is anythng other than 2, it should not be processed by any interface..

Now the second pair does not have any condition. The idoc should be processed and sent to the secon interface without any interface.

I tried to put EKORG = 2, in Interface determination. It works fine if the value is 002 but if the value is anything other than 2, it gets routed to the second interface. I dont want that to happen

Former Member
0 Kudos

Hi Harish,

If EKORG = 2, then it should be processed by first interface. But if the value is anythng other than 2, it should not be processed by any interface

So for above case, you will specify the condision & it should serve the purpose...

Now the second pair does not have any condition. The idoc should be processed and sent to the secon interface without any interface.

I am not sure if I gt you correctly here. This is strange, in first case, you are saying that if value other than 2, it should not be processed by any other interface? (or is it that first interfaces should not be called here). For second interface, you have mentioned that that IDOC should be processed & sent to second interface so no need to give any condition, If you dont give condision, all IDOC will be delivered for interface 2.

Regards

Sushil

harish_babu5
Participant
0 Kudos

Hi Sushil,

That's were I am also confused. It's actually two scenarios clubbed together. Both are Idoc to File. The receiver is FTP Server and the inrterfaces are different.\

There is no condition for the second interface. But for the first I do have a condition. The prob is when the value is other than what is required by the first interface its going to second interface which I dont want to happen.

Harish

former_member185881
Active Participant
0 Kudos

Hi Harish

Your requirement itself is wrong.

Please think about your requirement again because what you want to achieve that not possible.

solutions given by other members are correct with respect to there understanding.

Think about your requirement.

Regards

Dheeraj Kumar

harish_babu5
Participant
0 Kudos

Hi Dheeraj,

I removed the conditions and tried it. Now I have two interface mappings under interface determination and now when I try it, the message always go to the second interface. How can that happen ?

Harish

former_member185881
Active Participant
0 Kudos

Hi

First of all your requirement cannot be achieved, its a wrong requirement.

case 1 - If you give any condition then according to that if condition is true the receiver 1 will receive a message otherwise not.

case 2 - if you dont give any dondition then each and every message will will to receiver 2.

-


Case 1 - If you give any condition then according to that if condition is true the receiver 1 will receive a message otherwise not.

Case 2 - If condition is Not equal to case 1 then receiver 2 will receiver a message only if case 1 is false otherwise not.

If there is anyother requirement and i have not understood then explain it again.

Regards

Dheeraj Kumar