cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Receiver Mail Adapter

Former Member
0 Kudos

Hello,

Scenario : Proxy --->> Email with attachement(Text)

I am sending the multiple records from proxy into the Email adapter where filename is dynamic and Receipient is also dynamic.

So i have used the following blog. to achieve this funcitonality.

http://wiki.sdn.sap.com/wiki/display/SI/DynamicEmailAttachmentnameforReceivedMails

But now the problem is whatever we map with content field it takes only one record instead of all records.

Can you please help in this case. how to get all the records in attachement.

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi,

this looks more like a mapping problem. Please check your (message) mapping and test to assure it takes all records. Assumedly the imput parameter of your udf which represents the records has the wrong occurance (execution type shouldnt be "Single Values"), may be your source field has the wrong context.

Regards,

Udo

Former Member
0 Kudos

Hi,

Actually i have not written any UDF for this.

If i need to write the UDF can you please help what kind of logic i need to put.

Thanks,

Jignesh shah

shweta_walaskar2
Contributor
0 Kudos

Hello Jignesh,

You can create a context UDF as:

public void createContent(String[] a,ResultList result,Container container){

String str="":

for(int i=0;i<a.length;i++)

{

if(i==(a.length-1))

str=str+a<i>;

else

str=stra<i>"\n";

}

result.addValue(str);

In str=str+ statements,its a with index i ,instead of only a as it is changed after posting .

Use this UDF between your source and target field.

This would create all records.

Please let us know if this works for you.

Thanks.

Regards,

Shweta