on 01-17-2014 7:12 PM
Hi! Gurus
I need with the following routing conidtion to be applied in the receiver determination
It's a File to IDOC scenario: There are 2 fields which need to be considered out of the 10 fields coming on the XML:
Shipment_ID
WMS_ID
Requirement for Reciever Determination Filter Condition:
1. Shipment_ID ≠ 9* (All Shipment ID's starting with 9 should be filtered).
2. WMS_ID = CSA, INA, KSA, FLA, ILA
How best can we achieve this filter condition leveraging XPath under reciever determination condition option - please let me know your thoughts.
Thank you,
Ritu
Hello,
Can u try below xpath:
I am assuming that ur messge type name is MT and ur source node name is "Record"
/p1:MT/Record[(!starts-with(Shipment_ID,'9') and ( WMS_ID = "CSA" or WMS_ID="INA" or WMS_ID="KSA")] EX
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ritu,
Please check this link , it will help you in finding the solution.
BR,
Vijay Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
There is a slight correction in the xpath :
/p1:MT/Record[(not(starts-with(Shipment_ID,"9")) and ( WMS_ID = "CSA" or WMS_ID="INA" or WMS_ID="KSA")] EX
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey! Amit
I tried all combinations suggested by you and also by all - However, dint find success - The receiver determination failed - with no receiver found in the above condition - and in some other cases suggested above - Messages are getting processed without the 9* series of Shipment ID getting filtered.
Pl, let me know if there is any other combination of giving the above condition - IF not I would have to filter in mapping - However, IF I can still make it work - It will help reduce unnecessary/Invalid records records right at the receiver determination.
Please, advice ...
Thanks again,
Ritu
Hello,
It seems that u have multiple records in a message?
I have tested above condition and it's working fine in case there is one record in a file.
But having said so, in case there are multiple records in a message and if u want to filter out few records as per above condition then it's not possible. U cannot filter records just by using RD.
So, i would suggest you to filter unwanted records at mapping level.
Thanks
Amit Srivastava
path/Shipment_ID[not(starts-with(.,"9"))] EX AND
path/WMS_ID = CSA
or
path/Shipment_ID[not(starts-with(.,"9"))] EX AND
path/WMS_ID = INA
or
path/Shipment_ID[not(starts-with(.,"9"))] EX AND
path/WMS_ID = KSA
or
path/Shipment_ID[not(starts-with(.,"9"))] EX AND
path/WMS_ID = FLA
or
path/Shipment_ID[not(starts-with(.,"9"))] EX AND
path/WMS_ID = ILA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ritu,
You can achieve this using Xpath query in receiver determination. Please provide more details about your input structure and is your condition 1 and 2 is OR operation or AND operation.
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey! Harish
Thank you for your quick response!!
The above 2 condition are AND condition so WMS_ID can be any of the 5 values (CSA, INA, KSA, FLA,ILA) AND addionally Shipment_ID should NOT start with 9* (Eg: 981000021, 9170004312, 9222004516 are INVALID and need to filtered).
Here is the Input structure:
<?xml version="1.0" encoding="utf-8"?>
<ns:MT_SHIPCONFIRM xmlns:ns=http://SHIPMENT_WEEKLY>
<Recordset>
<LineDetail>
<Carton_Number>34000002</Carton_Number>
<Prepack_Number>0001</Prepack_Number>
<RecDate>201312</RecDate>
<Shipment_ID>981000021</Shipment_ID>
<Location_ID>15000003</Location_ID>
<WMS_ID>INA</WMS_ID>
<Description></Description>
<Purchase_Date>20140101</Purchase_Date>
<Ship_Date>20140101</Ship_Date>
<TotalAmount>210000.86</TotalAmount>
<Company_CostCenter>1</Company_CostCenter>
</LineDetail>
</Recordset>
</ns:MT_SHIPCONFIRM>
Thank you,
Ritu
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.