How to avoid output file and error lines when condition does not match
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?
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.
To display an individual message, define it using the info attribute.
If you want to avoid an entry in the message log, introduce the msglog attribute and set it to false.
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:
<b1im_skip info="skipped" msglog="false"/>