on 04-25-2007 10:02 AM
hi @,
I have a scenario where using exists and ifthenelse function i need to check for existence of a field and then if source field is present then map to a target field and if it is not present then map target with different field.
But the problem is when the source field is present then it is getting mapped to target but when it is not present in source message then target is nt getting mapped to another field which is contant.
I am not able to figure it out where the problem is?
Regards,
In the condition part use mapWithDefault instead of exists function.
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, use this blog of mine to trigger the alert from a User Defined Function.
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
Use EXISTS and if it does not exists call the UDF as shown in my blog , trigger the alert and then throw a runtime exception.
or,
just throw a runtime exception and use XI alerts to trigger the alert (mapping alert)
/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
Regards
Bhavesh
Hi Amit,
mapWithDefault is in <b>Node Functions</b>.
Thanks,
Maheshwari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then -
> The source filed
Source -> (Exists) -> If -
> target
Else -
> Constant
try that rule, it should ideally work else using mapwithdefault in case u r passing a constant would be ideal.
Ref -
Node functions in
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> hi @,
> I have a scenario where using exists and ifthenelse
> function i need to check for existence of a field
> and then if source field is present then map to a
> target field and if it is not present then map
> target with different field.
There is a standard function available for this.
Use <b>MAPWITHDEFAULT</b>.
It checks if the source field exists and maps it to the target if it does not it maps the default value provided. To add default value, double click on the MAPWITHDEFAULT.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.