Focal Point
how to recognize an empty segment and not output data

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/9861004352

October 23, 2007, 12:59 PM
petepeters
how to recognize an empty segment and not output data
First of all, I am new to iway and the transform mapping process.

my question is about how to recognize an input data segment and or fields as being empty (thinking about the 'null' and then not output any data.

in other words, if an sap idoc segment had data present then output that data else if the sap idoc segment does not have any data then output nothing.

when the segments are empty my transform is still outputting empty data that just takes up room and makes the entire process inefficient when you are looking at processing thousands of segments


iWay 5.5 smsp1

windows 2003
October 25, 2007, 04:25 PM
<Pete Webster>
You can do this globally for the entire output document or locally by element or parent.

Global: Output items properties > Data tab > Optimisation. You can set to remove empty tags, this will reduce the size of your output document

Local: Right click on the element or parent > properties > Filter tab. You can set some conditional logic here so if it returns true you define the action as ‘show’ or ‘hide’.
October 31, 2007, 05:03 AM
FinSource
We've handled the problem in the actual process and not in a transform. If you prepars all inputs to XML, as recommented, in you process then you can and a desition switch using XPATH that will route the input document to a set flow or to not continue processing the document if a speicifc filed is NULL.

If you are processing standard documents you can block them from the listener by adding Document rules under the document section. This is all in the Programmers manual.