Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Refresh OOPS ALV

itabhishek9
Participant
0 Likes
530

Hello SDNites,

I have created ALV using OOPS . My o/p is perfect. But I have a req where i need to refresh values when i press custom refresh button. Values are getting populated in internal table properly before REDISPLAY of ALV , but it is not showing in ALV output.

I have tried "refresh_table_display" but still it is not working.

Please give the appropiate suggestion.

Thanks,

Abhishek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
471

Hi,

In the PAI call the method check_changed_data and in PBO call REFRESH_TABLE_DISPLAY.

Regards,

Ankur Parab

3 REPLIES 3
Read only

Former Member
0 Likes
472

Hi,

In the PAI call the method check_changed_data and in PBO call REFRESH_TABLE_DISPLAY.

Regards,

Ankur Parab

Read only

Former Member
0 Likes
471

Hi Abhishek ,

Use:-

CLASS lcl_event_receiver DEFINITION.

*-- Method for Data Changed -


*

METHODS: handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid

IMPORTING er_data_changed,

ENDCLASS.

CLASS lcl_event_receiver IMPLEMENTATION.

*--- Handle data change

METHOD handle_data_changed.

error_in_data = space.

CALL METHOD perform_checks( er_data_changed ).

IF error_in_data = 'X'.

CALL METHOD er_data_changed->display_protocol.

ENDIF.

ENDMETHOD. "handle_data_changed

METHOD perform_checks.

PERFORM data_checks USING pr_data_changed

CHANGING error_in_data.

ENDMETHOD.

ENDCLASS.

FORM data_checks USING p_pr_data_changed TYPE REF TO cl_alv_changed_data_protocol

p_gt_output

CHANGING p_error_in_data.

DATA: ls_good TYPE lvc_s_modi,

l_bname TYPE usr01-bname,

l_werks TYPE t001w-werks,

l_kostl TYPE csks-kostl,

l_aufnr TYPE aufk-aufnr,

l_addr TYPE adrc-addrnumber,

l_matkl TYPE mara-matkl,

l_saknr TYPE ska1-saknr,

l_lifnr TYPE lfa1-lifnr,

l_posnr TYPE prps-pspnr,

l_len TYPE i.

DATA: l_fstag TYPE skb1-fstag.

DATA: ls_good1 TYPE lvc_s_modi.

IF p_gt_output = c_1.

LOOP AT p_pr_data_changed->mt_mod_cells INTO ls_good.

CASE ls_good-fieldname.

.

.

.

ENDFORM.

then refresh.

Thanks ,

Ruchi Tiwari

Read only

Former Member
0 Likes
471

Hi,

Do the following in a PBO Module.

data: r_alv type ref to cl_gui_alv_grid.

if r_alv is initial.

call method set_table_for_first_display.

else.

call method refresh_table_diaplay.

endif.