| 1. |
Types Of Usefull Node Functions? |
|
Answer» removeContext, splitByValue, collapseContext, Copy value, createIf, exits, useOneAsMany 1.removeContexts: "There is absolutely no difference between my children or GRAND children or great grand children". Material Group is sent in the item node of the source idoc but I WANT it in the header node of the target idoc. So I need to fool the mapping runtime that Material Group is coming in the header node of the source. removeContext exactly does that. 2.SplitByValue: "I need a different parent for every instance of me" I will try to explain the function with the same mapping as readers can correlate well. Each instance of Itemno in the source STRUCTURE should generate a target itemNo and item under a different instance of the header node in the target. As we can observe that OCCURRENCES of item in the source an target structure are different we cannot map the elements of the item node directly. We use splitbyValue to achieve the same. 3.collapseContexts: " There is just a slight difference between my children or grand children or great grand children". Similar to removeContext but context change is replaced with "". If we need to create empty tags in the target for every context change in the source we can use it. I did not find it useful so I don't like to explain in detail. 4 copyValue: "How many ever times I occur I am copied just once". This is not a node function but I am explaining it as it is used very frequently in real-time. Let US take an instance of material group, which can occur as many times as the item node. But since we are mapping it to the header in the target node I just want to copy the first occurrence of material group and map it to the header node. copyValue exactly does that. 5.createif: "I have a criteria for existing". It is used when you want to create target node or element based on some condition. removeContext, splitByValue, collapseContext, Copy value, createIf, exits, useOneAsMany 1.removeContexts: "There is absolutely no difference between my children or grand children or great grand children". Material Group is sent in the item node of the source idoc but I want it in the header node of the target idoc. So I need to fool the mapping runtime that Material Group is coming in the header node of the source. removeContext exactly does that. 2.SplitByValue: "I need a different parent for every instance of me" I will try to explain the function with the same mapping as readers can correlate well. Each instance of Itemno in the source structure should generate a target itemNo and item under a different instance of the header node in the target. As we can observe that occurrences of item in the source an target structure are different we cannot map the elements of the item node directly. We use splitbyValue to achieve the same. 3.collapseContexts: " There is just a slight difference between my children or grand children or great grand children". Similar to removeContext but context change is replaced with "". If we need to create empty tags in the target for every context change in the source we can use it. I did not find it useful so I don't like to explain in detail. 4 copyValue: "How many ever times I occur I am copied just once". This is not a node function but I am explaining it as it is used very frequently in real-time. Let us take an instance of material group, which can occur as many times as the item node. But since we are mapping it to the header in the target node I just want to copy the first occurrence of material group and map it to the header node. copyValue exactly does that. 5.createif: "I have a criteria for existing". It is used when you want to create target node or element based on some condition. |
|