cancel
Showing results for 
Search instead for 
Did you mean: 

UDF required

Former Member
0 Kudos

Hi Experts,

I am using multimapping in my file to IDoc scenario. My file will be in two formats:: File_1.csv && File_2.csv. If I get "1" in file then I need to map with one message type and if file contains "2" then I need to map with other message type in mapping. I am using dynamic configuration to get the file name and using it in condition.

My problem is: whenever I get file name like File_1.csv, my mapping should works only for Message Type 1. And the second message type should not create.

So please give me some UDF code how do I suppress the second mapping. Only one message should be executed.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

> My problem is: whenever I get file name like File_1.csv, my mapping should works only for Message Type 1. And the second message type should not create.

>

> So please give me some UDF code how do I suppress the second mapping. Only one message should be executed.

Hi,

There is no need of udf for this. Just use some standard function & constants e.g. 'if', 'EqualS' and 'constant' and put condition on parent node of Message Type 1 & 2, so that at a time only one condition will be true which will generate only either message type1 or 2.

Regards,

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

Thanks You

How to suprress the Message2?

Regards,

Rams

former_member200962
Active Contributor
0 Kudos
SourceField -->DynamicConfigUDF -->
                                                 --> equalS --> If(Then Constant(keep_it_blank)) --> MessageType1
                      Constant(file1)-->

Apply the above logic to the target message type nodes...Constant(File_Name) should be kept as per the file for which you are validating.

Above will generate only MessageType1....MessageType2 wont come....similarly if O/p of Dynamic config UDF says it is File2 then Messagetype2 will come and not 1

Regards,

Abhishek.

Edited by: abhishek salvi on Dec 7, 2009 3:54 PM

Former Member
0 Kudos

> How to suprress the Message2?

You have to put conditions on both message type1 & 2. See the logic given above by Abhishek.

So to generate message type1 you have to check if file name from you dynamic configuration contains file_1 & to generate message type2 check if file name is file_2.

Answers (0)