cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem

RameshGulipall
Active Participant
0 Kudos

Hi All,

my interface is SAP to Siebel. While running my interface I got error in sxmb_moni is EXCEPTION_DURING_EXECUTE .but I down load the Pay load message and test in my mappining is successfully so please help me out and I did the cache refresh(sxi_cache)but I got Exception_during_Execute.

One more problem with my target side structure. That is if my source side is element is null then pass as null or if source element is having data then pass as same data to my target side. For the checking null or data I wrote one UDF like this

<b> String Name1="";

if(a == null || a == " ")

{

return " ";

}

else

{

Name1 = a;

}

return Name1;

</b> I did mapping like this is

<b>1) ANRED---my UDF-----ParentAccountId

2) BANKA---my UDF----Email Address.</b>

ANRED and BANKA are the my source IDOC elements. while execute my custom IDOC If I am not give any data in 2 above elements then it pass as the empty tag in my target side as ParentAccountId and Email Address .

I hope u got my problem … please help me out.

Regards,

Ramesh

Accepted Solutions (0)

Answers (4)

Answers (4)

deviprasad_pothireddy
Active Participant
0 Kudos

Hi Ramesh,

I think this weblog will help you how to use the function mapWithDefault.

/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13

Regards,

Deviprasad

Former Member
0 Kudos

Hi Ramesh,

if I properly understood what you need, you want that a target field is filled with a source field if this exists, otherwise with an empty value (constant).

For this you do not need an user defined function but you can use the standard function (graphical message mapping) exist that returns true if the source field exist, false otherwise.

This condition will drive an if-else block

The "then" condition (so if the source exist) will receive the source field as input.

The "else" condition (source does not exist) will receive the constant value "" as input.

The output of the if-else block will be linked to the destination field.

Regards,

Sergio

Former Member
0 Kudos

Hi,

Use fuction "mapWithDefault" available in Node functions.

You can give a default value in the property of this function.

Regards,

Jai Shankar.

Message was edited by: Jai Shankar

RameshGulipall
Active Participant
0 Kudos

Hi Jai

Thanks for your quick reply.while doing map test is is fine.But while execut idoc i got problem with blank field in my target siebel.if it is balnk dataI want empty XML tag in my target side .

pls help me out...

Regards,

Ramesh

Former Member
0 Kudos

Ramesh,

you do not need an udf for this:

but an if, one exists and a constant value.

SOURCE --> EXIST --> IF

SOURCE -


> THEN

CONST -


> ELSE

and assign the output of the if block to you dest field.

Regards,

Sergio

RameshGulipall
Active Participant
0 Kudos

Hi Sergio,

Thanks for you quick responces.pls tell clear in mapping..

Regards,

Ramesh

Former Member
0 Kudos

Hi Ramesh,

Do you need the value "a" if any value exists in the source node anred regardless of the value

Regards,

Jai Shankar.

RameshGulipall
Active Participant
0 Kudos

hi Jai,

yes.If value exist in source node anred then send the value to target side.if value not exist in siurce node anred then send empty element in target side

regards,

ramesh

Former Member
0 Kudos

>>>>yes.If value exist in source node anred then send the value to target side.if value not exist in siurce node anred then send empty element in target side

If I got it clear, you need to send the value present in "anred" to target if any value exists otherwise send an empty tag. Rite???

If this is your requirement you can use mapWithDefault function as I said. On the other hand if you need to send the value "a" irrespective of value available in "anred" you need to go for if condition with a exist function..

Let me know if you need more help on this..

Regards,

Jai Shankar.

RameshGulipall
Active Participant
0 Kudos

hi Jai Shankar,

Thanks for your replys.i got sloved my problem base if then else funcation.Thanks for u help.

<b>But i have one proble with SXMB_MONI while montering the my message it is given Red Flage and error is during Mapping Exception.but i tested Payload message is succeses in my mapping so reslove the this problem</b>.i mapped all the mandatory fields and optional fields

pls help out..

Regards,

Ramesh

Former Member
0 Kudos

Ramesh,

Check your mapping. Just change the description, save and activate it again. Might be some problem with cache...

Also try cache refresh..

Regards,

Jai Shanakr.