on 03-09-2006 5:33 PM
Hello guys,
How to hard code in xi mapping , in such a way if value not passed ,default used and if passed default value not used , scenario file to rfc .
Vara
Hi Bujji,
can you clarify if
a) your CNUMBER always exists, but sometimes is empty or
b) if the complete field does not exist?
In case b) your mapping should work.
In case a) you need to check if cnumber is equal to space (using standard function equalsS)
Regards,
Claus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vara -
You can use mapWithDefault in the following way:
<source> -> <mapWithDefault> -> <target>
Specify a default value in mapWithDefault properties (e.g. double-click on mapWithDefault and it'll bring up properties).
However, the caveat with this function is that the <source> element CANNOT exist for this to work. For instance, it can't be <material></material> with just an empty value. The whole <material> element should not be there, otherwise it'll just pass an empty value.
Otherwise, if you need to account for all possibilities, you need more elaborate conditional logic. I'll send you a screenshot if you post your email address.
Regards,
Jin
Thanks jin and all of you ,
As i said in my earlier posting , the field exists but it might be empty in which i cant use what u say. my email id is : varaprasad.reddy@gmail.com
To let you know the data types are all strings .
to repeat again :
CNumber field exists in the message but if it is empty i have to pass a default value.
Message was edited by: Bujji Reddy
Hi Bujji,
if you need to take care of all situation, Jin may send you a screenshot as he offered.
If you know that your CNUMBER ia always there, you just mneed to replace the exist function in your solution you mentioned above with <i>equalS</i> and add the values as you mentioned (CNUMBER and constant with empty value).
Regards,
Claus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bujji Reddy,
You can hardcode using standard functions "constant" and "If then else". So if value is passed map the value to the target else map the constant to the target.
I hope this is what you meant.
Rgds,
Sam Raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bujji Reddy,
Refer to this how-to guide on SAP Service Maket Place.
Rgds,
Sam Raju
Hi Vara -
Here's a couple:
http://service.sap.com/~sapidb/011000358700003604872004E/MappingXI30.pdf
http://help.sap.com/saphelp_nw04/helpdata/en/d2/58cd3b11571962e10000000a11402f/frameset.htm
If you have questions about specifics, please post them to the forum.
Regards,
Jin
Message was edited by: Jin Shin
thanks all for the replys. Now as i explained earlier my current scenario, using if then else (Boolean function) with constant would solve my purpose ,
But how can i define the condition, How can i incorporate this one :
if <material# is null> then <constant 2000 to target >
else <material# to target>
i think i fugured out connecting nodes of constant to then and the filed material # to else but how can i define condition to if node.
thanks
Vara
Thanks sam,
well eventhough you are trying to explain the best way i have problem in connecting the nodes to each otehr. lemme explain the situation i kept in the editor :
Lets say i am mapping CNumber in source xml msg to KUNNR in target msg. here sith i am listing the flow of nodes.
Cnumber
|
then
Cnumber --> Exists --> if --> KUNNR
else
|
501
(entered this by double click)
Now while testing if Cnumber is empty i m not getting 501 in KUNNR?
Vara
P.S.: I used * to get spacing so that i can better picturize u
Hi Vara -
You can use the Node function mapWithDefault for this purpose.
Regards,
Jin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.