on 06-13-2007 1:56 PM
Hi Expert,
Is there a way to add a counter to a receiver file adapter that uses FTP ?
Thank you in Advance
D
Hi Danny,
As far as i know theres no standard way you can add a counter when
you are writing a file using FTP.
Possibly what you can do is...
Create the file name in mapping and store the last counter used in a database.
So next time when you want to create a file you can do a lookup and get the last
counter and increment it by 1.
Regards,
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit,
Thank you for the feedback. I've created the filename in the mapping and stored the last counter like you have suggested. It works. The only problem is the Filename also appears on the created file. Is there a way to force the receiver file adapter to ignore the extra filename tag in the mapping?
Tks,
D
Hi Danny,
Yes you can suppress.. See this wonderful blog by Shravya,
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
Some pointers..
Create a separete node FILENODE and inside the structure create a single field FNAME. Map the filename to the field FNAME in mapping. Then in FCC use as mentioned in the blog.
Regards,
Sumit
ps : reward points and close the thread if your problem is solved.
Sumit,
JCO.Repository mRepository;
// Change the logon information to your own system/user
JCO.Client mConnection = JCO.createClient(
"XX", // SAP client
"XX", // userid
"XX", // password
"XX", // language
"XX", // host name
"XX" ); // system number
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "SAPLookup", mConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("ZRFC_FILE_NUMBERS");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
//input.setValue( a , "FILETYPE" );
mConnection.execute( function );
String ret = function.getExportParameterList().getString( "FILENAME" );
mConnection.disconnect();
return ret;
Check out this Blog.
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
Tks,
D
Hi,
new file is created for each document. The file name is extended with a counter, which is inserted before the file name extension (for example, default002.file). This selection is only available for the File System (NFS) transport protocol.
Make specifications for Counter Definition:
● Prefix
Specify one or more characters that you want to add before the counter in the file name.
● Format
Specify the first counter to be used. It must be a valid integer number. Leading zeros are permitted.
● Step
Specify the counter increment.
● Mode
Specify when the counter is to be added.
○ After First File
The counter is added when the file name is used unaltered for the first time.
○ Immediately
The counter is added with the first document.
Regards
Hemant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danny,
you can put a counter to the file name:
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm">Configuring the Receiver File/FTP Adapter</a>
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.