on 04-01-2009 6:13 AM
hi all,
what is map with default. please explain how to do map with default.
Thanks
MappWithDefault function acheives the below logic;
If source field does NOT EXIST then Map the target field with a default value.
You can provide what should be the default value as part of the mapwithdefault function properties.
From Help:
mapWithDefault
Replaces empty contexts in the inbound queue with a default value, which you specify in the function properties.
Example:
If u201CDefaultu201D is the default value and
A|B1,B2| |C| |D
is the inbound queue,
mapWithDefault returns the following outbound queue:
A | B1,B2 | Default | C | Default |D.
The function corresponds to the following combination of standard functions:
If(
[]field,
exists([]field),
Constant([value=default]))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
MapWithDefault: Inserts default value specified in function properties into Empty contexts.
If the target field is mandatory and if the input to that field is null/or no source field, then you have to use the mapWithDefault function with the value you want.
sourcefield->mapWithDefault->targetfield.
Regards,
Swetha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i got useful answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This function provides a default value, whenever the source element is not available.
you can give default value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If the target side element is mandatory but source is not mandatory, at this time suppose the source is null then the mapping fails, so to avoid that we are using the mapWithDefault value.
Source field -
> MapWithDefault -
> Target Field,
Suppose source has null the default value (we mentioned value) goes to the target field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
*mapWithDefault :*
It is required when you wish to send some default value if input is null (Nothing) .If input is not null it will just simply pass the value coming from source .
e.g
null -> ABC -> ABC
Source MapWithDefault Target
XYZ -> ABC -> XYZ
Source MapWithDefault Target
Regrds,
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Functionality of "mapWithDefault" Function is:
Replaces empty contexts in the inbound queue with a default value, which you specify in the function properties.
Example:
If u201CDefaultu201D is the default value and
A|B1,B2| |C| |D
is the inbound queue,
mapWithDefault returns the following outbound queue:
A | B1,B2 | Default | C | Default |D.
The function corresponds to the following combination of standard functions:
If(
[]field,
exists([]field),
Constant([value=default]))
Please see the below link. It will help you to understand all the standard mapping functions.
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
Regards,
Shwetambari
Are you talking about mapping with default values?
Edited by: hetal shah on Apr 1, 2009 7:19 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.