We was upgrading to SP 9 to make sure the system was as updated as possible. We did have one BIG issue on how the runtime works, compared to how we are working as developers. We did not find the issue in development since we did not thing that there could be an issue with it. But a test in QA reviled the problem.
Update: it was in SP9 the change was introduced and not SP10
The issue is in a common pattern that I often use to simplify the mapping. It when you want to make different mappings for some instances with createIf. So map the first element if something is true otherwise map the duplicated instance. The second mandatory element is then a dublicate subtree. Notice the second element does not have any occurrences.
Using this pattern can in many situations make it clear what is in each field for the different.
A good example could be mapping the partner informations. I have situations where I’ll map the buyer partner different depending on if they provide a customer number or just an address.
If we run the same mapping on the old SP6 version we don’t have an issue. It seems like it is a new feature with SP 10 and the corresponding PI 7.4 SP.
We have created an OSS message for the case, but without any luck. The issue is that there have been some updates to the SAX parser or the way it is used. The solution is to find all mappings using createIf and determinate if it is an issue. You the query http://PISERVER/rep/support/private/MappingReport.jsp?searchString=createIf
The resolution is to update the mappings. We have around 70 mappings where createIf is used. So it can be a big problem to find and update all of the mappings. My guess is that we will have to spend 20-40 hours updating the mappings to handle the problem.
There are some solutions, but the only one that is easy to implement is the first.
- Update the schema to change the minimum occurrence to 0 and save the mapping.
- Remove the createIf on the first element and combine the values for it. In some of my mappings this can be a big issue.
- Create an always on dummy element on the first element. And then remove current mapping to lower levels. It can take some time.
Last time SAP made changes to the If functions and BigDecimal it was optional to use it. Because it did have a huge impact on how PI was run. This evaluation is in my perspective also something that users should be explicit if they want to use.
Are you also using this pattern please comment on the blog, so SAP can see how big the issue are. If it just us who is doing this we can probably get over it. But it is more common that it is something we must have changed.
Thanks Mikael Mauri Frandsen and Hans Hougaard for helping with identify and comment on the problem.