on 08-17-2005 8:31 AM
Hi,
in my scenario (Z-IDOC - XI - File) I send 2 segments to the XI.
L061 18000 DE 0101 23236318 050605 EUR
L061 87000 DE 0101 050605 EUR
In the second segment there is no XBLNR !!
IDOC: ZFIBUCH
Segment: L061
Fields:
IDENTIF
KZ
LAND
BUKRS
XBLNR
BLDAT
WAERS
Data typ: L061
Message type: MT_ZFIBUCH_FILE
My XML-message looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<ns1:MT_ZFIBUCH_FILE xmlns:ns1="http://xxx">
<L061>
<IDENTIF>L061</IDENTIF>
<KZ>18000</KZ>
<LAND>DE</LAND>
<BUKRS>0101</BUKRS>
<XBLNR>AG1236318</XBLNR>
<BLDAT>050605</BLDAT>
<WAERS>EUR</WAERS>
</L061>
<L061>
<IDENTIF>L061</IDENTIF>
<KZ>87000</KZ>
<LAND>DE</LAND>
<BUKRS>0101</BUKRS>
<BLDAT>050605</BLDAT>
<WAERS>EUR</WAERS>
</L061>
</ns1:MT_ZFIBUCH_FILE>
I use content conversion in the receiver-file-adapter
RECORDSET: L061
L061.fieldFixedLengths 4,6,3,4,10,3
L061.headerLine 0
L061.fixedLengthTooShortHandling Ignore
L061.endSeparator 'nl'
The result is:
L06118000 DE 0101AG1236318 050605EUR
L06187000 DE 0101050605EUR
But I will use fixed lengths for getting this:
L06118000 DE 0101AG1236318 050605EUR
L06187000 DE 0101 __________050605EUR
(instead of the underline there should be blanks)
Did I something wrong?
Christoph
Even if the field XBLNR is empty, you have to provide the element in the structure, otherwise the content conversions gets out of order.
Correct would be:
<ns1:MT_ZFIBUCH_FILE xmlns:ns1="http://xxx">
<L061>
<IDENTIF>L061</IDENTIF>
<KZ>18000</KZ>
<LAND>DE</LAND>
<BUKRS>0101</BUKRS>
<XBLNR>AG1236318</XBLNR>
<BLDAT>050605</BLDAT>
<WAERS>EUR</WAERS>
</L061>
<L061>
<IDENTIF>L061</IDENTIF>
<KZ>87000</KZ>
<LAND>DE</LAND>
<BUKRS>0101</BUKRS>
<XBLNR />
<BLDAT>050605</BLDAT>
<WAERS>EUR</WAERS>
</L061>
</ns1:MT_ZFIBUCH_FILE>
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In SP13 you can use the new node function mapWithDefault, which is just made for this purpose.
In lower SP, create an advanced user defined function with one inbound parameter and apply following code:
if (a.length == 0)
result.addValue("");
else for (int j=0;j<a.length;j++)
result.addValue(a[j]);
This should prevent you from difficult exists - if constructions
Regards
Stefan
Hi Christoph,
that is correct.
After creating an user-defined function, there will be a new entry in the function list, User-Defined. Here your function will appear.
To edit the function, try to hit the small triangle right at the function name. If you are successfull, you get a menu. Choose <i>edit</i>.
Hope that helps,
Stefan
You can use the simple node function <b>exists</b>.
1.XBLNR(source) exists and pass this to boolean function if then else.If XBLNR exists then pass the source XBLNR else pass the space.
If you want me to give the snap shot of the mapping.Mail me at sravya.talanki@wipro.com.After this you have to allot points..:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The exists function is fine, when you just want to map a element of source to target, but you could have a more complex case, where several elements are combined and checked. In this case it would very inconvenient to use the exists - if - combination:
............expression
......................
expression - exists - if - target_element
....................../
..............constant
Hi cristpoph..
Create the tag in your message mapping explicitly by using the node function "exists" and if then else boolean function.Check wether the tag exists otherwise create it explictily by passing a blank constant space.Please revert if any further input is required.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.