cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Adapter and File content conversion.

Former Member
0 Kudos

I have a scenario to send data from SAP to 4 different boards. I have used a Multi mapping for this scenario. I am using Proxy for SAP to xi and SOAP, File and Mail adapter for the external connections.

Questions:

1) I need to send a mail in CSV or Excell format in one scenario. I have used AF_StrictXml2Plain Module but its not working? any thoughts?

2) In the file adapter I have to add the YYYYMMDD (current Date) to the file name? when I use timestamp i get the time too, any way of getting only date? I cant use the Variable substitution as i dont have date in my payload.

3) Receiver File content conversion:

My Message Type Looks like this

MT_XX_XX

Row

title

xxx

I have used these parameters:

Recordset Structure: Row

Row.addHeaderLine : 0

Row.fieldSeparator : ,

Row.endSeparator: 'nl'

am I doing something worng, the file content conversion doesnt work.

Please let me know

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member190389
Active Contributor
0 Kudos

Use Dynamic configuration to get the date stamp only

1. Create


DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

.....
//code to fetch date from filename 
......
conf.put(key, fileName);

return fileName;

Set

Edited by: Progirl Progirl on Jul 25, 2008 12:25 PM

former_member190389
Active Contributor
0 Kudos

Hi,

Make sure u are using the bean before the mail adapter bean.

Before using the file content conversion make sure that there are no substructures in it , in order to use addheader line as 0. else use addheaderline 3 and give the headerline as comma seperated values

for e.g if this is the type then addheader line= 0

Type 1 :

Record_Mt

Row

field1

field2

else if this the type then addheaderline = 3

*Type 2: *

Record_Mt

Row1

field1

field2

Row2

field1

field2

add module like this

localejbs/sap.com/AF_Modules/StrictXml2PlainBean

with the module key e.g. key

for type 1 struct (as above )add parameter- key as singleRecordType and value as Row with comma seperated value. (remember header line is 0)

for type 2 structure (as above )add parameter- key as recordTypes and value as Row1, Row2 with comma seperated value. (remember header line is 3)

Former Member
0 Kudos

Thank you for the answers, the mail adapter content conversion issue is fixed.i was using the mail adapter bean before transform bean. Thanks again.

Regarding DynamicConfiguration,I have never used it before, please let me know the steps of where and how to use the code.

And also is it possible to have a Dynamic name for attachment from the mail adapter

Thank you.

Former Member
0 Kudos

Hi,

Have you specified module key and parameters for AF_Modules/StrictXml2PlainBean?

Parameters:

recordTypes ---> rec1,rec2...

<rec1>.fieldSeparator ---> ,

<rec1>.fieldLengths -


> 10,12,....

Please check communication monitoring for file receiver channel.

There must be some error.

Check if you have spelled the parameters correctly.

Use Dynamic configuration in mapping to get the date in desired format and set the filename.

Thanks,

Beena.