Flat File Automation

Hi Friends !
1) We have the flat files which will be monthly stored in the folder "e:\bitrans\" & the file name will be 20111101.csv & 20111201.csv.
2) We need to automatic this process so that we can schedule the process chain.
3) I was thinking to put the routine into the datasource & infopackage. Code is shown below:
DATA : YEAR(4)       TYPE C,
         MON(2)        TYPE C,
         DATE(2)       TYPE C,
         RESULT(8)     TYPE C,
         STR1(11)      TYPE C,
         STR2(4)       TYPE C,
         STR_FINAL(30) TYPE C.
  YEAR = SY-DATUM+0(4).
  MON  = SY-DATUM+4(2).
  DATE = SY-DATUM+6(2).
  CONCATENATE YEAR MON DATE INTO RESULT.
  STR1 ='e:\bitrans\'.
  STR2 = '.csv'.
  CONCATENATE STR1 RESULT STR2 INTO STR_FINAL.
  P_FILENAME = STR_FINAL.
Below code gives the path name correctly "e:\bitrans\20111121.csv" but when I am checking the preview, it showz the error "Syntax error in , row 34 (-> long text)
Message no. RG102
Diagnosis
Field "" is unknown. It is neither in one of the specified tables nor defined by a "DATA"   ...
Any advise or any other way to do?
With Regards
Rekha

Hi Rajini,
Ask UNIX team to write a code for file watcher which can wait till the file arrive into the unix folder. Once the code is ready, create a OS command in SM69 and define the system command and parameters like below
Operating system command : sh
Parametrs : /var/xx/xx/<xx>.sh (path of the unix code)
Now the create process chain and call the OS command process type and provide the execution details like :
System command : Name of the system command which you have created in SM69
Additional Parameters : File patch name which include file name / time of intervels / till what time it waits
If it success, keep schedule a infopackage process type else exit.
Hope it would helps you.
Please let me know if you need some more clarification while implementing.
Regards,
Venkata

