Dynamic File name in File Adapter

Hi,
I have a requirement to pass dynamic file name in File Adapter.
Is there any way to pass a variable for the file name attribut in file adapter.
I am looking for some options apart from %yyMMddHHmmss%,%SEQ%...etc
Please suggest if any of you have information on how to put values from a variable to file name attribute in file adapter
regards
Saiju

Hi Saiju,
Yes there is.
Assign your file name to a variable, let's say 'fileName'.
Now go to your invoke activity(for the specific fileadapter) -> Property tab-> find a property call jca.file.FileName -> in the value field assign 'fileName' variable.
That's it... (assuming you are using 11g)
Arik
Edited by: Arik on Jun 27, 2012 3:12 PM

Similar Messages

  • Dynamic Receiver file name in AS2 adapter

    Hi Experts,
    How to get dynamic receiver file name in AS2 adapter. We need receiver file name same as of sender file name.
    We tried selecting dynamic attributes file name but we are getting followin error in CC.
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message.
    Thanks,
    Hari

    hi hari,
    You can't do it manually. As both adapter are in different context.
    You can go with UDF to slove ur problem.
    Just extract the input file name using Dynamic configuration
    Store that in some variable.
    Use same name in the dynamic file name in AS2 receiver. Below code might be useful.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtAS2FileName", "DYNFILENAME");
    conf.put(key,strfilename);
    Thanks
    Jai
    Edited by: Jaideep Baid on Apr 9, 2010 9:16 AM

  • Xml file in dynamic file name in file receiver adapter

    Hi,
    I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
    The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
    Does anybody have the solution to my problem? thanks in advance

    Thank you Raj for the direction
    The way to do it is :
    1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
    2. Put a "*" on the file name scheme
    3. In IR, create a UDF to set up target file name :
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // set up file name for receiver adapter
    String SourceFileName = conf.get(key);
    conf.put(key, TargetFileName);
    return " ";
    4. Map the above UDF to the header level of the target structure.
    Regards,
    Idi

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • Same file name using JMS adapter on sender side.

    Hi Friends,
    I got a requirement to capture file name using JMS adapter on the sender side.
    Can some one help me in resolving this issue.
    Regards,
    Jeevan.

    Hi ,
    You can use Dynamic Configuration in mapping.
    Create a UDF with input as file name and copy/paste this code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //conf.removeAll();
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //String filename= conf.get(key);
    conf.put(key, fileName);
    key= null;
    return fileName;
    Thanks.

  • File Name and File Content  not gettinng passed from Proxy to Business Serv

    Hi All ,
    I have a requirement in OSB , where i need to pick the file from remote Source and FTP the files to Remote Target .Below are the steps which i did to achieve this.
    1.Created a FTP Adapter in JDeveloper to Get the files from Source and a FTP Adpater to Put the files to Target.Inboth the adapters i have choose 'Shema is Opaque'
    2.Imported the wsdl and jca file to OSB
    3.Generated Proxy Service (PS ) and Business service (BS) out of Step 2
    4.I edited the Message flow such a way that , the PS is routed to invoke the BS
    Aslo i assigned $inbound/ctx:transport/ctx:request/tp:headers/jca:jca.file.FileName to a variable 'FileName' in PS
    and in BS service i passed $outbound/ctx:transport/ctx:request/tp:headers/jca:jca.ftp.FileName = 'FileName'
    When i tried to activate my session , the file that is getting written to the target has 0 byte.Also , the file name is also not getting passed from PS to BS
    Can some one help me with the steps on how to use the Xpath , so as to pass the file name and file body from proxy servive to business service.
    Thanks
    John

     I search multiple shares to find a common file name then create a single output file. I will be doing this search and file creation
    for 5-10 different file names. If there is a better way .. certainly open for suggestions. It's working but having issue with
    the cmd file for every file and folder I check. It puts this error out for each run of the process.
      Error message in LOG file:
    Get-ChildItem : Cannot find path 'F:\powershell\-SearchFor' because it does not exist.
     Thanks.
    I tried your code with little changes and saved in Temp folder.
    My CMD file has the below code
    PowerShell C:\Temp\Untitled1.ps1
    It worked.
    Regards Chen V [MCTS SharePoint 2010]

  • How should we get the out put file-name same as in put file-name in file to

    Hi frnds,
    having hundreds of files in the sender system with different names, how should we get the out put file-name  in the receiver system same as the in put file-name in file to file scenario ?
    Thanks in advance.
    truly,
    snrvakiti.

    Hi,
    In Receiver File Adapter you can set under 'Adapter-Specific Message Properties'
    check Use Adapter-Specific Message Properties
    check Fail on Missing Adapter Message Properties
    Check File Name
    Have a look at this link,  [File_to_File|http://allsapnetweavernotes.blogspot.com/2008/09/how-can-i-access-filename-from-fileftp.html]
    Regards,
    P.Rajesh

  • FILE NAME WITH FILE EXTENTIONS

    HI EXPERTS!!
    I WANT TO GET THE FULL FILE NAME STRORED IN THE SERVER FOLDER. I USED  FM RZL_READ_DIR_LOCAL BUT I AM GETTING ONLY 32 DIGITS OF NAME NOT FULL NAME AND ALSO SIZE PARAMETER IS CONCATENATING WITH NAME.
    I WANT THE FILE NAME WITH FILE EXTENTIONS(TXT. .PDF ETC)..
    PLZ SUGGEST ME HOW TO GET THE SAME..
    PLZ REPLYE ME..
    MAHESH

    Hi Mahesh,
    Try the below FM in the below code.
      DATA:
        LV_PERMISSION(10),                 " Permission
        LV_H2,                             " H2
        LV_FLNM(13),                       " File name
        LV_USER(10),                       " User
        LV_GROUP(10),                      " Group
        LV_SIZE(15),                       " Size
        LV_MONTH(3),                       " Month
        LV_DAY_C(2),                       " Day
        LV_YEAR(5),                        " Year
        LV_FILE_NAME       TYPE FILE_NAME, " Filename
        LV_JUNK,                           " Junk
        RETURN_CODE      TYPE I.           " Return code
      DATA:
        CMD_PARAMS LIKE SXPGCOLIST-PARAMETERS,
                                           " External prg.parameters
        CMD_OUTPUT TYPE BTCXPM OCCURS 0,   " Log message
        STATUS TYPE EXTCMDEXEX-STATUS.     " Status
      CONSTANTS:
        LC_DIR TYPE C VALUE 'd'.           " Directory
      FIELD-SYMBOLS: <CMD_OUTPUT_LINE> LIKE LINE OF CMD_OUTPUT.
      CMD_PARAMS = PV_DIRECTORY.
      CLEAR CMD_OUTPUT.
      CALL FUNCTION 'SXPG_CALL_SYSTEM'
           EXPORTING
                COMMANDNAME                = 'Y_LS_LN'
                ADDITIONAL_PARAMETERS      = CMD_PARAMS
           IMPORTING
                STATUS                     = STATUS
                EXITCODE                   = RETURN_CODE
           TABLES
                EXEC_PROTOCOL              = CMD_OUTPUT
           EXCEPTIONS
                NO_PERMISSION              = 1
                COMMAND_NOT_FOUND          = 2
                PARAMETERS_TOO_LONG        = 3
                SECURITY_RISK              = 4
                WRONG_CHECK_CALL_INTERFACE = 5
                PROGRAM_START_ERROR        = 6
                PROGRAM_TERMINATION_ERROR  = 7
                X_ERROR                    = 8
                PARAMETER_EXPECTED         = 9
                TOO_MANY_PARAMETERS        = 10
                ILLEGAL_COMMAND            = 11
                OTHERS                     = 12.
    Check Status first then check sy-subrc
      CASE SY-SUBRC.
        WHEN 0.
          CASE STATUS.
            WHEN 'F'.
              MESSAGE I057(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'E'.
              MESSAGE I058(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'S'.
              MESSAGE I059(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'C'.
              MESSAGE I061(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
          ENDCASE.                         " CASE STATUS.
        WHEN 1.
          MESSAGE I048(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 2.
          MESSAGE I049(YS) WITH 'Y_LS_LN'(003).
          GF_EXIT = GC_TRUE.
        WHEN 3.
          MESSAGE I050(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 9.
          MESSAGE I054(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 10.
          MESSAGE I055(YS) WITH 'SXPG_CALL_SYSTEM'.
          GF_EXIT = GC_TRUE.
        WHEN 11.
          MESSAGE I056(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN OTHERS.
          MESSAGE I022(YS) WITH SY-SUBRC.
          GF_EXIT = GC_TRUE.
      ENDCASE.                             " CASE SY-SUBRC.
      IF GF_EXIT = ' '.
        READ TABLE CMD_OUTPUT ASSIGNING <CMD_OUTPUT_LINE> INDEX 1.
        IF SY-SUBRC = 0.
          CONDENSE <CMD_OUTPUT_LINE>-MESSAGE.
          IF <CMD_OUTPUT_LINE>-MESSAGE CS 'total' OR
             <CMD_OUTPUT_LINE>-MESSAGE CS 'TOTAL'.
            DELETE CMD_OUTPUT INDEX 1.
          ENDIF.
        ENDIF.
        LOOP AT CMD_OUTPUT ASSIGNING <CMD_OUTPUT_LINE>.
          CONDENSE <CMD_OUTPUT_LINE>-MESSAGE.
          SPLIT <CMD_OUTPUT_LINE>-MESSAGE AT SPACE INTO
                                          LV_PERMISSION
                                          LV_H2
                                          LV_USER
                                          LV_GROUP
                                          LV_SIZE
                                          LV_MONTH
                                          LV_DAY_C
                                          LV_YEAR
                                          LV_FILE_NAME
                                          LV_JUNK.
          IF LV_PERMISSION(1) = LC_DIR.
            CONTINUE.
          ELSE.
            LV_FLNM = LV_FILE_NAME(13).
            TRANSLATE LV_FLNM TO UPPER CASE.
            IF LV_FLNM = '1W_FIARFUNNEL'.
              PT_FILE-FILE_NAME = LV_FILE_NAME.
              APPEND PT_FILE.
            ENDIF.                         " IF LV_FLNM = '1D_FIARFUNNEL'.
          ENDIF.                           " IF lv_permission(1) = ...
        ENDLOOP.                           " LOOP AT CMD_OUTPUT
      ENDIF.                               " IF GF_EXIT = ' '.

  • Custom File Name-Original File Number doesn't work. Why?

    I want to export and rename some files with the "Custom File Name-Original File Number" option. Yet this doesn't seem to work, and I wondered what I might be doing wrong. The filename will only rename as the custom text.
    The sample file name shown underneath has a dash after the custom text bit, but then the extension only eg Newname-.tif
    I am now using LR 4.2 but I seem to remember doing this renaming OK with an earlier version (though I can't remember which). This suggest that either there is a problem with this specific version or that I have something set differently to the way I had it initially. I am hoping the latter is the case. Any suggestions as to how to fix this would be welcome!

    I am sorry to report that i don't know how to create a screenshot. However, what I am getting, exact;ly is this:
    From Library grid view: F2 or Library>Rename Photo
    Then little screen appears with heading Rename Photo:
    File Naming> set to Custom Name - Original File Number
    Custom Text> NewFilenameHere
    Example: NewFilenameHere-.tif
    Clicking on OK changes the filename to just the custom text without the original file number. Original File name shows in metadata eg DSC01129-Edit.tif
    The only way i seem to be able to get the original file number with the custom text is to include it manually as part of the custom text.

  • When I send out mail from MS Outlook enterprise account in the office to my Mac at home they are received as "winmail.dat" files.  Even if I perform a "save as" to the correct file name the file format is still not recognized.  Why is this happening!?

    When I send out mail from MS Outlook enterprise account in the office to my Mac at home they are received as "winmail.dat" files.  Even if I perform a "save as" to the correct file name the file format is still not recognized.  Why is this happening!?

    http://www.joshjacob.com/mac-development/tnef.php

  • Passing the file name and file type for mime_download

    HI All,
    Can You Please let me know how to pass the parameters file name and file type for mime_download.
    Thanks in Advance.
    Regards,
    Haritha.

    Hello Haritha,
    Please see the SAP help:
    http://help.sap.com/saphelp_nw70/helpdata/en/46/9bd97240b81e5be10000000a1553f6/frameset.htm
    Edgar

  • Make "File name" and "Files of type" fields read-only in JFileChooser

    I try to make the "File name" and "Files of type" fields read-only in JFileChooser dialog. Anybody
    knows how to do? Thanks.

    You mean so the user can't choose the name of the file to open or save? Not much point in even using a JFileChooser, then, is there? Or did I misunderstand the question?

  • Help on Dynamic queue name in JMS Adapter

    Hi Experts,
      Could you please explain how to configure dynamic queue name in JMS Adapter.
    My requirement is i would have to add the date and time to JMS Queue Name in receiver JMS Adapter.
    Thanks in Advance
    Chilla

    hi,
    as it's not in Adapter-Specific Message Properties
    http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    looks like you cannot do it with jms adapter in standard
    use proxy or your own adapter instead
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • "The file [name of file] may have been changed by another user since you last saved it." Issue affects both network and local files.

    When a certain user saves a file in Excel 2010, she gets a message: "The file <name of file> may have been changed by another user since you last saved it."  She can choose to save as another file or overwrite with her changes. 
    This just started happening a week or so ago.  She was concerned that someone else was accessing her files, but we did several tests that opened, made a change and saved in a matter of seconds, and she still gets the message.  It happens on
    most files, but not all – both network and local.
    We already tried the QFE_Saskatchewan registry fix.  I also checked the file server for Services for Macintosh.

    You may be confused by the error in Excel saying “another user”. Actually Excel cannot tell who (the real human) is editing the file. Based on my research the No.1 possibility of the error is KB2626998.
    2626998  Connection to a network document is lost in the 2007 Office system or in Office 2010 after the computer resumes from standby
    http://support.microsoft.com/kb/2626998
    For Excel 2010, follow these steps:
    a.  Click Start , click Run , type regedit in the Open box, and then click OK .
    b.  Locate and then select the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Options
    c.  On the Edit menu, point to New , and then click Dword Value .
    d.  Type NetworkAvailableTimeInSeconds , and then press Enter.
    e.  Right-click NetworkAvailableTimeInSeconds , and then click Modify .
    f.  In the Value data box, click Decimal , type a number value, and then click OK .
    Note This registry subkey sets the time, in seconds, that Excel waits for the network to resume. For example, if you type 15 for the number value, Excel waits 15 seconds for the network to resume. You might have to do some tests in your own environment to
    determine an appropriate value. You may have to try multiple numbers.
    g.  Locate and then select the following registry subkey.
    HKEY_CURRENT_USER\Software\Microsoft\office\14.0\common\Internet
    h.  Repeat step 2C through step 2F again. Reuse the same value that you used previously.
    i.  Exit Registry Editor.
    Feel free to post back. Thanks.
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • FileSaveService ignored the file name and file extensions

    I am using the JNLP API to build a JWS application. When using the FileSaveService, I found it automaticlly ignored the file name and file extensions I passed to the 'FileSaveService.saveFileDialog()'.
    My code is like the following:
    String[] xtns = {"csv"};
    FileContents fileContents = fileSaveService.saveFileDialog(
    ".", xtns, stream, "testFile"); Im running this application in JRE version 1.6.0_20-b02 in Windows XP.
    Although in the JNLP API, it said the file name and file extension 'might be ignored by the JNLP client', I still wonder if anyone has a better solution for this?
    Thanks very much :)

    Sean.Wang wrote:
    ..I still wonder if anyone has a better solution for this?Visit [http://pscode.org/jws/api.html#fs]. Click the link to the 'Launch File Service (sandboxed) demo'. Type some characters into the text area then activate the 'Save File' button. Do you get a file chooser that defaults to (.zzz) extension?
    Then if yes, and that is a 'better solution' for you, then yes, I have one. The code of the demo. can be downloaded at a link just to the right of the launch link.

Maybe you are looking for

  • Spry repeted region: only at filtering

    Hi all: I made a typical spry region with a table and an spry:repeat. Also I included a form with a text field and a button for filter. Everything works fine. When the user loads the page, all data is shown and that was fine while the XML file has fe

  • Error while binding values into Sdo_Dim_array

    Hi, Any body worked on binding SDO_DIM_Elements in to the SDO_DIM_Array using OCI's. I am unable to insert the values properly. I am getting 'Null" values inserted, instead of values passed in to the Sdo_Dim_Element. Can any body give clues...

  • Enabling SSH on SG300-20

    I had some issues with this, and was not able to find an answer in the help or searching the web. In order to help the next person, here are the instructions: I have a brand new SG 300-20 switch, and I am attempting to add ssh to the login capabiliti

  • RCATS_APPROVE_ACTIVITIES - Timesheet approval.

    Hi   User is approving the time entries through the standard program RCATS_APPROVE_ACTIVITIES.  Here while approving the time client wants to display a cusotm message.  Could you please suggest a BADI / exit to do this ? Regards, Ganesh

  • 6025E DAQ card is not communicat​ing with driver I have written

    I recently wrote a driver that used the 6025E DAQ card. I then packaged up this product, and am in the process of creating a second identical product. The problem is that the software I wrote does not work with the new hardware card. Nothing has chan