‎2009 Mar 10 11:47 AM
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
‎2009 Mar 10 12:02 PM
Hi,
Leave the screen entirely.
MODULE pai INPUT.
if sy-ucomm = 'BACK'.
LEAVE TO SCREEN 0.
endif.
ENDMODULE.
Regards
Marcin
‎2009 Mar 10 12:18 PM
Hi marcin,
I have tried this leave to screen ,but still it is not working, the alv shows old message
‎2009 Mar 10 12:24 PM
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
‎2009 Mar 11 8:44 AM
‎2009 Mar 12 6:28 AM
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.
‎2009 Mar 12 7:17 AM
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.
‎2009 Mar 13 7:14 AM
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