on 02-11-2010 5:33 AM
Hi all,
I have a scenario where i have two Interface mappings between same source and target. I need to define a condition based on if a field exists, then first one should be executed and if the field doesn't exists, then second.
How should i define a condition that if field doesn't exists, the second mapping should be executed.
Can any body please suggest.
Thanks,
Kalyani.
Hi Kalyani,
To check existance of a field in Interface determination you can use Xpath.
When you configure more than one inbound interfaces in Interface determination and save it will prompt for codition.
Specify the Xpath in the left operand and select (EX) operator to check the existance of the filed inCondition Editor.
Hope this may help you.
Thanks and Regards,
Saipriya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
May be the below useful for reference...
(/p1:MT_ABC/Records/RecordType1/Data2[substring(Data2,2,1) = '0'] EX )
(/p1:MT_ABC/Records/RecordType1[substring(Data2,2,1) = '8'] EX)
There would be a 'Square brackets' as prefix and suffix of hilighted colour above...
Warm regards
Ramesh Pothireddy
Edited by: Ramesh Pothireddy on Feb 11, 2010 9:49 AM
Thanks for your replies . But this condition is not working for our requirement .
Below is our exact requirement.
Source structure is the xsd which we have imported into ExternalDefinition.This External Definition has 2 other external references(namespaces are also different).
The field which we need to check is in the external reference. This field is not visible in interface determination condition editor.
We have manually added the xpath condition in the interface determination.
1)The Xpath for EXIST condition looks like
(/p1:ABC_Responses/p1:ABC_Response/p1:ABCResponses/p1:ABCResponse/p6:Fault/p6:ID EX).
This is working fine.
2) The XPath for Not Exists condition looks like
(/p1:ABC_Responses/p1:ABC_Response/p1:ABCResponses/p1:ABCResponse/p6:Fault[not(p6:ID] EX).
This is not working.
Hope iam clear with the requirement now.
Edited by: kalyani uppari on Feb 11, 2010 10:30 AM
Hi Kalyani,
you can either copy your inbound interface (with the same message type) and put the Xpath condition into the interface determination
or make the mapping dependend from the condition. This would be very easy in case of XSL, ABAP or Java because a simple choose/when/otherwise or if / else with condition on a certain source value would struture the code. Message Mapping is more challenging because the target is basis for the structure.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalyani,
Xpath condition will help you to identify which interface mapping should be triggered among the two. Here in your case the same file can be sent to both interface mappings but based on the Xpath condition particular interface mapping will be triggered. So you need to maintain condition at mapping also.
Hope this will help. Please let me know if you need further clarifications.
Regards,
Sridhar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalyani,
May be you need this..
/people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service
Regds,
Pinangshuk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How should i define a condition that if field doesn't exists, the second mapping should be executed
last but one example from this wiki: http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.