on 09-28-2007 1:07 PM
Hi all,
I am trying an XPath expression in order to decide which interface to use. The expresion is
(/p1:CONFDELIVERY_MT/row/TrtCode ≠ EL AND
substring(/p1:CONFDELIVERY_MT/row/TrtCode,1,2) ≠ ZZ)
it seems however that the second statement (substring...) is always returning true.
any ideas? Basically what I am trying to do is to have an expression that exludes all TrtCode that are either EL or start with ZZ. Any help will be appreciated.
I think there is some problem in the substring function as it seems it is never evaluated.Why don't you try some other logic like write a UDF in ur mapping and check that CONFDELIVERY_MT/row/TrtCode is never populated with something starting with ZZ .If it does change it to EN.
This will eliminate your second condition in XPath.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pravesh,
I can not do that since I need the value also for mapping it into other fields of the target message. And furthermore, I need the logic to take place before the mapping since I have two different mapping producing two different IDOC type and I need the logic in the Interface determination in order to decide which mapping takes place.
your requirement is to execute the interface mapping when
either Trtcode !='EL' or substring(TrtCode)!='ZZ" ,right?
uh...when TrtCode = 'ZDA' it should give true why its giving false.
I think systems checks existence if use EX,if it exists based on the condition we specified it returns 'true' and run the IM ,if not then 'false' it would not execute the IM.
I solve by not using the substring function . Instead I use all possible cases (in my case 10 such cases) and use an OR logic. This solve the problem but in case where the substring really is needed this is a problem and should be solve in later releases (I hope). Try not using substring if you can...
hi,
if the value is in string then give a try keeping EL and ZZ in ' ' like 'EL' and 'ZZ'
chck the link for other functions
http://www.w3schools.com/xpath/xpath_operators.asp
check this may be useful
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
do some search on SDN and try with different combinations.
Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Socrates,
check out instead
//row/TrtCode ≠ EL
AND
substring(//row/TrtCode,1,2) ≠ ZZ
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the message
<?xml version="1.0" encoding="UTF-8"?>
<ns:CONFDELIVERY_MT xmlns:ns="http://vivartia.aberon.sys/confdelivery">
<row>
<OwnerCode>3100</OwnerCode>
<DeliveryNo>0180000102</DeliveryNo>
<ErpWarehouseCode>31010001</ErpWarehouseCode>
<TrtCode>ZZEL</TrtCode>
<PostGIdate>2007-09-25 00:00:00.0</PostGIdate>
<PostGIdateChangedFlg>1</PostGIdateChangedFlg>
<DocumentNo>Αρ.Παραστατικού</DocumentNo>
<DocumentDate>2007-09-25 00:00:00.0</DocumentDate>
<CancelFlg>0</CancelFlg>
<PostGIFlg>1</PostGIFlg>
<TacticalRouteCode />
<LicenceNo />
<PackagesQty>0</PackagesQty>
<CusPickUpFlg>0</CusPickUpFlg>
<CusPickUpChangedFlg>0</CusPickUpChangedFlg>
<RouteChangedFlg>0</RouteChangedFlg>
<DlvPriority />
<PickingDate>2007-09-26 17:18:59.0</PickingDate>
<PickingDateChangedFlg>0</PickingDateChangedFlg>
<DlvPriorityChangedFlg>0</DlvPriorityChangedFlg>
<OdtLineNumber>10</OdtLineNumber>
<ItemCode>770901</ItemCode>
<WmsStatusCode>Χ</WmsStatusCode>
<Lot />
<ExpirationDate />
<ProductionDate />
<TraUnitQty>0.000</TraUnitQty>
<TraUnitCode />
<Qty>100.000</Qty>
<MainUnitCode>PCE</MainUnitCode>
<ConvFactor>1</ConvFactor>
<ConvDivisor>1</ConvDivisor>
<InitQty>100.000</InitQty>
<DocQty>100.000</DocQty>
<DeleteLineFlg>0</DeleteLineFlg>
<ParentLineNumber />
<ItemType />
<CusPickUpDescr />
<CusPickUpChangedFlg2>0</CusPickUpChangedFlg2>
</row>
</ns:CONFDELIVERY_MT>
User | Count |
---|---|
87 | |
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.