on 03-28-2008 4:57 PM
All,
We have the following structure from the input XML... We want to extract the PSTLZ node value into the target structure where PARVW = "WE" - Im trying to use a UDF but - im getting an error because the PSTLZ is an optional node under E1EDKA1 and not all the E1EDKA1 segments have this field. i was trying to UDF to take 2 parameters - PARVW (context at IDOC level) and PSTLZ (context at IDOC level).
Any help would be appreciated...
<IDOC>
.
.
<E1EDKA1 SEGMENT="1">
<PARVW>AG</PARVW>
<PARTN>1</PARTN>
<TELFX>XXXXX1</TELFX>
<BNAME>Mike</BNAME>
<PAORG>100</PAORG>
<ORGTX>US Purchasing</ORGTX>
<PAGRU>UG1</PAGRU>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>RE</PARVW>
<NAME1>SomeName</NAME1>
<STRAS>Street 1</STRAS>
<ORT01>City1</ORT01>
<PSTLZ> 12345</PSTLZ>
<REGIO>NY</REGIO>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>LF</PARVW>
<PARTN>2</PARTN>
<SPRAS>E</SPRAS>
<SPRAS_ISO>EN</SPRAS_ISO>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>WE</PARVW>
<LIFNR>XYZ</LIFNR>
<NAME1>NAME1</NAME1>
<NAME4>Name4</NAME4>
<STRAS>some street</STRAS>
<ORT01>BUFFALO</ORT01>
<PSTLZ>12345</PSTLZ>
<LAND1>US</LAND1>
<ABLAD>YYY</ABLAD>
<PARNR>YYY</PARNR>
<SPRAS>E</SPRAS>
<REGIO>US</REGIO>
</E1EDKA1>
.
.
</IDOC>
rkk,
Try this
Parvw[Change Context to IDOC] --->UDF
PSTLZ[Don't Change Context] --->Map With Default[] -->Remove Context---> UDF
If there are no values from PSTLZ what u want to do? According to the above logic, it will give blank value are u ok with it?
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
rk,
Check for field "PSTLZ " is null before passing to UDF. In case of null / emty replace it with constant value which you can ignore in your UDF.
Let me know if you need more detais.
Hope this will help.
Nilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
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.