cancel
Showing results for 
Search instead for 
Did you mean: 

Archive File --File Adapter

Former Member
0 Kudos

Hi All,

I am using file adapter to Archive File. In Processing mode i have set as Archive and also selected the Add Time stamp checkbox.

Now the file is being archived with timestamp being added.

EX :

20061204-143518-299abc.txt

I want to send the file name in a mail.

how do i get the file name.

Regards,

rahul

ps : In the SOAP message payload there is a entry ..

SAP:PerformanceHeader xmlns:SAP="http://sap.com/xi/XI/Message/30">

- <SAP:RunTimeItem>

<SAP:Name type="ADAPTER_IN">INTEGRATION_ENGINE_HTTP_ENTRY</SAP:Name>

<SAP:Timestamp type="begin" host="xidev">20061204090518.299</SAP:Timestamp>

</SAP:RunTimeItem>

that timestamp actually represents the file name.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

been a lot of dayz..so closing this message.

Former Member
0 Kudos

You can archive in a stage directory, exceute an OS script that get the e-mail and than use the sendmail program. Than move the file in the final arching directory.

Regards,

Sandro

bhavesh_kantilal
Active Contributor
0 Kudos

Rahul,

Can you give more details?

You can access the file name in the mapping if you are SP14 and above.

In the sender File adapter, select File name and then in the mapping use the following code to get the file name,

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(

“http://sap.com/xi/XI/System/File”,

“FileName”);

String fileNanme = conf.get(key);

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm

Regards,

Bhavesh

Former Member
0 Kudos

Hi All,

Thanks for the links...

What i want is the file name of the Archived File. Not the file name which was read by the sender file adapter.

MY XI server is installed in windows . So i dont want to use OS commands.In unix it is easy to send mail ..

Thanks,

Rahul

Former Member
0 Kudos

If you want to try this way, there is not difference at this level between windows and unix.

For sendmail you can use this comman line tool:

http://www.glob.com.au/sendmail/

Regards,

Sandro

Former Member
0 Kudos

Sandro,

Thanks. i cant use sendmail..i am using ABAP proxy to update some data..and if theres error while updating then i need to send a mail with the archive file location.

Regards,

Rahul

STALANKI
Active Contributor
0 Kudos

use this /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 to get the filename.