cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom Error handling in UDF, SAP PI/PO

corbinarnett30
Explorer
0 Kudos
310

Hi everyone,

We currently have a integration in place that processes price files from vendors. During this process, we perform a lookup to identify any changes in price between the data in our ERP system and the newly received price files. If no price difference is detected, an exception is currently being thrown.

As expected, this results in a large number of errors in the PI/PO message monitor, especially given the volume of vendors we work with. I'm seeking a way to modify this functionality so that instead of throwing an error, we can simply log a message such as 'No price changes detected' without registering it as an error in the message monitor. Is this even possible?

if (recs == 0) {
throw new RuntimeException("EXCEPTION ERROR IN PRICE CONDITION FILTER, ZERO RESULT RECORDS ! ");
}

 Any ideas or possible solutions would be greatly appreciated!

Thanks.

View Entire Topic
ShaikAzmathulla
Active Participant
0 Kudos

Hi ,

Please use XSLT mapping for this Issue . 

<xsl:template match="/">
<xsl:choose>
<xsl:when test="recs = 0">
<xsl:value-of select="'No price changes detected, skipping price update.'"/>
</xsl:when>
<xsl:otherwise>
<!-- Process normal price change logic -->
<xsl:value-of select="'Price change detected, processing update.'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Regards,