How to insert 2-D array of elements in excel sheet

I have a 2-D array of elements. I want to insert this array into an excel sheet and display the data in a graph. I used the example "excel insert table" but the problem with that VI is, it is inserting the elements cell by cell which is taking long time. I am wondering whether there is way to insert a complete column or row into excel sheet at a time.
Thank you,
Mudda.

Hi,
Try this vi which inserts the table in one operation. You can modify it to suit your purposes.
Hope this helps.
Edit: Should note that it works for both string and numeric array inputs.Message Edited by DavidT on 06-29-2005 10:09 AM
Attachments:
Excel Insert Table (LV7.1).vi ‏100 KB

Similar Messages

  • How to insert a new array of elements to a build array function such that the elements will be given one by one

    i 'am attacing one VI. In this VI i had a for loop into it I need to insert a section of commands only when the case loop selection is on state. How can I do it. Please help me to overcoem this problem
    Attachments:
    sequence post-case for selection.vi ‏15 KB

    Can you elobrate please. When boolean is FALSE then what you want to send otherwise when boolean is true then what you want to send ?
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • How to insert data in table UI elements

    Hi Guys,
    Here is my questions. How to insert data in table UI elements.
    Here i try to insert data by using Add button
    data:
        Node_Item                           type ref to If_Wd_Context_Node.
        Node_Item = wd_comp_controller->get_data_node( ).
      data:
        lr_table_line type ref to ITEM.
       lr_table_line = Node_Item->create_element( ).
      field-symbols:
        <ls_table> type any.
      assign lr_table_line->* to <ls_table>.
      Node_Item->bind_element(
        new_item             = <ls_table>
        set_initial_elements = abap_false
        index                = 1 ).
    But i got syntax error the result type of the function method cannot not be converted in to the type of lr_table_line.
    And i set cardinality and selection as 0.n.
    Pls, let me know for the soulutions
    Chandru
    Message was edited by:
            chandrasekar muthuvelraj

    Chadru, another option is for you to bind the table UI field to an internal table and to populate the internal table. Then, automatically, your Table UI field will be populated with the data from the internal table. Here is the code that does that and works for me.  Good luck!
    method FILL_DATA .
    DATA: node_level1 type ref to if_wd_context_node,
          node_level2 type ref to if_wd_context_node,
          node_items type ref to if_wd_context_node,
          stru_ResItems type BAPI2093_RES_ITEM,
          tab_ResItems TYPE TABLE OF BAPI2093_RES_ITEM,
          n type i.
    node_level1 = wd_context->get_child_node( name = 'BAPI_RESERVATION_CRE' ).
    node_level2 = node_level1->get_child_node( name = 'CHANGING' ).
    node_items = node_level2->get_child_node( name = 'RESERVATIONITEMS' ).
    n = 2.
      do n times.
        insert stru_ResItems into table tab_ResItems.
      enddo.
    node_items->bind_table( tab_ResItems ).
    endmethod.

  • How to get the password of a password protected Excel Sheet using java/jxl

    Hi ,
    how to get the password of a password protected Excel Sheet using java / jxl program.
    plz any one help me .
    Ramesh P
    [email protected]

    If they've implemented the password system correctly there probably isn't a way of getting the password at all.

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks.

    asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
    Justin

  • How to insert int type array value to String type value?

    public class wood
         public static void main (String args[])
              int a[]={1};
              String b[]={" "};
              b=a[0];
    }how can I do it??I know it is int type, but how to insert a[0] to b[0]?

    I don't understand this statement.
    What I want to know is
    1) why are you trying to convert an int[] to a String[]
    2) are you trying to convert from a int[] to String[] or from an int[] to a String (i.e. treating the ints as chars or even simply concatenating there String values to a single String) and , once again why
    There is probably a better way to accomplish your goals, but without cleary stating your goals we cannot help you. And as far as there being multiple int values, so what, the code snippet I posted would work for a hundred int values, you would just need to make the String[] long enough and loop through the values, you can't just simply do it all at once (unless of course, they are to be treated as char values, in which case you can probably cast your int[] to a char[] and use new String).

  • How can i bring the column heading downloaded in excel sheet?

    hi all,
    I am using  FM SAP_CONVERT_TO_XLS_FORMAT to downloading populated internal table data into excel sheet by using filename type rlgrap-filename.
    Now I need the column heading(field name) for downloaded data in excel sheet.
    pls tell me how can i merge the col heading with data perfectly. Is there any FM fulfills this requirement.
    pls give me a suitable approch.
    Thanks
    PRR

    HI,
    Go thru this code.
    REPORT  ZRMM0056  NO STANDARD PAGE HEADING
                          MESSAGE-ID ZZ
                          LINE-SIZE 300
                          LINE-COUNT 65.
    Program              : ZRMM0056
    Title                : Non Inventory PO's
    Description          : Non Inventory Purchase Orders details with
                           Vendor and Invoice Receipts and Goods Receipts.
    Input  :
           Select-options  : 1. G/L Account No
           Parameters      : 1.File Paths for the Excel sheet
           Others (Specify):
    Output : Extract Files in the application server
           Report  :
    Hear Ticket #        : 113392
    Created by           : Srinivas Rao.M
    Created on           : 12/15/2005
    Version              : 1
    Request              : D10K944304
    Transaction Code     : Z420
    Change History                                                       *
    Date         Programmer  Search String   Description                 *
    12/19/2005   Srinivas    D10K944316      Removed Purchasing document
                                             Company code and Plant from
                                             Select-Options and Inculded
                                             G/L Account No and changed
                                             code accordingly.
    T A B L E S                                                          *
    TABLES: EKBE,              " History of Purchasing Document
            EKPO,              " Purchasing Document Item
            EKKO,              " Purchasing Document Header
            LFA1,              " Vendor master (general section)
            EKKN.              " Account Assignment in Purchasing Doc
                        INTERNAL TABLES
    *--Internal table to store Purchasing document header data
    DATA : BEGIN OF IT_POHEADER OCCURS 0,
            EBELN LIKE EKKO-EBELN,      "Purchasing document
            AEDAT LIKE EKKO-AEDAT,      "Created on
            ERNAM LIKE EKKO-ERNAM,      "Created by
            LIFNR LIKE EKKO-LIFNR,      "Vendor
          END OF IT_POHEADER.
    *--Internal table to store Purchasing document Item data
    DATA : BEGIN OF IT_POITEM OCCURS 0,
            EBELN LIKE EKPO-EBELN,       "Purchasing document
            EBELP LIKE EKPO-EBELP,       "Item Number
            MATNR LIKE EKPO-MATNR,       "Material number
            BUKRS LIKE EKPO-BUKRS,       "Company code
            WERKS LIKE EKPO-WERKS,       "Plant
            MATKL LIKE EKPO-MATKL,       "Material Group
            MENGE LIKE EKPO-MENGE,       "Order Quantity
            NETPR LIKE EKPO-NETPR,       "Net Price
            PEINH LIKE EKPO-PEINH,       "Price unit
            NETWR LIKE EKPO-NETWR,       "Net Value
          END OF IT_POITEM.
    *--Internal table to hold final display data.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
             EBELN LIKE EKKO-EBELN,       "Purchasing document
             EBELP LIKE EKPO-EBELP,       "Item Number
             AEDAT LIKE EKKO-AEDAT,       "Created on
             ERNAM LIKE EKKO-ERNAM,       "Created by
             MATNR LIKE EKPO-MATNR,       "Material number
             BUKRS LIKE EKPO-BUKRS,       "Company code
             WERKS LIKE EKPO-WERKS,       "Plant
             MATKL LIKE EKPO-MATKL,       "Material Group
             MENGE LIKE EKPO-MENGE,       "Order Quantity
             NETPR LIKE EKPO-NETPR,       "Net Price
             PEINH LIKE EKPO-PEINH,       "Price unit
             NETWR LIKE EKPO-NETWR,       "Net Value
             LIFNR LIKE EKKO-LIFNR,       "Vendor
             NAME1 LIKE LFA1-NAME1,       "Vendor Name
             GSBER LIKE EKKN-GSBER,      "Business area
    *--IR details
            IR_BELNR LIKE EKBE-BELNR,     "IR-Number of Material Document
            IR_BUZEI LIKE EKBE-BUZEI,     "IR-Item in material Document
            IR_BUDAT LIKE EKBE-BUDAT,     "IR-Posting date
            IR_MENGE LIKE EKBE-MENGE,     "IR-Quantity
    *--GR details
            GR_BELNR LIKE EKBE-BELNR,     "GR-Number of Material Document
            GR_BUZEI LIKE EKBE-BUZEI,     "GR-Item in material Document
            GR_BUDAT LIKE EKBE-BUDAT,     "GR-Posting date
            GR_MENGE LIKE EKBE-MENGE,     "GR-Quantity
          END OF IT_FINAL.
    *--Internal table to store History per Purchasing Document data
    DATA : BEGIN OF IT_HISTORY OCCURS 0,
            EBELN LIKE EKBE-EBELN,        "Purchasing document
            EBELP LIKE EKBE-EBELP,        "Item
            VGABE LIKE EKBE-VGABE,        "Trans/Event type
            BELNR LIKE EKBE-BELNR,        "Number of Material Document
            BUZEI LIKE EKBE-BUZEI,        "Item in material Document
            BUDAT LIKE EKBE-BUDAT,        "Posting date
            MENGE LIKE EKBE-MENGE,        "Quantity
            BEWTP LIKE EKBE-BEWTP,        "Posting history category
           END OF IT_HISTORY.
    *--Internal table to store vendor name.
    DATA : BEGIN OF IT_VENDOR OCCURS 0,
             LIFNR LIKE LFA1-LIFNR,      "Vendor Number
             NAME1 LIKE LFA1-NAME1,      "Vendor Name
           END OF IT_VENDOR.
    *--Internal table to store Business area for Purchasing document
    DATA : BEGIN OF IT_BUSINESS OCCURS 0,
             EBELN LIKE EKKN-EBELN,      "Purchasing document
             EBELP LIKE EKKN-EBELP,      "Purchasing Item
             SAKTO LIKE EKKN-SAKTO,      "G/L Account No
             GSBER LIKE EKKN-GSBER,      "Business area
           END OF IT_BUSINESS.
    DATA : BEGIN OF FIELDNAMES OCCURS 0,
           TEXT(40),
          END OF FIELDNAMES.
                    VARIABLES DECLARATION                                *
    DATA: V_FILE LIKE IBIPPARMS-PATH,         "File path
           V_FLD  LIKE DYNPREAD-FIELDNAME,     "Dynpread fieldname
           V_FLAG(1) VALUE SPACE.              "FLAG VARIABLE
                            SELECTION-SCREEN                             *
    SELECTION-SCREEN BEGIN OF BLOCK S1 WITH FRAME TITLE TEXT-001.
    *--Begin of change D10K944316
    SELECT-OPTIONS : S_SAKTO FOR EKKN-SAKTO.  "G/L Accoun no.
    *--End of change D10K944316
    SELECTION-SCREEN END OF BLOCK S1.
    SELECTION-SCREEN BEGIN OF BLOCK S2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : P_EXCEL    AS CHECKBOX DEFAULT ' ' .  " download to excel
    PARAMETERS : C_FILE(128) DEFAULT : 'C:\ZRMM0056.xls'.
    SELECTION-SCREEN END OF BLOCK S2.
    A T   S E L E C T I O N - S C R E E N                                *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR C_FILE.
    *-Form to get file path for download of data
      PERFORM GET_FILE_PATH.
    AT SELECTION-SCREEN.
      PERFORM SCREEN_VALIDATIONS.
    START-OF-SELECTION
    START-OF-SELECTION.
    *--Extract Purchasing document header data.
       PERFORM GET_PO_HEADER_DATA.
    *--Extract Purchasing document Item data.
       IF NOT IT_BUSINESS[] IS INITIAL.
         PERFORM GET_PO_ITEM_DATA.
    *--Get complete required data in final internal table
         PERFORM GET_FINAL_DATA.
       ENDIF.
    END-OF-SELECTION
    END-OF-SELECTION.
      IF V_FLAG IS INITIAL.
    *--Display Purchasing document details
        IF NOT IT_FINAL[] IS INITIAL.
           PERFORM DISPLAY_PODATA.
          IF P_EXCEL = 'X'.
    *--To down load data to excel sheet
            PERFORM DOWN_LOAD_TO_EXCEL.
          ENDIF.
        ENDIF.
      ELSE.
           MESSAGE I001(ZZ) WITH 'No data found'(003).
      ENDIF.
    TOP-OF-PAGE
    TOP-OF-PAGE.
    *--To display page header
      PERFORM PAGE_HEADER.
    *&      Form  GET_PO_HEADER_DATA
          To Get Purchasing header data
    FORM GET_PO_HEADER_DATA .
    *--To extract Business Area details
           CLEAR IT_BUSINESS.
           REFRESH IT_BUSINESS.
            SELECT EBELN    "Purchasing document
                   EBELP    "Purchasing document item
                   SAKTO    "G/L Account no
                   GSBER    "Business area
                   FROM EKKN
                   INTO TABLE IT_BUSINESS
                   WHERE SAKTO IN S_SAKTO.
      IF SY-SUBRC <> 0.
        V_FLAG = 'X'.
        MESSAGE I001(ZZ)  WITH
        'No data selected for the given selection criteria'(004).
        STOP.
      ELSE.
    *--To extract Purchasing document details with respect
    to G/L Account no
           CLEAR   IT_POHEADER.
           REFRESH IT_POHEADER.
           SELECT EBELN       "Purchasing document
                  AEDAT       "Created on
                  ERNAM       "Created by
                  LIFNR       "Vendor
                FROM EKKO
                INTO TABLE IT_POHEADER
                FOR ALL ENTRIES IN IT_BUSINESS
                WHERE EBELN = IT_BUSINESS-EBELN.
             IF NOT IT_POHEADER[] IS INITIAL.
                CLEAR   IT_VENDOR.
                REFRESH IT_VENDOR.
    *--Extracting Vendor details
                SELECT LIFNR   "Vendor #
                       NAME1   "Name
                     FROM LFA1
                     INTO TABLE IT_VENDOR
                     FOR ALL ENTRIES IN IT_POHEADER
                     WHERE LIFNR = IT_POHEADER-LIFNR.
            ENDIF.
      ENDIF.
    ENDFORM.                    " GET_PO_HEADER_DATA
    *&      Form  GET_PO_ITEM_DATA
          To extract Purchasing document item data
    FORM GET_PO_ITEM_DATA .
    CLEAR   IT_POITEM.
    REFRESH IT_POITEM.
       SELECT EBELN        "Purchasing document
              EBELP        "Item Number
              MATNR        "Material number
              BUKRS        "Company code
              WERKS        "Plant
              MATKL        "Material Group
              MENGE        "Order Quantity
              NETPR        "Net Price
              PEINH        "Price unit
              NETWR        "Net Value
           FROM EKPO
           INTO TABLE IT_POITEM
           FOR ALL ENTRIES IN IT_BUSINESS
           WHERE EBELN = IT_BUSINESS-EBELN
            AND  EBELP = IT_BUSINESS-EBELP.
    IF NOT IT_POITEM[] IS INITIAL.
       CLEAR   IT_HISTORY.
       REFRESH IT_HISTORY.
       SELECT EBELN    "Purchasing document
              EBELP    "Item
              VGABE    "Trans/Event type
              BELNR    "Number of Material Document
              BUZEI    "Item in material Document
              BUDAT    "Posting date
              MENGE    "Quantity
              BEWTP    "Posting history category
            FROM EKBE
            INTO TABLE IT_HISTORY
            FOR ALL ENTRIES IN IT_POITEM
            WHERE EBELN = IT_POITEM-EBELN
              AND EBELP = IT_POITEM-EBELP
              AND ( VGABE = '1' OR VGABE = '2' )   "1 = GR , 2 = IR
              AND ( BEWTP =  'Q' OR BEWTP = 'E' ). "Q = GR , R = IR
       IF SY-SUBRC = 0.
         SORT IT_HISTORY BY EBELN EBELP.
       ENDIF.
    ENDIF.
    ENDFORM.                    " GET_PO_ITEM_DATA
    *&      Form  GET_FILE_PATH
          Select file path
    FORM GET_FILE_PATH .
    CLEAR V_FILE.
      MOVE 'p_flname' TO V_FLD.
      MOVE C_FILE TO V_FILE.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                PROGRAM_NAME  = SYST-CPROG
                DYNPRO_NUMBER = SYST-DYNNR
                FIELD_NAME    = V_FLD
           IMPORTING
                FILE_NAME     = V_FILE
           EXCEPTIONS
                OTHERS        = 1.
      MOVE V_FILE TO C_FILE.
    ENDFORM.                    " GET_FILE_PATH
    *&      Form  PAGE_HEADER
           To Print page header and other details
    FORM PAGE_HEADER .
    *--Page Header
    ULINE AT /1(300).
      FORMAT COLOR 1.
      WRITE:/ 'Run Date:'(005), SY-DATUM, 45 'Stanley Works'(006),
             100 'Page No:'(007), SY-PAGNO LEFT-JUSTIFIED, 298 ''.
      WRITE:/ 'Run Time:'(008), SY-UZEIT, 43 SY-TITLE, 100 SY-UNAME, 298 ''.
      WRITE:/ 'Source  :'(009), SY-SYSID, 100 SY-CPROG, 298 ''.
      FORMAT COLOR OFF.
      ULINE AT /1(300).
      FORMAT COLOR 4.
      WRITE : / SY-VLINE , (10) 'Purchasing Doc'(010),
                SY-VLINE,  (5)  'Item'(011),
                SY-VLINE,  (10) 'Created On'(012),
                SY-VLINE,  (7)  'Crea By'(013),
                SY-VLINE,  (10) 'Material'(014),
                SY-VLINE,  (6)  'Com cd'(015),
                SY-VLINE,  (5)  'Plant'(016),
                SY-VLINE,  (10) 'Mat Group'(017),
                SY-VLINE,  (13) 'Order Qty'(018),
                SY-VLINE,  (11) 'Net Price'(019),
                SY-VLINE,  (10) 'Price Unit'(020),
                SY-VLINE,  (13) 'Net Value'(021),
                SY-VLINE,  (8)  'Bus Area'(022),
                SY-VLINE,  (10) 'Vendor'(023),
                SY-VLINE,  (28) 'Vendor Name'(024),
    *--IR details
                SY-VLINE,  (10) 'IR-Mat Doc'(025),
                SY-VLINE,  (5)  'IR-It'(026),
                SY-VLINE,  (9) 'IR-Post dt'(027),
                SY-VLINE,  (13) 'IR-Quantity'(028),
    *--GR details
                SY-VLINE,  (10) 'GR-Mat Doc'(029),
                SY-VLINE,  (5)  'GR-It'(030),
                SY-VLINE,  (9) 'GR-Post dt'(031),
                SY-VLINE,  (13) 'GR-Quantity'(032), SY-VLINE.
      FORMAT COLOR OFF.
      ULINE AT /1(300).
    ENDFORM.                    " PAGE_HEADER
    *&      Form  SCREEN_VALIDATIONS
          Selection screen validations
    FORM SCREEN_VALIDATIONS .
    *--Validation for G/L Account No
    IF NOT S_SAKTO IS INITIAL.
        SELECT SAKNR UP TO 1 ROWS
               INTO EKKN-SAKTO
               FROM SKA1 WHERE
               SAKNR IN S_SAKTO.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MESSAGE E001(ZZ) with 'Please enter a valid G/L Account no'(048).
        ENDIF.
      ENDIF.
    *--Validation for Excel file path
    IF P_EXCEL = 'X'.
        IF C_FILE = ' '.
          MESSAGE E001(ZZ) with 'Please enter a valid Excle Path'(035).
        ENDIF.
      ENDIF.
    ENDFORM.                    " SCREEN_VALIDATIONS
    *&      Form  DISPLAY_PODATA
          To Display Purchasing Document details
    FORM DISPLAY_PODATA .
    FORMAT COLOR 2.
    SORT IT_FINAL BY EBELN EBELP AEDAT BUKRS WERKS.
    LOOP AT IT_FINAL.
         WRITE : / SY-VLINE ,(10)  IT_FINAL-EBELN,     "Purchasing Doc
                   SY-VLINE,  (5)  IT_FINAL-EBELP,     "Item
                   SY-VLINE,  (10) IT_FINAL-AEDAT,     "Created On
                   SY-VLINE,  (7) IT_FINAL-ERNAM,      "Created By
                   SY-VLINE,  (10) IT_FINAL-MATNR,     "Material
                   SY-VLINE,  (6) IT_FINAL-BUKRS,      "Company code
                   SY-VLINE,  (5)  IT_FINAL-WERKS,     "Plant
                   SY-VLINE,  (10) IT_FINAL-MATKL,     "Material Group
                   SY-VLINE,  (13) IT_FINAL-MENGE, "#EC UOM_IN_MES
                                                       "Order Qty
                   SY-VLINE,  (11) IT_FINAL-NETPR, "#EC UOM_IN_MES
                                                       "Net Price
                   SY-VLINE,  (10) IT_FINAL-PEINH, "#EC UOM_IN_MES
                                                       "Price Unit
                   SY-VLINE,  (13) IT_FINAL-NETWR, "#EC UOM_IN_MES
                                                        "Net Value
                   SY-VLINE,  (8)  IT_FINAL-GSBER,     "Bus Area
                   SY-VLINE,  (10) IT_FINAL-LIFNR,     "Vendor
                   SY-VLINE,  (28) IT_FINAL-NAME1,     "Vendor name
    *--IR details
                   SY-VLINE,  (10) IT_FINAL-IR_BELNR,  "IR-Mat Doc
                   SY-VLINE,  (5)  IT_FINAL-IR_BUZEI,  "IR-It
                   SY-VLINE,  (9) IT_FINAL-IR_BUDAT,   "IR-Post dt
                   SY-VLINE,  (13) IT_FINAL-IR_MENGE,  "#EC UOM_IN_MES
                                                        "IR-Quantity
    *--GR details
                   SY-VLINE,  (10) IT_FINAL-GR_BELNR,  "GR-Mat Doc
                   SY-VLINE,  (5)  IT_FINAL-GR_BUZEI,  "GR-It
                   SY-VLINE,  (9) IT_FINAL-GR_BUDAT,   "GR-Post dt
                   SY-VLINE,  (13) IT_FINAL-GR_MENGE, SY-VLINE.
                                                       "#EC UOM_IN_MES
                                                       "GR-Quantity
      ENDLOOP.
      FORMAT COLOR OFF.
    ENDFORM.                    " DISPLAY_PODATA
    *&      Form  DOWN_LOAD_TO_EXCEL
          text
    FORM DOWN_LOAD_TO_EXCEL .
      <b>REFRESH FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-010.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-011.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-012.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'Created By'(036).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-014.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'Company Code'(037).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-016.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'Material Group'(038).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'Order Quantity'(039).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-019.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-020.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-021.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'Business Area'(040).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-023.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-024.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'IR Material Doc'(041).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'IR Item'(042).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'IR Posting Date'(043).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-028.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'GR Material Doc'(044).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'GR Item'(045).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = 'GR Posting Date'(046).
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
      FIELDNAMES-TEXT = TEXT-032.
      APPEND FIELDNAMES.CLEAR FIELDNAMES.
    *--FM to download data to Excel sheet
    CALL FUNCTION 'WS_DOWNLOAD'
           EXPORTING
                FILENAME                = C_FILE
                FILETYPE                = 'DAT'
                TABLES
                DATA_TAB                = IT_FINAL
                FIELDNAMES              = FIELDNAMES
           EXCEPTIONS
                FILE_OPEN_ERROR         = 1
                FILE_WRITE_ERROR        = 2
                INVALID_FILESIZE        = 3
                INVALID_TABLE_WIDTH     = 4
                INVALID_TYPE            = 5
                NO_BATCH                = 6
                UNKNOWN_ERROR           = 7
                GUI_REFUSE_FILETRANSFER = 8
                OTHERS                  = 9.
      IF SY-SUBRC <> 0.
         MESSAGE E001(ZZ) WITH 'Data could not downloaded'(047).
      ENDIF.</b>ENDFORM.                    " DOWN_LOAD_TO_EXCEL
    *&      Form  GET_FINAL_DATA
          To Populate required data in final internal table
    FORM GET_FINAL_DATA .
    CLEAR   IT_FINAL.
    REFRESH IT_FINAL.
    LOOP AT IT_POITEM.
       CLEAR IT_POHEADER.
       READ TABLE IT_POHEADER WITH KEY EBELN = IT_POITEM-EBELN.
       IF SY-SUBRC = 0.
        MOVE :  IT_POHEADER-EBELN TO IT_FINAL-EBELN,     "Purchasing Doc
                IT_POITEM-EBELP   TO IT_FINAL-EBELP,     "Item
                IT_POHEADER-AEDAT TO IT_FINAL-AEDAT,     "Created On
                IT_POHEADER-ERNAM TO IT_FINAL-ERNAM,     "Created By
                IT_POITEM-MATNR   TO IT_FINAL-MATNR,     "Material
                IT_POITEM-BUKRS   TO IT_FINAL-BUKRS,     "Company code
                IT_POITEM-WERKS   TO IT_FINAL-WERKS,     "Plant
                IT_POITEM-MATKL   TO IT_FINAL-MATKL,     "Material Group
                IT_POITEM-MENGE   TO IT_FINAL-MENGE,     "Order Qty
                IT_POITEM-NETPR   TO IT_FINAL-NETPR,     "Net Price
                IT_POITEM-PEINH   TO IT_FINAL-PEINH,     "Price Unit
                IT_POITEM-NETWR   TO IT_FINAL-NETWR,     "Net Value
                IT_POHEADER-LIFNR TO IT_FINAL-LIFNR.     "Vendor
    *--To Insert IR details
        CLEAR IT_HISTORY.
        READ TABLE IT_HISTORY WITH KEY EBELN = IT_POITEM-EBELN
                                       EBELP = IT_POITEM-EBELP
                                       VGABE = '2'
                                       BEWTP = 'Q'.
          IF SY-SUBRC = 0.
            MOVE :
              IT_HISTORY-BELNR TO IT_FINAL-IR_BELNR,  "IR-Number of Mat Doc
              IT_HISTORY-BUZEI TO IT_FINAL-IR_BUZEI,  "IR-Item in mat Doc
              IT_HISTORY-BUDAT TO IT_FINAL-IR_BUDAT,  "IR-Posting date
              IT_HISTORY-BUDAT TO IT_FINAL-IR_MENGE.   "IR-Quantity
          ENDIF.
    *--To insert GR details
        CLEAR IT_HISTORY.
        READ TABLE IT_HISTORY WITH KEY EBELN = IT_POITEM-EBELN
                                       EBELP = IT_POITEM-EBELP
                                       VGABE = '1'
                                       BEWTP = 'E'.
          IF SY-SUBRC = 0.
            MOVE :
              IT_HISTORY-BELNR TO IT_FINAL-GR_BELNR,  "IR-Number of Mat Doc
              IT_HISTORY-BUZEI TO IT_FINAL-GR_BUZEI,  "IR-Item in mat Doc
              IT_HISTORY-BUDAT TO IT_FINAL-GR_BUDAT,  "IR-Posting date
              IT_HISTORY-BUDAT TO IT_FINAL-GR_MENGE.  "IR-Quantity
          ENDIF.
    *--To insert Vendor details
         CLEAR IT_VENDOR.
         READ TABLE IT_VENDOR WITH KEY LIFNR = IT_POHEADER-LIFNR.
         IF SY-SUBRC = 0.
          MOVE : IT_VENDOR-NAME1 TO IT_FINAL-NAME1.
         ENDIF.
    *--To insert Business area
         CLEAR IT_BUSINESS.
         READ TABLE IT_BUSINESS WITH KEY EBELN = IT_POITEM-EBELN
                                         EBELP = IT_POITEM-EBELP.
         IF SY-SUBRC = 0.
           MOVE : IT_BUSINESS-GSBER TO IT_FINAL-GSBER.
         ENDIF.
          APPEND IT_FINAL.
          CLEAR  IT_FINAL.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " GET_FINAL_DATA
    thanks
    Sunil

  • How to make a Bi Bean Export to an excel sheet

    Hi, I need to export the result of my data to an excel sheet , i need more export types, how can i extend the Exporter Bean or create another bean to do this ?
    Thanks...

    You can implement Export to Excel with BI Beans.
    For an HTML client you should look at the oracle.dss.thin.beans.dataView.ExportOptions class. Also look in the BI Beans Help for the Topic "Export Options Dialog".
    For a Java client application, you should look at the ExportPanel class (oracle.dss.gridView.gui.ExportPanel) in the BI Beans Javadoc.

  • How to transfer data more than 255 char from excel sheet to internal table.

    Hello Experts,
    I have a requirement where i have a text field in the excel sheet of more than 255 char and need to be updated in the text element. To do that i need to transfer the excel sheet data to an internal table where one of the field is more than 255 char.
    in the standard function module it works only upto 255 char. Can you help me if we have some other way to get more than 255 char in the internal table from excel sheet.
    Thanks in Advance.
    BR,
    RaJ.

    Using .xls, it is not possible transfer data more than 255 characters from excel sheet. However if the excel sheet is saved as Comma Delimited format or Tab Delimited format, then using GUI_DOWNLOAD function module data more than 255 characters can be transferred.
    File name should be : .csv (Comma Delimited format)  or .txt (Tab Delimited format)
    File Type would still remain 'ASC' while calling function module GUI_DOWNLOAD
    Also In the internal table declare the field type as String or LCHAR.
    Eg:
    TYPES: begin of ty_file,
            col_a TYPE string,
          end of ty_file.
    DATA: i_file type standard table
                   of ty_file
                 with header line
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      =  'C:\test.csv'
      TABLES
        DATA_TAB                      = i_file

  • How to insert a node in an Element ?

    I have the following XSD :
    *<?xml version="1.0" encoding="windows-1252" ?>*
    *<schema>*
    *     <element name="Donnee">*
    *          <complexType>*
    *               <sequence>*
    *                    <element name="Field1" type="string"/>*
    *                    <element name="Field2" type="string"/>*
    *                    <element name="ListField" minOccurs="0" maxOccurs="unbounded">*
    *                         <complexType>*
    *                              <sequence>*
    *                                   <element name="SubField1" type="string"/>*
    *                                   <element name="SubField2" type="string"/>*
    *                              </sequence>*
    *                         </complexType>*
    *                    </element>*
    *               </sequence>*
    *          </complexType>*
    *     </element>*
    *</schema>*
    I want to create a new Element following that schema.
    Once created (empty), I can fill the "Field1" and "Field2" fields.
    But I cannot insert a "FieldList" element !
    I tried with Java :
    setVariableData("my_variable", "Donnee/ListField[1]/SubField1", "my value"):
    But this throw me an error, because this xpath doesn't exists.
    I don't see how I can insert a new element...
    Thank you for your help.

    Hi,
    Change you XSD Schema definition as given below:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.oracle.com/Donnee" targetNamespace="http://xmlns.oracle.com/Donnee" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="Donnee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Field1" type="xs:string"/>
                        <xs:element name="Field2" type="xs:string"/>
                        <xs:element ref="ListField" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ListField">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="SubField1" type="xs:string"/>
                        <xs:element name="SubField2" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Now you can create variables of type ListField, create variables of ListField type and populate them.
    Append these variables into parent element Donnee using the append operation. Append operation is available in Assign activity.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • How to insert delay in array?

    in my program i need to send array for control 5 servo motors , but i need to send them with delay between each number, it  suppose to control pick and place robot, any idea ?
    is it possible to apply delay within array? its urgent thanks 

    erfan wrote:
    I need delay between arrays, for instance if i send 45 56 78 87 54 for my servo motors (there are five servo motor ),  i need delay between this number,.., 
    Your statements are confusing and conflicting. You talk about "this number" but show five numbers. Do you need delays between arrays (as you just said and as your code already does) or delays between the elements of the array?
    If you need a delay between the elements, you need to add a small inner FOR loop containing the write node and autoindex over the blue 1D array, similar to steve's suggestion..
    If this is not the solution, you need to be much clearer in your description, for example describe in detail how the delay should look, e.g.:
     45 56 78 87 54 delay
     or 45 delay 56 delay 78 delay  87 delay  54 delay
    or something esle
    LabVIEW Champion . Do more with less code and in less time .

  • How to insert a 1d array line into a 2 d array?

    I have a vi that acquire the signals of several pulse encoder and store it into a 1d array, and I want to move these data to a 2d array and fill it. I mean I want to acquire signal and store at line 1 of the 2d array, then acquire again and store at line 2 of the 2d array and keep going like this successively.
    how can I do that?
    Solved!
    Go to Solution.

    labvlearner wrote:
    I have a vi that acquire the signals of several pulse encoder and store it into a 1d array, and I want to move these data to a 2d array and fill it. I mean I want to acquire signal and store at line 1 of the 2d array, then acquire again and store at line 2 of the 2d array and keep going like this successively.
    You need to be careful with the terminology, because there are two very different scenarios:
    You have an existing 2D array and you want to insert a column(or row), thus growing one of the dimensions by one and moving everything to the right (or bottom) over one slot. (similar to "insert column" in excel)
    You have an existing 2D array (possibly all zeroes at the beginning) and you want to replace an existing column with new data. (many newbies call that "insert" too, even though it is not)
    If you know the final size of the 2D array, option 2 will be orders of magnitude more efficient, because it avoids constant memory allocations. Every time (almost) you grow an array, it needs to be recreated at a new memory location because arrays need to be contiguous in memory.
    LabVIEW Champion . Do more with less code and in less time .

  • How to insert brackets into an XML element value?

    If I have a <file> </file> element in an XML file and I want to insert a filename of the form PED<yyMMdd>232, how do I insert the < and > brackets as an element value inside the <file> tag?
    I use JCreator to edit the xml file and it treats <yyMMdd> as a seperate element instead of being part of the filename.
    Edited by: Weng on Mar 27, 2008 10:06 AM

    You have to escape those characters, like this:
    PED&lt;yyMMdd&gt;232

  • How to insert a text edit UI element  in a table

    hi all,
    I want a text edit UI element in a table .I do not want input field because text entered can be very long and whole text cant be seen then.Is there any way to increase the width of input field if i insert an input field ? or what can be other solution for this?

    Hi Govind,
    You can't insert Text Edit as a cell variant in table. But you can increase the 'Width' property of Input Field, say to 500px or as per your requirement, so that you can display the full text at one go. Or you can bind the 'Width' property to a context and set the width at run time as per the text length.
    Thanks,
    Sumit

  • How to insert a 2D array into the end of X axis of the initial array?

    Hi, friends, I have a question and look for an advice. I have several input data, each of which has 4 rows and unknow columns. Each time I receive the input, I need to combine it to all of the previous ones by adding it to the end of X axis of the previous combined data. I must do it because, later, I need to run my model and my model read input for each column of 4 rows. How should I do it? Also, should I initiate an array before reading all of the inputs? The inputs are F32 format. Thank you very much for any of your advice.

    Building a 2D array row-by-row is easy. You either use "build array" if you need to update the indicator during the run, or you simply autoindex at the loop  boundary (FOR or WHILE).
    Two possibilities are shown in the attached image. If your arrays are getting large and you use a while loop, there are possibilities that are more memory efficient. You would initialize a 2D array (e.g. filled with NaNs) of an upper boundary of the final expected size, then replace rows as you go.
    (Notice that if you use autoindexing on a FOR loop, the final size is known from the beginning so memory can be allocated efficiently)
    Message Edited by altenbach on 11-01-2006 09:19 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    AppendRows.png ‏5 KB

