Skip to Content
author's profile photo Former Member
Former Member

Problem in displaying data using ALV interactive using OOPS

Hi friends,

I have created one interactive report using oops..

on my selection screen i have a select-option TABNAME for DD02L table with no intervals option.

ie : i enter table names in that field..

for example i enter VBAP

MARA,

MARC. etc

when i execute i get a basic list which gives some details about the tables.

now on my basic list when i double click on any row then ie : say if i click on 2nd row , in the back ground based on the index on which i have click iam reading that particular row from the table and from that using the table name iam displaying the all the fields of the table in the ist secondary list....

Till now its working fine but once when i go back to the back to the basic list and when i click another row... here even if click another row its displaying the same fields of the table which was ist click.

ie : say ist time i have clicked mara then later vbap.....But its displaying me the mara details instead it should display vbap details...

I have used refresh_table_display method also.... But its not working fine...

How can i correct it...

Regards,

Kumar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 03, 2009 at 08:38 PM

    Hello Kumar

    I can only guess that you call the second screen (perhaps '0200') within the event handler method for event DOUBLE_CLICK. This is not really a good idea. Instead use a simple trick to overcome this refreshing problem:

    METHOD handle_double_click.
    
    " Save the row perhaps in a static attribute of your event handler method, e.g.
    .  lcl_eventhandler=>ms_row = e_row.  " ms_row defined as static attribute of event handler class
    
    " Trigger PAI with a defined ok-code:
      CALL METHOD cl_gui_cfw=>set_new_ok_code
        EXPORTING
         ok_code = 'DETAIL_LIST'.
    
    ENDMETHOD.
    

    This method call triggers PAI of your screen which otherwise does not occur after an event has been raised.

    MODULE user_command_0100 PAI.
      
      CASE gd_okcode.
        WHEN 'DETAIL_LIST'.
           perform DISPLAY_DETAIL_LIST.  " and call screen '0200'
    
        WHEN OTHERS.
        ...
      ENDCASE.
    ENDMODULE.
    

    The next time you make a double click a new row/index is filled into the static attribute. By triggering PAI (followed by PBO) you ensure a flushing (= refreshing) before the secondary list is displayed.

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2009 at 05:39 AM

    Hi,

    Guess the problem is you are also changing the fieldcatalog along with the data.

    Try using the method SET_FRONTEND_FIELDCATALOG also along with the REFRESH_ALV_DISPLAY.

    Also use FLUSH when coming back from screen 200.

    Regards,

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.