Pull multiple excel files in a folder into a table.

Hello,
I am using the instructions available in the link below to pull multiple excel files in a folder into a table.
http://stackoverflow.com/questions/6190578/how-to-import-excel-files-with-different-names-and-same-schema-into-database 
The instructions use two variables FilePath & FolderPath which i would like to record into another table. I dont have coding experience and therefore i am stuck. I see the code above but i am unable to modify for my usage.
Any help would be greatly appreciated.

TopCat,
If you wanna read the Filepath/FOlderpath values from a table int he database, use the Single row resultset option of Execute SQL task. That should help. refer:
http://stackoverflow.com/questions/18828498/ssis-set-multiple-variables-via-a-single-sql-task
http://technet.microsoft.com/en-us/library/cc280492.aspx (populating a variable with resultset section)
For recording the path variable data to a table in database, use ExecuteSQL task to achieve the functionality again:
Bind the variable data into  a sql variable : smthin like
"INSERT INTO Data_Result(Result) VALUES ('"+@[USER::my_data]+"')"
Then use this sql variable as the statement to be executed in execute sql task.
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

Similar Messages

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Read info about files in specific folder into internal table

    Hi Experts
    I need to have last modified date and filename information read into an internal table. I need to read in the information of all files in a specific (UNIX) folder (I do not know the name of the single files).
    I really hope someone can help.
    Thanks a lot
    Kind regards,
    Torben

    Hi Guys
    Thanks a lot for you input.
    I managed to get my program to works as follows:
    REPORT  ZDELETE_ARCHIVING_FILES.
    *Step 1: Get the list of files in the directory into internal table :
    DATA: DLIST    LIKE EPSFILI OCCURS 0 WITH HEADER LINE,
          DPATH    LIKE EPSF-EPSDIRNAM,
          MDATE    LIKE SY-DATUM,
          MTIME    LIKE SY-UZEIT.
    DATA: BEGIN OF FATTR OCCURS 0,
              FILE_NAME  LIKE EPSF-EPSFILNAM,
              FILE_SIZE  LIKE EPSF-EPSFILSIZ,
              FILE_OWNER LIKE EPSF-EPSFILOWN,
              FILE_MODE  LIKE EPSF-EPSFILMOD,
              FILE_TYPE  LIKE EPSF-EPSFILTYP,
              FILE_MTIME(12),
          END OF FATTR.
    DATA: P_PATH(50) TYPE C.
    CONCATENATE '/ARCHIVE/' sy-sysid '/archive' INTO P_PATH.
    *        WRITE: / P_PATH.
    DPATH = P_PATH.
    *Get files in folder - read into internal table DLIST
    *if filenames are longer than 40 characters
    *then use FM SUBST_GET_FILE_LIST.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
         EXPORTING
              DIR_NAME               = DPATH
         TABLES
              DIR_LIST               = DLIST
         EXCEPTIONS
              INVALID_EPS_SUBDIR     = 1
              SAPGPARAM_FAILED       = 2
              BUILD_DIRECTORY_FAILED = 3
              NO_AUTHORIZATION       = 4
              READ_DIRECTORY_FAILED  = 5
              TOO_MANY_READ_ERRORS   = 6
              EMPTY_DIRECTORY_LIST   = 7
              OTHERS                 = 8.
    IF SY-SUBRC EQ 0.
    *Step 2: Read the file attributes into an internal table
    *Read info about the files (attributes) into the internal table FATTR
    *as we need info about the last time it was changed (MTIME)
      LOOP AT DLIST.
        CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
             EXPORTING
                  FILE_NAME              = DLIST-NAME
                  DIR_NAME               = DPATH
             IMPORTING
                  FILE_SIZE              = FATTR-FILE_SIZE
                  FILE_OWNER             = FATTR-FILE_OWNER
                  FILE_MODE              = FATTR-FILE_MODE
                  FILE_TYPE              = FATTR-FILE_TYPE
                  FILE_MTIME             = FATTR-FILE_MTIME
             EXCEPTIONS
                  READ_DIRECTORY_FAILED  = 1
                  READ_ATTRIBUTES_FAILED = 2
                  OTHERS                 = 3.
        IF SY-SUBRC EQ 0.
          FATTR-FILE_NAME = DLIST-NAME.
          APPEND FATTR.
        ENDIF.
      ENDLOOP.
      SORT FATTR BY FILE_NAME.
      DATA: time(10), date LIKE sy-datum.
      DATA: months TYPE i.
      DATA: e_file TYPE string.
      LOOP AT FATTR.
      CLEAR: time, months, e_file.
        IF FATTR-FILE_NAME(10) = 'archive_BW'.
    *Convert the unix time into readable time
          PERFORM p6_to_date_time_tz(rstr0400) USING FATTR-FILE_MTIME
                                                     time
                                                     date.
    *Calculate the number of months between date (MTIME) and current day
    *ex 31.03.2009 - 01.04.2009 = 1 month
    *ex 01.02.2009 - 01.04.2009 = 2 month
        CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
          EXPORTING
            i_datum_von = date
            i_datum_bis = sy-datum
          IMPORTING
            e_monate = months.
            CONCATENATE DPATH '/' FATTR-FILE_NAME INTO e_file.
    *        WRITE: / FATTR-FILE_NAME,
    *                 FATTR-FILE_SIZE,
    *                 date,
    *                 time,
    *                 sy-datum,
    *                 months,
    *                 e_file.
    *Step 3: Delete files where months > 1
          IF months > 1.
            OPEN dataset e_file for output in text mode encoding default.
            DELETE dataset e_file.
            CLOSE dataset e_file.
          ENDIF. "months > 1
        ENDIF.
      ENDLOOP.
    ENDIF.

  • Importing multiple jpeg files from local folder into database LOB column

    I have to programatically save multiple pictures (jpeg) from the folder on my PC into Oracle table LOB column. I have to be able to choose local folder on my PC where are the pictures, and press button on Oracle Forms to save pictures in LOB column in database.
    I'm using Forms 6i and Oracle 10g Rel2 database.
    Is this possible with Oracle Forms or the only way to do that is to use create directory database command and use dbms_lob package which I shouldn't do, because Oracle database directory is not allowed to see my local folder.

    As I said I don't know how to use object data type, I just given a shot as below. I know the following code has errors can you please correct it for me.
    Public
    Sub Main()
    ' Add your code here 
    Dim f1
    As FileStream
    Dim s1
    As StreamReader
    Dim date1
    As
    Object
    Dim rline
    As
    String
    Dim Filelist(1)
    As
    String
    Dim FileName
    As
    String
    Dim i
    As
    Integer
    i = 1
    date1 =
    Filelist(0) =
    "XYZ"
    Filelist(1) =
    "123"
    For
    Each FileName
    In Filelist
    f1 = File.OpenRead(FileName)
    s1 = File.OpenText(FileName)
    rline = s1.ReadLine
    While
    Not rline
    Is
    Nothing
    If Left(rline, 4) =
    "DATE"
    Then
    date1 (i)= Mid(rline, 7, 8)
     i = i + 1
    Exit
    While
    End
    If
    rline = s1.ReadLine
    End
    While
    Next
    Dts.Variables(
    "date").Value = date1(1)
    Dts.Variables(
    "date1").Value = date1(2)
    Dts.TaskResult = ScriptResults.Success
    End
    Sub

  • Loading multiple text files from a folder into oracle clob field

    I would like to load about 300 word documents into a oracle clob field with each document inserted as a separate record.
    I'm not quite sure how to go about doing this. Is there a utility in oracle that would do this?
    I've looked at sql loader and utl_file but both require the name of the file. Is there a way I can do this?
    If its not possible using just oracle, does anyone know how I can do this in combination with perl?
    Many Thanks
    Sam

    I have no experience with this, but pl see if MOS Doc 73787.1 (How to Read A Binary File into BLOB Using PL/SQL) can help.
    Essentially, you will have to write code to loop thru all 300 files to load them into the database
    HTH
    Srini

  • How to transfer excel files(on ftp server) into internal table?

    hello,everyone
    pls tell me how to transfer excel files those on a ftp server into internal table?
    ps.i know the function 'ftp_server_to_r3',it can help to transfer flat file.

    Hi,
    I believe you want to get the data from the FTP Server to R3.
    I am also sending the code. Have a look and it would help you.
    First get the Password and user name and the FTP Server Path where file is stored and FTP Server Host name
    FUNCTION zfi_ftp_get.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_FILENAME) TYPE  C
    *"  TABLES
    *"      T_BLOB STRUCTURE  ZFI_TLM_LENGTH OPTIONAL " is a table type with a field called line of length 992
    *"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
      DATA : i_password(30)     TYPE c,
             i_user(30)         TYPE c,
             i_host(30)         TYPE c,
             i_rfc_destination  TYPE rfcdes-rfcdest,
             i_length           TYPE i,
             i_folder_path(100) TYPE c.
      DATA:   lv_blob_length   TYPE i.
      DATA:   lv_length        TYPE i,  "Password length
              lv_key           TYPE i VALUE 26101957,
              lv_password(30)  TYPE c,
              lv_ftp_handle    TYPE i,
              lv_cmd(80)       TYPE c.
      DATA: BEGIN OF result OCCURS 0,
            line(100) TYPE c,
            END OF result.
      TYPES: BEGIN OF ty_dummy,
             line(392) TYPE c,
           END   OF ty_dummy.
      DATA: lt_dummy TYPE TABLE OF ty_dummy,
            ls_dummy LIKE LINE  OF lt_dummy.
      i_password        = 'vnhdh'.
      i_user            = 'sdkgd'.
      i_host            = 'sbnksbg'.
      i_rfc_destination = 'SAPFTP'.
      i_length          = '992'.
      i_folder_path     = '/hioj/hohjk/hh'.
      lv_length = STRLEN( i_password ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = i_password
          sourcelen   = lv_length
          key         = lv_key
        IMPORTING
          destination = lv_password.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = i_user
          password        = lv_password
          host            = i_host
          rfc_destination = i_rfc_destination
        IMPORTING
          handle          = lv_ftp_handle
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
      IF sy-subrc = 1.
        return-type = 'E' .
        return-message = 'FTP Connection not Successful'.
        APPEND return.
      ELSEIF sy-subrc = 2.
        return-type = 'E' .
        return-message = 'FTP Connection not Successful'.
        APPEND return.
      ELSEIF sy-subrc EQ 0.
        return-type = 'S' .
        return-message = 'FTP Connection Successful'.
        APPEND return.
        CONCATENATE 'cd' i_folder_path INTO lv_cmd SEPARATED BY space.
        CALL FUNCTION 'FTP_COMMAND'
          EXPORTING
            handle        = lv_ftp_handle
            command       = lv_cmd
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        IF sy-subrc = 1.
          return-type = 'E' .
          return-message = 'Command Error Occured during open of FTP Folder'.
          APPEND return.
        ELSEIF sy-subrc = 2.
          return-type = 'E' .
          return-message = 'TCIP Error Occured during open of FTP Folder'.
          APPEND return.
        ELSE.
          REFRESH t_blob.
          lv_blob_length = 992.
          TRANSLATE i_filename TO LOWER CASE.
          CALL FUNCTION 'FTP_SERVER_TO_R3'
            EXPORTING
              handle      = lv_ftp_handle
              fname       = i_filename         
            IMPORTING
              blob_length = lv_blob_length
            TABLES
              blob        = lt_dummy.
          t_blob[] = lt_dummy[].
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    Regards
    Sajid
    Edited by: shaik sajid on Nov 16, 2010 7:25 AM

  • Read Excel file and insert it into a table

    Hi All
    i'm developing a web app using jdeveloper 11.1.1.3
    I want to upload an excel file to a table, is there way in the frame work to do this easily
    Tx

    convert the excel fil to a .csv file and expose the csv file as a datacontrol and then use it in the table
    http://technology.amis.nl/blog/2306/uploading-csv-files-into-dynamic-adf-faces-tables-programmtically-creating-columns

  • How do I merge multiple Excel files with more than one tab in each file using PowerQuery?

    Hello
    I have 12 Excel (.xlsx) files and each file has three identically named and ordered tabs in them. 
    I know how to merge multiple Excel files in a folder using M (those guides are all over the web) but how do I merge multiple Excel files with multiple (yet identically named and ordered) tabs? Surely it is possible? I just don't know how to do it in M.
    Cheers
    James

    What Laurence says is correct, and probably the best thing to do when the sheets have differing structures. Here is an alternate approach that works well when the sheets all have the same structure.
    When you first open the Excel file from Power Query, you can see its structure in the navigator at the right-hand-side of the screen. If you select the root (which is the filename itself) and click Edit, you'll see all the tabs in the sheet as a single table.
    You can now do filtering based on the Name, Item and Kind values. When you've reduced the set of things down to the sheets you want, select the Data column and say "Remove Other Columns". If the sheets don't have any header rows, you can just click the expand
    icon in the header and you'll be done.
    Otherwise, if the sheets have headers or if some other kind of sheet-level transformation is required against each sheet before doing a merge, you'll have to write some M code manually. In the following example, each sheet has a header row consisting of
    two columns: Foo and Bar. So the only step I need to perform before merging is to promote the first row into a header. This is done via the Table.TransformColumns operation.
    let
        Source = Excel.Workbook(File.Contents("C:\Users\CurtH\Desktop\Test1.xlsx")),
        RemovedOtherColumns = Table.SelectColumns(Source,{"Data"}),
        PromotedHeaders = Table.TransformColumns(RemovedOtherColumns,{{"Data", each Table.PromoteHeaders(_)}}),
        ExpandData = Table.ExpandTableColumn(PromotedHeaders, "Data", {"Foo", "Bar"}, {"Data.Foo", "Data.Bar"})
    in
        ExpandData

  • Can we combine multiple excel files into one excel file using SSIS?

    I have a bunch of excel files in a specified folder. I wanted to combine all the excel files into one excel file by adding additional tabs in one excel file. Can I do this using SSIS?
             OR
    I know using macro we can combine multiple excel files. Can we run a excel macro in SSIS? Please help me.
    Actually the complete package is this:
    Step1: Using FTP task I'm downloading the bunch of excel files into a folder.
    Step2: Above implementation is the second step that I have to do.  

    You can do it in two steps
    1. First get all data from excel sheets to a sql staging table. For that you need to use a looping logic as explained in below link (you dont required the additional logic used for checking file name etc in below example as you need all files). Also make
    source as excel instead of flat file
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    2. Once you get the data onto a single table, use below to get it exported to multiple sheets within same excel destination file
    http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to upload all excel files data from one folder into internal table.

    Dear All,
    I have one requirement, It is like I want to upload the frontend file data into my internal table, But here my scenario is;
    If I have one folder ( Called : Temp) in my frontend system, in this folder ( Called : Temp)  I have 100 excel files. In each excel file I have some 1000u2019s of entries. All these data of every file I want to take into my internal table.
    If I have one file I can go for, CALL METHOD cl_gui_frontend_services=>file_open_dialog and then upload method to upload. But I want to take all these excel files from that folder at a time, is there any class or any thing is there..? plz help..
    Thanks...
    Edited by: satishsuri on Jan 11, 2011 9:33 AM

    Hi satishsuri ,
    You will have to use 3 methods together :
    CALL METHOD cl_gui_frontend_services=>directory_browse "Browse the Directory
    CALL METHOD cl_gui_frontend_services=>directory_list_files "Get all the files from the directory
    CALL METHOD cl_gui_frontend_services=>gui_upload "Upload each file in a loop
    Example:
    TYPES: BEGIN OF ty_data,
             line TYPE string,
          END OF ty_data.
    DATA: str_file TYPE string,
          str_dir TYPE string,
          it_file_table TYPE STANDARD TABLE OF file_info,
          wa_file_table TYPE file_info,
          v_count TYPE i,
          it_data TYPE STANDARD TABLE OF ty_data,
          wa_data TYPE ty_data.
    CALL METHOD cl_gui_frontend_services=>directory_browse
      CHANGING
        selected_folder = str_dir.
    CALL METHOD cl_gui_frontend_services=>directory_list_files
      EXPORTING
        directory  = str_dir
      CHANGING
        file_table = it_file_table
        count      = v_count.
    LOOP AT it_file_table INTO wa_file_table.
      CONCATENATE str_dir wa_file_table-filename INTO str_file SEPARATED BY '\'.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename = str_file
          filetype = 'ASC'
        CHANGING
          data_tab = it_data.
      LOOP AT it_data INTO wa_data.
        WRITE : / wa_data-line.
      ENDLOOP.
      ULINE.
    ENDLOOP.
    Regards,
    Jovito

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • Error While reading an Excel file from KM Folder.

    Hi Guru's,
    In my PDK Application I am trying to read an Excel file from KM Folder.
    Workbook workbook = Workbook.getWorkbook(new File("/irj/go/km/docs/documents/test/Test.xls"));
    It gives an error:
    Error:java.io.FileNotFoundException: \irj\go\km\docs\documents\test\Test.xls (The system cannot find the path specified)
    Details of appli:
    In my JspDynpage I am calling a utility Java file.
    There I have to read an  Excel and to passit to JSP.
    Details of jar files  used:
      jxl-2.6
      com.sap.security.api.jar
    Regards,
    Ram

    Hi,
    You are trying to read file wrong way. In the tutorial of Java Excel Api: "JExcelApi can read an Excel spreadsheet from a file stored on the local filesystem or from some input stream.". You are trying to read from file system. So you must get file input stream then you can read it. Please search forums KM file read.

  • Do we have Format Checker to test set of Excel files in a Folder

    Team,
    I need to do Format checking (like Arial Font, Bold etc) for set of Excel files in a Folder. Do we have any tool for that?
    Thanks!
    Kiran

    Hi Kiran,
    As far as I know, Microsoft doesn't provide such kind of tools. But If you're familiar with Excel development, you can create your own VBA code or other kind of application(e.g. .Net application) to automate the Excel workbooks in the folder. Use the VBA
    code or applications to access the Excel object model to check the cell format.
    For example, use this vba code to check if cell A1 is bold:
    Sheet1.Range("A1").Font.Bold
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Write to Excel file in KM Folder with DynPage

    Hi,
    I want to create and read/write to a Excel file in KM Folder using DynPage.
    Searched the SDN but could not get any links which will demo on using excel with Dynpage. Lot of links to use excel with WebDynpro are available.
    Can anyone give the code or links for this purpose.
    Regards
    Sumant

    Hi,
       May be we can expect a blog for this too.. Actually, it is not very different. You can use the same blog for your purpose.
    Uploading files to KM repository using Webdynpro APIs
    Creating folders in KM dynamically
    Here the code can be written in doContent or doProcessBeforeOutput method. Import the required jars. References can be written in SharingReferences in application-config of portalapp.xml. Otherwise, the same code should work in portal application too.
    Regards,
    Harini S

  • Uploading data from excel file to a dynamically created internal table

    Hi,
    I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
    Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
    I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
    Could anyone please show me a way around this.
    Thanks in advance,
    Harsha

    Sure, check this out.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: iflat type table of string.
    data: xflat type string.
      data: irec type table of string with header line.
      data: tabix type sy-tabix.
    data: file type string.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
      file = p_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        changing
          data_tab                = iflat
        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.
      loop at iflat into xflat.
        clear irec. refresh irec.
        split xflat at ',' into table irec.
        loop at irec.
          tabix = sy-tabix.
          assign component tabix of structure <dyn_wa> to <dyn_field>.
          <dyn_field> = irec.
        endloop.
        append <dyn_wa> to <dyn_table>.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Delivery Complete Indicator in PO

    Dear Experts , I have manually ticked the delivery complete indicator in the delivery Tab in the PO . I had ordered 100 qty . Did the gr for 50 & now i dont expect any delivery. But when i try to do a GR  against the PO ,the system still allows to pr

  • Error while sending PO (with tax code) from SSP to SUS via MM

    Hello Experts We are implementing Self Service Procurement and Supplier Self Services scenario. We have created a SC with Tax Code say X in Self Service Procurement. The SC gets created as PO in R/3 (MM) system. The IDoc which is getting created in t

  • Creation of DMR and CMR from the archived billing document in EHP3 system

    Hi all I read somewhere that one of the functionality in EHP3 is we can create sales document like debit memo request and credit memo request from the archived billing document. I am working on EHP3 system only but i am not able to create the sales d

  • Disk problem with new Macbook Pro - Diagnosis, anyone?

    Hi everyone, I just purchased a 15" 2.0 Macbook Pro last week, and I've been having some interesting problems. No, not the problems with the heat and the whine - mine seems to be fine on both accounts. Let me explain my story: So I get my new, shiny

  • Email body text

    Hello, we need to add a mailbody text to a standard mail (e.g. sales order confirmation using program SAPMV45A). The output type was defined using transaction NACE with application V1 and medium 5 (external sending). Currently we have only the PDF at