Maybe you are looking for

  • CC 14.2.1: MiniBridge Photoshop Tools menu scripts are launching CC 2014.. err why ?

    I've installed CC 2014 and Adobe Bridge update 6.1.0.115. Since installing, if I use Photoshop CC 14.2.1 and try and access the Photoshop Scripts in Mini Bridge (Load Files as Layer, Batch, Image processor etc) they launch CC 2014 instead. I've tried

  • How do i make a scrolling text box?

    hi, i'm looking to make a text box that the user can control the scrolling, i've made it how i want it to look already, but i haven't got a clue where to start as to how to make it actually work. here's how i've got it set up so far, okay this is gon

  • Why do we need Queue mechanism in XI

    Hi, What is the use of Queues in XI message processing.??? Why do we Look into SM58 in IDOC Posting. What it says abt??? Explain me in brief nad in general words Regards Suman

  • Strange log entries (authentication fail) wth Home...

    I was idly checking the event log on my Homehub 3B and noticed something odd (to me) under the GUI category. An extract from the log reads... 12:51:50,26 July. HTTP User admin login from 192.168.1.64 successfully. 12:28:26,26 July. HTTP User Basic lo

  • 100% pure Java

    Does Sun have to formally authenticate one's code as 100% pure Java or is this purely an informal tag that the developer uses to show people it will run on any platform. Ta