Excel in place to maintain a Z table

I need to build a Excel inplace based utility to maintain table entries in a z table. So I can use this Excel inplace utility to add new record, modify existing ones or delete existing ones.
Can someone kindly share the code for a simple 5 field with 3 fields as key in the table excel inplace maintenance program.
Thanks
Karen

Hi,
i would give you the steps so that you can write the code:
1) Selection screen fields:
      Filename: RLGRAP-FILENAME
      Server: Presentation/Application server(Radiobutton)
      Radiobutton for Delete/insert/Update
2) Upload the data from the input EXCEL file from presentation server
    CALL FUNCTION 'FAA_FILE_UPLOAD_EXCEL'
    If application server, use GUI_UPLOAD.
3) Based on the data uploaded, Split the filedata into an internal table ITAB
4) If the radiobutton Insert/Update is selected, Use
MODIFY <ztable> from ITAB  (make sure that the table structure ITAB is same as ztable)
if the radiobutton delete is selected, Use
DELETE from <ztable> using ITAB  (Please check the syntax for delete and modify bu doing F1)
Regards
shiva

Similar Messages

  • How to read an APO table from excel in place using Visual Basic ?

    We have enhanced some APO reports using layouts that use excel in place with custom visual basic (VB) code. For example, the VB code can append the data with additional columns that perform specific calculations and then proceed to create pivot table reports in excel..That is working fine.
    The challenge is to see if that VB code could read specific APO tables (e.g. product master tables) to bring additional elements into excel and thus expand the report content. We know that additional fields can be added to the reports, but having the flexibility to read tables from VB could be more flexible.
    Can that be done?. If so, would it be possible using exclusively the VB code attached to the layout, i.e. no ABAP?

    Hello Anselmo,
    I am assuming you are doing this either using BeX analyzer or by reading the planning book using the RFC ActiveX component and a BAPI.
    I think it's possible to retrieve the data from the product master table. Here are my thoughts on how can this be done:
    1) You can create a generic datasource (transaction RSO2) for the product master table, connect that to a BW remotecube and use a BeX query to retrieve that values. You can then join the queries using VBA. Alternatively, you can build a muti-provider that connects your current InfoCube to the new RemoteCube and build a query from there. The multi-provider, in this case, joins the data (no more VBA).
    2) If you have already loaded your product master data into master data carrying InfoObjects then you can try the same technique as #1 but this time there is no need to create the generic datasource. You can use the InfoObjects for your master data as the InfoProviders for your query.
    3) You can try the ActiveX component from SAP which can  connect to any emote enabled function in SAP system. SAP already provided some BAPIs (check transaction BAPI for a list) which might be able to provide the data. You can also create your own function modules (be sure to make it remote enabled) using ABAP. (transaction SE37).
    Hope this helps

  • Hello, for a multilingual catalog project I would have to know how and with what tool I can place text from Excel or a database in text frames / tables. The basic idea is to provide the text box with an ID (eg text_eng_art_nr_987654 ) and above to ma

    Hello, for a multilingual catalog project I would have to know how and with what tool I can place text from Excel or a database in text frames / tables. The basic idea is to provide the text box with an ID (eg << text_eng_art_nr_987654>>) and above to make the connection. Does anyone have a tip. Thanks in advance !!!
    Bernd

    Data merge is really useful in many circumstances, but my first question would be about the size of the project. A really large catalog might be better handled by processing an IDML in some kind of translation memory tool.
    If all of your multilingual content is already in Excel, then it's probably best handled with a Data Merge. Note that you can't save Unicode CSV out of Excel for the merge, so for many languages you'll need to save "Unicode Text" out of Excel and tweak your import settings when you select a Data Source for encoding (Unicode) and delimiter (tab instead of comma).

  • ALV Grid Excel in Place using REUSE_ALV_GRID_DISPLAY

    I have a ALV grid displayed in a report and i have a bunch of layouts created by various users and the layouts works fine when selected. But when I use 'Excel'  (excel-in-place) button to export the grid into an excel sheet, the order of the columns are all jumbled up and not in sync with the ALV grid layout on the screen. However, when I use export to local file>excel option, the order of columns are in sync with the layout. Can any one explain why this is happening and how I can fix it ? Is there any OSS note or something that I need to apply ?
    PS : I am using REUSE_ALV_GRID_DISPLAY to display the report and I am building the fieldcatalog manually
    Eg :
    CLEAR r_fieldcatalog.
      MOVE 'TB_OUTPUT'  TO r_fieldcatalog-tabname.
      MOVE 'BUKRS'      TO r_fieldcatalog-fieldname.
      MOVE 'VBAK'       TO r_fieldcatalog-ref_tabname.
      MOVE 'BUKRS_VF'   TO r_fieldcatalog-ref_fieldname.
      MOVE text-f01     TO r_fieldcatalog-seltext_s.
      MOVE text-f01     TO r_fieldcatalog-seltext_m.
      MOVE text-f01     TO r_fieldcatalog-seltext_l.
      add '1' to lv_col_pos .
      move lv_col_pos to r_fieldcatalog-col_pos .
      APPEND r_fieldcatalog TO tc_fieldcatalog.
      CLEAR r_fieldcatalog.
      MOVE 'TB_OUTPUT'  TO r_fieldcatalog-tabname.
      MOVE 'VKORG'      TO r_fieldcatalog-fieldname.
      MOVE 'VBAK'       TO r_fieldcatalog-ref_tabname.
      MOVE 'VKORG'      TO r_fieldcatalog-ref_fieldname.
      MOVE text-f02     TO r_fieldcatalog-seltext_s.
      MOVE text-f02     TO r_fieldcatalog-seltext_m.
      MOVE text-f02     TO r_fieldcatalog-seltext_l.
      add '1' to lv_col_pos .
      move lv_col_pos to r_fieldcatalog-col_pos .
      APPEND r_fieldcatalog     TO tc_fieldcatalog.
    Thanks in advance,
    Shareen

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          i_callback_program       = sy-repid
          is_layout                = gs_layout
          it_fieldcat              = gt_fieldcat[]
          i_default                = ' '
          i_save                   = g_save
        TABLES
          t_outtab                 = it_tab
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and beneath this just put a form.as its shown.
    FORM alv_pf_status USING l_alv_excl TYPE STANDARD TABLE.
      SET PF-STATUS 'STANDARD_FULLSCREEN' "excluding lt_extab
                    OF PROGRAM 'SAPLSETB'.
    ENDFORM.                    "alv_pf_status

  • ALV Excel in-place in Portal

    Dear gurus,
    i wonder if:
    1) ALV Excel inplace can be used within portal
    2) if yes, what configuration steps I must maintain (if there is any document about it, could anybody point me to it?)
    3) if not, can anybody suggest any alternative? I need to have my Excels formatted (like using OLE or when I generate a XML Office file, but that would take me too long to create all the outputs one by one) and if possible opened from the portal. If that could not be done, my users would accept to save it first and open the file then.
    4) I need this functionality because on my portal the users access the standard ERP transactions (through ITS or WebGUI or how exactly that is called). If I could do any programming, I would use Office UI WebDynpro container, but obviously I cannot do that. That is the reason I look for some SAP standard way how to do this.
    Thank you for your time and effort if you ave read this far:))¨
    Have a nice day everybody, regards Otto

    Looks like there is not real progress regarding this topic. Excel in-place is not supported in any GUI version except the SAP GUI for windows. For anybody who would struggle and waste time like me, please read here:
    Note 512068 - Office integration and SAP GUI for HTML
    Note 822867 - Desktop Office Integration: No support for ITS & Java GUI
    Regards Otto

  • ALV Excel in-place for ITS transactions

    Dear gurus,
    i wonder if:
    1) ALV Excel inplace can be used within portal/ transactions provided through ITS
    2) if yes, what configuration steps I must maintain (if there is any document about it, could anybody point me to it?)
    3) if not, can anybody suggest any alternative? I need to have my Excels formatted (like standard ALV in-place Excel, like using OLE or when I generate a XML Office file, but that would take me too long to create all the outputs one by one) and if possible opened from the portal. If that could not be done, my users would accept to save it first and open the file then.
    4) I need this functionality because on my portal the users access quite many standard ERP transactions. If I could do any programming, I would use Office UI WebDynpro container, but obviously I cannot do that. That is the reason I look for some SAP standard way how to do this.
    Thank you for your time and effort if you ave read this far:))
    Have a nice day everybody, regards Otto

    Looks like there is not real progress regarding this topic. Excel in-place is not supported in any GUI version except the SAP GUI for windows. For anybody who would struggle and waste time like me, please read here: Excel inplace not supported in ITS/Web GUI.
    Note 512068 - Office integration and SAP GUI for HTML
    Note 822867 - Desktop Office Integration: No support for ITS & Java GUI
    Regards Otto

  • How can I run a BW Function from EXCEL-IN-PLACE (BPS)??? Please give any ex

    How can I run a BW Function from EXCEL-IN-PLACE (BPS)using VBA??? Please give any example.
    I would like to run my function module ZMY from EXCEL-IN-PLACE using VBA and get a result.

    if you are using excel in place in the web application environment I doubt you can, you've never really had any macro functionalty there.
    If you are in the gui environemnt (Planning folders) it will depend on how you want to invoke the module...

  • 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

  • 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

  • Maintain acct determination (table T030B) for posting key IRX / IGX (M8395)

    Dear Guru,
    I am testing IS-Oil & Gas (Downstream) - Exchanges.
    Created Exchange Agreement and Purchase Contract and Sales Contract, Purchase Contract and Sales Contract are assigned to the Exchange Contract.
    A PO is created with reference to the Purchase Contract.
    Upon post goods receipt in MIGO, encountered error message "Maintain account determination (table T030B) for posting key IRX (Message no. M8395)" that does not allow PGR to get through.
    A call-off is created with reference to the Sales Contract.
    Similarly, when PGI is performed in VL01N, encountered error message "Maintain account determination (table T030B) for posting key IGX (Message no. M8395)" that does not allow PGI to get through.
    Checked in OBYC, there is no transaction key for IRX and IGX.
    Please advise. Thank you.
    Regards,
    WL

    Hi WL,
    Please use transaction code O54E to maintain the required configuration.
    I hope this helps you.
    Thanks & Regards
    Kalpesh Chavda

  • Maintain account determination (table T030B) for posting key IRX (M8395)

    Dear Guru,
    I am testing IS-OIL - Exchanges.
    Created Exchange Agreement and Purchase Contract and Sales Contract, Purchase Contract and Sales Contract are assigned to the Exchange Contract.
    A PO is created with reference to the Purchase Contract.
    Upon post goods receipt in MIGO, encountered error message "Maintain account determination (table T030B) for posting key IRX (Message no. M8395)" that does not allow PGR to get through.
    A call-off is created with reference to the Sales Contract.
    Similarly, when PGI is performed in VL01N, encountered error message "Maintain account determination (table T030B) for posting key IGX (Message no. M8395)" that does not allow PGI to get through.
    Checked in OBYC, there is no transaction key for IRX and IGX.
    Please advise. Thank you.
    Regards,
    WL

    Hi WL,
    In an Exchange scenario, the account determination entry would have to go added through tcode O54E for this purpose. You would see both the IRX and IGX entry in the above mentioned tcode.
    Menu path: IS-OIL Downstream --> EXG --> Account Assignment
    You would not be able to see the IRX or IGX transaction key in OBYC.
    Hope the above helps.
    Thanks.
    Edited by: Kok Wai Phang on Jul 10, 2011 7:58 AM

  • Error Maintaining multi-lingual tables.

    Hello, for past few days i have been stack at this error, can't find the solution. So i am bringing my problem here, hoping for an answer.
    Platform: Linux Red Hat Enterprise 5
    i am on R12.1.3 version and DB: 11g 2 realise.
    I need to install a Finnish language on EBS, so i licensed Finnish language in EBS.
    As mentioned in subject my problem lies within Maintaining multi-lingual tables.
    After i run the adadmin and select Maintain multi-lingual tables, everything is right until the last jobs, where 3 workers fail! here is the error
    sqlplus -s APPS/***** @/u01/ar121/VIS/apps/apps_st/appl/ibc/12.0.0/sql/IBCNLINS.sql
    Connected.
    PL/SQL procedure successfully completed.
    MESG
    LANGUAGE=AMERICAN
    PACKAGE=IBC_CITEM_VERSIONS_PKG
    SQLERRM=ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in textindexmethods.ODCIIndexInsert
    ORA-20000: Oracle Text error:
    DRG-10607: index meta data is not ready yet for queuing DML
    DRG-50857: oracle error in drdmlv
    ORA-01426: numeric overflow
    ORA-30576: ConText Option dictionary loading error
    MESG
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 752
    select to_date('ERROR')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    And here is the worker fail
    ATTENTION: All workers either have failed or are waiting:
    FAILED: file IBCNLINS.sql on worker 1.
    FAILED: file CSNLINS.sql on worker 2.
    FAILED: file IRCNLINS.sql on worker 3.
    the worker error is the same on all three workers, just script is changed.
    I am pretty new at EBS, and newbie at DB administration too, so don't be so hard on me. Thx
    Edited by: 905194 on Dec 30, 2011 4:17 AM
    Edited by: 905194 on Dec 30, 2011 4:20 AM
    Edited by: 905194 on Dec 30, 2011 4:23 AM

    Was this instance upgraded from 11i and 10g database ? If so, a step in the upgrade may have been missed. Pl see this MOS Doc
    Applying The Patch 6678700 Worker 1 Failed: File Cskbcat.Ldt. ERRORS: ORA-20000: Oracle Text error: DRG-50857: oracle error in textindexmethods.ODCIIndexUpdate, DRG-13201: KOREAN_LEXER is desupported (Doc ID 1333659.1)
    If you are using 11.2.0.3, MOS Doc 1386945.1 (Oracle Text release 11.2.0.3.0 mandataroy Patches) may be applicable
    HTH
    Srini

  • Default Excel in place for cl_gui_alv_grid, no headers

    I am calling method set_table_for_first_display in cl_gui_alv_grid.
    In the layout structure I have no_headers = 'X'. 
    In the Grid view, there is no default header - it is hidden.
    When switching to Excel in place, the headers appear at the top shaded in gray.
    I have a need for two heading rows so I need the default hidden.  Is there a way to keep the default heading from converting to the gray shadded row at the top of the Excel view?

    Hi,
    On ouput of ALV Grid -> Right click->Spreadsheet->Excel(In MHTML Format)and press enter
    a pop will come for saving there replace the file name export.MHTML to export.xls.
    I hope you need this format right?

  • Excel in place runtime error

    We have a custom report which displays the output in ALV Grid ( OO ABAP , using custom container ) and when we try to use the excel in place option we get a short dump . We have more than 60 thousand records. We are using microsoft excel 2007.
    Exception condition "SYSTEM_FAILURE" raised.
    A RAISE statement in the program "SAPLOLEA" raised the exception
    condition "SYSTEM_FAILURE".
    Since the exception was not intercepted by a superior
    program, processing was terminated.
    Thx
    Krishna.

    Create a custom toolbar button and use any of the standard FM's/methods to download to excel. The reason i am saying it, at times, it's been observed that for large data/records, the standard download to excel functionality dumps. Not sure if this is an actual issue, but this happened with me few times and always gave a custom download functionality.
    See, if it works.
    Thanks,
    Santosh

  • Excel in Place in ALV

    Hi,
    Is it possible to show Excel in place button in ALV Grid? How?
    Thanks!

    Hi,
    See this thread will help u Excel view in ALV Grid---- Urgent
    regards,
    parvin

Maybe you are looking for