cancel
Showing results for 
Search instead for 
Did you mean: 

Worst OSS Note - upto version 7 of a fix

Former Member
0 Kudos

I have an ongoing issue with SAP - over three months due to a Program Error in PI7.0 SP10. This is a known issue.

My latest update tells me they hope it will be fixed in the new release of this note - version 7!

This may not be the highest note/patch number - but when i tell you the problem - it's quite shocking that such a fundamental problem can exist!

Bascially, an "IF statement" does not work in a user designed function!

<i>A new patch has been created for this issue. The fix is contained in

note, #1085331 Function 'if' evaluates both 'then' and 'else' branches.

This note has not been released yet as not all patches are ready.

The fix is contained in the archives below. I am not sure as to your

current SP level but please monitor the service marketplace for the

release of whichever archive matches your SP level.

- SAPXITOOL10_7.sca for XI Tools 7.0</i>

We appear to be almost beta testing these fixes....

7th time lucky does not inspire me with confidence!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thats SAP for you. buddy!!

What I am going to say here may not go down very well with most SAP fans.

However, its true, SAP does deliver a somewhat low quality code under its other wise robust application design.

An experienced developer only has to browse the coding to notice the lack of standardization in the naming conventions, coding styles and structures. Also i have often come across code blocks that directly contradict the recommendations in official SAP documents.

Some times (only sometimes though) I have seen poorly thought of algorithms.

The continously changing enhancement mechanism offered by SAP is also an indicator of a design delivered before maturity. This has been the biggest pain point in my 5 years as an ABAP consultant. Also

There is no contention to the fact that SAP does offer a very good technical architecture in its WebAS. Very mature business processes in its applications, but I do tend to feel that the development landscape in SAP has not been the best in the market.

Most of us know about how a large part of SAP uses global variables for data sharing between functions and routines, deeply damaging data encapsulation and making code enhancements extremely risky. The code is certainly not very well documented and too easily corruptable. Even the large number of classes in ABAP are largely undocumented.

Having said all that, I think SAP has shown a softer corner for the developers in its Java environment.

I wish that some day SAP could come up with something like the MSDN style documentation, without merging it into help.sap.com which is more of an application usage help guide.

Just my two cents.

Former Member
0 Kudos

Hello Ahsan,

I completely agree with your opinion.

With 10 years experience on SAP, I've always been amazed by the mix of an excellent technical architecture (out in 1992 and still ahead of competition) , a bright concept but some very annoying things.

Quality of code some times as you said.

Horrible Quality of translation on transaction screens. We often have to translate from French SAP to regular French. Some times the question on a popup window means the contrary in English and French !

Screen Design : the windows sizes are designed in R/3 as if everybody had still 640x480 displays. the text does not fit inside and you cannot resize the window. you have to use again and again the slide bars.

In BW 7.0 it is the contrary, you need a 1920x1080 display resolution to be able to use transaction RSA1.

Some bugs in basis transactions are NEVER corrected because there is a workaround. Exemple : RZ10 truncates long parameters and it can prevent the system start. I know this bug since R/3 2.2...

Imposed Choices from SAP to supposedly reduce the TCO which in fact add a lot to complexity (and TCO). Exemple mandatory Solution Manager, mandatory download manager or validation of support packages. The customer shoud make the choices, not the vendor. A utility should never be mandatory.

Marketing foolness which change names every 3 months to the point that nobody knows how to call something. It is to the point that all documentation and OSS notes are false because thaey are not updated where the names are changed.

Just my 2 cents also !

Answers (3)

Answers (3)

Former Member
0 Kudos

AAAAAAAARRRRRRRRRRGGGGGGGGHHHHHHHHHH!!!!!!!!!!!!!!

Just when I thought this couldn't get any worse....

ALl the problems had been fixed by this note, but if you change any If Statements after applying this note, it fails

I have had to open another OSS note with SAP...

je-hal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Mr. Neaves,

a colleague forwarded me a link to your posting because I'm responsible at SAP for the message mapping documentation of SAP NetWeaver Process Integration.

The issue with the if statement is that there can be two use semantics:

(1)

if <condition>

value = <exp1>

else

value = <exp2>

end

(2)

value = if (<condition>, <exp1>, <exp2>)

When used as a function as in use case (2), <exp1> and <exp2> should be evaluated initially before function 'if' is executed. This is the expected behavior of all standard functions in message mappings.

On the one hand, it turned out that the if statement did not work like this in all cases. To be more clear: In some cases it worked like a function (use case (2)) and in other cases it worked like a statement (use case (1), where <exp2> is not evaluated if <condition> is true). That is why a patch was released to fix it.

On the other hand - unfortunately - there are customers that relied on use case (1) and others that relied on use case (2). So for some customers the patch introduced a fix while for others it caused problems.

To get out of this trouble, we'll introduce a new if function, so that in the end we can cover both: (1) and (2). SAP note 1090369 will inform you about details. Since we currently are working on this, it is not released yet, but I wanted to tell you the number in advance anyway.

Sorry for all this confusion.

Best regards,

