Skip to Content
0
Former Member
Mar 04, 2015 at 09:13 AM

Problem with OO ALV refresh

207 Views

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.