cancel
Showing results for 
Search instead for 
Did you mean: 

Reg message mapping

Former Member
0 Kudos

Hi Guys,

I have a requirement in message mapping.......

i have a field qual in the Customized idoc and the possible valuesfor the field are .......OT,IT,UT and ST...

if the value of QUAL is OTor IT or UT then target should get created and if the value is ST then mapping should not fail and target should not get created...the message should get dropped...

any suggestions please.....

Thanks,

Madhu

Accepted Solutions (1)

Accepted Solutions (1)

GabrielSagaya
Active Contributor
0 Kudos
QUAL->FixValues->equalsS->NOT->IfWithoutElse->TargetNode
           Constant(blank)-/  Constant((blank))-/

In FixValues Table Assign those following values

OT = T
IT  =  T
UT = T

Thanks

Gabriel

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Use like below.

There is no need of change the message mapping. You can made the change in the receiver determination step.In the receiver determination give the condition as like below.

Go to condition editor.

QUAL ='OT'

In condition editor Select insert group.

QUAL ='IT'

In condition editor Select insert group.

QUAL ='UT'.

It will make a OR condition.

After that In the " if no receiver is found,Process as follows" select end message processing without error. Now only QUAL = OT,IT,UT then target will create.

Regards,

Prakasu.M

prasannakrishna_mynam
Contributor
0 Kudos

Hello Madhu,

You can achive this using standard functions and UDF, since the standard way you need to use more elements i am specifying below the udf for this.

Select Simple Type (Value).

String rtnValue="false";

if(a.equals("OT")||a.eqauls("IT")||a.equals("UT"))
         rtnvalue="true";
return rtnValue;

and map as below

QUAL->UDF_NODE->CreateIf->target_Node

or

QUAL->UDF_NODE->IFWithoutElse->target

(This assumes your target node is optional 0..1/unbound occurences)

Regards,

Prasanna

Former Member
0 Kudos

Hi,

If the target is a node, then use createIf standard function.

If the target is a field , then use IfWithOutElse std function.The mapping would not fail as per your requirement in any of the cases mentioned.

Regards,

Swetha.

Former Member
0 Kudos

Hi,

What do you mean by message should get dropped????

Meanwhile wjat requirement you are saying can be achievedusing the createIF function at rthe receiver root node.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

HI,

by using create if the message get fails....it should not fail.....there should not be any errors in SXMB_MONI.....

i guess this can be solved with UDF..

Former Member
0 Kudos

I dont think the mesage get fails using CreateIf,..

Why dont you try with IfWithOutElse std function.....

Former Member
0 Kudos

Hi,

See your receiver side field should be 0..1 or 0.. unbounded. Now if you use the combination of ifwithoutelse and createif, it shud work as you wish. If field contains ST the target field will not be created and there will not be mapping error. Whereas if the value is amongst what you are expecting then target field is created.

I dont see need of UDF for achieving this.

Regards,

Siddhesh S.Tawate

Correction in above reply: Map creatif to your field. I thought that you want to drop whole mssg if your field contains ST.

former_member200962
Active Contributor
0 Kudos
there should not be any errors in SXMB_MONI.....

as pointed by prasanna this is possible only if the target message occurence is 0..1 or 0..unbounded..