Hi
We are on PI 7.1 EHP1 SP05 and have a scenario to map . Flat text file --> idoc mapping. Each line in the text file maps to a line item in the idoc P01 segment.
Have a text file in the following structure - shown using a sample file as an example : 6 fields in fixed width format ( last column is the mapping action to be taken )
PO Number
Store Number
Part Number
SAP Code
SAP Code Type
Quantity Order
Blank
Action to take and reason
WH00261
12750
62225
PP635211
002
3
Map to Idoc - standalone sku
WH00261
12750
1109025
PP683008
002
1
Map to Idoc - standalone sku
WH00261
12750
84266
PP767197
002
2
Map to Idoc - standalone sku
WH00261
12750
3102202
PP263194
002
4
Map to Idoc - standalone sku
WH00261
12750
1122203
PP799412
002
1
Map to Idoc - standalone sku
WH00261
12750
91002274
PP707768
002
4
Map to Idoc - virtual "Y" BOM header
WH00261
12750
6338655
PP145428
002
1
Do not map - Y-BOM component
WH00261
12750
91002264
4
Do not map - special deal 9-code
WH00261
12750
63492
PP472885
002
4
Map to Idoc - special deal component
As we see from the above , there are special lines called BOM header lines ( ones with Part number starting with 9 ) followed by child part numbers. There is no explicitly specified link between the parent and child items except that child items follow the BOM header lines. For BOM header lines that have a non-blank SAP Code , those BOM header lines should be mapped to idoc line item. The child item records following this BOM header line should NOT be mapped to idoc line item. As a second possibility , if a BOM header line has a blank SAP code , then that line should not be mapped to the idoc line item, but the child items following that BOM header line should be mapped to idoc line item. Apart from the BOM header lines and the child line items following it, there are normal line that map unconditionally to idoc line item segment.
Question - can the above be achieved using a message mapping or is a Java / ABAP mapping needed for the complexity above ? Any approaches suggested to map the flat file as above to idoc line item segments ?