Refreshing ALV titlebar

Hi Experts,
   I am using CL_GUI_ALV_GRID class to show ALV output in via docking container.
   I am setting my ALV titlebar like following.
   if gv_titlebar = 'CHANGE'.
      ls_layout-grid_title = 'Change history'.
   elseif gv_titlebar = 'DELETE'.
      ls_layout-grid_title = 'History of deleted entries'.
   endif.
   ls_layout is the layout structure of ALV grid. Firstly it show 'Changed history'. Then when I check for delete, second title is set.
but 'change history' only is displayed. Value is correctly assigned. I checked in debugging. But it is not refreshed in ALV display.
refresh_table_display method is also called. Still it is not updated in output. Kindly help me out.
Thanks and regards,
Venkat.

Hi Venkat,
In the User Command, populate the Layout Structure with new Title and call the method SET_FRONTEND_LAYOUT as follows.
ls_layout-grid_title = 'History of deleted entries'.
      CALL METHOD o_grid->set_frontend_layout
        EXPORTING
          is_layout = ls_layout.
Thanks and Regards,
Rathish R Nair
Edited by: Rathish R Nair on Mar 25, 2011 7:56 AM

Similar Messages

  • REFRESH ALV

    HI
    I WANT TO REFREAH ALV AFTER I PRES ON BUTTON.
    WHEN I USE REUSE_ALV_GRID_DISPLAY
    IN USER-COMMAND I USE
    FORM USER_COMMAND USING P_UCOMM TYPE SYUCOMM
                            P_SELFIELD TYPE SLIS_SELFIELD.
    P_SELFIELD-REFRESH = 'X'
    how can i refresh when i use class
    CL_SALV_TABLE?
    thanks
    have nice day

    hi yossi,
    check these links..
    Refresh in ALV.
    Alv Grid and Refresh Button
    ALV grid Refresh.
    http://www.sap-img.com/abap/how-to-refresh-alv-list-grid-once-it-is-displayed.htm
    http://sap.ittoolbox.com/groups/career/SAP-CAREER/refresh-alv-report-421919
    Re: Refresh ALV with a new value
    Re: Update/refresh ALV grid

  • Refreshing ALV when action is triggered using button

    Hello Friends,
    I have a drop down list having 3 values "Last 30 Days", "Last 60 Days" and "Last 90 Days". If I select Last 30 Days and click on button "Search" it gives me record for the last 30 days. But, if I click again on "Last 60 Days" it duplicates the record that was already in. So it does not refresh the previous result. I have added the code as below to refresh ALV but, it refresh the table but not the ALV. My View name is "MY PO INVOICES" and the context node name is 'MY_PO_INV' .
    DATA ln_node type REF TO if_wd_context_node.
    ln_node = wd_context->get_child_node( 'MY_PO_INV' ).
    ln_node->invalidate( ).
    Please let me know how do I refresth the result in the ALV display when I trigger the event.
    Thks & Rgds,
    Hemal

    Hello All,
    Thanks very much for your responses. I tried to bind the alv table. But, I think I am doing some thing wrong here. Below is my code. Please let me know where I am doing wrong. Appreciate your help.
    lv_thirtydays = 'LAST 30 DAYS'.
    lv_sixtydays = 'LAST 60 DAYS'.
    lv_ninetydays = 'LAST 90 DAYS'.
    if ZDAYS = lv_thirtydays.
          lv_zpostingdate = sy-datum - 30.
          ENDIF.
    lv_zpostingdate_to = sy-datum.
        if ZDAYS = lv_sixtydays.
           lv_zpostingdate = sy-datum - 60.
       ENDIF.
        if ZDAYS = lv_ninetydays.
           lv_zpostingdate = sy-datum - 90.
       ENDIF.
    ln_node = wd_context->get_child_node( 'MY_PO_INV' ).
    ln_node->invalidate( ).
    LOOP AT lt_context_value_set INTO cocd_context_value_set.
       lv_zcompany = cocd_context_value_set-text.
       lv_zusername = username.
       lv_zdays = ZDAYS.
       CALL FUNCTION 'ZEBP_MY_PO_INV_SEARCH'
       EXPORTING
        bldat =                          lv_zpostingdate
        bldat_to =                      lv_zpostingdate_to
        bukrs =                         lv_zcompany
        usnam =                       lv_zusername
        ZDAYS =                      lv_zdays
       tables
        invsrch        = zsearch.
    ln_node->bind_table( zsearch ) .
    SORT zsearch BY zcompany.
    DATA lo_nd_get_po_inv TYPE REF TO if_wd_context_node.
    lo_nd_get_po_inv = wd_context->get_child_node( name = wd_this->wdctx_my_po_inv ).
    CALL METHOD lo_nd_get_po_inv->bind_table
      EXPORTING
        new_items            = zsearch.
    ENDLOOP.
    Thks & Rgds,
    Hemal

  • Refresh alv list display

    Hi,
    how to refresh an ALV LIST display?
    Thanks.

    Hi,
    Content and Structure Change
    Use
    You are able to change the internal data table in various ways. Depending on which type of change you use, you  have to proceed differently to make the change visible on the front end in the ALV output as well.
    You are able to make the following changes:
    ·        You change content or the sequence of the individual data records
    Afterwards you need to refresh the ALV output
    ·        You replace the entire data table
    Refresh Display of the ALV Output
    If you have changed single values, added rows or deleted rows in the data table of list-type ALV outputs, you need to complete these changes in the ALV output as well by refreshing the ALV display.
    For Changes in the Tree Structure you do not have to refresh the display. In the other ALV tools, you do not have to refresh the ALV output when you make the following changes:
    §         Changes to the Display of Columns
    §         Changes Sequence of Columns in the ALV display
    §         Changes to the DDIC Reference of Columns
    By default, the ALV output automatically scrolls to the beginning. However, you are able to determine that the current display (position on the screen) not be changed.
    You are able to refresh the ALV output in two ways:
    ·        All settings for filters and sorting remain.
    This setting can lead to newly inserted data records not being displayed because the filter setting hid exactly these data records.
    ·        All settings for filters and sorting remain.
    Features
    For changes to content and structure, you are able to make the following settings:
    ·        Refresh ALV output
    ·        Swap the data table of the ALV output
    Refresh ALV output
    With the refresh, you ensure that the changed values are available on the front end as well.
    Display type
    ALV Tool
    Classic ABAP list
    Full screen
    In the Container
    Simple, two-dimensional table
    Yes
    Yes
    Yes
    Hierarchical-sequential list
    Yes
    Tree structure
    No
    No
    Methods
    Function
    Class
    Method
    Refresh ALV output without deleting filter and sort settings
    CL_SALV_TABLE
    CL_SALV_HIERSEQ_TABLE
    REFRESH
    (Parameter REFRESH_MODE: SOFT)
    Refresh ALV output and delete filter and sort settings
    REFRESH
    (Parameter REFRESH_MODE: FULL)
    Change the Structure of the Data Table with SET_DATA
    Depending on which ALV tool you are using, the parameters of the SET_DATA method are different:
    If you assign a new structure with SET_DATA, all objects that referred to the previous structure will be deleted such as all sort objects in list-type ALV outputs or all node objects in tree structures.
    Methods
    Function
    Class
    Method
    Change structure and data table
    CL_SALV_TABLE
    CL_SALV_HIERSEQ_TABLE
    CL_SALV_TREE
    CL_SALV_HIERSEQ_LEVEL
    SET_DATA
    Change the Structure of the Data Table with the SET_DATA Method
    ALV Tool
    Parameter
    Remarks
    Simple, two-dimensional table
    T_TABLE
    Table for structure and contents of the ALV output
    Hierarchical-sequential list
    (in CL_SALV_HIERSEQ_TABLE)
    LEVEL
    Hierarchy level whose structure you wish to change
    T_TABLE
    New table of hierarchy level
    T_BINDING
    List of up to five foreign-key relationships
    (in CL_SALV_HIERSEQ_LEVEL)
    VALUE
    New table of hierarchy level
    T_BINDING
    List of up to five foreign-key relationships
    Tree structure
    T_TABLE
    Initial table
    Empty table, only sets the structure

  • Refresh ALV list?

    Dear experts,
    I have used REUSE_ALV_GRID_DISPLAY to display some data of an internal table. I modified it and I need to display the refreshed data again.
    How can I do that?
    Thank you...
    Roxani

    Hi,
    In ALV, to refresh the table you have to call the method "refresh_table_display". 
    It has the syntax very similar to creating the table. 
    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed) 
    or 
    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
    the synatx is :-
    <b>call method grid (name of grid )->refresh_table_display
    exporting
    IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)</b>
    <b>I_SOFT_REFRESH = <VARIABLE OF CHAR 01>  (THIS IS FOR ICON REFRESHING).</b>
    <b>Refresh grid display</b>
    Use the grid method REFRESH_TABLE_DISPLAY
    <b>Sample code:-</b>
    http://www.erpgenie.com/sap/abap/controls/alvgrid.htm#Refresh%20grid%20display
    TO refresh the ALV Lsit :
    http://www.sap-basis-abap.com/abap/auto-refresh-alv-list.htm
    Regards
    Sudheer

  • Refresh ALV ( Internal Table Will Be Change)

    Hi friends
    I am using 2 internal table. And they have their own field catalog. I can refresh alv grid.
    If my refresh data have stuation 1 I am using Inta another stuation I am using Intb.
    How can I refresh my ALV grid with different catalog and internal table?

    Hi,
    yes you can do that,
    Check this sample code, in your case you have to use two performs for display. with the help of SELFIELD-EXIT = 'X'. you can get what you want.
    REPORT  ZTEST_ALV.
    type-pools:slis.
    DATA: GT_SFLIGHT TYPE TABLE OF SFLIGHT.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          FIELDCAT type SLIS_FIELDCAT_ALV.
    data: l_layout type SLIS_LAYOUT_ALV.
    SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        I_PROGRAM_NAME         = sy-repid
        I_STRUCTURE_NAME       = 'SFLIGHT'
        I_INCLNAME             = sy-repid
      CHANGING
        CT_FIELDCAT            = gt_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.
    perform alv_display.
    *&      Form  status
    *       text
    form status USING P_EXTAB TYPE SLIS_T_EXTAB  .
      set pf-status 'AAA' excluding p_extab.
    endform.                    "status
    *&      Form  USER_COMMAND
    *       text
    *      -->P_UCOMM    text
    *      -->P_SELFIELD text
    FORM USER_COMMAND USING    P_UCOMM    LIKE SY-UCOMM
          P_SELFIELD TYPE SLIS_SELFIELD.
      case p_ucomm.
        when 'TEST'.
            fieldcat-no_out = 'X'.
            modify gt_fieldcat from fieldcat
                   transporting no_out where fieldname = 'PRICE'.
    p_selfield-exit = 'X'.
    perform alv_display.
    endcase.
    ENDFORM.                    "USER_COMMAND
    *&      Form  alv_display
    *       text
    FORM alv_display .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        IS_LAYOUT                = l_layout
        I_CALLBACK_PROGRAM       = sy-repid
        I_STRUCTURE_NAME         = 'SFLIGHT'
        I_CALLBACK_PF_STATUS_SET = 'STATUS'
        I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
        IT_FIELDCAT              = GT_FIELDCAT[]
      TABLES
        T_OUTTAB                 = GT_SFLIGHT.
    ENDFORM.                    " alv_display
    Regards
    vijay

  • Refreshing alv but how?

    while using alv, how can we refresh it?
    if it is not first display then of course will be refreshed but how, I do not know.
    Anyone that can help me?
    How it is understood that it is refreshed?
    When clicked a tool or button?
    Thanks in advance.
    Deniz.

    See The example COde :
    REPORT Z_GET_REFRESH no standard page heading.
    type-pools : slis.
    tables : makt,
             mara.
    data : i_fieldcat type slis_t_fieldcat_alv.
    CONSTANTS :
      gc_refresh TYPE syucomm VALUE '&REFRESH'.
    data : begin of i_makt occurs 0,
           matnr like makt-matnr,
           maktx like makt-maktx,
           end of i_makt.
    data : v_repid like sy-repid,
           g_user_command type slis_formname value 'USER_COMMAND',
           g_status_set   type slis_formname value 'SET_PF_STATUS',
            lt_event_exit TYPE slis_t_event_exit,
            ls_event_exit TYPE slis_event_exit.
    DATA:LC_GLAY TYPE LVC_S_GLAY.
    select-options s_matnr for mara-matnr .
    start-of-selection.
      select matnr maktx from makt into table i_makt
                                  where matnr in s_matnr.
    end-of-selection.
    Fill the fieldcatlog
      perform fill_field.
    Call the FM
      perform call_fm.
    *&      Form  fill_field
          text
    -->  p1        text
    <--  p2        text
    FORM fill_field.
      data wa_fieldcat type slis_fieldcat_alv.
      clear : wa_fieldcat.
      wa_fieldcat-tabname = 'I_MAKT'.
      wa_fieldcat-fieldname = 'MATNR'.
      wa_fieldcat-outputlen = '18'.
      wa_fieldcat-seltext_l = 'Material #'.
      wa_fieldcat-col_pos = '1'.
      append wa_fieldcat to i_fieldcat.
      clear : wa_fieldcat.
      wa_fieldcat-tabname = 'I_MAKT'.
      wa_fieldcat-fieldname = 'MAKTX'.
      wa_fieldcat-outputlen = '40'.
      wa_fieldcat-seltext_l = 'Material Desc'.
      wa_fieldcat-col_pos = '2'.
      append wa_fieldcat to i_fieldcat.
    ENDFORM.                    " fill_field
    *&      Form  call_fm
          text
    -->  p1        text
    <--  p2        text
    FORM call_fm.
      v_repid = sy-repid.
      LC_GLAY-EDT_CLL_CB = 'X'.
      CLEAR ls_event_exit.
      ls_event_exit-ucomm = gc_refresh.    " Refresh
      ls_event_exit-after = 'X'.
      APPEND ls_event_exit TO lt_event_exit.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
          I_CALLBACK_PF_STATUS_SET          = g_status_set
          I_CALLBACK_USER_COMMAND           = g_user_command
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
        I_GRID_SETTINGS                   = LC_GLAY
      IS_LAYOUT                         =
          IT_FIELDCAT                       = i_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
       IT_EVENT_EXIT                     = lt_event_exit
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_makt
       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.
    ENDFORM.                    " call_fm
          FORM USER_COMMAND                                             *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                rs_selfield TYPE slis_selfield.                 "#EC CALLED
      data i_RSPARAMS like RSPARAMS occurs 0.
      CASE R_UCOMM.
        WHEN '&IC1'.
          read table i_makt index rs_selfield-tabindex.
          SET PARAMETER ID 'MAT' FIELD i_makt-matnr.
          if not i_makt-matnr is initial.
            call transaction 'MM02' and skip first screen.
          endif.
        when '&REFRESH'.
          CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
            EXPORTING
              CURR_REPORT           = v_repid
    IMPORTING
      SP                    =
            TABLES
             SELECTION_TABLE       = i_RSPARAMS
           EXCEPTIONS
             NOT_FOUND             = 1
             NO_REPORT             = 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.
          submit z_get_refresh with selection-table i_RSPARAMS.
          rs_selfield-refresh = 'X'.
      ENDCASE.
      MOVE '&REFRESH' TO r_ucomm.
    ENDFORM.
          FORM set_pf_status                                            *
    FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
    DELETE Rt_extab WHERE fcode = gc_refresh.
      SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
          EXCLUDING Rt_extab.
    *SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.
      SET TITLEBAR  sy-tcode.
    ENDFORM.
    Reward Points if it is helpful
    Thanks
    Seshu

  • After refreshing ALV display, set it to the current cell that was modified.

    Hello Experts,
    I am currently using cl_gui_alv_grid for my ALV grid display. I have 1 editable column
    which lets users input values. Now, When users press 'ENTER' in the keyboard I refresh
    the ALV display to reflect the changes done. But the display always "moves back" to the first column
    so it is tiresome to find the current cell that was modified. My question is, how do I set the ALV
    display to just "stay put" in the current cell that was modified after pressing 'ENTER'?
    Hope you can help me guys.Thank you and take care!

    Check this link
    ALV scroll bar

  • Saving Layout's attributes after refresh ALV

    Hello,
    I use CL_SALV_TABLE class for ALV printing.
    I start the ALV with Layout variant which has sort & other attributes.
    From the ALV screen I run other screens and when I go back to ALV screen,
    I refresh the ALV table --> gr_table->refresh( ), to have updated data.
    The problem is that after refreshing the table, it forgets the Layout attributes and
    Don't sort as it requires in the specified layout.
    What I have to do for save the layout attributes?
    Thank you for your help,
    Fariba

    If you set
    wa_layout-NO_TOOLBAR = 1.
    it won't work
    but try
    wa_layout-NO_TOOLBAR = 'X'.
    -  it works

  • Refresh alv grid after user clicks f4( value-request)

    Hello Experts,
    I am currently developing a module pool program wherein after the user selects a value via f4(value request),
    my ALV grid(using custom control) should be refreshed to show the new records selected based
    on the f4 value. How can this be achieved?
    thank you guys and take care!

    Did you try a CALL METHOD [cl_gui_cfw=>set_new_ok_code|http://help.sap.com/saphelp_sm32/helpdata/en/06/3fa1b79f2811d2bd68080009b4534c/frameset.htm] and [=>flush|http://help.sap.com/saphelp_sm32/helpdata/EN/06/3fa1879f2811d2bd68080009b4534c/content.htm] in the POV section or in event onF4 handler method to force execution of PAI (either it works either it dumps)
    Regards,
    Raymond

  • Refresh alv grid

    i have an alv grid with 4 rows
    i mark 1 line and click on button and  now i have 3 lines and i see it in debug
    but when i get back to screen i see 4
    i try refresh-table_display
    any idea....,

    If line is deleted from internal table and you call refresh_table_display, it should refresh the table.
    Please check you are not reselecting data in PBO.
    Regards,
    Mohaiyuddin

  • Problem in refreshing ALV data in container (OOALV)

    Hello Experts, Good Day.
    I am developing a Modulepool program which is having two screens, one (101) is for Entering data (used TC with wizard) then saves it in database table and another screen (102) is to display saved data. Now I am facing problem in second screen (102).
    The problem I am facing is when I am displaying/calling 102 screen for multiple times, the internal table is getting updated but the previous ALV data is not getting updated/modified.
    I have searched the forum and found some methods/procedures for refreshing the data but I am not able to achieve this.
    Methods I found and Problems with them:
    1. FREE the Container and Grid objects usng FREE( ) method.
    If I free boht the Container and Grid objects data getting updated but another all the columns are getting displayed twice for second time, thrice for third time and so on... I have coded for this in PBO of 102 Screen.
    If I Free only Grid object, totally the table is getting disappeared when I display ALV Second time.
    2. When I use Refresh the table using CALL METHOD LR_GRID->REFRESH_TABLE_DISPLAY( ) then only second time the ALV is getting refreshed but if I display further it is displaying 2nd ALV data from 3rd time onwards (not getting updated from 3rd time).
    Coded as below in PBO OF 102 Screen:
    IF LR_GRID IS BOUND.
       CALL METHOD LR_GRID->REFRESH_TABLE_DISPLAY( ).
    ENDIF.
       CREATE OBJECT LR_GRID
         EXPORTING
           I_PARENT          =  LR_CONT
         EXCEPTIONS
           ERROR_CNTL_CREATE = 1
           ERROR_CNTL_INIT   = 2
           ERROR_CNTL_LINK   = 3
           ERROR_DP_CREATE   = 4
           OTHERS            = 5.
       IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    3. When I use FLUSH method: this is not at all working out, I have called this after displaying ALV in PBO.
        CALL METHOD CL_GUI_CFW=>FLUSH( ).
        CALL METHOD CL_GUI_CFW=>DISPATCH( ).
    My code to display ALV which is written in PBO of 102 is attached, please find the attachment.
    Experts, please let me know where I am going wrong. I wish to know the solution in all the above ways. Please help me.
    Thanks & Regards,
    Vijay

      LR_GRID->SET_TABLE_FOR_FIRST_DISPLAY(
    *    EXPORTING
    *      I_BUFFER_ACTIVE               =
    *      I_BYPASSING_BUFFER            = 'X'
    *      I_CONSISTENCY_CHECK           =
    *      I_STRUCTURE_NAME              = 'ZGVK_MP_DEMO'
    *      IS_VARIANT                    =
    *      I_SAVE                        = 'X'
    *      I_DEFAULT                     = 'X'
    *      IS_LAYOUT                     =
        CHANGING
          IT_OUTTAB                     = GT_DATA[]
          IT_FIELDCATALOG               = LT_FCAT
    *      IT_SORT                       =
    *      IT_FILTER                     =
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4 ).
      IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • Refreshing ALV from POV

    Hi Experts,
       I have a module pool screen, in which I have an input field and under that I have OOPS alv grid control.
    I want to select a value from search help for that input field. The moment I select the value in that input field,
    according to the input field value, the content of ALV should be changed and it should be refreshed.
    How to get it, when PBO is not called, as we call POV.
    Thanks and regards,
    Venkat.

    Hi,
    Well actually SAPGUI_SET_FUNCTIONCODE is ok as soon as you are correctly refreshing your ALV in PBO...
    MODULE pbo.
      IF gr_alv IS NOT BOUND.
         "Create ALV object
      ELSE.
        gr_alv->refresh( ).
      ENDIF.
    ENDMODULE.
    MODULE pov.
      CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
    ENDMODULE.
    works perfectly on my side...
    This is also working with the use of CL_GUI_CFW=>SET_NEW_OK_CODE indeed...
    Cheers,
    m.
    Edited by: Manu D'Haeyer on Oct 14, 2011 1:45 PM

  • Refresh ALV Report

    I am using        call method cl_salv_table=>factory to display an ALV report. How to add a refresh button and then add functionality to it.

    Hi,
    In ALV, to refresh the table you have to call the method "refresh_table_display". 
    It has the syntax very similar to creating the table. 
    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed) 
    or 
    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
    the synatx is :-
    call method grid (name of grid )->refresh_table_display
    exporting
    IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
    I_SOFT_REFRESH = <VARIABLE OF CHAR 01>  (THIS IS FOR ICON REFRESHING).
    Regards,
    Bhaskar

  • Refresh ALV Report after return from dialog screen

    Hi All,
    I have developed an alv report which lists new products, when user clicks on a product it will take to custom dialog screen where user makes neccessary changes. Once the changes are done user clicks back the control comes back to the ALV report.
    My question is when they come back to ALV report it should refresh and list the new products. Basically I want to know is it possible to refresh the report when control is coming back from dialog screen to ALV report.
    Pls provide me a best way to handle this scenario.
    Regards,
    Anand

    Hi Archna
    This is the code I am using
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = v_repid
          i_callback_user_command = 'USER_COMMAND'
          i_callback_top_of_page  = 'TOP_OF_PAGE'
          i_grid_title            = i_title
          it_fieldcat             = it_fcat
          it_events               = v_events
          i_save                  = 'A'
        TABLES
          t_outtab                = it_alv_cvg.
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          READ TABLE it_alv_map INTO wa_alv INDEX rs_selfield-tabindex.
          IF sy-subrc = 0.
            SET PARAMETER ID 'ZCR' FIELD wa_alv-product.
            CALL TRANSACTION 'ZSD_PRODUCT_DIV' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.   
    After it goes to dialog when I clcik back it comes  back to the alv report.
    Now can you Pls tell me where to use the refresh.
    Regards,
    Anand

Maybe you are looking for