on 09-25-2014 5:41 PM
I experts,
I have created 2 custom containers. One container displays records in ALV, and other container displays image when clicked on any one of the record from 1st container.
Both container displays data fine. On click event, I am handling displaying of image.
Say tehre are 10 records, if I click on 1st record and click display. It displays correct image say A. When I click 2nd record, it does not display image B, but displays A only. No matter what I click, It will display image A.
When I go back and execute, click on 2nd record, it will display Image B. and same problem again if I click 1st record and it displays image B only.
I have refreshed, cleared the image containers object instances. I have used CALL METHOD cl_gui_cfw=>flush.
Still problem exist. Here is the pseudocode-
METHOD display..
Create object for ALV Container to display records...
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'...
cl_salv_table=>factory()..
SET HANDLER me->on_link_click FOR l_o_events.
CL_SALV_TABLE->display( ).
END METHOD.
-----------------------------
METHOD ON_LINK_CLICK
Get the row information
Fetch that row information from internal table
READ TABLE <table> INTO <wa> INDEX <Index>.
CALL METHOD DISPLAY
exporting size
exporting xstr.
END METHOD.
----------------------------
METHOD DISPLAY
CALL FUNCTION 'DP_CREATE_URL'....
Create Object Container for Image
Create object CL_GUI_PICTURE
CALL METHOD ci_picture->set_3d_border
CALL METHOD ci_picture->set_display_mode
CALL METHOD ci_picture->set_position
CALL METHOD ci_picture->load_picture_from_url
CALL METHOD cl_gui_cfw=>flush
END METHOD
-----------------------
Please help or guide me.
I called method image_container->FREE ( ) and it worked.
I am not sure if its good programming to create object IMAGE container and free everytime a record is clicked.
Any other alternative solution ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.