‎2005 Jul 14 10:55 AM
Hello Everybody,
I have a peculiar requirement.
I have written and a module pool program. In the program I have attached an application toolbar. On clicking one of the button I have popped up a Selection-Screen. As selection-screen comes with default PF-STATUS (set of buttons), I want to change that.
I have used function module 'RS_SET_SELSCREEN_STATUS' but it doesn't help in attaching any new PF-STATUS. Please help.
Regards,
Deva.
‎2005 Jul 14 11:05 AM
Hi,
Have you done similar coding.
AT SELECTION-SCREEN OUTPUT.[should be changed to that button]
IF SY-DYNNR = 1000.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
P_STATUS = 'SELK'"your status
TABLES
P_EXCLUDE = EXCLUDE
"tables of ok codes to be
"excluded
EXCEPTIONS
OTHERS = 1.
ENDIF.
This is from documentation.
Sets own GUI status on selection screens
This function module allows you to set your own status on a selection screen and exclude function codes from your own or from a standard status.
For example, you can remove the Print function from the standard status by passing the SY-PFKEY field to the parameter P_STATUS, while the table P_EXCLUDE contains a line with the entry 'PRIN' (= function code for printing).
The function module should be called only when processing selection screens, i.e. only under INITIALIZATION or AT SELECTION-SCREEN OUTPUT.
Note Before calling this function module, you should call the function module RS_SUBMIT_INFO to find out the current mode of the selection screen processing (normal execution, variant maintenance or background job scheduling) and then set the correct status.
Note The GUI status passed to P_STATUS must be defined in the program itself (if you do not supply a value for P_PROGRAM). You can set an externally defined status with the function module RS_EXTERNAL_SELSCREEN_STATUS.
Have a look at the demo program also.
DEMO_SEL_SCREEN_STATUS
Message was edited by: Jayanthi Jayaraman
‎2005 Jul 14 11:05 AM
Hi,
Have you done similar coding.
AT SELECTION-SCREEN OUTPUT.[should be changed to that button]
IF SY-DYNNR = 1000.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
P_STATUS = 'SELK'"your status
TABLES
P_EXCLUDE = EXCLUDE
"tables of ok codes to be
"excluded
EXCEPTIONS
OTHERS = 1.
ENDIF.
This is from documentation.
Sets own GUI status on selection screens
This function module allows you to set your own status on a selection screen and exclude function codes from your own or from a standard status.
For example, you can remove the Print function from the standard status by passing the SY-PFKEY field to the parameter P_STATUS, while the table P_EXCLUDE contains a line with the entry 'PRIN' (= function code for printing).
The function module should be called only when processing selection screens, i.e. only under INITIALIZATION or AT SELECTION-SCREEN OUTPUT.
Note Before calling this function module, you should call the function module RS_SUBMIT_INFO to find out the current mode of the selection screen processing (normal execution, variant maintenance or background job scheduling) and then set the correct status.
Note The GUI status passed to P_STATUS must be defined in the program itself (if you do not supply a value for P_PROGRAM). You can set an externally defined status with the function module RS_EXTERNAL_SELSCREEN_STATUS.
Have a look at the demo program also.
DEMO_SEL_SCREEN_STATUS
Message was edited by: Jayanthi Jayaraman
‎2005 Jul 14 11:19 AM
Thanx for the quick reply. But it is not the exact problem i'm facing.
I have seen the program in ABAPDOCU 'DEMO_SEL_SCREEN_STATUS'. But the program is a report program where I can write AT SELECTION-SCREEN event. But I'm doing a module pool programming. Please refer to my earlier mail for exact details.
‎2005 Jul 14 11:25 AM
Hi,
you can write AT SELECTION-SCREEN event, but you have to check for the screen number.
AT SELECTION-SCREEN OUTPUT.
if sy-dynnr = SEL_SCREEN_NUM.
.......
endif.
‎2005 Jul 14 11:34 AM
Hi,
Ok.If that's the case,then in PAI ,you can do that in USER_COMMAND for that particular screen(9000).
MODULE USER_COMMAND_9000.
module USER_COMMAND_9000 input.
data lv_ucomm type sy-ucomm.
lv_ucomm = sy-ucomm.
case lv_ucomm.
...coding for calling the function module
endcase.
endmodule. " USER_COMMAND_9000 INPUT
Kindly reward points for useful answers[click yellow star[2 points],green star[6 points] and blue star[10 points,problem solved] against the replies] and close the thread if your problem is solved.Otherwise get back.
Message was edited by: Jayanthi Jayaraman