Jens Stumpe

SAP NetWeaver PM SOA

bhavesh_kantilal
Active Contributor
0 Kudos

Am so looking forward to this fix. I remember hitting this kind of a situation once and using an Advanced UDF to avoid going through the entire process as we were working on a strict time line. I thought it was something wrong with my logic then.

Can you pl update this thread when the note is launched. Maybe even a blog would be useful.

Thanks,

Bhavesh

Former Member
0 Kudos

It's a great day on the project....

After waiting for 4 months for a fix, it has been delivered and successfully tested!

WAHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

https://service.sap.com/sap/support/notes/1090369 has been released...

Summary

Symptom 
The behaviour of functions 'if' and 'ifWithoutElse' in Message-Mapping has been changed. We have changed it after we've become aware of the fact that both functions behave inconsistently with the documentation.
This change has some important consequences, which are described in this note.
Let us consider the function 'if'. The situation with 'ifWithoutElse' is analogous to it.
There are, in fact, two distinct use-cases for the function 'if':
1. One is when the function is used as an if statement. For example, consider this pseudocode:

if <condition>
  value = <expression1>
else
  value = <expression2>
end

In this case, one expects that the <condition> expression is evaluated first and then, depending on the value of the condition, one of the branch expressions is evaluated and assigned to variable 'value'.
2. The second use case is when the function is used as a procedure. In pseudocode:

value = if (<condition>, <expression1>, <expression2>)

In this case, all three expressions (<condition>, <expression1> and <expression2>) whould be evaluated first and the results of this expressions would be passed to function 'if', which in turn, would return one of them, depending on condition value, to be assigned to 'value' variable. This second use-case is also known in some programming languages as function 'iif'.

In Message-Mapping, the analog of evaluating an expression is advancing a pointer on one of the argument queues of a function. It turned out that the function 'if' did not consistently work either way and that the customers need both variants of the function. The SAP Note 1053706 has delivered the first patch to the function 'if'. This patch was not functionally complete and the function 'if' was patched again. The SAP Note 1085331 has delivered the finally fixed function 'if'. With this Note, the function always works as in use-case 2 above. That is, all arguments are evaluated first, then value of one of them is returned. To minimize compatibility problems with old usages, the function makes one exception to this rule: in case when evaluating one of the branches throws an Exception, the function ignores it, if the exception is in the branch that is not selected by condition.

This change in behaviour can lead to some of the Message-Mappings producing different results than before implementing the patch.
One common problem situation is when one of the branches of function 'if' contains a User-Defined function that produces side-effects. Like increments and stores a counter in 'GlobalContainer', for example. Such functions will be executed more times than before and will cause the numbering to go awry.


Other terms 
Message Mapping, XI, PI


Reason and Prerequisites 
See above.

Solution 
To provide customers with functions to use in use-case 1 above, SAP will deliver new standard functions 'ifS' and 'ifSWithoutElse'. The 'S' in the names states for 'Statement'. The new functions will be delivered in
SP22 of XITOOLS 3.0,
SP14 of XITOOLS 7.0,
SP05 of XITOOLS 7.1.

It is not recommended to install the patches between SAP Note 1053706 and 1085331. If you decide to install a patch from Note 1085331 or any subsequent release, carefully test Message-Mappings before deploying the patch in productive systems.

In case the upgrade is necessary and Message-Mappings do not work as before, there is a possibility to workaround the problem. There's no known generic workaround for all kinds of problems that can arise. For situation with functions leaving side-effects described above, we recommend to add a new argument to the User-Defined Function and create the side-effect conditionally based on that argument. Most probably you will want to put in this additional argument the same queue that you use in condition for function 'if'.


Header Data

  
Release Status: Released for Customer 
Released on: 07.09.2007  13:28:54 
Priority: HotNews 
Category: Upgrade information 
Primary Component: BC-XI-IBD-MAP Mapping

Thanks Jens for clarifying things. Sorry about my rant, but it has been a frustrating time... Any plans on writing another XI book?

Former Member
0 Kudos

Hi Barry,

I am facing a similar issue here. I am not using UDFs just graphical boolean function <b>If</b>. Is the issue fixed with the note 1085331 or the issue still continues with out a fix.

We are using PI 7.0 with SPS 10.

It will be really helpful for us if you can share your experience with us.

Awaiting your response.

Thanks,

Jai Shankar

Former Member
0 Kudos

I have had problems with standard IFs in Graphical mapping, although not all of them! It seemed to be really tempramental.

I am awaiting for a response from my Basis team to tell me they have loaded this current version into our sandpit/staging area before Ican say that it has worked. I raised this issue with SAP back at the beignning of June, so fingers crossed we can get this resolved!

I think the patch level 4 worked on the IF problem, but then broke the substring function.

SAP tell me there will be a separate note detailing what they have changed as it is possible to put work arounds in.

Former Member
0 Kudos

Hi Barry,

Many thanks. I will ask our BASIS team to implement the patch described in the note 1085331. If, else seems to work properly with in a UDF at my end. Really weired though.

Regards,

Jai Shankar