‎2008 Jul 11 6:21 AM
hello guru ,
Guru I have created several button in my selection screen , for different condition , suppose when I wl click on first button the sale contract will release on some condition , but the thing is that ......
Program is comming ok , but in second time when I click on that button again , alv data is comming(field catalog ) twice(duplicate data , same line ) in horizantly not vertically ,
I am not getting whats the prob , and I am not able to clear the button action for first button before pressing the second button .
this bello code I have witten for button in selection screen .
CLEAR v_flag.
IF sscrfields-ucomm = 'UCOM1'.
CLEAR it_output .
CLEAR fieldcatalog .
CLEAR gd_layout .
v_flag = '1'.
v_lifsk1 = '11' .
ELSEIF sscrfields-ucomm = 'UCOM2'.
v_flag = '2' .
v_lifsk1 = '14' .
ENDIF.
how do this , plz healp .
I am waiting for your healp .
regards ,
Joy Chakravorty .
‎2008 Jul 11 6:52 AM
hi,
Before Displaying the contents in the ALV grid please check fro the Existence of the ALV Grid. If it is Already present then dont use SET_TABLE_FOR FIRSTDISPLAY but instead use REFRESH_TABLE DISPLAY.
For Sample code Plz check this link.
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
Regards
Sumit Agarwal
‎2008 Jul 11 6:33 AM
Hi,
If alvgrid is not initial.
Call method SET_TABLE_FOR_FIRST_DISPLAY,
Else.
Write another method REFRESH_TABLE_DISPLAY.
Endif.
Regards,
Sujit
‎2008 Jul 11 6:52 AM
hi,
Before Displaying the contents in the ALV grid please check fro the Existence of the ALV Grid. If it is Already present then dont use SET_TABLE_FOR FIRSTDISPLAY but instead use REFRESH_TABLE DISPLAY.
For Sample code Plz check this link.
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
Regards
Sumit Agarwal