07-28-2014 8:22 AM
Hi experts,
I want to set some ALV input fields using abap.
That's easy, I can modify the table as I need and call the refresh of the ALV table ( refresh_table_display).
But how can I "fill" the fields that the event DATA_CHANGED is called?
When I fill manually in ALV, this event is raised...I need the event also when filling with ABAP...
Thanks in advance
Michael
07-28-2014 9:49 AM
Hello Michael,
This link shows you the right way to do:
Get Changed Value In ALV Grid Dynamically - ABAP Development - SCN Wiki
Inside HANDLE_DATA_CHANGED method, you can change the value of a cell in this way:
CALL METHOD PR_DATA_CHANGED->MODIFY_CELL
EXPORTING
I_ROW_ID = IT_TABLE-ROW_ID
I_FIELDNAME = 'FIELD'
I_VALUE = IT_FLIGHT-FIELD.
I hope you help.
07-28-2014 10:02 AM
Hi Michael,
Please find the link below to update the ALV Grid using REFRESH_TABLE_DISPLAY
demo program to refresh alv grid(oops) - Code Gallery - SCN Wiki
Regards
Rajkumar Narasimman
07-29-2014 9:31 AM
I'm almost there now!
First, I use method change_data_from_inside from cl_gui_alv_grid, exporting all the changed fields with tabix, value and fieldname.
But now I have a problem - if I change a field of type MENG13 (QUAN, length 13), I got a dump
ASSIGN_CASTING_ILLEGAL_CAST - CX_SY_ASSIGN_CAST_ILLEGAL_CAST
in method GET_CHANGED_DATA:
assign component is_style_cells-fieldname of structure
<ls_comp1> to <ls_comp> casting type c.
What I can do now?
12-30-2020 9:46 PM
Hi michael.fallenbchel,
I know it was 6 years ago but maybe you recall the way you have overcome that obstacle? If so feel free to share it 😉
Regards,
Bartosz
P.S. Now I know that I can't seek any help from SAP as "all methods that are related to editability of the ALV grid are not released for customer software developments" - SAP note 695910