on 05-23-2007 9:44 AM
Hi Friends,
in my Idoc to file..
in target message type most of the filds are 0..1 occurance..
if the idoc does not sending particular filed..it is not coming to target XML ..
but i want the target field as
<b><Filed1/></b> <i>.. ...if Idoc is not sending the value</i>..
i used exists and If ..and i got the result ..But..i have some 2000 fileds to map like this..
please guide me ..how can achive this for all fields once ...to populate null value if the value doent exsist....
Thanks and regards
ram
HI
use mapwithdefault node function in message mapping
Mapwithdefault function passes defalut value to the target if my source field does not appear.
You can set a default value by clicking the function in Mapping editor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
If u change the target fields min occurance to 1 and do not map it or leave it empty(as in ur case) u will get a null pointer exception...
The best way i think u can use is mapwithDefault Function
Regards,
AshwinM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram;
There seem to be no other way out of this.
You can copy the mapping end node and just change the source field in each mapping.
You can also do some code in SAP to pass Null other than blank in the fields to XI.
Mudit
Award points if it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Change the min occurance for the target field to 1.
This will resolve the issue.
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.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.