File name dynamic

Hello,
i need to use a dynamic name in the file output.
i've seen the blog /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14, however i don't understand how can i do the mapping
in my mapping my message types are of messages. must I included in message type target a new field?, where?
thanks very much

Hi..
          You can use Dynamic Configuration in  UDF and map the Root nodes with using that UDF.
You cannot test the mapping in IR part. WHile executing the scenario only you can test whether your mapping is correct or not.
Thanks,
Leela

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

  • 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,
    Sharmistha

    Hi 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

  • 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

  • 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 PM

    I 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

  • 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 PM

    Gopal,
    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

  • Passing file name dynamically to the file adapter

    Hi All,
    I'm using a file adapter to create a file from the XML message after mapping in XI. The file name is given in the file adapter configuration. Is it possible to have the file name as a part of the message and pass it to the file adapter dynamically? Or is it possible to have the file name in some variable or something in XI (like a BPM variable) and pass it to the adapter for every message?
    Does someone have any idea?
    Thanks,
    Sandeep

    Hi 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

  • Creating the receiver file name dynamically

    Hi Friends
    Here I have a scenario IDOC to File, I am not using any mapping or creating any repository objects. My requirement is to pass the sender IDOC to receiver in an xml file format. While posting the file at receiver file directory I suppose to post it with a file name File_IDOCnumber#.xml i.e., i need to include idocnumber in the file name. As I am not using any mapping objects I might not be able to use Dynamic configuration option, kindly suggest me with a solution.
    Am using PI7.1 version
    Regards
    Suman.

    Hi Suman,
    Depending on your backend application, you can create a XML file port in WE21 and use that in your Partner Profile configuration. You can create your own function module to generate the filename based on your requirements.
    Alternatively, if you really want to pass through PI, you can use variable substitution in your Receiver File Adapter:
    Under File Access Parameters in Target Tab:
    File Name Scheme: File_IdocNumber_%idoc%.xml
    Under Variable Substituion in Advanced Tab:
    Enable : Yes
    Variable Name: idoc
    Reference: payload:IDOCTYPE,1,IDOC,1,EDI_DC40,1,DOCNUM,1
    Regards,
    Erwin
    Edited by: Erwin de Gula on Apr 28, 2011 7:57 AM

  • 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

  • Constructing file name dynamically

    Hi,
    I have two requirements related to filenames when using File and FTP adapters.
    First one:
    How do I have the filename unchanged when I transfer a file from one location to another using either file or ftp adapters.
    Ex:
    At the source I have the filenames with the pattern "*.txt", that is the file adapter has to pick the files which have .txt extension. But while delivering the file to destination, the file name should be in tact.
    Say there are two files with the names as 12457_cust.txt and 548972_cust.txt. When we transfer these files, they should have the same names (12457_cust.txt and 548972_cust.txt) at the destination.
    In the adapter while writing the files on the destination, I dont see any option to pass the input filename.
    Second one:
    I need to construct destination filename from the some fields of the first record of the input file.
    record1|customernumber|document type|.....................
    Customernumber and document type fields vary from file to file.
    File name at the destination should be "documenttype_customernumber_dateandtimestamp.dat"
    Kindly advice on how to achieve the above two.
    Thanks,
    RV

    Hi..
    You can use the transport headers.. (see Re: File upload in ALSB from Proxy Service has some info on it).
    ..Mark.

  • How to retreive the dynamic file name in the AAE configuration?

    Hi Guys,
    I have configured File to File with the integrated configuration and in the mapping i need to retreive the file name dynamically and i am unable to retreive it from the run time in AAE configuration. I am able to retreive with the normal configuration where integration engine is the run time.
    I am using the code as below.  Is it possible to retreive the file name dynamically in the AAE configuration? any help or suggestions would be appreciated.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName;
    Thanks,
    Srini

    Hello Srinivas,
    Brief Solution:
    1. Using dynamic configuration, set the attribute value of payload dynamically to ASMA
    2. Using AF module, write the value of ASMA in a variable
    3. Using the variable substitution, set the receiver file name schema
    Plz go through the below link:
    http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
    Thanks,
    Satya Kumar

  • Dynamic File Name - Suppress the Substitue varible

    Hi All,
    I am doing the scenarios like File name at the recevier end would be dynamic for that i take an extra field NAME mapped with UDF which return the file name dynamically. It is working fine and doing good. But the problem here is , this field is the first field in my target structure so i am getting an empty line in the target file.
    So My structure as follows:
    <b>MT_BNK01           1..1
      NAME                1..1
      RECORD             0..Unbound
          --Record_data  0..Unbound</b>
    So in the recever side i written as follows
    Recordset Structure:: RECORD
    <b>RECORD.fieldSeparator = 'nl'
    RECORD.endSeparator = 'nl'</b>
    But according to this weblog i can suppress the empty line but it is not working
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    means, NAME is also in the same level of RECORD in the Structure. So How can i pass the structure as ??
    I tried to pass the RecordSet Structure: NAME,RECORD
    and following parameters, it is not working
    <b>NAME.fieldFixedLength =0
    NAME.fieldLengthTooShortHandling = Cut</b>
    Can you please  suggest me what could be the reason. Tell me what information i need to pass the RecordSet Structure and attrubute information also.
    One more thing like, My sender side it is not picking the empty lines. What could be the reason. I given fieldSeparator and endSeparator as 'nl'. So to catch the empty line what i need to do???
    Thanks in Advance,
    Best Regards,
    Vijay

    Hi Vijaya,
    This can be solved. Actually i had the same scenario where i was getting blank line for the header. Suppose Header was carrying the file name after i cut the value i would get a blank line in file.
    So i added in content conversion parameter the following line
    Header.endSeparator - '0'
    then the first line was not blank.
    Try this, i think your issue will be solved
    Regards,
    Ramesh P
    Message was edited by:
            Ramesh Parashivamurthy

  • Dynamic flat file name as source

    Hi All,
    I working on ODI 11g 11.1.1.3 version.
    I have Flat file say ABC01 as source, flat file was successfully load into target.
    But next day new file say ABC02 with same structure was generate from client.
    Every day new file is generate say ABC03, ABC04 and so on.
    how to use this file to load data, without changing file name.
    dynamically can it is possible.
    Please give me suggestion.
    Thanks in advance
    Prashant

    Hi Prashant,
    You can achieve this by doing the following :
    1. Create a variable Called FILE_NAME
    2. Go to your file datastore and replace the Resource Name with variable #FILE_NAME. So you need to pass correct file name to the variable.
    3. To get the filename into variable , you can look into the following thread
    Read FileNames in Directory
    Hope it helps

  • DATAEXPORT - set Dynamic File name in Calc Script

    Hi,
    I have a calc script which exports data from BSO cube to a flat file. Currently I have hard coded file name within the calc script which is
    DATAEXPORT "File" "," "D:/in/CAPXPT_FERC_*FY12*.txt";
    and, for example, I want use the substition varaible to dynamically assign the file name let' say
    DATAEXPORT "File" "," "/u11/oracle/OHDDEVD/in/CAPXPT_FERC *" + &fYear + "*.txt";
    Is there any way to set the export file name dynamically?
    Thanks for your help
    Regards,

    A kind of intriguing thought would be to use the sub var as a way to drive the file name, then grab Robb Salzmann's CDF to dynamically set sub vars on the fly, and then use a RTP to grab that string. I have no idea if this would all tie together, but it would be interesting to try.
    Here's Robb's post: http://codingwithhyperion.blogspot.com/2011/08/create-and-update-substitution.html This is my second in a row post that refers to his CDF -- it is almost like that's my pseudonym except of course I'm too thick to write a CDF.
    Regards,
    Cameron Lackpour
    Edited by: CL on Sep 20, 2011 10:36 AM
    Spelling. Arrgh.

  • Dynamic file Name generation

    Hi Experts,
      i have the requirement
    I need to extract some records from Database (Scenario is Database to file) and we need to put it into file.
    then i need to change the file name based on certain conditions and send it to relevent file server which are globally located across the world.
    My Doubts are :-
    1- After extracting the records from Database From where i can get file name?? Can i get the file name from SXMB_MONI. If yes then How??
    2- Now I got the file name then i need to change this file name into different file names (Dynamically) based on some conditions to send it to different file servers. Can i do it in my mapping Or i need to write a module for it.??
    Thanks in Advance
    Regards Prajwal

    Hi Naluvala,
    Based upon your condition you can directly set the file name using this UDF:
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        u201Chttp://sap.com/xi/XI/System/Fileu201D,
        u201CFileNameu201D);
    String valueOld = conf.get(key);
    if (valueOld != null) {
        String valueNew = valueOld.replaceAll(u201Cinputu201D,u201Doutputu201D);
        conf.put(key, valueNew);
    Instead of using get function to populate the valueOld, you can use your own logic.
    Regards,
    Sanjeev.

Maybe you are looking for

  • Is there a way to remove folders & files from the backup?

    i moved a bunch of file that was on two external drives to a larger single external... is there a way to get rid of the backups from the two original externals and free up some space on backup drive?

  • Itunes dropped the ball..

    no one can solve launch failures with itunes 7.5, 7.6... but i found a solution.. songbird! look it up... you wont turn back...

  • Username

    i recently upgraded my hard drive from 30 to 100 but when i got it back from the place i sent it for upgrade, the user name was different. how do i change the user name & make it a admin (little things matter).

  • Safety Stock field/table in ASCP Horizontal Plan?

    Hello, I need to get the safety stock data that is seen from the ASCP's Horizontal Plan. Whiat table and field is it? Can't find it from MSC_DEMANDS and MSC_SUPPLIES. Thanks

  • How do you block cookies

    How can I block all/3rd party cookies in Safari 5.1.4? I've tried Privacy options; however, it appears blocking does not work. Any thoughts?