Skip to Content
author's profile photo Former Member
Former Member

Problems with file content conversion

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Aug 17, 2005 at 07:43 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 17, 2005 at 11:14 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 17, 2005 at 01:21 PM

    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..:)

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.