Clear alv container

HI,
I am displaying my ALV grid in subscreen,i am using    CALL METHOD g_alv_grid->set_table_for_first_display,it is working fine for first time but when user is changing input in first subscreen ,and click push button to call ALV grid in 2nd subscreen it is displaying previous records.how to clear the container ,I tried   CALL METHOD g_alv_grid->refresh_table_display.but no result,

Hi,
that means the problem is not with the REFRESH. since you are editing the grid the values are not updated to frontend. did you call this method in the PAI of the screen if not call this and try.
MODULE PAI INPUT.
  CALL METHOD G_GRID->CHECK_CHANGED_DATA
    IMPORTING
      E_VALID = L_VALID.
  CALL METHOD CL_GUI_CFW=>FLUSH.
  CALL METHOD CL_GUI_CFW=>DISPATCH.
okcode hadnlings here...
  CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
    EXCEPTIONS
      FINISHED = 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.
ENDMODULE.                    "pai INPUT
Regards
vijay

Similar Messages

  • Creat icon to display no of entries in ALV container

    HI,
    I have to display no of records on push button type icon,
    it should directly display no of entries like'50 hits'.Need not to give any function code,we need not to click push button,it should display like text on button,
    button should be added in alv  container tool bar.
    I am giving output in alv on subscreen

        HANDLE_TOOLBAR
            FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
                IMPORTING E_OBJECT E_INTERACTIVE.
    define gloabal variable to populate the no of records.and use the variable
      METHOD HANDLE_TOOLBAR.
        DATA: LS_TOOLBAR  TYPE STB_BUTTON.
    * append a separator to normal toolbar
        CLEAR LS_TOOLBAR.
        MOVE 3 TO LS_TOOLBAR-BUTN_TYPE.
        APPEND LS_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
    * append an icon to to save data
        CLEAR LS_TOOLBAR.
        MOVE 'TOTAL' TO LS_TOOLBAR-FUNCTION.
    <b>    MOVE ICON_SYSTEM_SAVE TO LS_TOOLBAR-ICON. "Choose your Icon</b>
        MOVE 'Save' TO LS_TOOLBAR-QUICKINFO.
    <b>    MOVE V_VAR  TO LS_TOOLBAR-TEXT.</b>
        MOVE ' '  TO LS_TOOLBAR-DISABLED.
        APPEND LS_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
        CLEAR LS_TOOLBAR.
    * append a separator to normal toolbar
        CLEAR LS_TOOLBAR.
        MOVE 3 TO LS_TOOLBAR-BUTN_TYPE.
        APPEND LS_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
         ENDMETHOD.                    "handle_toolbar
    Before creating the ALV GRID object try to populate the variable V_VAR with no of records.
    obvious you need to set the handler to appear in the toolbar.
    Regards
    vijay

  • Refreshing alv container

    I have editable alv container in a module pool which runs through transaction code.the problem is each time the editabale alv is displayed the old values remain....How can i refresh my alv container?

    Hi Priya,
    you can try with --
          CALL METHOD grid->refresh_table_display.
              CLEAR:  gh_index.
    Thanks,
    Venkat

  • Editor using ALV Container

    Hi All,
    Please anyone suggest me, how can I use text-editor in ALV container?
    Means when i execute the program, i want to see editor screen.
    Thanks
    Amit

    see
    Custom Controls
    A custom control is an area on a screen. You create them in the Screen Painter, and, like all other screen objects, they have a unique name. You use custom controls to embed controls. Controls are software components of the presentation server. Depending on the used SAP GUI, these are either ActiveX Controls or JavaBeans. They allow you to perform tasks, such as editing texts, locally on the presentation server. The control is driven by the application logic, which still runs on the application server.
    The SAP Control Framework
    The controls on the presentation server and the ABAP application programs on the application server communicate using the SAP Control Framework. The SAP Control Framework is programmed in ABAP Objects . It contains global classes that can be found in the class library under Basis ® Frontend Services. These classes encapsulate the communication between the application server and presentation server, which is implemented using Remote Function Call.
    All application controls are encapsulated in a global class. You can find the SAP Basis controls in the Class Browser under Basis ® Frontend Services or Basis ® Component Integration. Programs that use controls on a screen work with the methods and events of the global classes that encapsulates them.
    Container Controls
    Before you can work with a custom control on a screen, you must assign a SAP Container Control to it. Container controls are instances of special global classes from the SAP Control Framework. The global class for custom controls is called CL_GUI_CUSTOM_CONTAINER. To link a custom control to a container control, pass the custom control name to the constructor of the container control when you instantiate it using CREATE OBJECT.
    As well as using custom containers, you can link controls to a screen using a SAP Docking Container. This is encapsulated in the global class CL_GUI_DOCKING_CONTAINER. The SAP Docking Container does not place the control within a screen. Instead, it attaches it to one of the four edges. You can nest containers. For example, you can use the SAP Splitter Container (classes CL_GUI_EASY_SPLITTER_CONTAINER or CL_GUI_SPLITTER_CONTAINER) within other containers. This allows you to split a custom control or docking control into more than one area, allowing you to embed more than one control.
    Application Controls
    You must also create instances for the application controls that you want to place within your container - for example, a SAP Textedit Control (class CL_GUI_TEXTEDIT) or a SAP Tree Control (for which there is more than one global class - an example is CL_GUI_SIMPLE_TREE). When you instantiate the control, you pass a reference to the container in which you want to place it to the PARENT parameter of its constructor method. The container may be an instance of the class CL_GUI_CUSTOM_CONTAINER, but can also be an instance of one of the other SAP Container controls.
    Control Methods
    For information about control methods and their documentation, refer to the class definitions in the Class Builder or the SAP Library documentation. To minimize the network load between the application and presentation servers, method calls are buffered in the automation queue before being sent to the presentation server at defined synchronization points. One of the automatic synchronization points is the end of PBO processing. You can force a synchronization point in your program by calling a method that is not buffered, or by calling the static method FLUSH.
    Control Events
    Unlike screens, on which user interaction triggers the PAI event and control returns to the application server, user interaction on controls is not automatically passed back to the application server. If you want an event to be passed back to the application server, you must register it in your program using the special method SET_REGISTERED_EVENTS. For a list of the events that you can register for each control, refer to its wrapper class in the Class Builder. You can register two kinds of event handling using SET_REGISTERED_EVENTS:
    System Events (Default)
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    Application Events
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Related Information
    For further information about controls, and in particular, help on troubleshooting and optimizing synchronization, refer to BC Controls Tutorial and BC SAP Control Framework.
    Example
    The following example shows the difference between system and application events.
    REPORT demo_custom_control .
    Declarations *****************************************************
    CLASS event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS: handle_f1 FOR EVENT f1 OF cl_gui_textedit
                           IMPORTING sender,
                 handle_f4 FOR EVENT f4 OF cl_gui_textedit
                           IMPORTING sender.
    ENDCLASS.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm.
    DATA: init,
          container TYPE REF TO cl_gui_custom_container,
          editor    TYPE REF TO cl_gui_textedit.
    DATA: event_tab TYPE cntl_simple_events,
          event     TYPE cntl_simple_event.
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    DATA handle TYPE REF TO event_handler.
    Reporting Events ***************************************************
    START-OF-SELECTION.
      line = 'First line in TextEditControl'.
      APPEND line TO text_tab.
      line = '----
      APPEND line TO text_tab.
      line = '...'.
      APPEND line TO text_tab.
      CALL SCREEN 100.
    Dialog Modules *****************************************************
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      IF init is initial.
        init = 'X'.
        CREATE OBJECT:
               container EXPORTING container_name = 'TEXTEDIT',
               editor    EXPORTING parent = container,
               handle.
        event-eventid = cl_gui_textedit=>event_f1.
        event-appl_event = ' '.                     "system event
        APPEND event TO event_tab.
        event-eventid = cl_gui_textedit=>event_f4.
        event-appl_event = 'X'.                     "application event
        APPEND event TO event_tab.
        CALL METHOD: editor->set_registered_events
                     EXPORTING events = event_tab.
        SET HANDLER handle->handle_f1
                    handle->handle_f4 FOR editor.
      ENDIF.
      CALL METHOD editor->set_text_as_stream
                  EXPORTING text = text_tab.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'INSERT'.
          CALL METHOD editor->get_text_as_stream
                      IMPORTING text = text_tab.
        WHEN 'F1'.
          MESSAGE i888(sabapdocu) WITH text-001.
        WHEN OTHERS.
          MESSAGE i888(sabapdocu) WITH text-002.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
      SET SCREEN 100.
    ENDMODULE.
    Class Implementations **********************************************
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_f1.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-003.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>set_new_ok_code 
             EXPORTING new_code = 'F1'.         
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
      METHOD handle_f4.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-004.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
    ENDCLASS.
    The layout of screen 100 is:
    The screen contains an output field field and a custom control called textedit.
    The flow logic of screen 100 is:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE user_command_0100.
    The GUI status SCREEN_100 has the functions BACK, EXIT, and CANCEL (all with type E) and the function INSERT (normal function).
    There is a local class event_handler defined in the program. It contains event handler methods for the F1 and F4 events of global class CL_GUI_TEXTEDIT. When you run the program, the classes CL_GUI_CUSTOM_CONTROL, CL_GUI_TEXTEDIT, and event_handler are instantiated in the PBO of screen 100.
    The container control is linked to the custom control on the screen, and the instance of the textedit control is linked to this container. The F1 and F4 events of the textedit control are registered using the SET_REGISTERED_EVENTS method to ensure that they are passed to the application server when they occur. F1 is defined as a system event, F4 as an application event. The event handler methods of the handle instance of the class event_handler are registered as handlers for the events.
    Before screen 100 is displayed, the program fills the textedit control with the contents of table text_tab . The user can edit the text while the screen is displayed. If the user chooses INSERT, the PAI event is triggered and the current text from the textedit control is copied into table text_tab.
    If the user chooses F1 on the textedit control, the handle_f1 method is executed. This assigns the contents of the line to the field field: The method SET_NEW_OK_CODE triggers the PAI event. It is this that ensures that the PBO is processed, and the contents of field are sent to the screen.
    If the user chooses F4 on the textedit control, the PAI event is triggered. The DISPATCH method is called, and this triggers the method handle_f4. This assigns the contents of the line to the field field: Since the PAI processing continues after the event, the PBO event follows, and the field contents are transferred to the screen.
    The contents of the textedit control are not passed to the internal table text_tab either after F1 or after F4. The contents of the textedit control are therefore overwritten in the PBO event with the previous contents of text_tab.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm

  • Print from ALV container

    Hi ,
    I am trying to print the contents from the ALV Container,This is a pop-up screen
    displaying details of the line selected in the ALV report.
    Standard tool bar print button is available, and it works, but I also have the print icon in bottom of the screen , which should print the container contents.
    Not sure what custom code shd go in for printing,
    Looked into the std BCALV * programs, but no luck so far.
    Appreciate any help.
    Thank you
    Lalitha

    Hi Joseph,
    in my case these are the settings...
    Just change your spool  settings also ..
    in my case
    SAP Cover Page  System Administrator: Default Settings
    OS Covert Sheet  System Administrator: Default Settings
    ALV statastics     NO
    i think for your case ALV statastics is markes as YES is it true.
    Can you change the settings.
    Regards
    Vijay

  • How to clear a container in OOPS...?

    Hi,
           How to Clear a Container in Object Orientation Programming...?
                      There is a method available......can you tell me that one.......
    Moderator message: Please search the forums and Google before posting basic questions. Thread locked.
    Edited by: Neil Gardiner on Sep 24, 2010 3:55 PM

    I Create an Container to display Graphics.
    Thare are many click events.
       When I click an "click event " it shows orihinal Graph.
         After I click second "click event" it overrides previous values and texts.
                Even though I didnt create Graphics for an Particular "click event" , it shows Graphics.
                       what is the Method (or) Function Module to clear that Container...?

  • Clearing doc contain no line item ?

    Dear Gurus,
    In which trx clearing doc contain no line item.when i perform trx in F-44,F-32 and F-51 clearing doc contain line item with same busines area.
    Pls help.
    *assign full marks
    Regrds
    Mahesh

    Hi
    " Transfer posting with clearing" is the transaction for account clearing without creating any posting. Did you select that in T-codes mentioned below?
    Jayaram

  • Capture ALV container event and change data in screen header

    Hi,
    I have a REPORT calling a custom screen with a header section and an ALV container displaying ITEMS.
    <b>Situation:</b>
    If I use the FILTER button on the ALV container, it works fine but I wish to capture the details, so that I can change my header data accordingly.
    <b>Example</b>
    e.g : Suppose the ALV container on the screen displays 4 lines of data.
       So my header area displays '4' as the no of items displayed
    Now when I use FILTER button on the ALV container, it then dispalys only '2' lines of data as per the filter criteria. Now how do I capture this details so that my header now displays 2 instead of 4.
    Basically I want my HEADER data to get refreshed whenever I use the filter button to change the number of data lines dispalyed.
    Hope I make some sense with the example.
    Appreciate if you gurus could help ..
    Thanks and Regards
    RK

    Can you post your code.
    Regards,
    Rich Heilman

  • How to clear costum container editor

    CREATE OBJECT: container EXPORTING container_name = 'EDIT',
                      editor    EXPORTING parent = container,
                      handle.
    CALL METHOD editor->set_text_as_stream EXPORTING text = GT_LINE.
    When iam calling method with exporting GT_LINE 2nd time with some other values I am getting old values on editor , can u please tell me how to clear old vales on editor and putting new vales………..
    thanks in adv.......

    Hello Kranthi,
    You can use the keyword "FREE".
    CALL METHOD container->free.
      FREE container.
    Use this at the exit.
    Regards,
    Reema.

  • Oops alv container

    Hi All,
    Greetings!!!
    I have developed  alv report using OOPS concept ,,currently am struck at 2 issues ..
    1. the container is not exactly the same size for the display ,,i mean its not fitting properly in the display window ..
    2. I have multiple records which are in both enable & disable mode for all fields ..,, now the problem is when I edit/enter some data in  the rows which are in enable mode only those enabled records should be selected/picked up  but not the other records which are in disabled mode ..,am using data_changed method for this purpose .., but its not getting fixed ..
    Kindly suggest me the alternatives to get rid off from them..
    Thanks in Advance..
    Regards,
    Jack

    Abhijith had a solution here >> Re: screen in OO alv

  • Splitter ALV container + 2 layout definitions

    Hello,
    I wrote an ALV report using splitter container. In the upper part of my report I need to define a layout , and another one for the bottom part.
    Also in my selection screen there are 2 parametrets for the upper and the lower layouts.
    I have 1 problems :
    B. when I use F4 functionalty from the selection screen for the upper part I get also layout of the lower part, and the samefor the lower part .
    attach is a part of the code.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lay01.
      PERFORM f4_layouts USING if_salv_c_layout=>restrict_none CHANGING p_lay01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lay02.
      PERFORM f4_layouts_sec USING if_salv_c_layout=>restrict_none CHANGING p_lay02.
    FORM f4_layouts   USING i_restrict TYPE salv_de_layout_restriction
                      CHANGING c_layout TYPE disvariant-variant.
      DATA: ls_layout TYPE salv_s_layout_info,
            ls_key    TYPE salv_s_layout_key.
      ls_key-report = sy-repid.
      ls_layout = cl_salv_layout_service=>f4_layouts(
        s_key    = ls_key
        restrict = i_restrict ).
      c_layout = ls_layout-layout.
    ENDFORM.                    " F4_LAYOUTS
    FORM f4_layouts_sec   USING i_restrict TYPE salv_de_layout_restriction
                 CHANGING c_layout TYPE disvariant-variant.
      DATA: ls_layout TYPE salv_s_layout_info,
            ls_key    TYPE salv_s_layout_key.
      ls_key-report = sy-repid.
      ls_layout = cl_salv_layout_service=>f4_layouts(
        s_key    = ls_key
        restrict = i_restrict ).
      c_layout = ls_layout-layout.
    ENDFORM.                    "
    screen 100.
    CREATE OBJECT g_custom
        EXPORTING
          container_name = 'CONTAINER'.
      CREATE OBJECT o_splitter
        EXPORTING
          parent  = g_custom
          rows    = 2
          columns = 1.
      CALL METHOD o_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = o_grid1.
      CALL METHOD o_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = o_grid2.
      cl_salv_table=>factory( EXPORTING r_container    = o_grid1
                             IMPORTING r_salv_table   = gr_table1
                             CHANGING  t_table        = gt_printout_main ).
      cl_salv_table=>factory( EXPORTING r_container    = o_grid2
                              IMPORTING r_salv_table   = gr_table2
                              CHANGING  t_table        = lt_printout_second ).
    cl_salv_table=>factory( IMPORTING r_salv_table = gr_table
                              CHANGING  t_table = gt_alv_data1 ). "<tb> ).
      lr_layout = gr_table1->get_layout( ).
      lu_layout = gr_table2->get_layout( ).
    *... §4.1 set the Layout Key
      ls_key-report = sy-repid.
      lr_layout->set_key( ls_key ).
      lu_layout->set_key( ls_key ).
    *... §4.2 set usage of default Layouts
      lr_layout->set_default( abap_true ).
      lu_layout->set_default( abap_true ).
    *... §4.3 set Layout save restriction
      lr_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
      gs_test-layout    = p_lay01.
      lr_layout->set_initial_layout( gs_test-layout ).
      lu_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
      gs_test-layout    = p_lay02.
      lu_layout->set_initial_layout( gs_test-layout ).
    lr_layout  = gr_table2->get_layout( ).
    lr_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
    *... §4.1 set the Layout Key
    ls_key-report = sy-repid.
    CONCATENATE ls_key-report 'SEC' INTO ls_key-report.
    lr_layout->set_key( ls_key ).
    lr_layout->set_default( abap_true ).
    gs_test-layout  = p_lay02.
    lr_layout->set_initial_layout( gs_test-layout ).
      lr_events = gr_table1->get_event( ).
      lu_events = gr_table2->get_event( ).
      CREATE OBJECT ge_events.
      SET HANDLER ge_events->on_user_command FOR lr_events.
      SET HANDLER ge_events->on_double_click FOR lr_events.
      CREATE OBJECT gu_events.
      SET HANDLER gu_events->on_user_command FOR lu_events.
    SET HANDLER gu_events->on_double_click FOR lu_events.
      lr_selections = gr_table1->get_selections( ).
      lr_selections->set_selection_mode( if_salv_c_selection_mode=>multiple ).
      lu_selections = gr_table2->get_selections( ).
      lu_selections->set_selection_mode( if_salv_c_selection_mode=>multiple ).
      lr_columns = gr_table1->get_columns( ).
    lr_columns->set_optimize( abap_true ).
      lu_columns = gr_table2->get_columns( ).
    lu_columns->set_optimize( abap_true ).
      PERFORM create_toolbar.
      PERFORM set_zebra_pattern.
      PERFORM set_columns_technical USING lr_columns lu_columns.
      PERFORM sort.
      PERFORM add_button_to_pf_status.
    *-> Display the grid, for this we use the DISPLAY method
      CALL METHOD gr_table1->display.
      CALL METHOD gr_table2->display.
    Please advise.
    Thanks
    Yifat

    Hi Ifat
    to access layouts for tab and bottom independantly, use the 'HANDLE' element of is_variant as follows
    at selection-screen on value-request for p_tvar.           
      is_variant-report = sy-repid.                           
      is_variant-handle = 'TOP'.                              
      call function 'REUSE_ALV_VARIANT_F4'                  
        exporting                                           
          is_variant                = is_variant            
          i_save                    = 'A'                   
          i_display_via_grid        = 'X'
        importing                                             
          es_variant                = is_variant              
        exceptions                                            
          not_found                 = 1                       
          program_error             = 2                       
          others                    = 3                       
      if sy-subrc <> 0.                                      
      else.                                                  
        p_tvar = is_variant-variant.                         
      endif.                                                 
    at selection-screen on value-request for p_bvar.         
      is_variant-report = sy-repid.                          
      is_variant-handle = 'BOT'.                             
      call function 'REUSE_ALV_VARIANT_F4'                   
        exporting                                            
          is_variant                = is_variant             
          i_save                    = 'A'                    
          i_display_via_grid        = 'X'
        importing                                           
          es_variant                = is_variant            
        exceptions                                          
          not_found                 = 1                     
          program_error             = 2                     
          others                    = 3                     
      if sy-subrc <> 0.                                      
      else.                                                  
        p_bvar = is_variant-variant.                         
      endif.                                                 
    Regards
    Joel

  • Clear ALV Data

    Hi All,
    I am very new to Webdynpro (ABAP) and have run into an issue, I have a main screen from which I am calling the ALV report screen. First time data coming fine, but when I go back and change the selection parameters and then execute the report again I am still getting the old data. If I run the same report, for the first time with the new parameters then also the data comes fine. Basically the issue seems to be clearing the Context node which provides data to the alv.
    If I use the invalidate() on the outbound plug of alv report, it clears the data but doesn't bring the data next time.
    Kindly let me know how should I do this, if you can provide some code that will be great.
    Your immediate help will be greatly appreciated and rewarded.
    Thanks,
    Barjinder Singh.

    Hi Barjinder,
    "In the init method of the report view I am calling the FM and getting its data into the context."
    the problem is right here....
    The WDDOINIT method runs only once....when you run your application....just move this FM call into your action button code....which your press to fire the plug to your result button...
    so something like this:
    your action method() for the button
    your FM call to get data
    than fire the plug to the result view....
    end of your action method....
    that is all...
    take care...
    J.

  • Editable alv container in module pool

    Hi,
    I have done a module pool program in which for a certain sectain i have to display a alv table...So I added a container in the module pool and called a editable alv in that..But the problem is now I am not able to trap any event in the editable alv..For eg if the user  edit somethng in the alv and press enter I am not able to trap the user command..Please guide me how to do this???

    create a handler for event DATA_CHANGED - it has parameters
    ER_DATA_CHANGED     Type Ref To     CL_ALV_CHANGED_DATA_PROTOCOL
    E_ONF4     Type     CHAR01
    E_ONF4_BEFORE     Type     CHAR01
    E_ONF4_AFTER     Type     CHAR01
    E_UCOMM     Type     SY-UCOMM
    That means all information you need.
    See the sample programs mentionend, search the forum before posting, close the thread as solved.
    Regards,
    Clemens

  • To hide alv container

    hi,
    i have 3 alv grids in my screen.
    based on selection screen i have to display the grids.
    how can i hide one grid.

    Hi,
    Dop not create object of that container. I think this should leave blank space where container is declared.
    Another way is to declare 3 different screens
    first with 1 container
    second with 2 containers
    third with 3 containers.
    Depending upon how many and which container you want to display call any one of the screen with corresponding container name.
    Regards,
    Mohaiyuddin

  • OO-Alv Container Edit Columns ?

    I am using salv container and i wanna activeted  edit mode for some columns .
    How Can i do this ?
    Thanks..

    CL_SALV_TABLE is not editable
    here a nice workaround
    SALV Table 10 - Editable SALV Model (Overcome the restriction of SALV Model) | ABAP Help Blog

Maybe you are looking for