‎2015 Mar 04 9:13 AM
Hi.
I know my problem has been asked hundred times.
But I still cannot find any suitable solution for me
1. I has a dropdown, every time I change data in dropdown it will load new data based on dropdown data
2. From step one, I refresh editable ALV
3. Any change in editable ALV willbe saved (another action for saving)
My problem if, After I save, I can't refresh my ALV
But it's not problem if I haven't pressed save button
Please kindly help me
Thanks
Attached Code
Step 1 is "when SET_P" in this code
see font with blue color
MODULE pbo_1000 OUTPUT.
IF flag = 0.
SET PF-STATUS '1000'.
SET TITLEBAR '1000'.
s_name = sy-uname.
s_date = sy-datum.
IF s_month IS INITIAL AND s_year IS INITIAL.
s_month = sy-datum+4(2).
s_year = sy-datum(4).
ENDIF.
PERFORM create_toolbar.
PERFORM create_catalog.
PERFORM select_data.
CREATE OBJECT ob_custom
EXPORTING
container_name = 'CCTRL'.
CREATE OBJECT ob_grid
EXPORTING
i_parent = ob_custom
i_appl_events = 'X'.
PERFORM create_dropbox.
CALL METHOD ob_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'TYPE'
it_toolbar_excluding = lt_toolbar
is_layout = lyt
CHANGING
it_fieldcatalog = fld[]
it_outtab = itab[].
CALL METHOD ob_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
CALL METHOD ob_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
ENDIF.
ENDMODULE.
PAI Module
MODULE user_command_1000 INPUT .
DATA: v_perio(6) TYPE c.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'SAVE'.
PERFORM save_data.
PERFORM send_email.
WHEN 'SET_S'.
flag = 1.
PERFORM set_status.
CALL METHOD ob_grid->refresh_table_display
EXPORTING
is_stable = stbl.
WHEN 'SET_P'.
flag = 1.
PERFORM select_data.
CALL METHOD ob_grid->refresh_table_display
EXPORTING
is_stable = stbl.
ENDCASE.
ENDMODULE.
‎2015 Mar 04 10:02 AM
Hi Vicky,
Call the refresh method in PBO event of screen.
Regards.
Praveer.
‎2015 Mar 05 1:27 AM
Hi Praveer
Thanks for your answer, but the problem still exists
I Moved refresh method to PBO
in this case : MODULE pbo_1000 OUTPUT.
still not getting refreshed
‎2015 Mar 05 3:26 AM
Sorry my Bad
Think I find my solution myself
I'm still testing my solution
Note :
My bad, I created object as local variable, it should be global variable
‎2015 Mar 05 4:52 PM
Hi,
you call event data_changed after you have changed cell value and update your internal table.
after, you save the new value.
AI