cancel
Showing results for 
Search instead for 
Did you mean: 

File name modification in a File adapter

Former Member
0 Kudos

Can I alter the file name via the module bean?

I have this snippet code...can I alter the file name the data is being created under.

Thank you.

try {

obj = inputModuleData.getPrincipalData();

msg = (Message) obj;

// Get the Supplemental data which is available as hash table

Hashtable mp = (Hashtable)

inputModuleData.getSupplementalData

("module.parameters");

// Get the file name which is being processed

if (mp != null) fileName = (String) mp.get("FileName");

}

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

no this module only works with sender file adapter

if you want to set the name you can use:

variable substituion (from sp12)

or adapter specific identifiers (from sp14) <--best solution

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

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

Former Member
0 Kudos

Michal / Krishna,

I got the same answer from you both and this solves my problem....didn't know SP14 had this awesome feature.

Like one of the guy mentions under blog comments - This should've been there a year ago.

I could not have done it thro' variable substitution since I did not want this in payload and we did not want file content conv to cut it....etc.

Michal - great blog.

Thanks.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

thanks

this solution is not also great but mainly very easy to

implement as you can do everything in the message mapping:)

Regards,

michal

Answers (1)

Answers (1)

moorthy
Active Contributor
0 Kudos

Hi Parimala,

The options are -

  • Variable Substitution from SP 12 onwards

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

*And Adapter Specific Propertis from SP14 onwards..

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

*Execute the Script via operating System command-

I don't think so, you can change it in the Receiver File Adapter Module.

Hope this helps,

Regards,

Moorthy