Changing file name dynamically in INFOSPOKE
Hi All,
I am using infospoke to export data to third party.
But here file name is constant. I want to change the file name using prefix with time stamp before filename. For example if data is getting extracted today and file name is suppose ABC then it should become 03.06.2009ABC.
Please let me know the process how to achieve this.
Your input would be a great help to me.
Thanks,
Uday.
Hi dear..ur file will have dynamic date appended in the begining as per the current date..and I do always...so don't worry about that..few more settings are there when you will be specifying logical path..
go to transaction file
1.say yes on cross client message
2.double click on the logical path definition..check if there already specified logical path..for you..(you may find it out by clicking on another tcode AL11)
once you know it..you can find the details by clicking on assignment of physical path ...
if its not present..i dont' hope so..then create one..eg. ZLOGTEST
.Logical path ZLOGTEST
Name Logical file Path Definition(folder path)
Syntax group UNIX Unix compatible
Physical path /transfer/<FILENAME> (here it depends on ur application server folder check AL11)
3.Now click on Logical file name definition
Logical file ZTEST_INFOSPOKE
Name ZTEST_INFOSPOKE
Physical file /<SYSID>/<DATE>_ZTEST_.CSV
Data format ASC
Applicat.area BW
Logical path ZLOGTEST
when u would have defined logical path in step 2 the only u can use it in step 3.
Ti will work always..to add time also use tab <TIME> in between...if u want..
regards,
rk
Similar Messages
-
Error in reciever file adapter , where i am getting file name dynamically
hi all,
error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'i am getting new error
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
this is my strcuture
and i have changed my structure
<HEADER>
<ADDRESS1/>
<ADDRESS2/>
<ADDRESS3/>
<ADDRESS4/>
</HEADER>
<HEADER_GST>
<TAX1/>
<TAX2/>
<TAX3/>
</HEADER_GST>
<LINE>
<QTY/>
<UOM/>
<UNIT_AMT/>
<CHARGE_TO_DT/>
</LINE>
<FILENAME>
<FILENAME/>
</FILENAME>
i have given the recordset structure as
HEADER,HEADER_GST,LINE,FILE -
Hi Experts,
I am working on one scenrio, where i am fetching the file name dynamically by adapter module.
Now, the file name needs to be checked for the following conditions:
BOOKING_REF_DELIVERYNO_WB.pdf
BOOKING_REF_DELIVERYNO_BOLCOPY.PDF
DELIVERYNO_AWB.PDF
Depending upon the type of file being picked up by PI from the mail box,following needs to be done:
1.time stamp needs to be added ..
ex..
for file SO10162239_123_458_BOLCOPY.pdf--> the file name must be changed to :
SO10162239_X2100_20101206_123_458_BOLCOPY.pdf.
Please suggest if this can be done by graphical mapping ?
Thanks,
Sushamahi,
I am using following UDF..
FileName->ParseFile>getNykFilename>concat--
Current date-> concat> Trim> FileName
concat----
|
constatnt[.pdf]--->
UDF for parse file:
String[] sarray;
String regex = "\"";
String retstring;
String fname;
int l= raw.length();
try {
sarray = raw.split(regex, 3);
retstring = sarray[1];
fname=sarray[l-1];
if( fname=="WB")
raw.concat("_X2100_");
else if (fname=="BOLCOPY")
raw.concat("_X2101_");
else if (fname=="AWB")
raw.concat("_X2102_");
} catch (Exception e) {
retstring = "no_att_name_found.err";
return retstring;
UDF for getNykFileName:
String[] sarray;
String regex = "[_]";
String retstring;
if(!orgName.endsWith(".err")){
try {
sarray = orgName.split(regex, 3);
retstring = sarray[0];
} catch (Exception e) {
retstring = "nyk_filename.err";
return retstring;
}else{
return orgName;
But, its not working..
Its giving the file name as:
no_att_name_found.err20101206 for the input file : 801243209_81473641_wb.pdf
Display queue result for parsefileName:
"no_att_name_found.err"
Please suggest.
Thanks,
Suahama -
Change file name with oreilly servlet
I am using oreilly servlet package and I want to change the file name to the file I am uploading, is this possible ?
How ?
Thanks.
here I post the servlet code:
package com.reducativa.sitio.servlets;
* DemoParserUploadServlet.java
* Example servlet to handle file uploads using MultipartParser for
* decoding the incoming multipart/form-data stream
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import com.oreilly.servlet.multipart.*;
public class DemoParserUploadServlet extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType("text/plain");
out.println("Demo Parser Upload Servlet");
File dir = new File("f:/");
if (! dir.isDirectory()) {
throw new ServletException("Supplied uploadDir " + "f:/ " +
" is invalid");
try {
MultipartParser mp = new MultipartParser(request, 10*1024*1024); // 10MB
Part part;
while ((part = mp.readNextPart()) != null) {
String name = part.getName();
if (part.isParam()) {
// it's a parameter part
ParamPart paramPart = (ParamPart) part;
String value = paramPart.getStringValue();
out.println("param; name=" + name + ", value=" + value);
else if (part.isFile()) {
// it's a file part
FilePart filePart = (FilePart) part;
String fileName = filePart.getFileName();
if (fileName != null) {
// the part actually contained a file
long size = filePart.writeTo(dir);
out.println("file; name=" + name + "; filename=" + fileName +
", filePath=" + filePart.getFilePath() +
", content type=" + filePart.getContentType() +
", size=" + size);
else {
// the field did not contain a file
out.println("file; name=" + name + "; EMPTY");
out.flush();
catch (IOException lEx) {
this.getServletContext().log("error reading or saving file");
}Hi there,
I am facing the same problem that you have stated in your Feb 26, 2002 10:28 AM message regarding "change file name with oreilly servlet", I would like to change the file name to include a unique identifier upon upload, did you ever find a solution to your problem?
Thanks!
Todd
[email protected] -
Is it possible to change file name policy in the JRE cache folder?
We are getting calls from our clients complaining of slowdowns in loading our Java applet. The reason is a virusscanner. If a virusscanner is in the middle, it can drastically slow down the download process, and therefore cause some high delay before the user can work on the our product as expected.
On this csutomer's side, it may take up to 10 min (the first time it is ran) instead of 1 min. JRE 1.6 is in use.
They dont want to exclude from antivirus scan all files from Sun\Java\Deployment\cache folder.
Question:
Is it possible to change file name policy in the JRE cache to make it less unique?
Thanks,
-Dimadgomel wrote:
We are getting calls from our clients complaining of slowdowns in loading our Java applet. The reason is a virusscanner. If a virusscanner is in the middle, it can drastically slow down the download process, and therefore cause some high delay before the user can work on the our product as expected.
On this csutomer's side, it may take up to 10 min (the first time it is ran) instead of 1 min. JRE 1.6 is in use.
They dont want to exclude from antivirus scan all files from Sun\Java\Deployment\cache folder.
Question:
Is it possible to change file name policy in the JRE cache to make it less unique?
I suggest you solve the real problem - big files.
There are two scenarios
1. Initial download
2. Updates.
The first takes as long as it takes. No way around it.
The second means that you can't use one jar. Otherwise every single update requires downloading the entire application every time. Multiple jars means only the one that changed is downloaded. -
Passing file name dynamically in Synchronous read operation of FTP adapter in OSB
Hi,
We are implementing the integration in OSB 11g and using FTP JCA adapters to check if the file exists in the FTP location or not. We are using Synchronous read operation of FTP adapters. We need to pass the file name dynamically at run time. In the JCA file we can hard code the file name. How that file name can be taken dynamically using OSB.
Regards,
SharmisthaHi Sandeep,
This is possible.
For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
In the case of receiver file adapaters, you have 5 options for file creation like,
1.Create
2.Append
3. Add time stamp
4.Add Counter
5. Add Message ID
You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
Hope this helps -
How do I reconnect media after changing file name?
The original file name is 1001.WAV I changed it to Take1 . How do I relocate the files? I use Pluraleyes to sync all my files.
Cheers, GregChange it back. NEVER change file names in the Finder level if the media is in an FCP project. Change it BEFORE you import it into FCP...or change the name IN FCP. What you did was bad bad wrong wrong. Expecially since you already did things like sync it up with pluraleyes.
Change it back. Then change the name in FCP. -
Need example to create File names dynamically using File adapter
hello,
I am mapping an IDOC to a flat file using XI and a file adapter. I need to be able to output a file name dynamically depending on the data in the IDOC. For example if the IDOC has 310 as the company code, the file name should be xyz.310 and if the IDOC has 600 as the company code, the file name created by the file adapter should be xyz.600. Please some body provide me with an example of the XSLT code that I will have to write in the dispatcher User Exit.
Any help will be greatly appreciated.Nope
But you could add a dummy row to your source to include column headers and then use options column headers in first row in flat file connection manager.
So suppose you've three columns column0,coulmn1,column2 and you want to make it as ID,Name,Datethen make source query as
SELECT 'ID' AS Col1,'Name' AS Col2,'Date' AS Col3, 0 AS ord
UNION ALL
SELECT Column1,Column2,Column3,1
FROM YourTable
ORDER BY Ord
then choose column headers in first row option
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
The book I downloaded has each chapter as a seperate .pdf, each with it's own unique filename. ADE has retitled every chapter (.pdf) to the name of the book. Now that all the chapters have the same name, I can't transfer them to my Kobo. How do I change titles or get ADE to stop changing file names?
ThanksDimitri,
As usual, thanks for the simple but informative explanation!
Jason
"Dimitri Rakitine" <[email protected]> wrote in message news:[email protected]..
> I think your theory is correct - java classes cannot contain '-' in
> the name and 45 is ascii decimal for '-'. 46 is '.'.
>
> Jason Rosenberg <[email protected]> wrote:
> > I have been working with using jspc.
>
> > I have noticed in a few cases it changes file names.
>
> > For instance, when I compile the file: '6-12adrworld_090700.jsp',
> > it produces: '_6_45_12adrworld_090700.class'
>
> > Where does the '_45_' come from? I am trying to work with the
> > theory that '-' becomes '_45_'....
>
> > Also, in another case, I noticed a '_46_' was inserted.
>
> > Any ideas? Is this documented anywhere?
>
> > Jason
>
>
>
> --
> Dimitri
-
Passing file name dynamically to sql loader ctl file
Hi,
I am new to scripting and I have a complex requirement involving writing a script.
Requierment:
I need to upload a CSV file from a FTP server into oracle table using SQL Loader. The file name resembles like APF0912312359.csv represents 31-DEC-2009 23:59 and there will be multiple files in same day indicated by differnt timestamp as its filename. Once I load a file using SQL loader, I need to move the file to another directory for archival.
Since the sql loader ctl file has a fixed file name, I would like to know how I can pass the file name dynamically to ctl file to load a new file every time it runs.
Any help is greatly appreciated..
Bye
Sudheer
Edited by: user2138419 on Oct 28, 2009 4:08 PMI agree with Pradeep in regards to declaring the file names on the command line. However, I do have a concern regarding presenting the password on the command line as any user that can issue a ps (assuming Unix ~= Linux here) would be able to read it while the sqlldr command is running.
Unfortunately, you may not always have the option of declaring the files on the command line. I was recently challenged with this in a Windows 2003 Server environment running SQL*Loader: Release 10.2.0.1.0. In this environment I found that I am able to set a variable file name in a calling batch file and use that value in the control file successfully. Just to demonstrate the approach:
Batch file:
set IN_FILE=’c:\inbound\load_me.txt’
sqlldr user/pswd@db PARFILE=’c:\parameters.txt’
Parameter file:
errors=500000
rows=50000
control=%CTL_FILE%
bad=%BAD_FILE%
discard=%DSC_FILE%
log=%LOG_FILE%
Control file:
LOAD DATA
INFILE ‘%IN_FILE%’
INSERT
INTO TABLE table_to_be_loaded
I’m really interested to see if this would work on Unix.
-Luke -
In my receiver adapter the file name schema is intern_pay%var1%.dat and in variable substitution var1 is defined as message:message_id_hex.According to this i can see the file in the target directory as intern_payb0ba03a0904711dbbb9e00000e252c96.dat
Can any one please help me out to change the format of the file in the target directory to intern_pay_yyyymmdd.dat
Briefly, can any one please explain me how to change the file name schema in the receiver adapter.
Many Thanks,
Smith.Hi Paul,
You can use DynamicConfiguration in a user defined function to achieve this.
Go thro these threads, they will provide you the solution.
Dynamic Directory and File Naming in Receiver Adapter
In the above thread look at the post that answered the question. It will certainly help you.
And go thro this also.
Dynamic File Name for Receiver File Adapter
Regards,
P.Venkat -
Infopackage routine for changing file name
Hi Everyone,
I have to load flat files from application server directories. I get these files from different locations and they are saved in own (location) folders by a script). I would like to run these file from infopackage through process chain. the problem is that these files have changing names. The format is like this
Canada_co3300.csv
I can write a routine is my infopackage but "co3300" keeps changing as it represents different companies code in that particular location (Canada).
I have a routine
data: F1 type string value 'D:\usr\sap\FLAT_FILES\Inbound\Cayman\Canada_<b>co3300</b>_',
F2 type string '.csv'.
concatenate f1 f2 into p_filename.
How can I get a variable <b>co</b>---- in my routine so my infopackage can read the file if <b>co</b> has different value like co2000. Thanks In advance.
Regards,
AsadHi Saugata,
My flat file name has a naming convention based on company code in application server folder, so I get files with name
Canadaco<b>3000</b>.csv or
Canadaco<b>2000</b>.csv or
Canadaco<b>4000</b>.csv or something else <b>(co</b> number keeps changing)
So My file name keeps changing all the time. I would like my infopackage to read these files automatically thorugh a routine or logical file name. I have tried both, but donot know how to configure this scenerio thorugh my infopackage. Please give me steps to use that table you mentioned. Thanks . -
Unable to change file name in Metadata pane - Lightroom 2
I can't seem to activate the file name area in the Metadata pane in the Library module. It is solid gray and I cannot make the area active. With the correct folder active, the files seem to be normal in all visible ways, but the ability to change the name is not available. This is true in Grid or Loupe views. It is true with only one Active image. Any thoughts?
Are the images on-line? Though that shouldn't make a difference. You should still get a non-grayed out filename and get a warning dialog, instead if you try to set a name change.
Don -
Change File Name In The "File Download" Dialog Box For Web Reports
Hi All ,
I followed the below note to change the "File Download" name.
How To Change The File Name In The "File Download" Dialog Box For Web Reports? Doc ID: Note:418366.1
However its not working. Has anyone tried this and works fine ?
Basically I wanted to change the name "rwservlet" when a report is run in an
excel format.
Rajesh Alex
Rajesh AlexHello,
Have you checked if a HTTP header "Content-disposition" is returned ?
You can use ieHTTPHEaders for IE
http://www.blunck.se/iehttpheaders/iehttpheaders.html
and
Live HTTP Headers for FireFox
https://addons.mozilla.org/en-US/firefox/addon/3829
Regards -
How to generate file name dynamically in receiver FIle adapter? Please help
Dear Experts,
I have a scenario where I need to generate output file with the name dynamically pulled from the XI payload.
In receiver File communication channel I don't see any option where we can specify the XML path for the file name.
For example:
If my inbound XML structure (inbound interface) is like below:
<filename>file123.txt</filename>
<RootNode>
<Element1>Product123</Element1>
<RootNode>
From this I need to pick the filename value and generate the output file with the same value.
How can I achieve this? Please help!
Thanks & Regards
Gopal
Edited by: gopalkrishna baliga on May 3, 2011 1:10 PMGopal,
You can use DynamicConfiguration class for this.
You need to write UDF for this and with input of filename you want to set and map this UDF to the top level node.
Refer the below famous blog from Micheal:
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
You can also use Variable substitution to get value from payload, search SDN on this.
--Divyesh Vasani
Maybe you are looking for
-
How come when every time i open ff i have the same 2 tabs instead of the one I choosed in my options
'''''texte en gras''''' in "option internet" & "general" & i chose "new tab" for my home page, but every time i open firefox i have two tabs that loads, one is the tab i asked for, but another one creep in there, it is an old web page where i downloa
-
Control OB52 per Business Area
Hi All, We are having multiple Business areas under 1 company code. Any idea on how to control posting period per business area? Thx Best Regards, Kawi
-
HT1338 Why can't I search in my toolbar anymore?
I now have to open google up in a separate tab/window but I used to be able to just put my search straight into the toolbar. A small thing but it's driving me nuts! It seemed to happen after my son had been playing around on it.
-
I must decide platform selection for PI/XI system?
<b>I must decide platform selection for PI/XI system?</b> Most important criteria is performans.Which platform is recommended? Is there a web address is comparing platforms about PI/XI performance? Thanks
-
I am trying to upload a pdf and it won't let me when I hit the button
In the sign in to export a pdf now area where you click on the upload pdf nothing happens Why