Skip to Content
author's profile photo Former Member
Former Member

Problem with OO ALV refresh

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Mar 04, 2015 at 10:02 AM

    Hi Vicky,

    Call the refresh method in PBO event of screen.

    Regards.

    Praveer.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 05, 2015 at 03: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 05, 2015 at 04: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.