In this post we are going to learn , how to set PF-STATUS for standard selection screen ( SCREEN #: 1000)
i will explain this by taking small example.
Report Zvenky_pfstatus.
Tables : MARA.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
If you execute the above piece of code, you will get a selection screen with s_matnr as select option.
Here in output you will get GUI status with Back,Exit and Cancel button.This status automatically provided by SAP.
Now here my requirement is , i want to display my own PF-STATUS for Standard Selection screen.
we can implement this very easily with help of SAP Standard FM 'RS_SET_SEL_SCREEN_STATUS'.
Example.
Report Zvenky_pfstatus.
Tables : MARA.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
AT SELECTION-SCREEN OUTPUT. " Event which will trigger before Selection screen display
CALL FUNCTION 'RS_SET_SEL_SCREEN_STATUS'
EXPORTING
p_status = 'ZSTATUS' " user created status
*p_program = ' '
TABLES
p_exclude = itab_exclude . " itab_exclude type standard table of rsexfcode
By Using above piece of code we can display our own GUI Status.
Note : In Standard gui status Back,Exit,Cancel Buttons will work automatically ,as the button functionality will take by SAP. But if you display your own GUI status ,You have to write code for Button action.
P_EXCLUDE : Table of OK codes to be excluded.
i will explain this by taking small example.
Report Zvenky_pfstatus.
Tables : MARA.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
If you execute the above piece of code, you will get a selection screen with s_matnr as select option.
Here in output you will get GUI status with Back,Exit and Cancel button.This status automatically provided by SAP.
Now here my requirement is , i want to display my own PF-STATUS for Standard Selection screen.
we can implement this very easily with help of SAP Standard FM 'RS_SET_SEL_SCREEN_STATUS'.
Example.
Report Zvenky_pfstatus.
Tables : MARA.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
AT SELECTION-SCREEN OUTPUT. " Event which will trigger before Selection screen display
CALL FUNCTION 'RS_SET_SEL_SCREEN_STATUS'
EXPORTING
p_status = 'ZSTATUS' " user created status
*p_program = ' '
TABLES
p_exclude = itab_exclude . " itab_exclude type standard table of rsexfcode
By Using above piece of code we can display our own GUI Status.
Note : In Standard gui status Back,Exit,Cancel Buttons will work automatically ,as the button functionality will take by SAP. But if you display your own GUI status ,You have to write code for Button action.
P_EXCLUDE : Table of OK codes to be excluded.