01-14-2016 8:07 PM
Hi everyone,
Can any one know about how to pass or update values in top of page in grid1 based on selected row value in grid2 dynamically.
Suppose in grid1 top of page i have Display Currency = USD which is local.
Now I have other currencies in other grid2 that is popup. the values may be
USD,
'SGD,
EUR.
etc..
that values are dynamic which are in grid2.
So how to update Display currency value based on other grid2 selection.
I am using OOPS events here...Can anyone plzzz.
Thanks,
Karunakar Reddy.
01-14-2016 8:08 PM
01-19-2016 9:38 AM
01-19-2016 10:11 AM
Hi,
The code examples below are just that - code examples. You will need to modify them to suit your own application
First define an event to handle your change of selection in Grid 2
Call Method Me->Register_Delayed_Event
Exporting
i_Event_Id = Me->Mc_Evt_Delayed_Change_Select
Exceptions
Others = 1.
You might want to change the delay time for this event to make the reaction of the grid snappier.
Then, in the event, do something similar to:
*
* Redisplay the header
*
If Me->Get_Header_Pane( ) Is Not Initial.
Me->List_Processing_Events( Exporting i_Event_Name = 'TOP_OF_PAGE'
i_Dyndoc_Id = Me->Get_Grid_Header( ) ).
Me->Get_Grid_Header( )->Display_Document( Exporting Reuse_Control = Abap_True
Parent = Me->Get_Header_Pane( )
Exceptions Html_Display_Error = 1
Others = 2 ).
EndIf.
(Get_Header_Pane is one of my methods), the bit you are interested in is the List_Processing event. This then raises a TOP_OF_PAGE event in your grid1 (if you replace Me-> with Grid1->)
Regards
Rich