Similar Messages

  • Flat File automation process - limitations

    Hello Everyone,
    I would really appreciate any insight on the process improvement suggestions.
    Background:
    Currently we have around 12 territories providing a new flat file with new data on a daily basis depending on the business activity. Which would also mean that, on a given day if there is no activity would mean no flat file provided to BI for loading process.
    The flat files provided need to be loaded into the BI system (PSA - DSO - InfoCube).
    The flat file loading process has been automated for the daily file by implementing the logical file name for each territory.
    1. The process variant in the process chain is to ensure if the flat file is available on the App server (Custom ABAP program).
    2. 12 InfoPackages have been created to pick the data from the flat file on the app server and load the data over into the PSA.
    3. All the InfoPackages merge into an "AND" event in the process chain before the DTP load into the DSO kicks off.
    4. DSO Activation
    5. Recon between the flat file and the DSO to ensure all the data from flat file has been loaded into the DSO.
    6. DTP loads into the InfoCube.
    7. Recon between the InfoCube and the DSO itself.
    8. Moving the flat file from one folder into another.
    All the above processes are automatically performed without any issues if the flat file is available on the server.
    Problem / Issue:
    As one of the major limitations of the above design is the flat file for sure needs to be made available on the app server in order for the whole data flow in the process chain to continue without any breakpoints.
    Current workaround / process improvement in place:
    Based on the above limitation and upon further research, I was able to apply the OSS Note to give us the option of maintaining multiple DTPs for the same data target with different filter values.
    So, even if have individual data stream for each territory with a different DTP the issue still remains where the process variant (ABAP program to check if file exists) or the InfoPackage load if the ABAP program is removed will fail.
    Which means due to the above fact, the support team is alerted about the process chain failure.
    Question / Suggestions required:
    The main questions or any suggestions would be welcome, if one of you can let us know an approach where the flat file check program doesn't have to give a hard failure in the process chain for the rest of the process chain to continue with the loading process. (As in order for the rest of the process chain to continue the only options we have are Error, Success, Always).
    I have also looked into the Decision process variant available in the process chain, but based on the options available within I cannot utilize it for the loading process.
    Error can be caused by generating an error message in the ABAP program which in turn is causing the issue of alert being sent over even if the rest of the process chain finishes.
    Success would mean the flat file needs to be available. Always cannot be used in this case as it will cause a failure at the InfoPackage level.
    If the InfoPackage load can be avoided without a hard error to be generated, the process chain does not have to remain in the failed state which in turn will not trigger any alert to the support team.
    Please do let me know if you need more details about the above process improvement question.
    Thanks
    Dharma.

    The main issue with this as you mentioned is that the file has to be available for sure.
    We had a similar issue - we had a very critical data load that had to happen everyday , failure of the file getting loaded would mean that the reports for the day would be delayed.
    We were running on UNIX and we implemented a simple UNIX command that would not complete till the file was available in the app server.
    Something like
    while ( the file does not exist )
    delay of 15 seconds
    you will come out of the while only after the while completes which means that the file becomes available.
    You can write a similar ABAp program to check file availability if required and put it into your program.
    we also had a failover process where we created a zero byte file with the same name if the file did not come beyond a certain number of tries and the PSA would load zero records and the data load will continue.
    Edited by: Arun Varadarajan on Jan 26, 2009 10:18 AM

  • Automation of Query generation and Conversion to Flat File CSV

    I have a requirement for Generating / Executing the refresh for the existing Query IN BEX automatically on 3 rd Business day of Every Quarter in BEX Analyzer AND also to convert it to flat file after generation. Please give me some documents or exact steps on how to go about this
    automation. Please reply me in detail and soon
    Thanks
    Soniya

    Hi Sir, I will be very grateful if u can clarify
    1. User want the flat  file on the Company Server, which means there are folder on my company BMW server , and he wants to see the flat file there so that he can review it
    2. I saw some AL11 and directories how can I create my directory or Create the file in DIR_HOME and see the file in flat file format it shows like a screen which my user do not want, he just want a flat file.
    3.Please suggest me if this method rscrm_bapi will work or should u suggest download scheduler or report agent and how.
    4. Sorry for the question but my problem and requirement of user is not solved
    please reply soon
    thanks
    soniya

  • Loading Multiple Flat File around 80+

    Hi,
    Loading multiple flat file in to BI system.
    My issue: I got a scenerio of loading multiple i.e., 80+ flat file into BI system every month and my client want it to be done through process chain r automation with out manual intervention.
    Can any one suggest me how can i achiev this one.
    Regards,
    Prabhakar.

    Hi All,
    We have developed a logic to upload multiple flat file at a time i.e., .CSV file. Please find below is the logic regarding that routine.
    *+ program filename_routine.
    Global code
    $$ begin of global - insert your declaration only below this line  -
    Enter here global variables and type declarations
    as well as additional form routines, which you may call from the
    main routine COMPUTE_FLAT_FILE_FILENAME below
    data : v_filename type string.
    data : v_foldername type string.
    data : v_uploadfile type string.
    data:  v_download_file type string.
    data : v_ext(4) type c.
    data : v_FILE_EXISTS type c.
    data : v_file type DXFILE-FILENAME.
    data : v_count(3) type c.
    data : v_length type i.
    TYPES: BEGIN OF  TY_file,
            LINE(900),
          END OF  TY_file.
    DATA: GIT_file TYPE TABLE OF TY_file.
    $$ end of global - insert your declaration only before this line   -
    form compute_flat_file_filename
      using    p_infopackage  type rslogdpid
               p_datasource   type rsoltpsourcer
               p_logsys       type rsslogsys
      changing p_filename     type RSFILENM
               p_subrc        like sy-subrc.
    $$ begin of routine - insert your code only below this line        -
    This routine will be called by the adapter,
    when the infopackage is executed.
      v_count = 1.
    *---- As per the folder location of the files & system we have to change
    *the path fo the folder in the below variable i.e., 'c:\............
      v_foldername =
      'C:\Documents and Settings\Prabhakar-HP\Desktop\test\'.
    *---- As per the Prefix of the files like 'CSI_01_..' we have change the
    *prefix if required in the below variable i.e., 'CSI_01_..', IF REQUIRED
    *OR IF WANT TO CHANGE THE PREFIX TO SOME OTHER.
      v_filename = 'CSI_01_'.
      v_ext = '.csv'.
      condense v_count.
      concatenate   v_foldername
                    v_filename
                    v_count
                    v_ext       into v_uploadfile.
      v_file = v_uploadfile.
      CALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'
        EXPORTING
          FILENAME       = v_file
          PC             = 'X'
        IMPORTING
          FILE_EXISTS    = v_FILE_EXISTS
        EXCEPTIONS
          RFC_ERROR      = 1
          FRONTEND_ERROR = 2
          NO_AUTHORITY   = 3
          OTHERS         = 4.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      while v_FILE_EXISTS = 'X'.
        v_file = v_uploadfile.
        CALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'
          EXPORTING
            FILENAME       = v_file
            PC             = 'X'
          IMPORTING
            FILE_EXISTS    = v_FILE_EXISTS
          EXCEPTIONS
            RFC_ERROR      = 1
            FRONTEND_ERROR = 2
            NO_AUTHORITY   = 3
            OTHERS         = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        if v_file_exists = 'X'.
          CALL FUNCTION 'GUI_UPLOAD'
            EXPORTING
              FILENAME                = v_uploadfile
              FILETYPE                = 'ASC'
              HAS_FIELD_SEPARATOR     = 'X'
            TABLES
              DATA_TAB                = GIT_file
            EXCEPTIONS
              FILE_OPEN_ERROR         = 1
              FILE_READ_ERROR         = 2
              NO_BATCH                = 3
              GUI_REFUSE_FILETRANSFER = 4
              INVALID_TYPE            = 5
              NO_AUTHORITY            = 6
              UNKNOWN_ERROR           = 7
              BAD_DATA_FORMAT         = 8
              HEADER_NOT_ALLOWED      = 9
              SEPARATOR_NOT_ALLOWED   = 10
              HEADER_TOO_LONG         = 11
              UNKNOWN_DP_ERROR        = 12
              ACCESS_DENIED           = 13
              DP_OUT_OF_MEMORY        = 14
              DISK_FULL               = 15
              DP_TIMEOUT              = 16
              OTHERS                  = 17.
          IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          elseif sy-subrc = 0.
    **----- As per the REQUIRMENT, want to change the down loading file
    *path means we have to change the path in the below variable i.e.,
    *'c:\.......
    v_download_file =
    'C:\Documents and Settings\Prabhakar-HP\Desktop\test\satheesh.CSV'.
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                FILENAME                = v_download_file
                FILETYPE                = 'ASC'
                APPEND                  = 'X'
              TABLES
                DATA_TAB                = git_file
              EXCEPTIONS
                FILE_WRITE_ERROR        = 1
                NO_BATCH                = 2
                GUI_REFUSE_FILETRANSFER = 3
                INVALID_TYPE            = 4
                NO_AUTHORITY            = 5
                UNKNOWN_ERROR           = 6
                HEADER_NOT_ALLOWED      = 7
                SEPARATOR_NOT_ALLOWED   = 8
                FILESIZE_NOT_ALLOWED    = 9
                HEADER_TOO_LONG         = 10
                DP_ERROR_CREATE         = 11
                DP_ERROR_SEND           = 12
                DP_ERROR_WRITE          = 13
                UNKNOWN_DP_ERROR        = 14
                ACCESS_DENIED           = 15
                DP_OUT_OF_MEMORY        = 16
                DISK_FULL               = 17
                DP_TIMEOUT              = 18
                FILE_NOT_FOUND          = 19
                DATAPROVIDER_EXCEPTION  = 20
                CONTROL_FLUSH_ERROR     = 21
                OTHERS                  = 22.
            IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            refresh git_file.
          ENDIF.
        endif.
        if v_file_exists = 'X'.
          if p_subrc = 0.
            v_count = v_count + 1.
            condense v_count.
            concatenate
                 v_foldername
                 v_filename
                 v_count
                 v_ext into v_uploadfile.
          endif.
        else.
        endif.
      endwhile.
      v_uploadfile = v_download_file.
      p_filename = v_uploadfile.
      p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    endform. +*
    Reagrds,
    Prabhakar.

  • Oracle API for Extended Analytics Flat File extract issue

    I have modified the Extended Analytics SDK application as such:
    HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_FLATFILE
    instead of
    HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_STANDARD
    I am trying to figure out where the Flat file extract is placed once the Extract is complete. I have verified that I am connecting to HFM and the log file indicates all the steps in the application have completed successfully.
    Where does the FLATFILE get saved/output when using the API?
    Ultimate goal is to create a flat file through an automated process which can be picked up by a third party application.
    thanks for your help,
    Chris

    Never mind. I found the location on the server.

  • Extended Analytics Flat File extract question

    I have modified the Extended Analytics SDK application as such:
    HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_FLATFILE
    instead of
    HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_STANDARD
    I am trying to figure out where the Flat file extract is placed once the Extract is complete. I have verified that I am connecting to HFM and the log file indicates all the steps in the application have completed successfully.
    Where does the FLATFILE get saved/output when using the API?
    Ultimate goal is to create a flat file through an automated process which can be picked up by a third party application.
    thanks for your help,
    Chris

    Never mind. I found the location on the server.

  • Export Table to flat file and upload to FTP server for external vendor

    I have done some extensive searches on the forums and I think I have an idea but really need some help. Basically have a table that needs to be exported to a flat file and uploaded to a FTP server so that our vendor can get the data Monday-Saturday and automated by sysdate. This data is used to produce daily letters that go out to customers.
    After doing some searching I came across the UTL_FILE package and reading more into this right now but I am not sure if it is what I should be using to create the file.
    I am using TOAD right now and can see how to do it manually however really need the file to create itself and send automatically at 6 am Monday - Saturday with the date at the end of the file name making it a unique file for each day.
    Thanks in advance for all of your help.

    As Justin and others have mentioned I wrote [XUTL_FTP|http://www.chrispoole.co.uk/apps/xutlftp.htm] so you wont find it in the Oracle documentation. It's pure PL/SQL and uses UTL_TCP and implements an integrated PL/SQL FTP client / API. One of it's many overloaded procedures FTP's the contents of a refcursor straight to a FTP server of your choice, meaning no intervening file is required. Since it is pure PL/SQL, it is trivial to schedule using DBMS_JOB/DBMS_SCHEDULER.
    Any questions just ask.
    HTH Chris

  • InfoPackage to load multiple flat file for different plant

    Hi
    There is a requirements to load the data from multiple flat files by different plant into BI which source data is coming from other system. Each flat file has it own naming convention.
    As data has to load via infopackage into the targeted cube. Then I have to create multiple infopackage in order to load the data according to the number of flat files that provided. However, new plant will be created due to expansion of bussiness. If that is the case, additional infopackage is required to create as and when there is a new plant. 
    Is there a way to create a infopackage to load the data from flat file by plant? Your advice is much appreciated.
    Thanks and regards
    Kang Ring

    Hi,
    The best way I can suggest is....
    1. Create a folder in AL11 for your requirements.
    2. In InfoPackage under Extraxction Tab you can have File Name , just side of this you can fine ABAP Routines ICon there you click on that and asks Name give some and then it will takes to your into ABAP Code there you can access the AL11 and then write code in such way that to take file irrespective of the File name, whatever the file is there in that Folder it ahoud take from that AL11 Folder path.
    3. Load the Data using PC.
    4.At the end of the PC Delete the File in AL11 folder , becasue we don't need it for next load.
    Else
    See the thread
    Re: Automation of load from application server
    Thanks
    Reddy
    Edited by: Surendra Reddy on Jun 4, 2010 11:03 AM

  • Unattended Daily Exporting of Query to Flat File

    I am VERY new to Oracle and SQL Plus. I've been tasked with automating a query to run unattended daily to export data and store it in a flat file with structured naming convention (CC_MMDDYY.exp). I need to have it be able to an "on demand" query to flat file too. Any help would be appreciated.

    search asktom.oracle.com (temporary unavailable right now) for keyword flat file to obtain a procedure to write the result of a given query to a flat file and that's it. You can then schedule it's execution using DBMS_SCHEDULER or execute it on demand.
    Regards
    Etbin
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:68212348056
    Message was edited by: Etbin
    user596003

  • 10g data export to flat file (diffrent)

    hello
    I could see that this question have been asked several times in several ways. But I have a little specific thing to ask which I could not find :(
    Here is what I am trying to achieve:
    -I have close to 50 tables which I need to export in flat file format with some deliminator.
    -I would like to use a stored procedure to achieve it
    -I want to write a simple SQL statement(not PL/SQL program) for the user's convenience for modifications in future
    -I have tried exporting data using SQL developer in csv format but I would like to suppress the table headings and replace them with some other
    -I am expecting not more than 1000-2000 records per table and also the number of columns per table are not more than 10
    -I am using SQL developer 1.5 to do this and it has the export functionality but eventually the process would be automated so I would like to make it a stored procedure.
    Any help is appreciated
    Thanks in advance
    Regards
    Kedar

    You can use utl_file, see the specs :
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF
    Also: http://www.psoug.org/reference/utl_file.html
    for some working examples.
    Enrique

  • Exporting R3 tables into Flat Files for BPC

    Dear BPC experts,
    I understand currently the way for BPC to extract data from R3 is via flat files. I have the following queries:
    1) What exactly are the T codes and steps required to export R3 tables into flat files (without going through the OpenHub in BI7)? Can this process be automated?
    2) Is Data Manager of BPC equivalent to SSIS (Integration Services) of SQL Server?
    Please advise. Thanks!!
    SJ

    Hi Soong Jeng,
    I would take a look at the existing BI Extractors for the answer to Q1, I am working on finishing up a HTG regarding this. Look for it very soon.
    Here is the code to dump out data from a BI Extractor directly from ERP.
    You need dev permissions in your ERP system and access to an app server folder. ...Good Luck
    *& Report  Z_EXTRACTOR_TO_FILE                                         *
    report  z_extractor_to_file                     .
    type-pools:
      rsaot.
    parameters:
      p_osrce type roosource-oltpsource,
      p_filnm type rlgrap-filename,
      p_maxsz type rsiodynp4-maxsize default 100,
      p_maxfc type rsiodynp4-calls default 10,
      p_updmd type rsiodynp4-updmode default 'F'.
    data:
      l_lines_read type sy-tabix,
      ls_select type rsselect,
      lt_select type table of rsselect,
      ls_field type rsfieldsel,
      lt_field type table of rsfieldsel,
      l_quiet type rois-genflag value 'X',
      l_readonly type rsiodynp4-readonly value 'X',
      l_desc_type type char1 value 'M',
      lr_data type ref to data,
      lt_oltpsource type rsaot_s_osource,
      l_req_no type rsiodynp4-requnr,
      l_debugmode type rsiodynp4-debugmode,
      l_genmode type rois-genflag,
      l_columns type i,
      l_temp_char type char40,
      l_filename    like rlgrap-filename,
      wa_x030l      like x030l,
      tb_dfies      type standard table of dfies,
      wa_dfies      type dfies,
      begin of tb_flditab occurs 0,
    *   field description
        fldname(40)  type c,
      end of tb_flditab,
      ls_flditab like line of tb_flditab,
      l_file type string.
    field-symbols:
      <lt_data> type standard table,
      <ls_data> type any,
      <ls_field> type any.
    call function 'RSA1_SINGLE_OLTPSOURCE_GET'
      exporting
        i_oltpsource   = p_osrce
      importing
        e_s_oltpsource = lt_oltpsource
      exceptions
        no_authority   = 1
        not_exist      = 2
        inconsistent   = 3
        others         = 4.
    if sy-subrc <> 0.
    * ERROR
    endif.
    create data lr_data type standard table of (lt_oltpsource-exstruct).
    assign lr_data->* to <lt_data>.
    call function 'RSFH_GET_DATA_SIMPLE'
      exporting
        i_requnr                     = l_req_no
        i_osource                    = p_osrce
        i_maxsize                    = p_maxsz
        i_maxfetch                   = p_maxfc
        i_updmode                    = p_updmd
        i_debugmode                  = l_debugmode
        i_abapmemory                 = l_genmode
        i_quiet                      = l_quiet
        i_read_only                  = l_readonly
      importing
        e_lines_read                 = l_lines_read
      tables
        i_t_select                   = lt_select
        i_t_field                    = lt_field
        e_t_data                     = <lt_data>
      exceptions
        generation_error             = 1
        interface_table_error        = 2
        metadata_error               = 3
        error_passed_to_mess_handler = 4
        no_authority                 = 5
        others                       = 6.
    * get table/structure field info
    call function 'GET_FIELDTAB'
      exporting
        langu               = sy-langu
        only                = space
        tabname             = lt_oltpsource-exstruct
        withtext            = 'X'
      importing
        header              = wa_x030l
      tables
        fieldtab            = tb_dfies
      exceptions
        internal_error      = 01
        no_texts_found      = 02
        table_has_no_fields = 03
        table_not_activ     = 04.
    * check result
    case sy-subrc.
      when 0.
    *      copy fieldnames
        loop at tb_dfies into wa_dfies.
          case l_desc_type.
            when 'F'.
              tb_flditab-fldname = wa_dfies-fieldname.
            when 'S'.
              tb_flditab-fldname = wa_dfies-scrtext_s.
            when 'M'.
              tb_flditab-fldname = wa_dfies-scrtext_m.
            when 'L'.
              tb_flditab-fldname = wa_dfies-scrtext_l.
            when others.
    *         use fieldname
              tb_flditab-fldname = wa_dfies-fieldname.
          endcase.
          append tb_flditab.
    *        clear variables
          clear: wa_dfies.
        endloop.
      when others.
        message id sy-msgid type sy-msgty number sy-msgno
        with  sy-subrc raising error_get_dictionary_info.
    endcase.
    describe table tb_flditab lines l_columns.
    " MOVE DATA TO THE APPLICATION SERVER
    open dataset p_filnm for output in text mode encoding utf-8
      with windows linefeed.
    data i type i.
    loop at <lt_data> assigning <ls_data>.
      loop at tb_flditab into ls_flditab.
        i = sy-tabix.
        assign component i of structure <ls_data> to <ls_field>.
        l_temp_char = <ls_field>.
        if i eq 1.
          l_file = l_temp_char.
        else.
          concatenate l_file ',' l_temp_char  into l_file.
        endif.
      endloop.
      transfer l_file to p_filnm.
      clear l_file.
    endloop.
    close dataset p_filnm.
    Cheers,
    Scott
    Edited by: Jeffrey Holdeman on May 25, 2010 4:44 PM
    Added  markup to improve readability
    Edited by: Jeffrey Holdeman on May 25, 2010 4:47 PM

  • Flat File Load Problem

    Hi All,
    Has anyone come across where flat file uploads cuts out the last 1 or 2 columns from the upload.
    This happens in the preview and in the actual load.
    The data separators(,) and the Escape sign (") are OK
    This are sample lines below:
    "60    ","105906      ","A","253215      ","2005052700000000","516007      ",".TonyA        ","1.17                 ","0.20         ","2005050600000000","7     ","1   "
    "102   ","42577       ","A","560194      ","2005070400000000","825293      ","A.HARCOURT     ","23.95                ","4.19         ","2005062300000000","8     ","56  "
    "149   ","103179      ","A","254010      ","2005020900000000","208864      ","Paul Glew      ","2.16                 ","0.38         ","2004121300000000","9     ","1   "
    It only loads up to the column with 0.20,4.19,0.38 and cuts it out from the date onwards (3 last columns).
    Anybody seen this???

    Hi Guys,
    I really don't have much of a leeway in manipulating the file for upload. It is generated by a legacy system and the upload will be automated.
    However, I am using a subset of the data for testing which I have been changing to troubleshoot the errors. What confuses me in this situation is that I have similar data structures with the same spaces, date formats etc. that is working.  To answer your questions:
    In the preview the data is displayed OK and first date in the line is displayed without the suffix zeros up to the last 3 columns which is blank completely, the following column shows 4 zeros and the last column is blank as well.
    I have tested the data by physically removing the last 3 columns from the file. When I preview that it also gives me zeros in the 2nd last column even though there is no data to be read.
    I have also tested it by removing unwanted spaces and it did not make a difference.
    I have also tested via a logical path as well as pc file.
    I am thinking other ways to test this......any ideas still......
    K

  • Flat file selection

    hi bw gurus
       I am looking for some document on flat file recommendations, Issues involved with ascii and csv formats. Does SAP recommend ascii format irrespective of size flat file?
    If some one can throw some light on this, it would be of great help.
    thanks in advance

    Hi Sreekanth,
    To add to what Luca said...
    1> If your file is going to be smaller (say, records in thousands), then you need not bother abt the format, there won't be big diff in using ASCII/CSV. But, if you are planning to load millions of records in CSV, that is going to take quite long!
    2> If the user is going to handle the files directly, then CSV is the better option. If the file is generated by a program/other application, you can try to get it as ASCII.
    3> Try to load huge files from Application Server, instead of the client work station. This will save file upload time and will aid in automating the process.
    Regards,
    Sree

  • Timedependent hierarchy flat file upload

    Hello All,
    I am trying uploading timedependent hierarchy through a flat file.There was no error when i ran infopkg but when i go and check in hierarchy maintanance, i dont find any hierarchy there.I also verified in PSA, wherein i found four segments properly loaded with data.
    I am wondering what can be the possible reason, please provide your valuable suggestions.
    Regards,
    Jay

    Actually speaking there was a error which i didn't noticed. I have to go to scheduler monitor --> details tab --> Transfer (IDocs and TRFC): Errors occured --> Data Package 1 : arrived in BW ; Processing : 2nd processing step not yet finished ,  on the context menu i clicked manual update, hierarchy got loaded.
    But still why one has to go for manual update, Can't it be automated ?
    Infopkg --> processing tab --> check -- update subsequently in data target will solved the problem.
    Edited by: Mr. JK on Mar 14, 2008 7:28 AM

  • Refreshing the data in a flat file

    Hi
    I am working on data integration.
    I need to fetch data from Oracle data base and then write it to a flat file.
    It is working fine now,but for the next fetch I don't need the old data to remain there in the file.The data should get refreshed and only the newly fetched data should be present.
    After the data is written to the flat file can i rename the file?
    I need the format of the file to be 'File_yyyyMMDDHHmmss.txt'.
    My final question is how should I FTP this to the target?
    Please help me on this as soon as possible since this is needed in an urgent part of the delivery.

    All you ask is achievable:
    1) The IKM SQL to file has a TRUNCATE option, which will if set to YES, will start from a clean file.
    2) You could rename the file after writing it, but why not just write it with that name? If you set the resource name to be a variable, (e.g. #MyProj.MyFilename), and be sure to set the variable in the package before executing your interface, you should be able to get the file you want. Otherwise, you can use the OdiFileMove tool in your package to rename the file.
    To set the name of the variable you can use a query on the database (if you are using Oracle, something like SELECT 'File_'||TOCHAR(SYSDATE) from DUAL.)
    3) ODI has ftp classes built in- you can find the doc under doc\webhelp\en\ref_jython\jyt_ex_ftp.htm
    Hope this helps
    Message was edited by:
    CTS

Maybe you are looking for