on 2013 Apr 17 2:13 PM
hi All,
I have a scenario in which my sender sends a flat file and i need to check in the interface determination if the first four characters is the plant value. Based on that i need to route it to a different mapping.
I am aware of a solution in which we can use a basis receivers mappping in which we can set a variable binding which can be checked in the interface determination.
But I have seen a few cases like
"/p1:FlatFile/LIST[(starts-with(" XXXX"))]" in the condition with EX operator and empty on the RHS.
If we can use this, the effort would be much reduced. Please let me know how to do this in case of flat files if possible.
Regards,
Ninu
Hi,
I don't think having a flat file will cause you any issues. You will be having file content conversion for converting it into an XML for mapping right?? You can have the condition on the field which you are converting from the flat file.Are you facing an issue with the config??Can u consult the below link for customizing XPATH:
http://wiki.sdn.sap.com/wiki/display/XI/Xpath+Condition+in+Receiver+Determination
http://wiki.sdn.sap.com/wiki/display/XI/To+Exist+Or+Not+to+Exist+is+the+Question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Thanks for your comments.
Please note that mine is a special case in which there is no content conversion in the channel. Instead only when the file reaches the mapping there is a java code to convert into xml and map.
So it means, i need to do a condition checking on a FLAT FILE and not on an XML.
REgards,
Ninu
Hi Ninu,
Unfortunately this won't work. XPATH needs a properly formed XML document as input so a text stream input is not suitable.
My suggestion would be to use Content Conversion to at least just split the document into a flat XML structure like below:
<Document>
<Line></Line>
<Line></Line>
</Document>
You can then use an XPATH expression in the interface determination like:
//Document/Line[starts-with(.,'search string')]
Regards,
Nick
Hi Ninu,
Once you have come up with the XML and determining logic, you can do multi-mapping as the next step.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ninu,
I think you can go for CP(contain pattern) option for condition
ex. your plant no is start with 1234
you just give condition like 1234*
check my blog for more information that may help you
Regards
gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.