The ocean is made up of tiny drops of water. With the same analogy, if you have debugged many siebel issues, you must understand the importance of elementary things which are primarily the reason why code does not work.
Here i will mention one of those elementary things which need to be taken care of, and is very important.
Often we use the Search Specification. Here, take for example, using search expression in IC Map Search Specification of a Datamap, we only want field to be mapped if the value of [Attr] in hierarchy is not equal to say Value1 or Value2, so we will the write the expression like :
[Attr] <> "Value1" AND [Attr] <> "Value2"
So far so good, but what will happen in case value of [Attr] in siebelmessage which we are passing to this datamap is not present or not having the value ? Will this expression hold true even in that case ?
Answer is this expression will not be true even though Blank/NULL value is neither Value1 nor Value2.
So in case if you want to have the IF mapping for blank or null values, explicitly define a check for null values :
([Attr] IS NULL OR [Attr] ="") AND [Attr] <> "Value1" AND [Attr] <> "Value2"
So please make sure to handle NULL/blank check in search specification explicitly.
I hope this small piece of information will help you handle more probable scenarios in your project. Happy Exploring !!!
Hi,
ReplyDeleteIt still does not work :(.. can you please help in this and you can also mail me on mailsforseema@gmail.com
Regards
Seema
Hi Seema,
DeleteCan you give a bit more details on this ? Like what scenario you are testing and what exactly is the objective.
Hi
ReplyDeletecan u elaborate a little more on this why?
"Answer is this expression will not be true even though Blank/NULL value is neither Value1 nor Value2."
Yes, for handling null or blank values you need to explicitly create a check. Else the expression will not hold true.
DeleteTo elaborate, lets take the above example only:
[Attr] <> "Value1" AND [Attr] <> "Value2"
The expression will be false for the null or blank value of [Attr], so if you want to cater null or blank value, you need to explicitly make a check like below:
([Attr] IS NULL OR [Attr] ="") AND [Attr] <> "Value1" AND [Attr] <> "Value2"