Regarding Conditional Interface Determination
Hi All,
I need small confirmation on behavior of conditional interface determination,
My source message is like below
<?xml version="1.0" encoding="UTF-8"?>
<PROS_CustInfo><Structure>
<name>ABC</name>
<data>100</data>
</Structure>
<Structure>
<name>XYZ</name>
<data>101</data>
</Structure>
</PROS_CustInfo>
I am having 2 Receiver RFC messages for same receiver.
If name=ABC then i need to send this data(ABC, 100) to first RFC by using 1st mapping else
if name=XYZ then i need to send that data(XYZ,101) to second RFC by using 2nd mapping.
But in my message name contains ABC and XYZ also. Now how conditional interface determination bahaves. Will it execute 1st mapping or 2nd mapping or both.
If you find any related post please share.
Thanks,
Madhusudhan
Hi Madhusudhana,
because of the problem, that only one condition can ever be true at runtime, you can avoid this by using count function. Because you can't build a Statement like count(xy) > 1 with ExpressionEditor of SAP PI, you have to use this expression with SAP PI:
/PROS_CustInfo[count(Structure[name='XYZ'])>=1] EX
This condition works on whole document.
Regards,
Alex
Edited by: Alexander Kirsch on Feb 16, 2010 4:43 PM
Edited by: Alexander Kirsch on Feb 16, 2010 4:45 PM
Similar Messages
-
Conditional Interface determination
Hi All,
I had a requirement for conditional interface determination...
Im using this blog
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID0462124050DB00225564311988524100End?blog=/pub/wlg/2973
In ID under interface determination...when I begin to add another interface..I do not get the condition tab??
Any idea y?..has ne one experienced such a strange scenario?Hi Ravindra,
Even I face the same issue.
But I always save the interface determination after adding the second row, and then only I will be able to see the condition column for the two rows added.
Regards,
Supriya. -
Conditional Interface Determination with Flat Files
Hello,
I have one sender interface (dummy) which could either hold a flat file or an XML file. On receiver side there is one system with two receiver interfaces, one should be used for the XML structure and one for the flat structure.
My requirement is to have a conditional interface determination with an (exclusive) OR logic. Pseudo code:
The XML structure has "submission" as root node. So I use the condition (/submissioin) EX to determine whether it is an XML file and I check with not(/submission) EX to determine whether it is a flat file. However the condition does not work using a flat file ("Unable to find an inbound interface"). Could it be, that the conditional expression never is true in case a flat file arrives? How can I achieve this requirement?
What I additionally do with the flat file is just calling a Java Mapping that sets dynamic attributes for a file receiver, the flatfile itself is dumped on a file system without any addtional conversion logic.
Thank you for your advice.How can I ingnore a message in case a condition applies? I am just aware of the fact that you can ignore messages in case NO condition applies.
Couldn't you simply reverse the logic and use "not equals"? Or perhaps you can use the EX operator to alter your conditions... here is more info on the EX (exists) operator
Re: ConditionEditor: Check if element is empty
What is best practice in this case? Should I use a "dummy receiver"? However if I use a dummy receiver I think I would receive a "interface determination not found" error. How would you do that?
I've never found the need to work with dummy receivers so I cannot comment there. -
Enhanced and conditional interface determination, :
Experts ,
can you giv me some link/ examples of Conditional interface determination and Enhanced Interface determination.
Pls dont send me teh below link!
http://help.sap.com/saphelp_nw04s/helpdata/en/42/ed364cf8593eebe10000000a1553f7/frameset.htm
many Thanks
Arnab MondalHI,
U can refer this threads of same discussion:
Re: Condition In Receiver Determination Not Working
purpose of Enhanced Receiver Determination
Then refer this blogs:
Illustration of Enhanced Receiver Determination - SP16
SAP NetWeaver Process Integration: Enhanced Receiver Determination for Synchronous Scenarios -
Condition Based Interface Determination in ICO (AAE) - PI 7.1 EHP1
Hi Friends,
We have PI 7.1 EHP1 - SP 04.
In our scenario, we have 1 outbound interface and 2 inbound interface. Based on condition, it needs to select the first inbound interface or second inbound interface.
In the normal configuration, we are able to select. (By click + icon and add condition in the Receiver Interfaces in Interface Determination Step)
When we create configuration using ICO (Integrated Configuration), there is no option in "Receiver Interfaces" Tab to add two inbound interfaces with condition.
Could you please clarify how do we do this in ICO?
Kind regards,
Jegathees P.IMHO, condition based interface determination is not possible in ICO.
Use Multiple inbound service interfaces... You can handle in design level .. ESR level.
Check the Abhishek's blog... This might be helpful.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?quicklink=index&overridelayout=true
Note: Since in your case you need two receiver agreements, you cannot handle through ICO. The above link might be helpful to do multimapping without BPM.
Edited by: Baskar Gopal on Apr 26, 2011 9:53 AM -
PI 7.1 Condition in interface-determination
Hi everybody,
I want to process interface determinations depending on payload. But when opening the condition editor in interface determination, the interface on which to apply the condition is not obtained!
What could be the reason?
Thanks
Regards MarioHey Mario .. that's a bug. Thanks for pointing this out. Never noticed till now
Regards,
Neetesh -
XPATH to determine node name in condition of Interface determination
Hi,
does anybody out there know whether one can use a condition such as "name(/p1:Envelop/p1:Body/*)" to retrieve the name of the first element underneath the Body structure which is usually the payload. In the example below. I'd like to retrieve "ns0:BAPI_USER_GET_DETAIL" or just "BAPI_USER_GET_DETAIL" which I would like to than compare in my "=" condition.
<?xml version="1.0" encoding="iso-8859-1"?>
<sap:Envelope xmlns:sap="urn:sap-com:document:sap" version="1.0">
<sap:Header xmlns:rfcprop="urn:sap-com:document:sap:rfc:properties">
<saptr:From xmlns:saptr="urn:sap-com:document:sap:transport">BC1</saptr:From>
<saptr:To xmlns:saptr="urn:sap-com:document:sap:transport">BC2</saptr:To>
</sap:Header>
<sap:Body>
<ns0:BAPI_USER_GET_DETAIL xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<CACHE_RESULTS/>
<USERNAME>bauerd</USERNAME>
</ns0:BAPI_USER_GET_DETAIL>
</sap:Body>
</sap:Envelope>
I have a client that once to migrate his SAP BC interfaces to PI without having to change the sending application which is a CICS mainframe application. The mainframe application invokes various BAPI's by just passing in a different payload into the above envelope. The payload is always the request structure for the BAPI. The message is send synchronously to SAP BC which than calls the BAPI and returns the response to the caller, again in form of the above envelope and as payload the BAPI response structure.
To convert this to PI I have to be able to initiate different interface mappings depending on what BAPI is requested. This is pretty straight forward as there are no special mapping transformation taking place in SAP BC for both the BAPI request and response. However I need to determine what interface mapping to call depending on BAPI requested by the CICS application.
As said the customer does not want to change the sending application. The only part we are allowed to change is the URL which changes from SAP BC to the SAP PI Plain HTTP sender adapter. The post will always use the same outbound message interface. Therefore I can't use SAP PI's standard receiver determination. Using this adapter I will also be able to get access to the whole message envelope as outlined above.
I already got all of this working nicely with the exception that I can't determine what BAPI is requested and therefore what interface mapping I have to trigger in my interface determination.
Has anybody used a condition as above and if so how should it look like in the condition editor. The one outlined above does not seem to work. However it is also not failing in PI.
Also I don't want to change my approach for doing this. However if it is not possible to retrieve the node name using the xpath statement (as outlined above) in the condtion editor than I will have to look for a different approach to resolve this problem. Any suggestions would than be more than welcome.
Many thanks in advance.
DieterIf the structure is not too big, you can use:
//ns0:BAPI_USER_GET_DETAIL EX
otherwise take the full path:
/p1:Envelop/p1:Body/ns0:BAPI_USER_GET_DETAIL EX
The namespaces have to be declared.
Regards
Stefan -
Condition based Interface determination
Hi ,
Environment : PI 7.1.
Scenario : File to Proxy.
In this scenario , We have a single file interface which reads a file and routes the data to two different inbound interfaces.
Steps followed to do this -
>>Defined two inbound interfaces interface1 & interface2.
>>Both interfaces are pointed to same ECC system.
>>Read the file using a single sender file communication channel.
>>Define receiver ECC in the receiver determination.
>> Define interface determination based on a value of a field in the file structure(source structure). Used XPATH to define this content based routing and selected operation mapping specific to the interface.
1 sender agreement
1 receiver determination ( not using enhaced receiver determination because we have only one receiver)
1 interface determination which has two receiving interfaces based on XPATH condition ( maintain order runtime is checked)
2 Receiver agreements.
2 Communication channels.
For example if you have 10 lines in a file , out of which if 5 lines has a value related to interface 1 & 5 lines has a value related to interface 2. It should push the data into two different proxies as configured.
We are facing a problem in this scenario -
There is no consistency in the logic. Some times it runs interface 1 & some time it executes interface 2.
based on condition 1 it routes the data to interface 1 successfully but the structure is not getting created for interface 2 so it is giving an error stating the interface 2 structure is not available.
In SXMB_MONI the branching steps show two subnodes but if you see the log it shows that in subnode 1 the sender is sender interface & the receiver is interface 1 based on the filter condition. If you see the log for subnode 2 then it shows the sender is sender & the receiver as interface 2 below that it shows another entry which shows the reciver interface is interface2.
Please evaluate and let us know if the approach we are following works or not. If there is any limitations please let us know how to achive this.
Regards,
ReddyHi,
Your design is correct but here you missed one point. Here the message is send either to receiver1 or receiver2 depending on the condition but not both. As this does not result in multiple messages with the same payload because only one condition can ever be true at runtime. For more details see the below link
http://help.sap.com/saphelp_nw04/helpdata/en/46/8015de950e6be3e10000000a155369/frameset.htm
If you want to create multiple message then you need do 1:n mapping :
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID2056393550DB10021342992851308291End?blog=/pub/wlg/2927
Shweta. -
Interface determination condition
Hi Experts,
I am working on File to IDoc scenario, where I want to send IDocu2019s based on source data, in flat file if order number exists then I have to send MATMAS idoc , if order number does not exists then I want send DEBMAS.
I developed 2 mapping programs and checking condition in Interface determination to check order number exists or not.
i wrote below conditions in Interface determination and not working for multiple Orders
MT_Invoice /Order/OrderNum EX u2013 to check order number exists or not.
MT_Invoice /Order[not(OrderNum)] EXu2014to check order number not exists
My Source Structure after file content conversion looks like below
<Order> 1..unbounded
<CustomerID>
<MaterialID>
<OrderNum>
</Order>
Regards,
JAMHello,
The Interface determination condition will not filter the payload data. It can only determination whether a particular condition is true or false.
If any valid condition occurs, complete payload will be passed to the respective Interface and mapping will be executed accordingly.
Currently in your case I guess both conditions are getting satisfied for multiple records in payload.
I think you need to implement the filtering logic in message mapping using the concept of multi- mapping.
Refer blog: /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
The mapping will contain 2 target structures with occurance 1...unbounded i.e. Matmas and Debmas for your scenario.
You need to apply filter logic on header nodes in the mapping.
Or you need to process single records in the payload.
-Rahul -
Wildcard in interface determination condition
Hi Folks,
I tried the following condition in setting up the condition in Interface Determination, but it is not working:
Condition: /Document/Type = addLoad*
The source field has this sample [email protected]
I only need the "addLoad" and the other data that comes after the "@" changes in every transaction coming in to XI.
Your advise is very much appreciated. Thanks!
Regards,
LexHi,
Try using Contains Pattern operator instead of '='.
Condition: /Document/Type ~(contains pattern operator) addLoad*
refer the below link
http://help.sap.com/saphelp_nw04/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/frameset.htm -
IDoc to file- How to include conditions in Interface determinations
Hi,
In interface Determination i am trying to add the conditions based on IDoc structure field value. But when i clicked on Condition editor i don't find Idoc stucture in editor XPath.
Please suggest me how i can add the condtions in the Interface determination in IDoc to file Senario.
Thanks in Advance...
Regards
SreeniHi Sudhir,
I have tried as you mentioned, but still its not working. Below i am providing my inbound payload.
Could please let me know how i have to mention in condition editor to refer the IDoc field
ZGHIER01/IDOC/Z1GLHIERH/SETNAME
<?xml version="1.0" encoding="UTF-8" ?>
- <ZGHIER01>
- <IDOC BEGIN="1">
+ <EDI_DC40 SEGMENT="1">
- <Z1GLHIERH SEGMENT="1">
<CATEGORY>GLHIER</CATEGORY>
<SETNAME>PEGPL_AG</SETNAME>
+ <Z1GLHIERD SEGMENT="1">
+ <Z1GLHIERI SEGMENT="1">
+ <Z1GLHIERI SEGMENT="1">
+ <Z1GLHIERI SEGMENT="1">
+ <Z1GLHIERI SEGMENT="1">
</Z1GLHIERH>
</IDOC>
</ZGHIER01>
Thanks & Regards
Sreeni
Edited by: Sreenivasulu Reddy jonnavarapu on Dec 12, 2008 10:39 PM -
Configuring conditions in Interface Determination
Hi,
We have a scenario where the Message has to be sent to 2 different business systems(say BS1, BS2). with in one business system(BS2) we need to send the message to 2 different locations based on the Value we received in the Message.
For the above Scenario we have developed a Receiver Determination with 2 receiver systems(2 different business systems BS1,BS2)
As part of the Interface Determination
for 1 business system(BS1) we have a single Interface Determination(ie 1 configured Inbound Interfaces) .
in the 2nd Business system(BS2) we have 2 configured Inbound Interfaces and have a conditions added to that.
While we execute the Interface with a Message (end to end flow) The message is going through BS1 where as in BS2 if any of the conditions failed(OR Condition), the message is not getting routed to any of the locations in BS2.
If we see in SXMB_MONI the message is getting branched and were able to see one message successfull and the other Message in(for the flow in which the condition is successful) "Message being Processed".
Thanks in advance.
GaneshHi,
Check some links,
/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm
http://www.w3schools.com/xpath/default.asp
http://www.w3schools.com/xpath/xpath_operators.asp
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
/people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service
Regards,
phani -
Interface Determination Conditions
Dear All,
I have 2 different mappings. My source XML contains a "NAME" field. If this name field is having some value then mapping 1 should get executed. But if "NAME" field does not exists in source XML then mapping 2 should get executed.
Note that in second condition NAME field itself is not there in Source File.
As I want to change mapping depending upon source payload, I am using Interface determination. Here I have added two interface mappings. But I am not able to give the conditions. I have already followed links from Help.Sap.com.
Can anybody will help me to solve this?
-Gourihi gouri,
in ID--> interface determination give two inbound interfaces. u wil then have an option to specify the condition. the left operand can be a context object or xpath pointing to ur specific field of source structure. use this to check if the node/element exists or not. if it exists then ur 1st mapping will be executed.
also see this:
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
[reward if helpful]
regards,
latika.
Message was edited by:
Latika Sethi -
Condition in Interface Determination
Hi
I have two interfaces clubbed together. The output is an Idoc and the same Idoc is sent to two interfaces. The Business Sytem is same for both receivers. The Idoc has to be sent only to both reveiver interfaces if the EKORG is one and I have put that condition in Receiver Determination and its working fine.
Now, I have two interfaces and one of the interface has an additional condition. If only a particular Idoc field has values either 12 or 20. So how do I incorporate it ? Should I go to the Configured Inbound Interfaces under Interface Determination, select the Interface and use " OR " there ?
RegardsI didn't understand how to create the OR operand
You need to make use of the Insert Group option....it is mentioned in this help link
http://help.sap.com/saphelp_nwpi71/helpdata/EN/67/49767669963545a071a190b77a9a23/content.htm
You can even enter the condition manually in the condition editor...for more info check the blog by Shabharish.
Regards,
Abhishek. -
Error while specifying condition in Interface Determination
Hi all,
I am facing a typical problem
It's a proxy to file scenario with mutiple receivers.
In the interface determination when we are trying to specify the condition, it gives the following error.
"Message interface does not exist in any software components installed on this business system".
Detailed solution would be highy helpful.
regards.
younusHi Yonus,
It seems that u have made changes in SWCV after doing the configuration.
Try out thess:
STEP1->In ID
Go to menu :--> Enviorment->clear SLD cache
Step2->In IR
Go to menu :-->Tools->Transfer from SLD->Update application component and then step 1
Step3->IN SLD
Check the the SWCV u r using is associated with the Business system u are using. Check for the checkbox for SWCV in Business System.
Sachin
Message was edited by:
Sachin Dhingra
Maybe you are looking for
-
Face time not working. When dialled it says connecting and drops immediately. When my friends calling it show connecting but it does not. Is there a problem with face time. I am in south Africa, it was working perfectly up to Easter. Please help this
-
PC to Mac Transition help!
Hi- I bought a pc about a year ago which I regret and would like to try out Mac. now I've got 3x1TB hdd and 1x60gb ssd. If purchase Mac pro would I be able to use these hdd along with rams and video card and moniter and put additional cpu. Specs are
-
Any sample code for an Extractor to read in a flat file?
Hi SAP gurus, Are there any sample code for an extractor to read in a flat file? Are there any documentation on custom coding an extractor to dump information into an info source? Are there any documentation on the pit falls and contraints using Solu
-
Reproducable Error with script SYS.I_PLSCOPE_SIG_IDENTIFIER$
Hi Oracle, I get an error when running attached script: The error message is: ORA-00603: ORACLE server session terminated by fatal error ORA-00600: internal error code, arguments: [kqlidchg1], [], [], [], [], [], [], [], [], [], [], [] ORA-00604: err
-
Faster way for Refreshing a Library Reference
Hi, I have a question for the Creator gurus: I'm developing a webapp who in turn is a presentation layer of the bussiness logic coded in some EJB's. I'm developing both components together, and when I add some Session Beans (EJB ones, not Creator one