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 problem

Former Member
0 Likes
824

Hi experts,

I have created alv list whcih contains chekc box. So whatever check box is created ,the perticular rows

are passed to bapi to create sales order.If it gives error or sucess message is displayed on next screen.

But if i clicked on back button, the previous screen is called & if user does any operation again.The next screen shows same previous message.That means if error is coming in first operation,it gives same error for next operation also.I have debug the whole code.The proper message is coming in internal table,

but it displays the previous.

Iam using dispaly method of cl_salv_table class.

Plz help me out this.

Thanks & Regards,

Anagha Deshmukh

7 REPLIES 7
Read only

MarcinPciak
Active Contributor
0 Likes
682

Hi,

Leave the screen entirely.


MODULE pai INPUT.
   if sy-ucomm = 'BACK'.
      LEAVE TO SCREEN 0.
   endif.
ENDMODULE.

Regards

Marcin

Read only

0 Likes
682

Hi marcin,

I have tried this leave to screen ,but still it is not working, the alv shows old message

Read only

Former Member
0 Likes
682

In ALV, to refresh the table you have to call the method "refresh_table_display".

It has the syntax very similar to creating the table.

It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)

or

if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).

the synatx is :-

call method grid (name of grid )->refresh_table_display

exporting

IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)

I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).

Regards

Shashi

Read only

Former Member
0 Likes
682

hi,

Can u please paste ur code

Thanks and egards

Suraj S Nair.

Read only

Former Member
0 Likes
682

Hi!!!

In the PAI event work on ur back method and there use this

CALL METHOD W_ALV_GRID->REFRESH_TABLE_DISPLAY
    EXCEPTIONS
      FINISHED = 1
      OTHERS   = 2.
  IF SY-SUBRC  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Also u can go through this program BCALV_GRID_07.

Read only

asik_shameem
Active Contributor
0 Likes
682

Hi

Call the following methods,


CALL METHOD g_grid->check_changed_data .
CALL METHOD g_grid->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
CALL METHOD cl_gui_cfw=>dispatch.

Read only

Former Member
0 Likes
682

Thanks to all,

I have checked the all option given by you people.But not get solution.

Anyways my req. is changed now.I have done coding according to it.

So that i am closing this thread.

Thanks once again.

Regards,

Anagha Deshmukh