Dynamic name Flat file reading.

Hi all,
  my client wants to schedule a BDC program for daily running.
But the file name is changed daily eventhough path is fixed.
can this be done.
can we read dynamic file from local system.
thanks in advance
Vikash.

yes. so u can at initialissation for the paramter which takes the filepath name you can set to synamic filename as below
data : p_filename  type RSVAR-FILEPATH.
initialization.
concatenate '/....SAP Forex Upload_' sy-datum+06(02) sy-datum+04(02) sy-datum+00(04) into p_filename.

Similar Messages

  • EJB +FLAT FILE READ options

    Hi Form
    I know it's really Against the policy to read a FLAT File in EJB env,
    But On a classic scenireio , When one has to use a 3rd party tool with Flat file Read / Write complications arise How dos one Cope with this manner
    With regards
    Karthik

    Hi Form
    Yes Some day's ago In did post the form , but returned without results,So hence re posting the form
    I am working on NLS [ Natural Language Processing ] String sequence and would like to use the same along with EJB's ]
    There is a 3rd Party ( JWNL ) Package avaliable on Web which uses the FLATFILE Read capability and Free one in it's env.
    For the JWNL to work ,it has to read some FLAT Files for processing
    Synonyms,Cordinate terms...
    It this is the classic Scenerion to use within the EJB HOW TO HANDLE??
    Plz help
    With regards
    Karthik

  • Dynamically changing flat file target location in OWB10gr2.

    Hi,
    We have a requirement where in we are suppose to load a flat file from relational tables and the location of the flat file needs to be configurable at runtime.
    Please suggest if this is achievable.
    Regards,
    PHD
    Edited by: user1662077 on Jun 17, 2009 10:08 PM

    See the post here for dynamically generating target file names using the OWB file operator as a target;
    http://blogs.oracle.com/warehousebuilder/2007/07/dynamically_generating_target.html
    Other techniques also include using a table function as a target.
    Cheers
    David

  • JCA flat file read issue

    Hi,
    We needs to read a flat file and transform it to destination xml format. Then send it to destination file location.
    Steps we have done:
    1. Create JCA adapter and configure the flat file schema
    2. Create proxy based on the jca
    3. create transformation for the source to target schema (this has no namespace)
    4. Create BS for sending the output
    Everything workins as expected when testing from OSB test console. But then the file is placed in the source folder, the output xml has the namespace xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" to the root node.
    e.g,
    <Root xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" >
    <Child>
    <Child1/>
    <Child2/>
    <Child3/>
    </Child>
    </Root>
    But expected output is
    <Root>
    <Child>
    <Child1/>
    <Child2/>
    <Child3/>
    </Child>
    </Root>
    We tried converting the xml to string then repalcing the xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" value with balnk.
    Also we tried with hadcorded xml using assign action instead of transformation. Even the harded xml also having the namespace to the root node.
    But the end system is failing due to this namespace value.
    Help me to resolve the issue.
    Thanks,
    Vinoth
    Edited by: Vinoth on Jun 8, 2011 10:12 PM

    Ideally your endsystem should not fail if you specify any number of namespace identifiers in the XML unless you are using them in elements or attributes within the XML. They should try to resolve this on their side.
    But to see whats going on in OSB, can you please paste log the $body variable in the before the publish action and paste the content here. Or send the sbconfig of the Proxy and business to me on my email mentioned in the profile if possible.

  • Dynamically generating flat file using OWB10gr2

    Hi,
    I am trying to generated an XML file using OWB10gR2.
    It is achievable to create a predefined file ie with static name or add sysdate into the file name,but can we name the file depending on the Request Id which can be provided as an Input to the mapping.
    Any suggestions will be helpful.
    Regards,
    PHD.

    You can define expressions which you might be able to be creative with;
    http://blogs.oracle.com/warehousebuilder/2007/07/dynamically_generating_target.html
    Cheers
    David

  • Dynamic name for File through FTP Adapter

    I am working on FTP Put and I have a requirement where in I have to generate the file with dynamic content in its name.I should actually embed a Purchase Order number in that file name follwed by a sequence number.I dont need any time stamp.Should I create a variable for this?
    Help in this regard would be highly appreciated.

    Hi,
    you have to enable the adapter specific parameter --> file name in both the sender and the receiver CC to get the input file name as output file name.
    Refer this blog:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Also you need to use this udf
    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; 
    Also refer this blog:
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Regards,
    Nithiyanandam

  • Multiple Header Lines in Flat-File read by FileSenderAdapter

    Hello XI and File Sender Adapter Species
    We have the following file with fixed file lengths:
    #H1 F1
    #H2 F1
    #H3 F1
    #H4 F1
    #H5 F1
    #H6 F1
    #D1 Field1 - Fieldn
    #D2 Field1 - Fieldm
    #D2 Field1 - Fieldm
    #D1 Field1 - Fieldn
    #D2 Field1 - Fieldm
    #D2 Field1 - Fieldm
    #F F1
    Concrete example as follows:
    #H1 150
    #H2 ECH150_20070709_026745152.dat
    #H3 20070709_1600
    #H4 9.0
    #H5 8712423010208
    #H6 8712423009202
    #MDDTD3 146307732 146202845 871687940006178374E70871687910000219120200707090032B 040235031             Noordkant               28         SINT ANTHONIS           5845EW                                   8716879000004871242300920287124230091962007070909550113533533                 8716948000010501000L
    #MDDTD4 59664          E10
    #MDDTD4 30180          E11
    #MDDTD3 146309776 146202839 871694840030212726E70871694830000000309200707090031B 0411   8              Flierakkers             21         VROOMSHOOP              7681XV                                   8716948000003871242300920287124230091962007070909590113533515                 8716948000010503000L
    #MDDTD4 3562           E10
    #MDDTD4 2422           E11
    #F6
    This File Should be read via the File Sender Adapter and afterwards mapped into the following idoc structure:
    IDOC-Type
    ZUECH_010
      Header Segment: H1, H2, H3, H4 , H5 ,H6
      Detail1Segment: Field1, Field2 …. Fieldn
      Detail2Segment: Field1, Field2 …. Fieldm
      Detail2Segment: Field1, Field2 …. Fieldm
      Detail1Segment: Field1, Field2 …. Fieldn
      Detail2Segment: Field1, Field2 …. Fieldm
      Detail2Segment: Field1, Field2 …. Fieldm
      FooterSegment: Field1
    Now my Questions:
    1.     As far as I know it is not possible to configure in the filesender adapter 2 different Record sets? We need two record sets, one for the header lines whose occurrences are once per File and one for the detail lines? Does anybody know if this is possible?
    2.     Any other ideas for a simple solution?
    Thanks for a soon answer.
    Regards Marlies

    Thanks all very much for your answers:
    The hint from Praveen was very helpful.
    If possible we need a solution with the graphical mapping tool and as far as possible without UDF, because at the moment there is no java developer.
    The file adapter now produces the following xml structure:
    <ZUECH_0150>
      <recordset>
        <H1>     
         <KH1>#H1</KH1>
         <H1>150</H1>
        </H1>
        <H2>
         <KH2>#H2</KH2>
                       <H2>ECH150_20070709_026745152.dat</H2>
              </H2>
              <H3>
                   <KH3>#H3</KH3>
                   <H3>20070709_1600</H3>
              </H3>
              <H4>
                   <KH4>#H4</KH4>
                   <H4>9.0</H4>
              </H4>
              <H5>
                   <KH5>#H5</KH5>
                   <H5>8712423010208</H5>
              </H5>
              <H6>
                   <KH6>#H6</KH6>
                   <H6>8712423009202</H6>
              </H6>
              <MDDTD3>
                   <KMDDTD3>#MDDTD3</KMDDTD3>
                   <MDDTD3>146307732 146202845 </MDDTD3>
              </MDDTD3>
              <MDDTD4>
                   <KMDDTD4>#MDDTD4</KMDDTD4>
                   <MDDTD4>59664          E10</MDDTD4>
              </MDDTD4>
              <MDDTD4>
                   <KMDDTD4>#MDDTD4</KMDDTD4>
                   <MDDTD4>30180          E11</MDDTD4>
              </MDDTD4>
         </recordset>
    </ ZUECH_0150>
    I would prefer the following structure, because it fits exactly to the structure of the idoc.
    That means the mapping is very simple:
    <ZUECH_0150>
          <HEADER>
                  <H1>150</H1>
                  <H2> ECH150_20070709_026745152.dat</H1>
          </HEADER>
          <MDDTD3>
                 <KMDDTD3></KMDDTD3>
                 <MDDTD3>146307732 146202845</MDDTD3>
                    <MDDTD4>
                   <KMDDTD4>#MDDTD4</KMDDTD4>
                   <MDDTD4>59664          E10</MDDTD4>
              </MDDTD4>
              <MDDTD4>
                   <KMDDTD4>#MDDTD4</KMDDTD4>
                   <MDDTD4>30180          E11</MDDTD4>
              </MDDTD4>
          </MDDTD3>
    </ZUECH_0150>
    Now my new questions:
    1.     Is it possible to configure the file adapter to produce a xml structure which afterwards can be mapped with a simple graphical mapping into the idoc structure?
    (I can live with the suggestion from Praveen, that the header information is in each recordset but only has content in the first one.)
    2.     What about the MDDTD4? It is a substructure from MDDTD3. Is it possible to configure this in the file adapter?
    Thanks a lot for your help and a soon answer.
    Regards Marlies
    Message was edited by:
            Marlies  Nowotka
    Message was edited by:
            Marlies  Nowotka

  • Dynamic name physical file target

    Hi
    i have create logical file name with physical target name  : /appli/interfaces/<FILENAME>_<SYSID>.csv
    i want also add system time , date  in this name.
    anyone  cab help me
    thanks.

    This is exactly the same as for <FILENAME> and <SYSID>. Those are all reserved words. In transaction file on field Physical file click F1 help and you will see a list of all reserverd words you can use and are subsituted automatically.
    Here is part of the list:
    Reserved word        Word to be substituted           
    <OPSYS>              Operating system in call         
    <INSTANCE>           R/3 application instance         
    <SYSID>              R/3 application name in SY-SYSID 
    <DBSYS>              Database system in SY-DBSYS      
    <SAPRL>              R/3 release in SY-SAPRL          
    <HOST>               Host name in SY-HOST             
    <CLIENT>             Client in SY-MANDT               
    <LANGUAGE>           Log on language in SY-LANGU      
    <DATE>               Date in SY-DATUM                 
    <YEAR>               Year in SY-DATUM, 4-character    
    <SYEAR>              Year in SY-DATUM, 2-character    
    <MONTH>              Month in SY-DATUM                
    <DAY>                Day in SY-DATUM                  
    <WEEKDAY>            Day of the week in SY-FDAYW      
    <TIME>               Time in SY-UZEIT                 
    <STIME>              Hour and minute in SY-UZEIT      
    <HOUR>               Hour in SY-UZEIT                 
    <MINUTE>             Minute in SY-UZEIT               
    <SECOND>             Seconds in SY-UZEIT              
    <PARAM_1>            External parameter 1             
    <PARAM_2>            External parameter 2

  • How to create source system for flat file loads

    How do I create a source system to load flat file?
    I have a screen that asks for the following:
    Logical system name
    Source system name
    Type and release
    What should I enter for these?
    I am not Basis and Basis was supposed to set this up.

    hi sam.
    STEPS TO CREATE FLAT FILE SOURCE SYSTEM
    step:1 select source systems under modeling in AWB.
    step:2 select Source Systems root node.
               |---> context menu
                   |--->create......
    step:3 select your required source system Icon.
              (in your case it is PC Icon).
    there it askes for a logical.......and source system name...
    here u can specify any name of ur wish
    for example:-
    logical sys name --- PC_FF
    source system name --- flat file source system*
    *press Continue * button.
    Observe the activation icon to confirm the successfull creation(_glowing lamp icon_ symbol)

  • Problem Loading Microsoft Sql Serer table data to flat file

    Hi Experts,
    i am trying to load data from SQL Server table to flat file but its errror out.
    I have selected Staging area different form Targert ( I am using SQL Server as my staging area)
    knowlegde modue used: IKM SQL to file Append
    I reciee the following errror
    ODI-1217: Session table to file (124001) fails with return code 7000.
    ODI-1226: Step table to file fails after 1 attempt(s).
    ODI-1240: Flow table to file fails while performing a Integration operation. This flow loads target table test.
    ODI-1227: Task table to file (Integration) fails on the source MICROSOFT_SQL_SERVER connection POS_XSTORE.
    Caused By: java.sql.SQLException: Could not read heading rows from file
         at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:164)
    Please help!!!
    Thanks,
    Prateek

    Have you defined the File Datastore correctly with appropriate delimiter and file properties.
    Although the example is for oracle to file , see if this helps you in any way - http://odiexperts.com/oracle-to-flat-file.

  • Flat file loading... how to automate the loading of multiple files

    HI Alll,
    I'm wondering if it's possible to create a routine that automates the loading of several flat files into a PSA table.
    I only want a single info package, and I would like this info package to load file 1, then load file 2, file 3 etc etc....
    The alternative is to create info packages for each flat file, but this seems clunky and inefficient.
    Is this possible?
    Regards,
    Frederick

    Hi,
    It is not possible with single infopackage. you have to create different infopackages. But you can put it in process chain in sequence to load different flat files.

  • Creating flat file on other machine.

    Hi All,
    I am working on ODI 11g( 11.1.1.6).
    i want to create flat file on another machine.
    lets say, i have two machine A & B.
    Machine A contain ODI 11g, Machine B contain source (Oracle) and Flat file location which is Target.
    How to create flat file in machineB as target.
    Please heip.
    Regards
    Prashant

    Thanx for replay,
    In machineA ODI 11g is installed.
    source and target are on machineB.
    In Physical Architecture i am able to map source(Oracle) machineB using IP,
    but for file, i am not able to map with target machineB, to generated flat file.

  • FM to create a flat file in given IDOC type format

    Hi,
    I need to create a flat file having IDOC format.
    I have data in some other source file.
    Which function module can be used for the same?
    Could you pls provide some sample code?
    Appreciate the help.
    Thanks.
    -Shreyas

    My Exact requirement is:
    I have some data in a source file.
    Now I want to create a flat file while which should be in a standard IDOC format(WMMBID02) so that I can process it later using IDOC processing say EDI_DATA_INCOMING or any appropriate FM which will process IDOC later.
    I dont want IDOC to be created in the system right now. I just need to reformat my source file into a standard IDOC format flat file.

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

Maybe you are looking for