cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Condition

Former Member
0 Kudos

Hi,

This is my sample  file structure and creating an idoc for each occurrence of dataheader.

<dataheader>

     <dataheader>

          <reasoncode>   WSC </reasoncode>

          <qty>12</qty>

       < /dataheader>

</dataheader>

<dataheader>

     <dataheader>

          <reasoncode>   ADJ </reasoncode>

          <qty>120</qty>

       < /dataheader>

</dataheader>

<dataheader>

     <dataheader>

          <reasoncode>   RECONCILE </reasoncode>

          <qty>120</qty>

       < /dataheader>

</dataheader>

My condition is to create idoc where reasoncode is not equal to WSC or RECONCILE.  Initially I had given this condition in Receiver Determination.

But the problem was it checked only one occurrence and ignored the rest. Since the file has multiple occurrence, it made sense to give this rule in the mapping.

I had given the logic int he IDOC node and now the idoc is getting created without any issues. 

We had an issue where the file came with only one dataheader with reasoncode WSC. As per the mapping the idoc was not created, but instead it failed in the call adapter with the following error.

Error: MSGGUID 80144F1E18641ED1A5B6C3109D578D5D: Tag found instead of tag IDOC BEGIN=</.

Since there was nothing to be created, it just tried sending an empty payload to the receiver idoc adapter. 

How to handle this situation.  Even if i provide the logic in the interface determination, it is also going to check the first one and ignore the rest.

Regards

Anandh.B

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Were you able to check the multiline option in your xPath condition?

Regards,

Mark

Former Member
0 Kudos

Hello Mark,

I did not try that.  My doubts were that if i choose multiline option, will PI send only the relevant messages to the receiver. How does the condition works out.

Say for Eg., if i have three messages in single payload, will PI send only the message which got satisfied, I doubt so

Regards

Anandh.B

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,


I did not try that.  My doubts were that if i choose multiline option, will PI send only the relevant messages to the receiver. How does the condition works out.

Say for Eg., if i have three messages in single payload, will PI send only the message which got satisfied, I doubt so

The multiline option will only check the other nodes in your XML if it meets the condition you specified in your XML.

My condition is to create idoc where reasoncode is not equal to WSC or RECONCILE.  Initially I had given this condition in Receiver Determination.

But the problem was it checked only one occurrence and ignored the rest. Since the file has multiple occurrence, it made sense to give this rule in the mapping.

In this case, if the reasoncode that is not equal to WSC or RECONCILE is found at the third-occurrence, it will use the receiver your specified.

It will not filter the message, you still have to do that in mapping though.

Hope this helps,

Mark

Former Member
0 Kudos

Mark,

I think it will solve  the problem by putting the condition both in the receiver determination as well as in the mapping. 

Regards

Anandh

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

I think it will solve  the problem by putting the condition both in the receiver determination as well as in the mapping. 

Yes, that was what I was suggesting a while ago Well, I think you know what to do now. Not checking multiline will only check the first occurrence of a field.

Hope this helps,

Mark

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

You have to write condition in mapping level then only it check all records.

Best Regards,

Raj

Answers (0)