File Name for Proxy to File

Hi experts,
My Scenario proxy to file(FTP). Currently in my Sender Data Type Proxy one of the field holds the file name to be created at the FTP.
Could anyone help me how to use that field data (name) to create the file(FTP) with that name?
Thank you experts.
regards,
s.saravannan

Hi,
You can get the same by creating a simple UDF (one argument - fname) and use the following code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename = fname;
conf.put(key, filename); 
return  "true";
Additional parameter, in Receiver communication channel is, provide file name as * and "Set Receiver File Name as Payload Attribute Value".
Regards,
Sachin Dhingra

Similar Messages

  • Assign Logical file name for the physical file path through Program

    Hi all,
    I am having a physical file which is getting generated dynamically. It is having the date and time stamp in its name which is added at runtime.
    Now I need to assign a logical file name for the physical file path through the program.
    Is there any FM or any other method to assign the same.
    Gaurav

    I think it is not possible. becuase the date & time added at runtime. so if you check the table  PATH you can find filename and their definitions

  • Log4j - issue in configuring the file name for daily rolling file adapter

    We have configured the log4j properties. We want to create back-up of log file each hour. The file name of the log file is MyApp.log and as per the below configuration after each hour backup file is created as
    MyApp.log<<time>>
    but we want that file should be created in follogin format
    MyApp<<time>>.log
    Below are the log4j properties configured, please let us know, what should be the correct option to create the filename in desired format.
    # Set root logger level to DEBUG and its only appender to MyApp.
    log4j.rootLogger=DEBUG, MyApp
    log4j.appender.MyApp=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.MyApp.File=D:/logs/MyApp.log
    log4j.appender.MyApp.DatePattern='.'yyyy-MM-dd-HH
    log4j.appender.MyApp.Append=true
    log4j.appender.MyApp.layout=org.apache.log4j.PatternLayout
    log4j.appender.MyApp.layout.ConversionPattern=[%d{yyyy-MM-dd} %d{HH:mm:ss z}] %m%n

    yes you can use /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW
    In the SAP system, there is no uniform rule for the structure of the actual text key Textname. However, in order to be able to maintain the structures and fields, you have to know what the structure of text name as well as the values for text object and text ID are.
    Procedure
           1.      Display a text of the required text type.
           2.      Branch to the editor.
           3.      Choose Goto > Header.
    The Text header dialog box appears.
    Result
    In the Text header dialog box, you gather the required information.

  • Dynamic File name for Open Hub file

    Hi All,
    I wanted to create a .csv file using open hub destination. I wanted the name of the file to be dynamic based on month. for example in jan I wanted it as 01.Dump for January and 02.Dump for february.
    is is possible at all to do that.I wanted to save the file in the application server. There should not be any manual intervention the process.
    Thanks in advance.
    Regds
    Raghu

    Hi
    We have take month from the first record that we read.
    Our requirement is to take one months data and give it in a file with a file name having the corresponding month.
    In the code mentioned below MOC_CODE is the field that is used for this purpose.
    Hope it helps.
    Regards,
    Raghu
    code:
    #!/bin/sh
    Script to dump file.
    Parameters.
    $1 Division name to extract from the data file.
    It re-arranges the columns.
    It replaces values in strings.
    Parameters.
    DATA_FILE_NAME="data_file.csv"
    HEADER_FILE_NAME="header_file.csv"
    DIVISION_NAME="$1"
    Re-arrange header file columns.
    Transpose rows to columns comma separated.
    HEADER_ROW=`cat "$
    Re-arrange header columns.
    Re-direct the output to a temporary file.
    " | tr '\n' ',' | sed 's/,$//g'`
    echo "$" | awk 'BEGIN { FS = ","; OFS = "," } { print $2, $3, $1, $4, $5, $6, $7 }' > "$.$.tmp"
    Prepare awk program.
    Re-arrange data file columns.
    Replace UNI in 6th column with UNIT and Replace TON in 6th column with TONS.
    Filter division rows.
    AWK_PROGRAM="BEGIN { FS = \",\"; OFS = \",\"; TVAL = 0 } \$5 ~ /$/ { sub( \"UNI\", \"UNIT\", \$6 ); sub( \"TON\", \"TONS\", \$6 ); print \$2, \$3, \$1, \$4, \$5, \$6, \$7; TVAL = TVAL + \$7 } END { printf \"$ Total Value: %f\", TVAL 2> \"$$Re-direct the program to a temporary program file.Control.ctl\" }"
    echo "$" > "$.awk"
    Execute the data file formatting command.
    awk -f "$.awk" "$" > "$.$
    Get generation date.
    Get moc code from data file.
    .tmp"
    GENERATION_TIME=`date +"%Y%m%d_%H%M%S"`
    MOC_CODE=`head -1 $ | awk -F, '{ print $3 }'`
    Prepare dump file.
    DUMP_FILE_NAME="$_$_$_$"
    cat "$.$.tmp" "$.$.tmp" > "$
    Remove temporary files.
    FTP dump file to remote server.
    FTP.
    rm *.tmp
    REMOTE_SERVER="<replace with server ip address>"
    REMOTE_USER="xxxx"
    REMOTE_PWD="xxxx"
    ftp -n "$" << EOF
         quote USER "$"
         quote PASS "$"
         ascii
         put "$"
         bye
    EOF
    Exit.
    exit 0

  • How to read a ftp file with a specified file name in Proxy-XI-File scenario

    Dear all,
    I have the following requirement:
    The end user send a request via the proxy to XI, within the request parameters there is a file name, and the XI need to retrieve the file content from a ftp server with this specified file name, how can I achieve this?
    According to my understanding, the file receiver adapter can only write the files to the server.
    Thanks and regards,
    Bean

    Dear Bean,
    This can be achieved using a BPM...
    you will have to use Two parallel receive steps within a fork...
    1. 1st receive step :This will bring the data from the proxy
    2. 2nd receive step :according to pipeline step before this step would be executed interface determination would be called withini that you can put a mapping wherin the source and target message type would be as follows
    a. source message type ; the file structure that is going to be picked from ftp structure
    b.target message type : same structure as source except at top you will add "filename" field
    (you cna find on forum how we can get a fielname in the mapping ..in case you dont knw )
    3. now you can define correlation on the field "fielname" in both the receive steps provide the hirearchy and structure of data coming from both file and procy are same...
    4..  after corelation you can put any steps like transformation ( as you want)
    Hope this helps

  • Export Indd to EPS/JPG and set the file name  for EPS/JPG file

    Hi,
       When I export the INDD to JPG/EPS, I want to set the file name with pageNumber  for JPG/EPS files using javascript.
    For Example
    If I set the file name as EPSFile.eps, after exporting the indd(with 2 pages) to eps
    ,files are generating in the following name EPSFile_1.eps, EPSFile_2.eps.
    but I want to set the file name as EPSFile_001.eps and EPSFile_002.eps using javascript.
    anyone knows please reply for this.
    Regards,
    Mubeen

    Hi,
      I tried the following code.
    var JPGe = new File("Applications/PDF/JPG/file.jp");
    app.activeDocument.exportFile(ExportFormat.jpg, );
    when I use this code ,exported jpg file names are
    file.jpg, file1.jpg,file3.jpg.
    but ,I want the output file names as file_001,file_002,file_003,
    Thanks,
    Mubeen

  • Setting file name for a downloaded file

    I've set up a file download using code I've gleaned from jsf forums. However, the file name is not being set correctly. When the user downloads File.doc, it shows up as downloadPage.jsf. Am I setting the header correctly?
    public class VendorInfoBean extends AbstractViewController {
        public VendorInfoBean() {
        public String downloadVendorApp() {
            ExternalContext context = getExternalContext();
            String path = context.getInitParameter("externalFiles");
            String filename = "Vendor_Application_e_Form.doc";
            String fullFileName = path + filename;
            File file = new File(fullFileName);
            HttpServletResponse response = (HttpServletResponse) context.getResponse();
            response.setHeader("Content-Disposition", "attachment;filename=\"" + filename + "\"");
            response.setContentLength((int) file.length());
            response.setContentType("application/msword");
            try {
                FileInputStream in = new FileInputStream(file);
                OutputStream out = response.getOutputStream();
                // Copy the contents of the file to the output stream
                byte[] buf = new byte[1024];
                int count;
                while ((count = in.read(buf)) >= 0) {
                    out.write(buf, 0, count);
                in.close();
                //out.write(bytes);
                out.flush();
                out.close();
                FacesContext.getCurrentInstance().responseComplete();
            } catch (IOException ex) {
                ex.printStackTrace();
            return null;
    }

    StringBuffer sbFilename = new StringBuffer();
         sbFilename.append("adeem");
         sbFilename.append(".doc");
    StringBuffer sbContentDispValue = new StringBuffer();
         sbContentDispValue.append("attachment");
         sbContentDispValue.append("; filename=");
         sbContentDispValue.append(sbFilename);
    HttpServletResponse response = (HttpServletResponse) context.getResponse();
    response.setHeader("Content-Disposition", sbContentDispValue.toString());
    i think this will work .. if not let me know i will give some code that will work for u then ...

  • Displaying file name for open Acrobat files

    Is there a way to copy and paste the URL for an open pdf file in Acrobat? We currently open the file in MS Word and copy the file link from the web toolbar display.
    Thanks for the help!
    Ken

    Thanks for the quick response. Is that a hard thing to do? We haven't done much with Java Script.
    Ken

  • How to give dynamic name for csv export files?

    Hi,
    how we can give dynamic file name for each csv export file? ex(&item_name.csv)
    I am using apex 4.1 and IE 6,
    thanks in advance
    regards
    Chandran

    Please help me on this
    I am using report template as a csv export..
    when user click on download link on other page he will redirect to csv export temlate page and he is is directly get the open or save window
    but dynamic title name is not working for only for this.
    regards
    Chandran

  • How to create Same file names for source and target.

    hi
    Can any body send Procedure for below requirement.
    how to create the dynamic file names for a source and save the file with same name in the Target, because it has to identify that which sender had sent the file and the target file should be again sent back to the customer as a link.
    Please help me.
    Thanks

    Hi,
    See the below link
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - sender file name as receiver file name
    Regards
    Chilla

  • I just found an error in the file name for my Camera Raw Cache file.  How do I correct it?

    I just found an error in the file name for my camera raw cache file.  The error is in my username.  I don't know how to correct the error or if I should just leave it.  I'm not sure where my cache file is stored on my computer.  Any help would be appreciated.
    Thank you

    Since you are on a Mac if when you first set up your account you left out the i in Wilson nothing you do will change that. The REAL account name will always be alicewlson. Once an account is created you can't actually change the name of it. You can change the name that is displayed but not the REAL account name.
    Simplest thing to do is stop worrying about it. Everything is as it should be, that is except Wilson being spelled without the i.
    Lilac50 wrote:
    When I searched finder for "alicewlson" I found a long list of files like this:
    2014-07-22 12.50/File005.nef[15:16:35.212] (debug) src/ImageLoader.cpp:363: File: /Users/alicewlson/Recovered/2014-07-22 12.50/File002.nef[15:18:02.173] (debug) src/StoreXMLFile.cpp:21: /Users/alicewlson//.rpro/rpro.cfg
    I believe I made the error in my user name when I first got my computer a year ago. I then corrected it under my user name but not in my Lightroom files. I also looked for files with a .lrdata extension and didn't find any.

  • How do i change the HTML file names for existing index

    Hi,
    How do i change my existing HTML file names for indexes. The Html file name is disabled when we click on properties.
    Ex:   Index Keywork : Architecture
            Old HTML Page/URL =: Architecture.htm
    I want to change  Old HTML Page/URL =: Architecture.htm to architecture_new.htm
    Please find the screenshot attached.

    That's because you are looking at the Properties and that is not how you create index entries.
    Highlight the Index keyword ("Paste" in this example). It shows below what is already linked. If you delete that, the keyword will be displayed in bold to show no keyword is attached. You can add further keywords by dragging them from the Topic List.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do I change the .php file name for a page of my site?

    how do I change the .php file name for a page of my site? The only link to the page is the nav. button link for it in the global nav. The reason I need to change the file name is we want the breadcrumbing name to change and the breadcrumbing is linked to the file name.

    The reason I need to change the file name is we want the breadcrumbing name to change and the breadcrumbing is linked to the file name.
    I don't understand this reason. How would changing the file extension solve your breadcrumb issue? Why don't you explain the issue in more detail.

  • Displaying File Name for Photo and Video Clips in Premiere Elements 10

    I am using Premier Elements 10 on a Windows 7 Pro desktop computer to create
    a project consisting of 128 jpg photo and mp4 video clips.  Before creating
    the project I created a short file name for each clip describing its
    content.  I've added menu tags at locations which separate the project into
    discrete segments.  I've selected a disc menu which utilizes the menu tags I
    created.  I previewed the project and I'm satisfied that the DVD disc I
    intend to create will display everything I want except for one thing.  I
    have spent several hours trying to find out how to have each displayed clip
    include the file name (without extension) somewhere near the edge of each
    window as it is opened in the finished production.  I sure would appreciate
    some help with the steps needed to accomplish this.

    Welcome to the forum.
    This can most easily be accomplished by adding a Title (maybe from a Lower-Thirds Title Template), above each Clip/Still Image.
    I would create one such Title, and manually add the "File Name" in the location desired. Then, place that on a higher Video Track, above the Clip/Still. Then, just use the Duplicate Title function, to create a new Title, with the Text and Style, per the first - edit the Text for each, as required.
    I know of no automated method to grab the Clip's/Still's File Name, and add that to a Title, as PrE does not support any scripting.
    Good luck,
    Hunt

  • Custom dynamic names for outbound payment files in R12

    I have asked this on a couple of forums, but somehow missed this one.
    We are upgrading from 11i to R12 and require custom dynamic file names for the Payments output files (cheques, advices, efts). I see that you can create a custom prefix and extension through payment profiles, but the functionality is very limited (i.e. no date stamp). I am thinking that others must have come across this before, and am wondering how you have handled such a requirement. Is it possible to add custom steps to the seeded payment process? Can the payment process be run as part of a request set and then a custom step added which grabs the output file and renames it based on information obtained from the batch and the process profile. Our goal is a fully automated payment process where batches are scheduled, processed and files renamed and sent out to banks and a 3rd party printer with no user interventation.
    Any advice/tips would be appreciated.
    Thanks.
    Tam.

    Hi Tam,
    Could you please let me know if you got the solution as we have a similar requirement of renaming the output file as perthe business needs fro which we need custom program.
    Thanks,
    Manas

Maybe you are looking for