Loading multiple flat file at a time.

hi experts,
I am having 15 flat files with same data structure.so how do i load all the fileswith out creating 15 info packges .
( say all the files are on the desktop.)
I had seen the option that ABAP code an be written in info package in extraction tab.
Can any one share me the abap code
Regards
Laxman.

You can write dynamic code using ABAP if your number of flat files are not fixed...but if you have to 15 flat files always just creating multiple infopackages.
For code, you have to store file names/name pattern in some table and reading it at run time. You can use function modules starting with BAPI_IPAK* to create/change/start template IP like BAPI_IPAK_START. You can set IP parameters at run time using FM RSBATCH_MAINTAIN_PAR_SETTINGS.
Kamaljeet

Similar Messages

  • Loading Multiple Flat File in to BI System with one InfoPackage

    Greetings,
    i have developed a routine to Load Multiple Flate File in one InfoPackage, but it doesn't work. Only the Last File are loaded. Who can Help me?
    Loading 'R:\Verzeichnis \ing_wan_b_002.fall.csv' to 'R:\Verzeichnis \ing_wan_b_240*.fall.csv'
    Routine:
    DATA: VerzUndDateiname TYPE string value 'R:\Verzeichnis \ing_wan_b_000.fall.csv',
          VerzUndDateinameKomplett TYPE string,
          count TYPE i value 2,
          countN(3) TYPE n.
    WHILE count <= 240.
    countN = count.
    VerzUndDateinameKomplett = VerzUndDateiname.
    REPLACE '000' WITH zaehlerN
                  INTO VerzUndDateinameKomplett.
    p_filename = VerzUndDateinameKomplett.
    count = count + 1.
    ENDWHILE.
    Best Regards
    Jens
    Edited by: JB6493 on May 18, 2009 1:03 PM
    Edited by: JB6493 on May 18, 2009 1:07 PM

    Hello Jens,
    you have to process the InfoPackage 239 times. Your routine would be executed once during one processing of the InfoPackage. This would run the WHILE statement and end up with the last filename after 239 iterations.
    Either try to concatenate the files you want to load (if possible) and load them in one go. Alternatively you could try to use a process chain to run the InfoPackage 239 times.
    Kind regards,
    Christoph

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

  • 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

  • How to load multiple flat files

    Hi,
    I am new to ODI 10, I have one requirement where I need load flat files containing the folder size11GB.
    I want to load them all in a single instances with using of single data server, single physical schema and single logical schema.
    How can we do this.
    Also to execute this in package what steps and precautions do we need to follow.
    Thx

    Is the data in your files the same format?
    If so, simply follow one of the many guides to looping around files that use a common structure to load them, you can do this in parallel if you want.
    http://odiexperts.com/multiple-files-single-interface/
    or
    http://www.odigurus.com/2011/05/multiple-files-single-target-table.html

  • How can i load multiple ase files at a time or is there any other adobe software can let me preview multiple ase files

    I downloads multiple color schemes. I want to know if I can open them all at once without opening one by one.

    For sideloaded content the nook pulls the metadata from ePub file itself.  I would suggest looking at a program like Sigil or Calibre that will let you edit the metadata in the book to make it appear like you want.
    For the PDF vs ePub - No, that's the way PDFs work (think of them as graphics, not text), wheres ePubs are Web Pages - so  no you can't them to behave exactly alike without converting the files.

  • Parallel loading of flat files into BPC 7.0 NW - Help required

    Hi All
    Can I load multiple flat files in parallel into BPC using IMPORT process chain.
    If yes , How ?
    Regards
    AK

    Please import SAP Note [1507226|https://service.sap.com/sap/support/notes/1507226] titled "FileService should support running DM package simultaneously" which is contained in BPC 7.0 NW SP10 and BPC 7.5 NW SP05.
    Best regards,
    [Jeffrey Holdeman|http://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]
    SAP Labs, LLC
    BusinessObjects Division
    Americas Applications Regional Implementation Group (RIG)

  • Loading from multiple flat files to same table using SQL Loader

    Hi Gurus,
    Can anyone please brief me the pros and cons of kicking of multiple sql loader sessions that reads multiple flat files but inserting it into just one table.
    The table is not partitioned. Avg record counts for each flat file is about 5-6 million.
    Oracle 11g,
    OS: Linux
    Regards
    Cherrish Vaidiyan

    Vaidiyan wrote:
    Hi Gurus,
    Can anyone please brief me the pros and cons of kicking of multiple sql loader sessions that reads multiple flat files but inserting it into just one table.Cherrish,
    Pros -> Faster loading of more data
    Cons -> Potential performance degradation
    Test to see how much resource consuming this task would be and do a priority comparison of that multi-multi load task with other stuff that will be happening in the database in the multi-multi load time so you could decide how to share resources in that time.

  • Loading of flat file (csv) into PSA – no data loaded

    Hi BW-gurus,
    We have an issue regarding loading a flat file (csv) into PSA using an infopackage u2013 (BI 7.0)
    The infopackage has been used for a while. Prior the consultants with SAP_ALL-profile have run the infopackage. Now we want a few super users to run the infopackage.
    We have created a role for the super users, including authorization objects:
    Data Warehousing objects: S_RS_ADMWB
    Activity: 03, 16, 23, 63, 66
    Data Warehousing Workbench obj: INFOAREA, INFOOBJECT, INFOPACKAG, MONITOR, SOURCESYS, WORKBENCH
    Data Warehousing Workbench u2013 datasource (version > BW 3.x): S_RS_DS
    Activity: All
    Datasource: All
    Subobject for New DataSource: All
    Sourcesystem: FILE
    Data Warehousing Workbench u2013 infosource (flex update): S_RS_ISOUR
    Activity: Display, Maintain, Request
    Application Component: All
    InfoSource: All
    InfoSource Subobject: All values
    As mentioned, the infopackage in question, has been used by consultants with SAP_ALL-profile for some time, and been working just fine.  When the super users with the new role are executing the infopackage, the records are found, but not loaded into PSA. The load seems to be stuck, but no error message occurs. The file we are trying to load contains only 15 records.
    Details monitor:
    Overall status: Missing messages or warnings (yellow)
    Requests (messages): Everything ok (green)
      ->  Data request arranged (green)
      ->  Confirmed with: OK (green)
    Extraction (messages): Errors occurred (yellow)
      ->  Data request received (green)
      -> Data selection scheduled (green)
      -> 15 Records sent (0 Records received) (yellow)
      -> Data selection ended (green)
    Transfer (IDocs and TRFC): Missing messages (yellow)
    Processing (data packet):  Warnings received (yellow)
      -> Data package 1 (? Records): Missing messages (yellow)
         -> Inbound processing (0 records): Missing messages (yellow)
         -> Update PSA (0 Records posted): Missing messages (yellow)
         -> Processing end: Missing messages (yellow)
    Have we forgotten something? Any assistance will be highly appreciated!
    Cheers,
    Anne Therese S. Johannessen

    Hi,
    Try to use the transaction ST01 to trace the authorization of the upload with the SAP_ALL. 
    And the enhance your Profile for the super user.
    Best regards
    Matthias

  • Error when loading a flat file

    Hello,
    I am trying to load a flat file into our BW for the first time.  I keep getting the error:
    Error 1 when loading external data
    Message no. RSAR234
    I have search SDN and looked at the OSS notes and have tried several suggestions, but I still cannot get the file to load.  We are currently on version 3.5.
    My transfer structure and flat file do match.
    My transfer structure for IO_MAT_ATTR has a transfer method of PSA and is laid out as follows:
    IO_MAT                      Material Number          IO_MAT
    IO_MATNM     Material Name          IO_MATNM
    IO_MAT is: CHAR 15
    IO_MATNM is: CHAR 30
    My flat file is saved as a CSV and is as follows:
    MATONE,TEA
    MATTWO,COFFEE
    My file is saved on my local PC and is not open when I try to load it.  When I attempt to preview the file in my infopackage, I get the same error there as well.
    Any suggestions would be greatly appreciated.
    Thanks
    Charla

    Hi Charla,
    Error 1 means that the system is unable to access the file. Make sure that the path is correct and also check if the data separator is correctly defined in the "external tab" of the infopackage.
    I guess the settings in the "external tab" of the infopackage have some issues.
    Bye
    Dinesh

  • Difference b/w Loading a Flat File made from EXCEL and NOTEPAD

    Hi
    Is there any difference in Loading a flat file made from MS-Excel and Note Pad. Imean performance or errors etc....
    GSR

    S R G,
    Theres no much difference only that when loading from excel we store excel in CSV format.  In notepad we use seperators like comma aand write one row at a time, then next....
    Rest everything is same...
    thats y it is preferable to load from excel as it is easier to represent and create...

  • Multiple flat files appended, is file locked until all processed?

    Hi All,
    Have a scenario in place where we are collecting multiple flat files on ECC and using append mode on the receiver file adapter to create a single file for final output. We are only interested in submitting the output to it's target after all files sent to PI have been appended.
    Does PI 7.0 lock the appended file until all files have been appended so I am sure I end up with a complete single file on output? If not, what are my options to ensure a completely appended file is output? Would it be a viable option to pass the appending file through another sender file adapter using 'msecs to wait before modification check'?
    Thanks!
    Don
    Edited by: donald.meredith on Dec 1, 2011 2:31 PM

    How many files are you collecting from ECC and appending at receiver side and how much time it is taking to complete the process?
    if its possible to schedule your business to read data from FTP after completing append then no worries, else sometimes it creates trouble.
    The option you mentioned is reliable one , but you ended up creating one more interface.
    Regards,
    Raj

  • Multiple flat file in and multiple target tables

    Hi,
    How can we have multiple flat file into multiple targets.
    I am trying to load data from multiple flat files into respective tables. But it gives error like
    VLD-2411: Cannot handle two file structures
    Make sure that only one file structure is used in a SQL*Loader map
    Can anyone help.
    Regards
    Rakesh Kumar

    I donot thing in one mapping you can take multiple sqlloader file.
    If want to load data form multiple file use External table.

  • SSIS project - read multiple flat files with different formats

    hi all,
    i need to import multiple flat files with different formats into different tables of the sql server database and not able to figure out the best way out in ssis to do so...
    please advise the possible methods in ssis to do so and if possible the process which can be dynamic as file names or columns might change in future.

    Hi AK1987,
    To import flat files with dynamic columns, we can use Script Task inside a Foreach Loop Container to parse the first row of the flat file to get the columns names and save them into a .NET variable, then, we can create “Create Table” script based on this
    variable, and then store the script into a SSIS package variable. After that, we create a staging table based on the package variable, load the flat file data to the staging table. Eventually, we load data from the staging table to the destination table. For
    the detail steps, please walk through the following blog:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    Regards,
    Mike Yin
    TechNet Community Support

  • ABAP Code for loading the flat files kept at FTP locations

    Hi all,
    I need to automate the process of data loading via flat files with the help of process chains , with respect to which I require following help:
    1. what steps should I follow to load the data with respect that whenever the new file comes in the directory of the ftp location start that process chain for data load.(Note : there is no fix time that when the new file will be coming)
    2. Every time the new file will be having differnt name , then in that case how we will be fetching the new file which is require for data loading?
    Thanks and Regards,
    Neha

    Hi Neha,
    I have not worked on this or made this code.
    Recently my onsite did it.
    Try to find more gyan on this functiona module...'DX_GET_PHYSICAL_FILENAME'
    Code is... write it in infopackge start routine.
    DATA: v_filename LIKE dxfile-filename.
    Below function module generates the filename with the complete path
    based on the app server attached to the Central Instance
    The logical mapping Z_INBOUND_EBIZ_PAYMENTS is maintained in the
    transaction - "FILE"
      CALL FUNCTION 'DX_GET_PHYSICAL_FILENAME'
        EXPORTING
          i_filename             = 'Z_INBOUND_EBIZ_PAYMENTS'
        IMPORTING
          o_filename             = v_filename
        EXCEPTIONS
          not_registered         = 1
          logical_filename_error = 2
          OTHERS                 = 3.
      IF sy-subrc = 0.
        p_filename = v_filename.
        p_subrc = 0.
      ELSE.
        p_subrc = 4.
      ENDIF.
    Regards,
    San!

Maybe you are looking for

  • How can I connect my early 2008 MacBook Pro to a tv through HDMI?

    I was wondering if there is a way to connect my early 2008 MacBook Pro to a tv using an HDMI port. My MacBook Pro has a DVI output. In the past I bought a DVI to VGA adapter and connected it to a TV that had a PC input that took VGA and a 3.5mm audio

  • "500 internal server error" after adding custom fields to Address page

    I need to display custom fields on the "Addresses" and the "Personal Data" pages. For that, we added custom CI_INCLUDE fields in both PA0006 and PA0002 tables as per instructions below https://www.sdn.sap.com/irj/scn/wiki?path=/display/profile/essPer

  • Icon Position in JButton

    I have an application wherein I am adding imageicons to Jbuttons dynamically. By defualt the icon is shown after the button text. How do i set it in such a way that the Icon appears befire the jbutton text

  • Is it possible to recover a Database in the following condition??

    Dear folks: this question has confused me quite a while, and nobody I asked can answer it. Please kindly provide any hint to the following question: Suppose I did a hot backup last night. (use ALTER TABLESPACE BEGIN BACKUP;copy Datafiles;ALTER TABLES

  • Download to file (.xls) problem

    I am running my application in 2004s Environment. It is throwing ClassCastException with the below code. Class IWDModifiableBinaryType is deprecated. Is there any way i can get the same functionality. IWDAttributeInfo mAttInfo =           wdContext.g