2015 Jun 24 8:26 PM
Hi Folks,
I need to have a push button for each row of ALV output with some text (say "countries"). When the the particular push button is clicked i need to display some data. Can anybody tell me how to handle this. I am able to create the push button, but facing two below issues
1.unable to place the text for the button and
2.when that is clicked how to display some data.
w_fcat-fieldname = 'PB'.
w_fcat-scrtext_m = 'Select'.
w-fcat-tabname = 'T_FINAL'.
append w_fcat to t_fcat.
w_fcat-fieldname = 'xxx'.
w_fcat-scrtext_m = 'xxx''.
w-fcat-tabname = 'T_FINAL'.
append w_fcat to t_fcat.
loop at t_fcat into w_fcat where fieldname = 'PB'.
w_fcat-style = c;_gui_alv_grid=>mc_style_button.
modify t_fcat from w_fcat.
endloop.
this is working fine but with above two issue.
I am using RESUE_ALV_GRID_DISPLAY_LVC. If this cannot be achieved through this FM atleast please let me know through any other approach.
Thanks in advance.
Regards
Mallikarjun Reddy G.
Hi Folks,
I need to have a push button for each row of ALV output with some text (say "countries"). When the the particular push button is clicked i need to display some data. Can anybody tell me how to handle this. I am able to create the push button, but facing two below issues
1.unable to place the text for the button and
2.when that is clicked how to display some data.
w_fcat-fieldname = 'PB'.
w_fcat-scrtext_m = 'Select'.
w-fcat-tabname = 'T_FINAL'.
append w_fcat to t_fcat.
w_fcat-fieldname = 'xxx'.
w_fcat-scrtext_m = 'xxx''.
w-fcat-tabname = 'T_FINAL'.
append w_fcat to t_fcat.
loop at t_fcat into w_fcat where fieldname = 'PB'.
w_fcat-style = c;_gui_alv_grid=>mc_style_button.
modify t_fcat from w_fcat.
endloop.
this is working fine but with above two issue.
I am using RESUE_ALV_GRID_DISPLAY_LVC. If this cannot be achieved through this FM atleast please let me know through any other approach.
Thanks in advance.
Regards
Mallikarjun Reddy G.
2015 Jun 25 3:45 AM
Instead of a button, print a text and use the HOTSPOT value in teh fieldcat, this will make appear a hand icons when you hover that column and then use USER_COMMAND to control de row clikked and the logic..
Here you have a blog with some info.
http://www.abap-tutorials.com/2012/11/26/alv-report-call-transaction-using-hot-spot/
Regards
2015 Jun 25 7:08 AM
Hi Malli,
FM RESUE_ALV_GRID_DISPLAY_LVC is support style feature.
what ever you cell value that automatically come to button text.
for your last problem when user click on any button trace the index of ALV by using like user command event then if need take column values as per requirement and display custom screen or else to user.
Swadhin
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |