cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (6)

Answers (6)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Can you put your UDF?

.

sbuttler77
Active Participant
0 Kudos

If you're using a UDF you can insert ResultList.SUPPRESS in your resultList that will suppress the node it is mapped against.

former_member189420
Active Participant
0 Kudos

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

Former Member
0 Kudos

Hi.

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