‎2008 Jul 21 11:09 AM
Hello Experts,
I have a button on the selection screen next to Execute button on the Application Tool Bar.
I have written some validations on the button.It was defined on the PF-Status and its funtion text i have given as 'Show'.
But the problem is that the code is not working.When I execute the button,the screen just remains their.
The sy-comm always returns the value of 'UCOM' for whatever even takes place on the screen.The execution of the program does not stops their in debugger.
Can anyone help me with some sample code and also provide the value of sy-ucomm which i should use for the customized button.
Good points will be rewarded.
‎2008 Jul 21 11:12 AM
Hi
First of all you need to set function code of that button in PF status
then write code as
In PAI
caes sy-ucomm
when 'FCODE'.
-
endcase.
Regards
Aditya
‎2008 Jul 21 11:15 AM
Hi,
case sy-ucomm.
when 'FCODE'.
<codings>
.
.
.
when 'FCODE2'.
<codings>
.
.
.
endcase.
hope it will help..
Edited by: prabhu p on Jul 21, 2008 12:16 PM
‎2008 Jul 21 11:23 AM
hi..
first of all in SET PF-STATUS 'TAB_STATUS'.
in application tool bar create your FCODE button of normal application type.
after that in your PAI write
CASE ok_code.
WHEN 'FCODE'.
hope this will help you.
regards
Lokesh
‎2008 Jul 21 11:25 AM
Here is the short program which will show how to do it. You are simply checking for the USER-COMMAND value CHK and changing it to ONLI which is the F8 button, then the START-OF-SELECTION will be fired and you can output the list.
REPORT zyou_0001.
TABLES: sscrfields.
SELECTION-SCREEN PUSHBUTTON 2(10) pbut1 USER-COMMAND chk.
AT SELECTION-SCREEN OUTPUT.
pbut1 = 'Test This'.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'CHK'.
sscrfields-ucomm = 'ONLI'.
ENDIF.
START-OF-SELECTION.
DO 10 TIMES.
WRITE:/ sy-index.
ENDDO.
Regards,.
Mohammed