cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Determination Conditions

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

If you specify multiple mappings in Interface Determination, you get the condition option. Here depending upon XPATH or context Object you can specify the conditions.

-Gouri

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Ya I tried with EX Operator too. But What I can do is first condition will be XPATH EX blank. But what abt second condition?

-Gouri

Former Member
0 Kudos

Hi Ramesh,

I checked that blog. It specifies about EX Operator. which tells that field exists or not. I want to specify a condition which talks about DOES NOT EXIST.

I mean to say Opposite to EX. Just like for equal to we have not equal to.

-Gouri

Former Member
0 Kudos

hi gouri,

Have you tried NULL for comparison.

Regards

Ramesh P

Former Member
0 Kudos

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.

nisarkhan_n
Active Contributor
0 Kudos

Instead of using DOES NOT EXIST (which is not logical as it is present in the Payload) try to check the value of the field with some dummy value, if the field exists then the value will be true if not false....

Former Member
0 Kudos

Hi Latika,

I dont have any other element which I can compare instead of NAME.

-Gouri

Former Member
0 Kudos

Hi Latika,

Some how I managed to get 2 fields and tried my scenario.

One more observation here is Interface determination condition editor

works fine if inbound interfaces are different. But it does not work if

inbound interfaces are same.

Any idea on this?

-Gouri

Former Member
0 Kudos

go with BPM only

bhavesh_kantilal
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Bhavesh,

I tried by manually giving the condition in XPATH but still it is not working.

- Gouri

Former Member
0 Kudos

Thanks a lot. Problem got solved by adding not function in XPATH.

bhavesh_kantilal
Active Contributor
0 Kudos

Gouri,

Would be helpful if you can give us the exact syntax that did the trick.

Thanks,

Bhavesh

Former Member
0 Kudos

(/IDOC NAME[not(Field Name from IDOC which u want to compare)] EX ).

-Gouri

Former Member
0 Kudos

I am trying to get this sort of check on the LIFNR field of a CREMDM idoc. If you are still watching this thread, could you tell me what is wrong?

(/CREMDM04 not(/IDOC/E1LFA1M/LIFNR) EX )

Thanks!

Keith

Former Member
0 Kudos

Hi Guys,

Could you please give us the exact syntax ?

Thank you.

Best Regards,

Evaggelos Gkatzios

Answers (3)

Answers (3)

Former Member
0 Kudos

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

sunil_singh13
Active Contributor
0 Kudos

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

Former Member
0 Kudos

I dont want to do anything in mapping. Because my mapping programs are ready. Only in interface determination I need to put a condition which will decide at runtime which mapping program should be used.

I hope you are getting my point.

-Gouri

Former Member
0 Kudos

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

Former Member
0 Kudos

I can use node functions in mapping. But before executing mapping I want to decide mapping program. which is possible with interface determination conditions. Any idea how to specify those conditions?

-Gouri

Former Member
0 Kudos

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

Former Member
0 Kudos

I have already mentioned that I have followed Help.Sap.com link.

If possible please help on how to specify conditions in Interface determination.

-Gouri