cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass a filename dynamically in incoming email and process that file

Former Member
0 Kudos

Hi,

We have to process an incoming file with XI, the name of which we don't know to design time. The filename is passed dynamically in an incoming email, in the body section. We can parse the filename from the mail already. However, file adapter-sender does not accept variables (whereas receiver does), so we have no way to pass this name to the file-sender.

What would be the best way to implement this scenario? I'd really appreciate a bit more explanation than 1-liner answers (e.g. links to help.sap.com We have SAP XI 7.0 SP15.

TIA

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

We developed an adapter module, which reads the incoming mail and returns the file content in the payload.

Former Member
0 Kudos

not sure if this the best approach but you could try something like this...

1. Mail-XI-File Scenario,

where you get the file name from incoming e-mail and call the shellscript in receiver file adapter to rename the incoming file to <generic name>+date time stamp.

2. File-XI-<Target> scenario to pick up the renamed file.

i.e sender file adapter polling for a <generic name>* files

Former Member
0 Kudos

Thanks. This is similar to our plan B That is, using a wildcard, processing all files in the incoming directory, and moving them after processing. This way, only the unprocessed files would be in the source folder. IMHO, it's not elegant.

Besides, should a second mail get received, before the first file is processed completely (e.g. due to an error, slow FTPS transfer rate, etc.), the second process would try to pick up the first file as well, which would mess up everything.

There should be a way to set a parameter for the sender-file adapter...