cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid output file and error lines when condition does not match

Former Member
0 Kudos

Hi Experts
A customer want to send purchase order files to several vendors and each vendor has their own requirement to content and file format. I have prepared scenarios for each vendor and a template is (conditionally) called when CardCode matches. It works fine, - PO file is generated when CardCode matches, but error lines are written to SAP B1 Control Center each time CardCode does not match the one defined in a scenario (100 or more times per day). Problem is that these error lines does not get automatic deleted. Conditional processing are made in this way:

Result Message in SAP B1 Control Center when CardCode does not match:

I tried to avoid an error line in SAP B1 Control Center when CardCode does not match in this way:

Then no error lines are written to SAP B1 Control Center, but an output file is generated each time (order file when CardCode matches and an empty file when CardCode does not match).


Any suggestions on how to avoid both errors types (error lines in SAP B1 Control Center and empty output files)?
Or - can lines in SAP B1 Control Center be automatic deleted?

Regards
Steen

Accepted Solutions (1)

Accepted Solutions (1)

bastian_schaefer
Active Contributor
0 Kudos

Hi Steen,

using <b1im_skip> should be the right approach, if you're working with B1 OUTBOUND.

Following extract form the B1i help describes the usage to skip the outbound processing:

1.1 Skipping Outbound Processing


If you do not want to hand over the message to the receiver system, the scenario step can create a special tag that indicates to generic processing in the integration framework to skip the message processing.

Add the following to the final transformation atom (atom0):

<b1im_skip xmlns= ”” info=”my info” msglog=”true” msgout="yes">

If the integration framework skips the message, it puts the message log information to the Filtered section, if the message log is switched on. The result message contains the Message skipped by vBIU logic information.

info

To display an individual message, define it using the info attribute.

msglog

If you want to avoid an entry in the message log, introduce the msglog attribute and set it to false.

msgout

To display the skip information in the Success section of the message log, use the msgout attribute and set it to yes.

In case you don't want any MsgLogEntry in case of a skipped message, please enter the following in final atom0:


<xsl:template name="transform">

<xsl:attribute name="pltype">xml</xsl:attribute>

<xsl:choose>

<xsl:when test="$msg/BOM/BO/Documents/row/CardCode=&apos;C20000&apos;">

<xsl:call-template name="transform2"/>

</xsl:when>

<xsl:otherwise>

<b1im_skip info="skipped" msglog="false"/>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

Best regards

Bastian

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bastian

Exactly what I were looking for. Thank you very much.
Now only wanted files and msg log lines are created.

Best regards

Steen