on 10-22-2007 5:54 AM
Dear All,
I have 2 different mappings. My source XML contains a "NAME" field. If this name field is having some value then mapping 1 should get executed. But if "NAME" field does not exists in source XML then mapping 2 should get executed.
Note that in second condition NAME field itself is not there in Source File.
As I want to change mapping depending upon source payload, I am using Interface determination. Here I have added two interface mappings. But I am not able to give the conditions. I have already followed links from Help.Sap.com.
Can anybody will help me to solve this?
-Gouri
Hi ALL,
I dont think that any condition specification option is available in Interface Determination, condition specification option is there in RecieverDetermination but not in Interface determination
Regards,
Reyaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi gouri,
in ID--> interface determination give two inbound interfaces. u wil then have an option to specify the condition. the left operand can be a context object or xpath pointing to ur specific field of source structure. use this to check if the node/element exists or not. if it exists then ur 1st mapping will be executed.
also see this:
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
[reward if helpful]
regards,
latika.
Message was edited by:
Latika Sethi
Thanks Latika.
I have already tried this. I am doing the same thing. First condition is, NAME field from source (XPATH) is equal to blank and second condition is Not equal to blank.
But it is not working. For blank I have not specified anything. Do I need to specify anything?
I tried with " " or ' '. But still it is not working.
If I check my mapping programs with payload from SXMB_MONI, it gives correct output. That means the conditions from Interface determinations are not working.
-Gouri
hi gouri,
from ur first post i infer that u want to check whether the "NAME" exists in source structure or not. rite?
if so, use 'EX' operator. its checks the existence of a particular element. u may leave the right operand blank.
refer this:
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
[reward if helpful]
regards,
latika.
hi Gouri,
Have you check this blog by shabharish.
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
http://www.w3schools.com/xpath/xpath_functions.asp#string
Regards
Ramesh P
hi gouri,
there is no operator as 'not exists'. and this is logical also coz when u give XPath for NAME as left hand operand, it means that NAME is present at runtime at first place.
for second condition then i suggest, u compare any other element/flag if its value depends on the existence of NAME
dont forget to mark helpful answers **
regards,
latika.
Manually key in the XPATH and use the Not function.
not(node exists)
Exact syntax will be here,
http://www.w3schools.com/xpath/xpath_functions.asp
Regards
Bhavesh
of course you can add condition in interface determination.
or how do you determinate inbound interface.
but after when you add multiple inbound interface, the screen apperar condition column between inbound interface column and interface mapping column!
you have to add 3 inbound interfaces to be appeared condition column.
Message was edited by:
joy zheng
Message was edited by:
joy zheng
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gouri ,
You can do N:N mapping and you can apply logic such that if Field Name has some value then u will map your first structure and if it is empty u will map your second structure ,u can use If Else Function for that .
If still it is noty cleare just reply back to me
Regards,
Sunil Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi gouri,
I think you should use node Functions for this. CreateIf Node function.
http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/frameset.htm
Regard,
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
excuse me, i didnt get properly the last time.
Anyways conditional mapping is possible. Check this out
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/content.htm
Regards
Ramesh P
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
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.