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

hide next button - screen

Former Member
0 Likes
500

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

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
414

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

Read only

Former Member
0 Likes
414

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