I have a situation where I want to create IDOCS for customers (1 idoc / customer). Each customer may have multiple associated accounts. Each account results in an idoc segment. Each Account has a DOCUMENT-NUMBER which links it to the Customer.
- Cust1
- Account1
- Cust2
- Account1
- Account2
I first created the job to create 1-idoc per customer by adding a RowGeneration transform and selecting from this. This works successfully as I create 1-idoc for every customer. The segments select only from the RowGen transform (not Customer). This is how my input schema looks for each segment:
However, I now want to add segments to each of these idocs (for the Accounts).
When I make the join criteria, I have to use Customer/Account as a join. This means I must select from Customer/Account, which is returning all Accounts for all customers and making each as an idoc (so in the above situation I would have 3 idocs all with 3 segments - not 1 with 1, and another with 2).
I am not sure how to modify these schema selections to properly make the segments work correctly. It seems like I need to avoid using Customer in selection criteria here, but if that is the case, I am unsure how to setup my join correctly so that each set of Accounts is linked to the proper customer.