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

Similar Messages

  • Flat file to Oracle: Dynamic flat file name

    Hi,
    I am doing a transformation from flat file to oracle.
    At one place there is requirement like flat file name is dynamic.
    *eg. D:\ Flat DB\ Sample<Date>.txt   
    examples may be like Sample09012012,Sample08012012 *
    As in physical schema we specify name of file is there any way by which we can specify dynamic file name.
    as stated above.
    Any help and suggestions would be appreciated.

    Hi,
    Yes you can specify a variable in the file name ( the resource name filed) .
    You need to refresh the variable in a package and then use the interface to pick data from the file .
    Thanks,
    Sutirtha

  • Creating dynamical flat file name in mapping?

    Hi.
    I know about the variations on how to use an input parameter and/or sysdate to create a dynamic output file name in a mapping.
    My challenge is nearly the same, but I cannot make OWB generate the correct code.
    Problem:
    - got a one column table that holds an identifier in a string field
    - got a function that reads and returns said identifier
    - imported function into OWB
    - trying to use the function call in the Flat File Operator's Target Data File Name, e.g. fixedfilename||fn_get_id()||sysdate||'.ext
    OWB creates the code:
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||fn_get_id()||'_'||SYSDATE||'.ext',
    'w',
    32767
    However, when compiling the package code, it returns the warning:
    ORA-06550: PACKAGE BODY, line 2214, column 29: PLS-00201: identifier 'FN_GET_ID' must be declared
    which results in an error when trying to execute the mapping.
    I've tried substituting the function call in the FOPEN call:
    myId := fn_get_id();
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||myId||'_'||SYSDATE||'.ext',
    'w',
    32767
    and this works fine, the mapping creates a file with the desired filename. But obviously not a good solution rewriting the generated code all the time....
    Anyone solved something similar?
    Could I use an input parameter and the autogenerated function GET_<PARAMETER>?
    But can I set the value of an input parameter inside the very same mapping?
    Regards,
    -Haakon-

    (It always helps writing out one's problems...)
    I managed to get it working :-)
    Added an input parameter to the mapping, and gave the outgroup variable a default value by calling my imported function.
    Then concatenated the implicitly generated function (GET_PARAMETER) in the Target Data flat file name.
    I now have a target file name that changes according to a departement id stored in a parameter table.
    Regards,
    -Haakon-

  • Dynamic flat file name based on selected date range

    Hi,
    I have created mapping which load data into file, i have to create file with the range specified for the data to be pulled.
    e.g if i have to load data from 01-sep-12 to 15-sep-12 the file name should be ext_rio_15-sep_to_15_sep. how can i achive through owb

    https://blogs.oracle.com/warehousebuilder/entry/dynamically_generating_target
    Cheers
    David

  • Flat file name from Sender Side Dynamically into subject of Receiver Mail

    Hi All,
             I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
    Thanks in Advance

    Hi....
              You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
      DynamicConfiguration conf = (DynamicConfiguration) param.get(
              StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
          // read value
          String Filename = conf.get(KEY_FILENAME);
    Regards,
    Leela

  • Dynamic File Name as source file format

    Hi Experts,
    I have to load daily Excel Workbook to HANA.
    Files will come to shared Folder in BODS Job Server in the format 'FILE_NAME_<DAYMONYYYY>'.xlsx format.
    Everyday the file name will be appended with System Date Format.
    Example: 'FILE_NAME_17JUL2014.xlsx', 'FILE_NAME_18AUG2014.xlsx' etc.
    I tried to achieve it by creating a substitution parameter and using it to dynamically define file name.
    But I am not able to define the parameter correctly. (screenshot attached).
    Please advise where I am doing wrong.  Is there any better way to achieve it.
    Thanks,

    Hi Bala,
    Thanks for your suggestion.
    For a test I have created
    1. A Flat File named "FLAT_FILE_2014.txt".
    2. A Global Variable $G_FILE_NAME as varchar(18) and value 'FLAT_FILE_'||Year(sysdate())||'.txt'.
    3. Used it in the File Name for File Format.
    Below is the result:
    When I hard-code the file name as "FLAT_FILE_2014.txt", I am getting the data Preview.
    But When I am using global variable $G_FILE_NAME, I am not getting the data Preview.
    Please check attached "C.png"
    Please suggest.
    Thanks,
    Krishnendu.

  • Extraction, Flat File, Generic Data Source, Delta Initialization

    Extraction, Flat File, Generic Data Source, Delta Initialization
    I have couple of questions regarding data extraction.
    1.     If you have Data Source a Flat File e.g. Excel file I know that you have to create Data Source at BW side. How do you upload updates, by selecting Delta Update when executing next Data Load? Do you ever u201Cconvertu201D this Excel file into Application Tables to become SAP Source 
    2.     Can you please give me example of situation where you had to create Generic Data Source? What is difference between Time Stamp, Calend. Day and Numeric Pointer. Which one is most common to select?
    3.     I read somewhere that Generic Data Source does not have Setup Table. I thought that you have to have Setup Table in order to load transaction Data otherwise you will lock the Application Tables. Where am I going wrong im my thinking please?
    4.     What are steps in terms of IP before, under and after Delta Initialization. I belive that you can do two ways:
    Full Update - Initialize Delta Process (without Data Transfer) u2013 Delta Update  or
    Initialize Delta Process (with Data Transfer) u2013 Delta Update
    Am I right? What is most common method and why?
    5.     If you want to add a filed in Data Source after 6 month using it, you want to do it without re-init Delta Queue. You add field in RSA6, then provide info for ABAP to populate new filed (info u2013 name of Data Source, Extract Structure, field added, name of Application Table which contains the field). How does it work now as there is no SetUp table it has been deleted after Initialisation? How does Delta Queue know that it is going to receive data which has been  expanded by one field or it may does not need to know at all?
    THANKSSSSSSSSSs

    Hi,
    1. If you have Data Source a Flat File e.g. Excel file I know that you have to create Data Source at BW side. How do you upload updates, by selecting Delta Update when executing next Data Load? Do you ever u201Cconvertu201D this Excel file into Application Tables to become SAP Source
    Once you create Datasource for A flat file extraction then it is file source system specific hence you cont change to Application table source Data source
    In info package you can change the source as application server instead of desktop no need to change the DS
    2. Can you please give me example of situation where you had to create Generic Data Source? What is difference between Time Stamp, Calend. Day and Numeric Pointer. Which one is most common to select?
    When we don't find any standard extractor then we can go for Generic(if i want information sales along with finance information in a data source then generally we dont get standard one hence we can go for generic DS)
    Check the below link for More about generic DS .
    http://wiki.sdn.sap.com/wiki/display/BI/Generic+Extraction
    for Delta capturing you can use
    Timestamp(if the table has time stamp filed  so it can stamp the last changed record in that table hence it is easy to get delta based on the time stamp)
    Calday- (If the table doesn't have the Timestamp filed then search for Calday where you can stamp the delta based on the date when documents are changed )
    Numericpointer : If the table doesn't above both then we go for this option where you can the numeric value change stamp )
    3. I read somewhere that Generic Data Source does not have Setup Table. I thought that you have to have Setup Table in order to load transaction Data otherwise you will lock the Application Tables. Where am I going wrong im my thinking please?
    Generic datasource nothing but we extracting data directly from the database table without any interface between the application/systems
    4. What are steps in terms of IP before, under and after Delta Initialization. I belive that you can do two ways:
    Full Update - Initialize Delta Process (without Data Transfer) u2013 Delta Update or
    Initialize Delta Process (with Data Transfer) u2013 Delta Update
    Am I right? What is most common method and why?
    Correct
    5. If you want to add a filed in Data Source after 6 month using it, you want to do it without re-init Delta Queue. You add field in RSA6, then provide info for ABAP to populate new filed (info u2013 name of Data Source, Extract Structure, field added, name of Application Table which contains the field). How does it work now as there is no SetUp table it has been deleted after Initialisation? How does Delta Queue know that it is going to receive data which has been expanded by one field or it may does not need to know at all?
    Once you add the new field to structure(DS) you will get the data as on date onwards not historical data hence what is the concept of setup table  ( delta records come from the Delta Que not from the setup table )
    If you want histaric data to new field then you need to setp table deletion ...etc...
    Hope it is clear..
    Regards,
    Satya

  • Flat file as a source - now more confused then before.

    Sorry to open this topic again - i just got confused to what needs to be done (i did read all of the posts on previous topic - honest!) got confused to who did what and how it needs to be done. it's hard to be stupid sometimes :(
    here is what i have:
    OWB server (target + runtime repository) = RHEL 4
    Source (the location of the flat files) = shared drive/folder on Windows
    OWB client (my machine) = Windows (unfortunatelly)
    I followed the steps described in
    http://download-uk.oracle.com/docs/cd/B31080_01/doc/owb.102/b28223/def_flatfiles.htm#CHDHBECD
    created samba mount point from OWB server to the Source files:
    /mnt/folderA/folderB/source_file.txt
    mapped shared drive from the source onto my machine
    Z:/folderA/loderB
    created location for the flat files in OWB:
    TEST_LOCATION = \\windows\folderA\folderB\
    imported flat files into OWB (had to go through the sample)
    created the map 'TARGETLOAD' - simple load the data from the flat file into the table
    validation produced the following message:
    VDL-2398: No data file specified. Generated code will use the sampled file name and the file location 'TEST_LOCATION'
    --which is fine isn't it? it should be using this file in that location
    generation went OK.
    deployment produced this error:
    SQL*Loader-500: Unable to open file (/u01/app/oracle/product/10.2.0/owb_1/owb/bin/unix/\windowsfolderAfolderBTARGETLOAD.ctl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    i checked this directory - there are 2 files there that were created by OWB:
    \\windows\folderA\folderB\TARGETLOAD.ctl
    \windowsfolderAfolderBTARGETLOAD.log
    Could anyone please enlighten me on what is going on? What do i have to change/amend/edit/tweak in order to solve this? all i want is to be able to load the data from flat file on the source windows box into the table in OWB server.
    Any help/thoughts would be greatly appreciated.

    Hi GB
    Thank you very much for your reply.
    I cannot use external tables - my superiors decided agains it, so i am lambered with external files (even jedi mind trick didn't work!).
    What i do is import external files from windows box. The location is specified as \\windows\forlderA\folderB
    --Mount the drive onto unix then register the files location as the unix path.
    i have a samba mount point from unix box to this windows location. But what i can't do is to select is as a location. i even tried to mapping this mount point onto windows box, so that it looks like \\unix\mnt\folderA\folderB - and of cause when i execute - i get the same error.
    I even tried configuring the sql loader (right click on map and select configure -- create), but i cannot do it even that way. coz everytime i try to create - OWB automatically assigns windows path to it.
    IT told me to let them know what i need and they will create it (map the drive etc) the problem is - i can't think of how to do it! and i do not have a priveleges to start 'trying things out'... well they say if i break their security one more time -i am in trouble!
    I know it sounds sad, but could you please let me know what i need to have/to do in order to make it work.
    Hope you do not mind my request and thank you very much for all your kind help and advise
    Kind Regards
    Vix

  • Include Flat file name as a field in the PSA / DSO.

    Hi,
    I have a requirement to include the Flat file name also in the DSO which is used for loading the data from a flat file source. I have created a new infoobject for File Name in the DSO. Can you guide me from which table I can get this information.
    I was thinking of reading this information from the table which stores the file name in a routine in the transformation to the DSO.
    I came across the table RSLDPSEL, it stores the Infopackage name and file name. But this does not work when I am using the same infopackage to load multiple files. Thanks in advance.
    Regards,
    Hari.

    Hi,
    The main challenge is to get the Technical name of the infopackage in the transformation ( field routine) from PSA (Datasource Source) to DSO for the Filename info object.
    Is there any table which stores the Infopackage and the corresponding data target information in BI 7.0 sothat I could use the field routine in transformation to get the Infopackage ID based on the data target (DSO) ?
    Once I have the technical name of the Infopackage, my logic is to query the RSLDPSEL table and find the file name based on Infopackage ID.
    Please share your thoughts on how this scenario could be realised.
    Thanks,
    Regards,
    Hari

  • 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

  • Dynamic Logo file names in PO XSL-FO stylesheet

    We have different company logo files for different operating units. Hence , we require to use a dynamic logo file name in XSL-FO template.
    When I use the below for a single file it works.
         <fo:inline>
    <fo:external-graphic content-width="50pt" content-height="50pt" src="url({'${OA_MEDIA}/Logo_medium_COMCEL.jpg'})" />
    </fo:inline>
    However, I would need to make the filename dynamic.
    When a tried usng an xsl variable tos tore fielname, it didnt work.
    Any pointers as to how we can achieve that would be helpful

    Thanks for your quick reply Dave, I appreciate your time.
    But I couldn't test the new template as I was neither able to create a new PO nor was able to run the PO Output for communication Report. When I tried to create a PO the Purchase Order form did not open saying I am not setup as an employee, even the PO Output for communication did not give any LOV for the PO's.
    I tried to define employee name in the employee's login
    information (System administrator/Security/User/Define) for my user, but some how my name doesn't appear in LOV. Any help is appreciated.
    Thanks,
    Sharmila

  • Include the file dynamicly by file name

    in my jsp,I want include another jsp dynamicly
    <%@ include file="thefile.jsp" %>
    thefile.jsp should be dynamic like:
    <%=String filename=="thefile.jsp" %>
    <%@ include file=filename%>
    I know above is not working since file only take static name.
    is there any way to include the file dynamicly by file name?

    String path = "..."; // to the ressource to include
    javax.servlet.RequestDispatcher dispatcher
              = getServletContext().getRequestDispatcher(path);
    dispatcher.include(request,response);

  • Dynamic attribute file name

    Hi All,
              I am trying to use dynamic attribute file name using UDF in message mapping:
    <i>String filename = null;
    filename = "Yahoo";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://seeburger.com/xi/common" , "dtSubject");
    conf.put(key1,filename);
    return "";</i>
    But its just giving me the name on the receiver side as in the sender side.
    I have checked FileName in Dynamic attributes in the reciever adapter.
    Regards,
    XIer

    your return statement looks like <i>return "";</i>
    Return the filename that you have assigned inside the UDF and can be achieved by
    conf.put(key1,filename);
    <b>return filename;</b>
    Do refer this blog as well
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

  • Flat file name

    Hi Experts,
    I am working with BDC
    I want to get the flat file name also .
    how to get that
    Regards,

    Hi above all
    Thanks for your reply,
    I want only flat file name .
    for ex:If  i am working with this file
    C:\Documents and Settings\pri\Desktop\INPUT.xls
    i have to populate only The name of Flat file(INPUT) In Ztable
    like that how many flat files i work with my program
    all the names should be populated in ztable
    I am successfully populating the data of flat file into ztable
    I need only the FLAT FILE NAME
    Regards,
    Edited by: abap learner on Jul 8, 2008 11:35 AM

  • Is it possible to know flat files names loading using particular info pack

    hi experts ,
    is it possible to know flat files names loading using particular info package  ??
    in our project we hav flat file extraction  manually ...as i am replacing old sap bi consultant i must contine pending loads ..
    as ther s no document about loads i must check and ensure about loads left out ..'
    for every flatfile they used load with differnt name ... if am able to get those files name i can list out  pending ones
    and can load
    is it possible to those details ??
    pls help me .....
    relative answer will rearded with points ............
    thanks in advance
    regards
    harry

    I AM REALLY THANK FUL FOR ALL.. your people are really quick .and giving relavtive answers ...
    they loaded from desktop only ....not from application server ..
    i got details  from info cube mange screen .they used to load data monthly wise ,so i hav given month in selection  and viewed data..
    Regards ,
    Harry

Maybe you are looking for

  • HP Pavilion dv6-7173er (Bootloade​r recovery)

    Greetings! I happened a problem with the recovery partition (F11 at startup click and nothing happens) . So, restored backup (Partition Recovery) created in Nero BackItUp, when you press the F11 recovery system booted from C:\Windows. Recovered from

  • R12 Reports Customization

    We are preparing a release 12.0.6 environment for testing. How do you customize a R12 reports file? (For release 11i, I used the Oracle Reports Developer). So is it the same or different in R12? Thanks...Colin

  • Access modifier for Constructors ???

    As constructors are not the so called Members of a class (Class's Member declarations include only 4 things : variables , methods, member classes and member interfaces) Why do we have access modifiers for constructors also ?? I know that if a class A

  • How to back to first line using vi

    hi, How can we back to first line when we edit text using vi in unix environment. Thanks :)

  • Just in last two days, my battery is dying at extremely fast rate. Why is that?

    Just the past two days, my IPhone 4 battery is dying at an extremely fast rate. Why is that?