07-03-2007 1:44 PM
Hi. I have a problem.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS werks TYPE werks_d OBLIGATORY.
PARAMETERS lifnr TYPE lifnr OBLIGATORY.
SELECT-OPTIONS mblnr FOR zvratka_prijemky-mblnr_311.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
sscrfields-functxt_01 = text-013 .
I added a FUNCTION KEY 1. I need it after click to launch some program. But I have OBLIGATORY parameters and when I click the button, I receive a warning that I not all obligatory fields are filled. I can't remove the OBLIGATORY parameter, it's necessary. How to solve this problem? Greetings. P.
07-03-2007 2:03 PM
hi,
For the FUNCTION KEY make the function type as 'E' and then add your code to call another program in the event block AT SELECTION-SCREE ON EXIT-COMMNAD.
try like this
AT SELECTION-SCREE ON EXIT-COMMNAD.
PARAMETERS werks TYPE werks_d OBLIGATORY.
PARAMETERS lifnr TYPE lifnr OBLIGATORY.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS mblnr FOR zvratka_prijemky-mblnr_311.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN END OF BLOCK b1.
if useful reward some points.
with regards,
Suresh.A
07-03-2007 1:47 PM
Hi,
For the FUNCTION KEY make the function type as 'E' and then add your code to call another program in the event block AT SELECTION-SCREE ON EXIT-COMMNAD.
Regards,
Sesh
07-03-2007 1:49 PM
The function key you added must be given the Function Type as 'E'. Then you can use the at exit-command variant of at selection screen to exit the program.
07-03-2007 1:52 PM
Hi,
Instead of checking the obligatory check in the screen field
check in the at selection screen if not werks is initial and sy-ucomm = 'ONLI'
then proceed ur logic or goto some logic.
but remove obligatory definition and check it in further processing
Regards,
Nandha
regard if it helps
07-03-2007 2:03 PM
hi,
For the FUNCTION KEY make the function type as 'E' and then add your code to call another program in the event block AT SELECTION-SCREE ON EXIT-COMMNAD.
try like this
AT SELECTION-SCREE ON EXIT-COMMNAD.
PARAMETERS werks TYPE werks_d OBLIGATORY.
PARAMETERS lifnr TYPE lifnr OBLIGATORY.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS mblnr FOR zvratka_prijemky-mblnr_311.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN END OF BLOCK b1.
if useful reward some points.
with regards,
Suresh.A
07-03-2007 2:05 PM
07-03-2007 2:18 PM
Hi
U can't assign the characteristic to your function code, so you need to delete the OBLIGATORY option and manage it in the event AT SELECTION-SCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS werks TYPE werks_d.
PARAMETERS lifnr TYPE lifnr.
SELECT-OPTIONS mblnr FOR zvratka_prijemky-mblnr_311.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
sscrfields-functxt_01 = text-013 .
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = 'FC01'.
...
ELSE.
IF WERKS IS INITIAL.
MESSAGE E208(00) WITH 'Insert the Plant'.
ENDIF.
IF LIFNR IS INITIAL.
MESSAGE E208(00) WITH 'Insert Vendor Code'.
ENDIF.
ENDIF.
Max
07-03-2007 2:18 PM
YOu must have created the GUI Status / PF-Status.
Go To SE41 & give program name & GUI Status Name (which contains the FUnction Key)
Double Click on the Function Key to make the changes.
Message was edited by:
Anish Thomas
07-03-2007 2:26 PM
07-03-2007 2:26 PM
Hi
<b>DON'T CHANGE THE STATUS</b>, it's a std one and used for all reports with a selection-screen.
Use the event AT SELECTION-SCREEN to check of the user has filled the mandatory inputs just as I explianed you in my previous answer.
Max
07-03-2007 2:52 PM
How to do such thing?
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS werks TYPE werks_d.
PARAMETERS lifnr TYPE lifnr.
SELECT-OPTIONS mblnr FOR zvratka_prijemky-mblnr_311.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
sscrfields-functxt_01 = text-013 .
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = 'FC01'.
WRITE: 'some text'.
ELSE.
IF WERKS IS INITIAL.
MESSAGE E208(00) WITH 'Insert the Plant'.
ENDIF.
IF LIFNR IS INITIAL.
MESSAGE E208(00) WITH 'Insert Vendor Code'.
ENDIF.
ENDIF.
in that situation I receive a message that no documents were found (so I assume that programm continued working), text doesn't show on the screen