08-02-2016 7:23 AM
Hello Guys,
I am creating a new ALV Report which need to display some dropdown columns in it. I have done this through OOPS concept without using function modules REUSE_ALV_GRID_DISPLAY_LVC or REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY. The report is working fine but when I select values from dropdown columns and try to refresh the internal table data through GET_GLOBALS_FROM_SLVC_FULLSCR but is coming Initial.
Please help me as I have to finish this ASAP.
Thank You in Advance.
08-02-2016 7:44 AM
Hi,
If you are using ALV OOPs then why are you using this function module to refresh internal table data.?
In class CL_GUI_ALV_GRID , there is a standard method to check and get the changed data .
Call this method - CHECK_CHANGED_DATA.
Regards
Ashish
08-02-2016 7:44 AM
Hi,
If you are using ALV OOPs then why are you using this function module to refresh internal table data.?
In class CL_GUI_ALV_GRID , there is a standard method to check and get the changed data .
Call this method - CHECK_CHANGED_DATA.
Regards
Ashish
08-02-2016 7:52 AM
Thanks for instant reply, but how to use that method when object is null. I tried and it gives dump error " Access via 'NULL' object reference not possible.".
08-02-2016 7:56 AM
You have created an object for clas cl_gui_alv_grid, call it by that .
Where are you calling it.? Is there any button which you are pressing for refreshing the internal table.?
08-02-2016 8:02 AM
this is the code need to be edited.
module USER_COMMAND_0500 input.
DATA l_selfield TYPE slis_selfield.
save_ok = ok_code.
clear ok_code.
case save_ok.
WHEN 'SHIFT-F4'.
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
MODIFY zqals FROM TABLE it_qals. "insert if no record found else update
IF sy-subrc = 0.
MESSAGE 'Data is saved' TYPE 'S'.
ELSE.
MESSAGE 'Error' TYPE 'E'.
ENDIF.
endcase.
endmodule.
08-02-2016 8:06 AM
Tell me one thing, why are you declaring a new data type ref_grid TYPE REF TO cl_gui_alv_grid.
And you are not even creating any object. What is the main object you created for displaying the table , in you PBO module.?
Call this method by that object. It will work.
08-02-2016 8:12 AM
Thanks Bro
You saved my life. I will require your help in future too.
Thanks Again.
08-02-2016 8:14 AM