I have a scenario where I need to select subsets out of a table, based on different key values, for several data flows. It seemed to me the most flexible design would be to create an embedded data flow to select the subset of records and pass in the key values as parameters, which I can then use to select the records in all the data flows that need them. This keeps me from having to write the same where clause over and over again and potentially making a mistake.
The issue I'm finding is when I use the embedded data flow inside of another data flow, I am unable to set the parameter values in the Calls window. Based on the SAP Designer Guide, page 274 under the heading "Setting the value of the parameter in the flow call", the first step says "Open the calling job, work flow, or data flow."(emphasis added) This would suggest one could set the parameters for something requiring them within a data flow. The only item that fits this description would be an embedded data flow, as far as I know. However, I found two forum posts, here and here, indicating you can't pass parameters to an embedded data flow, and the parameters will only pass-through from the outer data flow. This behavior does not meet my needs because I don't want a work flow, outside of the data flow, to be the place to indicate which keys will be used to select the relevant records. All of the logic for what set of records to process in the data flow should be contained in the data flow itself. Is the only way to accomplish this really to rewrite the same where clause over and over again in data flow after data flow? This seems like a very poor design from a code reuse perspective.