‎2009 Aug 12 10:03 AM
Hi experts,
I have an alv grid some records, and also i add an extra button to display selected records. When i display the selected records, it goes to another screen.(200) at 200 screen i have two buttons at toolbar( not screen) , next and back. i wanna hide back at first record. and next at last record. but i cannot handle it with loop at screen.
Thanks for answers,
Ozgur
‎2009 Aug 13 9:28 AM
If these buttons are located on application toolbar of the screen then simple [SET PF-STATUS EXLCUDING|http://help.sap.com/abapdocu_70/en/ABAPSET_PF-STATUS_SHORTREF.htm] in PBO of screen will trun your button on or off.
Regards
Marcin
‎2009 Aug 13 9:34 AM
Hi,
When you will go to screen 200 you need to set the pf-status accordingly.
Means in the PBO of the screen 200 you need to give a if condition and accordingly you need to set the PF Status,
In the module of PBO write the code like below -
IF w_index = 1.
SET PF-STATUS 'STATUS_NAME' EXCLUDING 'BACK' IMMEDIATELY..
ELSEIF w_index = total_index.
SET PF-STATUS 'STATUS_NAME' EXCLUDING 'NEXT' IMMEDIATELY.
ELSE.
SET PF-STATUS 'STATUS_NAME' IMMEDIATELY.
ENDIF.Here w_index variable will hold the current index value .
total_index variable will contain the total no entries of the grid, that you can get from the internal by the -
DATA : w_index TYPE i,
total_index TYPE i.
DESCRIBE TABLE itab LINES total_index.Regards
Pinaki