Why excel output on the ALV Application Tool bar  don't work

most of our company's report was view in the ALV, but the standard excel output function on the ALV Application Toolbar don't work. 
DEFINE ADD_FIELD.
  WA_FIELD-FIELDNAME = &1.
  WA_FIELD-REPTEXT_DDIC = &2.
  APPEND WA_FIELD TO IT_FIELD.
END-OF-DEFINITION.
the micro above is how i fill the SLIS_FIELDCAT_ALV, is that has some problem ?
i  am expecting for you guys  help .

Thanks for answer me , and the problem was sovled by my colleague,  go to the toolbar   option / security / macro security/ trust access to visual basic project, and select it . and you will fine the FM REUSE_ALV_GRID_DISPLAY can use the standard excel output now .
沧浪之水
msn:[email protected]
qq  : 107198046
skype:zhangdezhao
gtalk:[email protected]
yahoo msgr:dezhaozhang
Edited by: dezhao zhang on Jan 15, 2008 2:26 AM

Similar Messages

  • What are the standard Application tool bars used in reports

    Hi All,
    What are the standard application tool bars used in the report/program?
    Thanks in advance
    Regards
    Chakri

    Hi,
    Goto SE41,
    Programs : SAPLKKBL
    Status : STANDARD
    Thanks,
    Best regards,
    Prashant

  • ALV GRID Tool bar options not working

    Hello Experts,
    I copied the standard tool bar into my program with the name 'ZSALV_STANDARD' and displaying the output in the grid format in a container with the method set_table_for_first_display
    When I execute the program the standard buttong in the tool bar are not working... Can anyone guide where am I going wrong...
    Here is my code
    DATA :    gr_event_handler TYPE REF TO lcl_event_handler .
      DATA:  threed TYPE i VALUE 1.
      SET PF-STATUS  'ZSALV_STANDARD'.
    * Creating an instance for the event handler
      CREATE OBJECT gr_event_handler .
      TRY.
          CREATE DATA i_table TYPE TABLE OF (viewname).
          ASSIGN i_table->* TO <i_itab>.
          CREATE DATA wa_all LIKE LINE OF <i_itab>.
          ASSIGN wa_all->* TO <wa_tab>.
    *     Selecting data dynamically
          SELECT * FROM (viewname) INTO TABLE <i_itab>.
    *     Building the fieldcatelog
          CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
            EXPORTING
              i_structure_name       = viewname
            CHANGING
              ct_fieldcat            = li_fieldcat
            EXCEPTIONS
              inconsistent_interface = 1
              program_error          = 2
              OTHERS                 = 3.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *     Making fields editable except key fields
          IF sy-ucomm = 'UPD' OR  sy-ucomm = 'CHANGE'.
            LOOP AT li_fieldcat INTO lwa_fieldcat.
              IF lwa_fieldcat-key = space.
                lwa_fieldcat-edit = 'X'.
                MODIFY li_fieldcat FROM lwa_fieldcat.
              ENDIF.
            ENDLOOP.
          ENDIF.
    *     Making fields editable
          IF sy-ucomm = 'NEW'.
            LOOP AT li_fieldcat INTO lwa_fieldcat.
              lwa_fieldcat-edit = 'X'.
              MODIFY li_fieldcat FROM lwa_fieldcat.
            ENDLOOP.
            lh_flag = 'X'.
            CLEAR : <i_itab>.
            DO 100 TIMES.
              APPEND <wa_tab> TO <i_itab>.
            ENDDO.
          ENDIF.
    *     Exclude buttons
          PERFORM exclude_tb_functions CHANGING i_exclude.
          IF g_custom_container IS INITIAL.
            CREATE OBJECT g_custom_container
              EXPORTING
                container_name = g_container.
            CREATE OBJECT grid1
              EXPORTING
                i_parent = g_custom_container.
          ENDIF.
    *     Making all fields non-editable if display mode
          IF sy-ucomm = 'SHOW'.
            LOOP AT li_fieldcat INTO lwa_fieldcat.
              lwa_fieldcat-edit = ' '.
              MODIFY li_fieldcat FROM lwa_fieldcat.
            ENDLOOP.
          ENDIF.
          IF sy-ucomm = 'SAVE'.
            LOOP AT li_fieldcat INTO lwa_fieldcat.
              IF lwa_fieldcat-key NE space.
                lwa_fieldcat-edit = space.
                MODIFY li_fieldcat FROM lwa_fieldcat.
              ENDIF.
            ENDLOOP.
          ENDIF.
    *     Displaying ALV Grid
          i_layout-NO_TOOLBAR = 'X'.
          i_layout-edit = 'X'.
          CALL METHOD grid1->set_table_for_first_display
            EXPORTING
              i_structure_name              = viewname
              it_toolbar_excluding          = i_exclude
              i_default                     = 'X'
              is_layout                     = i_layout
            CHANGING
              it_outtab                     = <i_itab>
              it_fieldcatalog               = li_fieldcat
            EXCEPTIONS
              invalid_parameter_combination = 1
              program_error                 = 2
              too_many_lines                = 3.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
    *      Getting the changed data
          SET HANDLER gr_event_handler->handle_data_changed FOR grid1 .
        CATCH cx_sy_create_data_error.
      ENDTRY.
    Thanks alot in advance.
    Sri

    Hello ,
    try
        call method g_grid%->set_table_for_first_display
          exporting
            i_save               = p_save_layout%
            i_default            = 'X'
            is_layout            = ps_layout%
            is_variant           = ps_variant%
            it_toolbar_excluding = pt_exclude%
          changing
            it_outtab            = pt_alv_tab1[]
            it_fieldcatalog      = pt_fieldcat%[].
        call method g_grid%->set_toolbar_interactive.
    regards
    Prabhu

  • How to implement functionkeys on the ALV GRID tool bar

    Hello All,
    I need to implement functionkeys(Ex.given below) to the standard buttons like Ascending order etc. on the ALVGRID Tool Bar . I have implementedObject orient concept( Methods) to display the out put.I tried by using set pf-status but it is not comming.
    Ex:
    ALV Grid Toll Bar Buttons                ( Func.Keys )      
    Print Preview                       ( CtrlShiftF10)
    Sort in Ascending order        ( Ctrl+F6 )
    Thanks in Advance.
    Vijay
    Edited by: Vijay Reddy on Aug 19, 2008 10:12 AM
    Edited by: Vijay Reddy on Aug 19, 2008 10:13 AM

    Hi,
    check this code,
    REPORT  zcl_timesheet_approval MESSAGE-ID zcl_msg.
    *  CLASS L_CL_EVENTS DEFINITION                                        *
    *  Class for inserting buttons on the toolbar                          *
    CLASS l_cl_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          toolbar FOR EVENT toolbar
                  OF cl_gui_alv_grid
                  IMPORTING e_object
                            e_interactive,
          user_command FOR EVENT user_command
                       OF cl_gui_alv_grid
                       IMPORTING e_ucomm .
    ENDCLASS.                              " L_CL_EVENTS DEFINITION
    *  CLASS L_CL_EVENTS IMPLEMENTATION                                    *
    *  Implementation of class L_CL_EVENTS                                 *
    CLASS l_cl_events IMPLEMENTATION.
      METHOD toolbar.
        PERFORM event_toolbar USING e_object.
      ENDMETHOD.                           " TOOLBAR
      METHOD user_command.
        PERFORM event_ucomm USING e_ucomm.
      ENDMETHOD.                           " USER_COMMAND
    ENDCLASS.                              " L_CL_EVENTS IMPLEMENTATION
    CONSTANTS:
       c_boolean_yes(1)     TYPE c         " Boolean - yes
                           VALUE 'X',
       c_approve_status(1)  TYPE c         " Approval status
                           VALUE 'A',
       c_rej_status(1)      TYPE c         " Rejected status
                           VALUE 'R',
       c_save_status(1)     TYPE c         " Save status
                           VALUE 'S',
       c_fcode_approve(7)   TYPE c         " Function code - APPROVE
                           VALUE 'APPROVE',
       c_fcode_rej(6)       TYPE c         " Function code - REJECT
                           VALUE 'REJECT',
       c_fcode_back(4)      TYPE c         " Function code - BACK
                           VALUE 'BACK',
       c_fcode_onli(4)      TYPE c         " Function code - EXECUTE
                           VALUE 'ONLI',
       c_fcode_exit(4)      TYPE c         " Function code - EXIT
                           VALUE 'EXIT',
       c_fcode_cancel(6)    TYPE c         " Function code - CANCEL
                           VALUE 'CANCEL',
       c_zero(1)            TYPE c         " Constant value 0
                           VALUE '0',
       c_alv_scr(7)         TYPE c         " GUI status : ALV screen
                           VALUE 'ALV_SCR'.
    * Field-string declarations...........................................
    DATA:
    * Field-string to build fieldcat.
       fs_fcat TYPE lvc_s_fcat,
    * Field-string for t_temp
       fs_temp TYPE type_s_temp.
    * Working variables...................................................
    * Internal table declarations........................................
    DATA:
    * Internal table to build fieldcat.
       t_fcat      TYPE lvc_t_fcat,
    * For ALV ...........................................................
    DATA:
    * To create instance for cl_gui_custom_container
      g_grid      TYPE REF TO cl_gui_custom_container,
    * To create instance for cl_gui_alv_grid
      g_alv       TYPE REF TO cl_gui_alv_grid,
    * To create instance for l_cl_events
      g_events    TYPE REF TO l_cl_events,
    * To assign name for custom container
      g_container TYPE scrfname VALUE 'CONTAINER',
    * To assign layout
      g_fcatlayo  TYPE lvc_s_layo.
    *            AT SELECTION-SCREEN EVENT                                 *
    AT SELECTION-SCREEN.
    * To perform user actions on the selection screen
      PERFORM user_command.
    *  MODULE  STATUS_0100  OUTPUT                                         *
    *  This module will create the objects for the instance and display    *
    *  the records                                                         *
    MODULE status_0100 OUTPUT.
      SET PF-STATUS c_alv_scr.
      PERFORM set_titlebar USING w_display.
    * If program executed in foreground.
      IF sy-batch IS INITIAL.
    * If g_grid is empty.
        IF g_grid IS INITIAL.
    * To create object for instance grid
          CREATE OBJECT g_grid
            EXPORTING
              container_name = g_container.
    * To create object for object grid
          CREATE OBJECT g_alv
            EXPORTING
              i_parent = g_grid.
        ELSE.
    *     IF W_SUBMIT EQ
          CALL METHOD g_alv->refresh_table_display.
        ENDIF.                             " IF G_GRID IS INITIAL
      ENDIF.                               " IF SY-BATCH IS INITIAL
      REFRESH t_fcat.
    * If w_display eq 'X' .
      IF w_display EQ c_boolean_yes.
    * To display all records except saved data
        PERFORM display_allrecords.
      ENDIF.                               " IF W_FLAG EQ C_BOOLEAN_YES
      IF w_submit EQ c_boolean_yes.
    * To display submitted records
        PERFORM submitted_records.
      ENDIF.                               " IF W_SUBMIT EQ C_BOOLEAN_YES
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *  MODULE USER_COMMAND_0100  INPUT                                     *
    *  To perform user actions in the screen 100                           *
    MODULE user_command_0100 INPUT.
    * To update the data in the ALV grid
      PERFORM check_changed_data.
      w_okcode = ok_code.
      CLEAR ok_code.
      CASE w_okcode.
        WHEN c_fcode_back.
          LEAVE TO SCREEN 0.
        WHEN c_fcode_exit OR c_fcode_cancel.
          LEAVE PROGRAM.
      ENDCASE.                             " CASE W_OKCODE
    ENDMODULE.                             " USER_COMMAND_0100
    *  FORM BUILD_FCAT                                                     *
    *  To build the field catalog giving managers comment in editable mode *
    *  -->PR_Tabname   type lvc_tname                                      *
    *  -->PR_Fieldname type lvc_fname                                      *
    *  -->PR_Coltext   type lvc_txtcol                                     *
    *  -->PR_Colpos    type lvc_colpos                                     *
    FORM build_fcat USING pr_tabname   TYPE lvc_tname
                          pr_fieldname TYPE lvc_fname
                          pr_coltext   TYPE lvc_txtcol
                          pr_colpos    TYPE lvc_colpos.
      CLEAR fs_fcat.
      fs_fcat-tabname   = pr_tabname.
      fs_fcat-fieldname = pr_fieldname.
      fs_fcat-coltext   = pr_coltext.
      fs_fcat-col_pos   = pr_colpos.
      IF fs_fcat-fieldname EQ 'MNGCOMMENT'.
        fs_fcat-edit      = c_boolean_yes.
        fs_fcat-lowercase = c_boolean_yes.
        fs_fcat-dd_outlen = 60.
      ELSE.
        fs_fcat-edit      = space.
      ENDIF.                               " IF FS_FCAT-FIELDNAME...
      APPEND fs_fcat TO t_fcat.
    ENDFORM.                               " BUILD_FCAT
    *   FORM BUILD_FCATD                                                   *
    *  To build fieldcatalog in the display mode                           *
    *  -->pr_Tabname   type lvc_tname                                      *
    *  -->pr_Fieldname type lvc_fname                                      *
    *  -->pr_Coltext   type lvc_txtcol                                     *
    *  -->pr_Colpos    type lvc_colpos                                     *
    FORM build_fcatd USING pr_tabname   TYPE lvc_tname
                           pr_fieldname TYPE lvc_fname
                           pr_coltext   TYPE lvc_txtcol
                           pr_colpos    TYPE lvc_colpos .
      CLEAR fs_fcat.
      fs_fcat-tabname   = pr_tabname.
      fs_fcat-fieldname = pr_fieldname.
      fs_fcat-coltext   = pr_coltext.
      fs_fcat-col_pos   = pr_colpos.
      fs_fcat-edit      = space.
      APPEND fs_fcat TO t_fcat.
    ENDFORM.                               " BUILD_FCATD
    *  FORM ALV_DISPLAY                                                    *
    *  To display data in ALV                                              *
    *  --> pr_table type standard table                                    *
    *  --> pr_fcat  type lvc_t_fcat                                        *
    FORM alv_display USING pr_table TYPE STANDARD TABLE
                           pr_fcat  TYPE lvc_t_fcat .
    * Local data declaration....
      DATA: lt_exclude TYPE ui_functions.
    * To exclude buttons on the ALV grid
      PERFORM exclude_tb_functions CHANGING lt_exclude.
    * To display ALV
      CALL METHOD g_alv->set_table_for_first_display
        EXPORTING
          i_default            = space
          is_layout            = g_fcatlayo
          it_toolbar_excluding = lt_exclude
        CHANGING
          it_outtab            = pr_table[]
          it_fieldcatalog      = pr_fcat[].
    ENDFORM.                               " ALV_DISPLAY
    *  FORM EVENT_TOOLBAR                                                  *
    *  Setting toolbar in the alv grid                                     *
    *  -->E_OBJECT TYPE REF TO CL_ALV_EVENT_TOOLBAR_SET                    *
    FORM event_toolbar USING e_object
                             TYPE REF TO cl_alv_event_toolbar_set.
    * Local declaration for the button.
      DATA: ls_toolbar TYPE stb_button.
    * To add Approve button
      ls_toolbar-function  = c_fcode_approve.
      ls_toolbar-butn_type = c_zero.
      ls_toolbar-text      = text-001.
      APPEND ls_toolbar TO e_object->mt_toolbar.
    * To add Reject button
      CLEAR ls_toolbar.
      ls_toolbar-function  = c_fcode_rej.
      ls_toolbar-butn_type = c_zero.
      ls_toolbar-text      = text-013.
      APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDFORM.                               " EVENT_TOOLBAR
    *  FORM EXCLUDE_TB_FUNCTIONS                                           *
    *  To exclude buttons from ALV grid                                    *
    *  <--> PR_EXCLUDE TYPE UI_FUNCTIONS                                   *
    FORM exclude_tb_functions  CHANGING pr_exclude TYPE ui_functions.
    * Local data declaration...
      DATA ls_exclude TYPE ui_func.
    * To remove the buttons on the ALV grid.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
      APPEND ls_exclude TO pr_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
      APPEND ls_exclude TO pr_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
      APPEND ls_exclude TO pr_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
      APPEND ls_exclude TO pr_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
      APPEND ls_exclude TO pr_exclude.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *  FORM EVENT_UCOMM                                                    *
    *  After Input in the ALV grid,if user select record and press         *
    *  approve or reject then the record will get updated                  *
    *  --> PR_ucomm type sy-ucomm                                          *
    FORM event_ucomm USING pr_ucomm LIKE sy-ucomm.
      CASE pr_ucomm.
    * If e_ucomm contains 'APP' i.e.function code for Approve button
        WHEN c_fcode_approve.              " To approve selected record
          PERFORM app_timesheet USING c_approve_status.
    * If e_ucomm contains 'REJ' i.e. function code for Reject
        WHEN c_fcode_rej.                  " To reject selected record
          PERFORM app_timesheet USING c_rej_status.
      ENDCASE.                             " CASE E_UCOMM
    ENDFORM.                               " EVENT_UCOMM
    *  FORM APP_TIMESHEET                                                  *
    *  To get the selected records and update the records in database      *
    *   --> pr_status type char01                                          *
    FORM app_timesheet USING pr_status TYPE char01 .
    * Local data declaration......
      DATA:
       lt_marked_rows TYPE lvc_t_roid,     " Table to get rowid
       l_fs_marked_row LIKE LINE OF lt_marked_rows.
                                           " Field-string for lt_marked_rows
    * To get all the selected rows in the table lt_marked_rows
      CALL METHOD g_alv->get_selected_rows
        IMPORTING
          et_row_no = lt_marked_rows.
    * Reading each row id and updating the database.
      LOOP AT lt_marked_rows INTO l_fs_marked_row.
    * Reading the table t_timesheet with rowid
        READ TABLE t_timesheet INTO fs_timesheet INDEX
                                                 l_fs_marked_row-row_id.
    * If record is there in the table.
        IF sy-subrc EQ 0.
          CLEAR fs_timesheet-appstatus.
          GET PARAMETER ID 'ZEMPID' FIELD w_empid.
    * Changing the appstatus.
          fs_timesheet-appstatus = pr_status.
          fs_timesheet-approvedby = w_empid.
    * Updating the database table.
          UPDATE zcl_timesheet FROM fs_timesheet.
          IF sy-subrc EQ 0.
           fs_temp-empid = fs_timesheet-empid.
           fs_temp-workdate = fs_timesheet-workdate.
           fs_temp-linenum  = fs_timesheet-linenum.
           append fs_temp to t_temp.
          ENDIF.                           " IF SY-SUBRC EQ 0.
        ENDIF.                             " IF SY-SUBRC EQ 0
      ENDLOOP.                             " LOOP AT LT_MARKED_ROWS...
      perform delete_data .
      PERFORM refresh_table USING pr_status.
    ENDFORM.                               " APP_TIMESHEET
    *  FORM CHECK_CHANGED_DATA                                             *
    *  To change the data                                                  *
    *  No parameters are passsed to this subroutine                        *
    FORM check_changed_data .
    * To change the data.
      CALL METHOD g_alv->check_changed_data.
    ENDFORM.                               " CHECK_CHANGED_DATA
    *  FORM REFFRESH_TABLE                                                 *
    *  To refresh output table and  issue message according p_status       *
    *  -->PR_STATUS TYPE CHAR01                                            *
    FORM refresh_table  USING pr_status TYPE char01.
    * To refresh output table.
      CALL METHOD g_alv->refresh_table_display.
    * Depending upon pr_status message is given.
      IF pr_status EQ c_approve_status.
        MESSAGE s001.
      ELSE.
        MESSAGE s002.
      ENDIF.                               " IF P_STATUS EQ C_APPROVE_STATUS
    ENDFORM.                               " REFRESH_TABLE
    *  FORM SET_TITLEBAR                                                   *
    *  To set titlebar on the screen 100.                                  *
    *  -->PR_STATUS TYPE CHAR01                                            *
    FORM set_titlebar USING pr_status TYPE char01.
    * If pr_status eq 'X'.
      IF pr_status EQ c_boolean_yes.
        SET TITLEBAR c_alv_scr WITH text-017.
      ELSE.
        SET TITLEBAR c_alv_scr WITH text-018.
      ENDIF.                               " IF P_STATUS EQ C_BOOLEAN_YES
    ENDFORM.                               " SET_TITLEBAR
    *  FORM USER_COMMAND                                                   *
    *  According to sy-ucomm the action is performed in the screen 100     *
    *  No parameters are passsed to this subroutine                        *
    FORM user_command .
      CASE sy-ucomm.
    * If p_app is selected, submitted data will be displayed for approval
        WHEN c_fcode_onli OR c_fcode_approve.
          CLEAR sy-ucomm.
    * To display the submitted records.
          IF p_app EQ c_boolean_yes.
            w_submit = c_boolean_yes.
    * To get submitted records
            PERFORM get_data.
          ENDIF.                           " IF P_APP EQ C_BOOLEAN_YES
    * To display all records according to selection.
          IF p_disp EQ c_boolean_yes.
            w_display = c_boolean_yes.
    * To display
            PERFORM display_all.
            CLEAR w_display.
          ENDIF.                           " IF P_DISP EQ C_BOOLEAN_YES
         IF p_sdn EQ c_boolean_yes.
           PERFORM GET_GRAPH.
         ENDIF.
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " USER_COMMAND
    *  FORM  DISPLAY_ALLRECORDS                                            *
    *  To display all the records in the display mode                      *
    *  No parameters are passsed to this subroutine                        *
    FORM display_allrecords .
      CLEAR w_display.
      PERFORM build_fcatd USING 'T_TIME' 'WORKDATE'     text-002 '1'.
      PERFORM build_fcatd USING 'T_TIME' 'EMPID'        text-009 '2'.
      PERFORM build_fcatd USING 'T_TIME' 'PROJECTID'    text-003 '3'.
      PERFORM build_fcatd USING 'T_TIME' 'PROJECTNAME'  text-004 '4'.
      PERFORM build_fcatd USING 'T_TIME' 'OBJECTID'     text-005 '5'.
      PERFORM build_fcatd USING 'T_TIME' 'OBJECTNAME'   text-006 '6'.
      PERFORM build_fcatd USING 'T_TIME' 'ACTIVITYID'   text-007 '7'.
      PERFORM build_fcatd USING 'T_TIME' 'ACTIVITYNAME' text-008 '8'.
      PERFORM build_fcatd USING 'T_TIME' 'TIMEWORKED'   text-010 '9'.
      PERFORM build_fcatd USING 'T_TIME' 'DESCRIPTION'  text-011 '10'.
      PERFORM build_fcatd USING 'T_TIME' 'APPSTATUS'    text-012 '11'.
      PERFORM build_fcatd USING 'T_TIME' 'BILLSTATUS'   text-016 '12'.
      PERFORM build_fcatd USING 'T_TIME' 'SDNSTATUS'    text-019 '13'.
      PERFORM build_fcatd USING 'T_TIME' 'MNGCOMMENT'   text-014 '14'.
      PERFORM alv_display USING t_time t_fcat.
    ENDFORM.                               " DISPLAY_ALLRECORDS
    *  FORM SUBMITTED_RECORDS                                              *
    *  To display submitted records for the manager to approve             *
    *  No parameters are passsed to this subroutine                        *
    FORM submitted_records .
      CLEAR w_submit.
    * To create object for instance g_events
      CREATE OBJECT g_events.
    * If w_first equal to space
      IF w_first IS INITIAL.
        SET HANDLER g_events->toolbar
                FOR g_alv.
        w_first = c_boolean_yes.
      ENDIF.                               " IF W_FIRST IS INITIAL..
      SET HANDLER g_events->user_command
              FOR g_alv.
      g_fcatlayo-sel_mode = c_approve_status.
      REFRESH t_fcat.
      * to fill ur field cat table.
    ENDFORM.                               " SUBMITTED_RECORDS
    * FORM DELETE_DATA                                                     *
    * This form is used to delete thedata from output table after updating *
    * the database                                                         *
    * No parameters are passsed to this subroutine                         *
    form delete_data .
       loop at t_temp into fs_temp.
         loop at t_timesheet into fs_timesheet where
                             empid = fs_temp-empid
                         and workdate = fs_temp-workdate
                         and linenum = fs_temp-linenum.
          delete  t_timesheet index sy-tabix.
          endloop.                         " LOOP AT T_TEMP INTO FS_TEMP
       endloop .                           " LOOP AT T_TIMESHEET INTO FS_T..
    endform.                               " DELETE_DATA
    Hope it helps you.
    Regards
    Manjari.

  • To disable the Application tool bar button in ALV report

    Hi Everyone,
    Iam using REUSE_ALV_GRID_DISPLAY to display ALV report.
    Now my requirement is to disable(I mean grey out) a application tool bar button.
    Thanks in advance
    Moderator message: please search for available information and try yourself before asking.
    locked by: Thomas Zloch on Sep 23, 2010 11:38 AM

    We can disable the buttons on the application toolbar as below.
    *To Exclude a few buttons from the Application tool bar
    data: it_excluding type slis_t_extab.
    data: wa_excluding type slis_extab.
    wa_excluding-fcode = '&OUP'.
    append wa_excluding to it_excluding.
    wa_excluding-fcode = '&ILT'.
    append wa_excluding to it_excluding.
    wa_excluding-fcode = '&ODN'.
    append wa_excluding to it_excluding.
    and in the FM.....
    call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            i_callback_program      = sy-repid
            i_callback_pf_status_set = 'ZPICK'
            is_layout               = itlayout
            i_callback_user_command =  'LIST1'
            i_grid_title            = <fs>
    *       i_callback_top_of_page  = ' '
            it_fieldcat             = itfieldcat[]
            it_excluding            = it_excluding
    But,no idea on how to disable the  whole application tool bar itself ?
    K.Kiran.

  • Display of push button in the application tool bar in an ALV report

    Hello everyone,
    Query:
    Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
    On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?

    Hiii..
    I have written a sample code for You
    <b>"Call the below FunctionModule For Displaying The List
    " And see the bolded line in the Below FunctionModule
    " STANDARD_02 and USER_COMMAND are the subroutine Names</b>
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       i_callback_program             = sy-repid
       <b>i_callback_pf_status_set       = 'STANDARD_02'</b>
      <b> i_callback_user_command       = 'USER_COMMAND '</b>
       i_structure_name               =  'ZST_SCARR'
       is_layout                      = is_layout
       it_fieldcat                    = gt_fieldcat[]
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      is_sel_hide                    = is_sel_hide
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       it_events                      = e03_lt_events[]
      IT_EVENT_EXIT                  =
      is_print                       = t
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = it_scarr
    EXCEPTIONS
       program_error                  = 1
       OTHERS                         = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       FORM PF_STATUS_SET
    <b>" Here Set A Button In Application Toolbar Using PF- Status</b>
    FORM standard_02 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'STANDA02' EXCLUDING extab.
    ENDFORM.                    "STANDARD_02
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->RS_SELFIELDtext
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    <b> "menubutton with functioncode GOTO's Action</b>
        WHEN  'GOTO'.  
          READ TABLE it_scarr INDEX rs_selfield-tabindex. "cursorposit.
          IF sy-subrc = 0.
            WRITE:/ it_scarr-carrid,
                  /  it_scarr-carrname.
          ENDCASE.
    ENDFORM.                    "USER_COMMAND<b></b>
    Hope it helps..
    Regards,
    Simy

  • Re: ALV Grid Application Tool Bar

    Dear Experts,
                 I am displaying a report in ALV grid. In the application tool bar. 'save layout' and 'change layout' icons were missing.if i want to put those icons on application tool bar where i have to change? if anybody knows pls. help on this.
    Thanks in advance.
    Thanks and regards,
    Harish babu

    Hello Harish
    The parameter I_SAVE (of method SET_TABLE_FOR_FIRST_DISPLAY) can have several setting(<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/bf/3bd1369f2d280ee10000009b38f889/content.htm">ALV Grid Control</a>):
    I_SAVE
    Determines the options available to the user for saving a layout:
    'X':         global saving only
    'U':         user-specific saving only
    'A':         corresponds to 'X' and 'U'
    SPACE:       no saving
    In addition, you have to provide parameter IS_VARIANT:
    IS_VARIANT
    Determines the layout to be used for displaying the output table. If you use this parameter, you must at least fill field REPORT of the structure of type DISVARIANT
    Regards
      Uwe

  • Push button in the application tool bar in the standard LDB PNP

    Hi ABAPERS,
    I have a  requirement that in the selction screen to use the standard LDB PNP beyond that I need to pass one push button in the selection screen 1000 ( in the application tool bar beside execute button) actually i  passes the push button in the gui status but its not refelcting in the output  and in the initilization event also i passed even then its noty working,
    initialization.
      move 'Cluster ID'(010) to sscrfields-functxt_01.
    Thanks and Regards,
    Deepthi.

    Pavan,
    write code like this
    TABLES: USR02,       "Logon data
            SSCRFIELDS.  "FIELDS ON SELECTION SCREENS
    STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT
    SELECTION-SCREEN: FUNCTION KEY 1.
    SELECTION-SCREEN begin of BLOCK b1.
      PARAMETERs p1 type i.
      SELECTION-SCREEN end of BLOCK b1.
    INITIALIZATION.
    SCREEN ICON LEFT AND RIGHT
      SSCRFIELDS-FUNCTXT_01 = 'Button'.
      start-OF-SELECTION.
    Thanks
    Bala Duvvuri

  • Is it Possible to display the output of the ALV list as POP-UP

    Hi Experts,
                     Is it Possible to display the output of the ALV list as POP-UP, if yes then provide some ideas on it.
    thanking in advance,
    Samad.

    Hi samad, it is possible to display alv list as pop-up by using the FM " REUSE_ALV_POPUP_TO_SELECT"
    try this sample code
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
          EXPORTING
       I_TITLE                       =  P1_TITLE
           I_SELECTION                   = 'X'
           I_ZEBRA                       = 'X'
      I_CHECKBOX_FIELDNAME          =
      I_LINEMARK_FIELDNAME          =
      I_SCROLL_TO_SEL_LINE          = 'X'
            I_TABNAME                     = 'T_VBAP'
           I_STRUCTURE_NAME              =  'T_VBAP'
           IT_FIELDCAT                   =  T_FCAT2
           I_CALLBACK_PROGRAM            = 'ZTEST_ALV_POPUP'
       IMPORTING
           ES_SELFIELD                   = I_SELFIELD
           E_EXIT                        = W_EXIT
          TABLES
            T_OUTTAB                      = T_VBAP.
    i think it will solve your problem
    Regards,
    Vijay

  • Excel output for the xml publisher report when it is [b]scheduled [/b]

    How to get the excel output for the xml publisher report when it is scheduled by a apps user? Like what is the user profile option (for the apps user who runs the report) and what are the other things that needs to be taken care of so that only this xml publisher report run by this apps user produces a EXCEL output (When scheduled) ???
    Really appreciate it if any one can help me in this regards.
    Thanks
    Munna

    Hi Munna,
    For eBusiness Suite (apps user) the report output is stored the same way whether executed immediately or scheduled.,To get excel set the options > output format to Excel. Only the user that submitted the report can view it, or you can get the output file from the server. Or you can set the notify option so that a Workflow Notification is sent when the request completes.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • How can i disable a button in the application tool bar of a standard trans?

    Hi Experts,
       I want to disable the create button in the application tool bar of the standard transaction cv03n. Is there any method?

    Hi,
    In the include 'LCV110F19', the GUI is being called for the screen.
    This is the actual code being called.
    WHEN c_dms_create.
          SET PF-STATUS 'D100CREATE'.
          SET TITLEBAR  'D100CREATE'.
    You can try to code something like below.
    DATA: itab TYPE TABLE OF sy-ucomm.
    APPEND 'CREATE' TO itab.
    SET PF-STATUS 'D100CREATE' EXCLUDING itab.
    Kindly reward points by clikcing the star on the left of reply,if it helps.

  • Add bottons on the application tool bar of the standard selection screen

    Hi All,
    I am having the standard selection screen in module pool programing. I wnat to add the bottons on the application tool bar of the standard selection screen.and hide the existing bottons (like std. execute and i bottons.)instead of these i want to give my won bottons like create and display.
    pls help on this.

    Hi Sridhar,
      Try the Code below. It places two buttons on the selection-screen along with the execute button.
    TABLES sscrfields.
    PARAMETERS: p_carrid TYPE s_carr_id,
                p_cityfr TYPE s_from_cit.
    SELECTION-SCREEN: FUNCTION KEY 1,
                      FUNCTION KEY 2.
    INITIALIZATION.
      sscrfields-functxt_01 = 'LH'.
      sscrfields-functxt_02 = 'UA'.
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
          WHEN'FC01'.
          p_carrid = 'LH'.
          p_cityfr = 'Frankfurt'.
        WHEN 'FC02'.
          p_carrid = 'UA'.
          p_cityfr = 'Chicago'.
      ENDCASE.
    START-OF-SELECTION.
      WRITE / 'START-OF-SELECTION'.
    Just go to the table sscrfields to knoe the fields in it. I think this clears the issue.
    Regards,
    Swapna.

  • Application Builder removing the menu and tool bar

    In Labview 8 we can use the application builder to disable the tool bar on the VI when during the build. Under Labview 8.2, the source file setting no longer affects the menu and tool bar of the top level VI. In my particuliar case, I want to remove the ability of a user to abort the VI from running after the application build, but I want the abort ability during the debugging phase.
    Under Labview 8.2, you have to alter the custom window for the VI. In the previous version, you can do it on the build module.

    Have you tried to set the properties of the Main VI being built?  It should default to these settings but you can still change them.  See attached picture from 8.20
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
    Attachments:
    AppBuilder8_20.JPG ‏51 KB

  • How to disable ikons on the Application tool bar in module pool

    Hi Guys,
    I am working in module pool.
    I had three ikons on the Application tool bar .
    i am creating transactions for create,change and display.
    for display transaction i want to disable the ikons on the Application tool bar .
    Can any one help me in this regard.
    Regards
    Ram
    Message was edited by:
            ram kumar

    Hi
    go to layout
    double click on the button
    it will display button properties
    in that below u will find 3 tab strips
    like
    dict program  display
    click on display
    click on check box for invisible
    so that will become invisible
    reward if usefull

  • How to create print button in the Application tool bar in the Std.SAPscreen

    Hi,
        I want to create a print button in Production order display:header screen in  CO03 transaction.In that after Viewer button(i.e. in application tool bar) ,I have to create this print button. Can anyone suggest me How do i need to proceed further?

    hi,
    Use this code..
    REPORT  Z_TEST999                               .
    DATA itab TYPE TABLE OF sy-ucomm.
    PARAMETERS test(10) TYPE c.
    AT SELECTION-SCREEN OUTPUT.
      APPEND: 'E' TO itab.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
           EXPORTING
                p_status  = sy-pfkey
           TABLES
                p_exclude = itab.
    Regards,
    Sailaja.

Maybe you are looking for

  • Having issues with MacBook Pro and Verizon Mobile Hotspot

    Hey everyone, I bought a MacBook Pro with the Lion OS. I recently switched to Verizon and got an HTC Thunderbolt so I could use it as a hotspot at home and when I travel. The problem I am having is when I turn the Mobile Hotspot on is, it will connec

  • "RT Set date and time" does not set seconds in UTC mode

    Hallo, I tried to set the time on my cRio 9012 with the function settimeUTC which is used by the "Set Date and Time" vi. But the seconds I enter are ADDED to the current time and not set as new value. Even the vi shows this behaviour: I set up a vi i

  • Giving OR Statement in formula evaluates only one condition

    This is the formula I used in the reports record selection. I need to display the records in division number = 9 and division number = 20 and need records where other field top account = true as well in the reports. But it displays only first conditi

  • USB not powering external drive on new macbook pro

    My new macbook pro retina display is not powering an external 750GB GDrive moblie. Is anyone having this problem?

  • Visio UML - Long object lifetime run out of connector points

    I have a sequence diagram that is attempting to model a relatively long business process over a large number of objects. the problem is that as I extended the object lifetime swimlane I run out of connector points the automatically appear on the line