‎2010 Feb 03 1:46 PM
SELECT-OPTIONS AND PARAMETERS
*----
selection-screen begin of block a with frame title text-001.
selection-screen begin of line.
selection-screen comment 1(20) for field p_bl.
parameters : p_bl as checkbox .
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) for field p_di.
parameters : p_di as checkbox .
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) for field p_pl.
parameters : p_pl as checkbox .
selection-screen comment 25(20) for field p_plout.
parameters : p_plout like nast-kschl.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) for field p_in.
parameters : p_in as checkbox .
selection-screen comment 25(20) for field p_inout.
parameters : p_inout like nast-kschl.
selection-screen end of line.
selection-screen end of block a.
selection-screen begin of block c with frame title text-003.
parameters: pa_email no-display ,
pa_downl no-display.
selection-screen end of block c.
*----
START-OF-SELECTION
*----
if p_bl eq c_x.
perform download_bl.
endif.
if p_di eq c_x.
perform download_di.
endif.
If Delivery Order is checked
if p_pl eq c_x.
perform download_packlist.
endif.
If Invoice , Based On The OutPut Type is checked
if p_in eq c_x .
perform download_invoice.
endif.
I using the above program.
My question is i want validation in selection screen for below stmts.
1) atleast 1 of the check box should be selected
2) If packing list is selected, then the message type Must be selected. (can not allow blank)
3) If invoice list is selected, then the message type must be selected
4) Validate the message type field entered.
--
‎2010 Feb 03 3:13 PM
Hi Sen 001
It depends how you want to validate. If you want to validate immediately after the user put a check box or enter value then you shoul use <AT SELECTION SCREEN> event and <USER-COMMAND> following your parameters (or select-options) in your selection screen. You can also validate when user presses F8, where you should put your validation inside <START-OF-SELECTION> event.
Example to immediate validate after check box entered
SELECTION-SCREEN: BEGIN OF BLOCK b02 WITH FRAME.
PARAMETERS: p_grp RADIOBUTTON GROUP gr1 DEFAULT 'X' USER-COMMAND zcomm,
p_dst RADIOBUTTON GROUP gr1.
SELECTION-SCREEN: END OF BLOCK b02.
AT SELECTION-SCREEN.
IF sy-ucomm(6) = 'ZCOMM'.
PERFORM xxx.
ELSE.
PERFORM yyy.
ENDIF.
‎2010 Feb 03 3:25 PM