Skip to Content
avatar image
Former Member

Graphic Mapping:IDOC to File-Avoid Error in Adapter Engine

Hi all,

I'm using Graphic Mapping in my IDOC to File scenario in which each segment in source IDOC will generate a ROW in target File with the condition: DATBI >= currentdate (and some other conditions)

I have a UDF and use the mapping function CREATEIF for this purpose:

DATBI -> UDF -> CREATEIF -> ROW

Problem scenario: In the source IDOC if all the segments have DATBI < currentdate then there is no ROW created, and I get the error in Adapter Engine

Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure ...

How can I avoid this?

I've tried to put this condition using XPATH in Interface Determination and got the error.

There is a way to use function current-date() in XPATH condition?

Thanks for your help,

Elaine

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 05, 2010 at 06:41 PM

    did u supress the row node if condition fails...........also check ur FCC

    can u test the message mapping with the same XML data which u r using

    chirag

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 05, 2010 at 06:25 PM

    Hi.

    It's look like issue with your FCC or maybe the tag is requeried.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 05, 2010 at 07:16 PM

    Hi all,

    How can I "suppress the row node if condition fails"? I'm new in PI, so please give more details.

    My FCC as follows:

    Record Structure: Record, Row

    Row.addHeaderLine 0

    Row.fieldSeparator ,

    Record.fieldSeparator 'nl'

    Row.endSeparator ; 'nl'

    It works fine if the condition satisfied.

    In Message Mapping, I've use Test to double check my mapping, and in the scenario that conditions fails, there is no Row in the target message.

    Please advise.

    Thanks,

    Elaine

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      Even I had the same problem. I tried to create the node with empty value and it works.

      To create node with empty value you can do the following.

      Check the source node if it exists and using OR condition with a constant "1" you will be sure to get the node created. Using the if condition you can populate the value in the target node.

      Regards,

      Anand Patil

  • avatar image
    Former Member
    Oct 06, 2010 at 01:34 PM

    Sorry, my UDF is pretty long, but the logic is simple. It returns "Y" or "N".

    What do you want to know in my UDF?

    Thanks,

    Elaine

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 06, 2010 at 05:40 PM

    it seems that the row is mandatory, if so you have to change the occurrance to 0.N or generate at least one row segment.

    correct me if i am wrong,

    let me know.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2010 at 07:15 PM

    Hi all,

    Thanks so much for your contribution to this issue.

    @ Sven: Sorry, I cannot figure out how to use the SUPPRESS in my UDF in this purpose.

    @ Ariand: Appreciate your great advice. It took me some times to find the solution: crate a new intermediate message mapping.

    So I have: Source -> Intermediate -> Target instead of Source-> Target

    Now I can have the empty note ROW when the condition fails.

    @ Rodrigo: Actually in my Target structure, ROW has the occurrance of 0.N, but I've had to changed the occurrance of all its elements from 1 to 0.N since ROW can be the empty node.

    Thanks again.

    Regards,

    Elaine

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2010 at 07:17 PM

    Create the intermediate message mapping:

    Source -> Intermediate -> Target

    Check the source node if it exists and using OR condition with a constant "1" to be sure the node created. Using the if condition to populate the value in the target node.

    Add comment
    10|10000 characters needed characters exceeded