04-18-2008 9:00 AM
Hi expert,
In my report, I define two rodiobutton to show block1 or block2, but every time I click each radiobutton, the message "Fill in all required entry" shown, so my question is how can I skip required check when click radiabutton?
Some of my selection-screen code is :
PARAMETER: P_block1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1.
PARAMETER: P_block2 RADIOBUTTON GROUP GRP1.
SELECT-OPTIONS S_ERDAT FOR VBRK-ERDAT OBLIGATORY.
04-18-2008 9:04 AM
You can't. You will have to remove the OBLIGATORY key word and code the check yourself in AT SELECTION-SCREEN.
04-18-2008 9:04 AM
You can't. You will have to remove the OBLIGATORY key word and code the check yourself in AT SELECTION-SCREEN.
04-18-2008 9:08 AM
Try as below:
PARAMETER: p_block1 RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND uc1.
PARAMETER: p_block2 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS s_erdat FOR vbrk-erdat. " OBLIGATORY.
AT SELECTION-SCREEN.
IF s_erdat[] IS INITIAL AND NOT sy-ucomm = 'UC1'..
MESSAGE e001(00) WITH 'Fill in Creation Date'.
ENDIF.
04-18-2008 9:09 AM
Hi,
If you dont want PAI to be triggered when you select the radio button, then you can remove the USER-COMMAND while declaring parameter.
If User Command is necessary, use following code
PARAMETER: P_block1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1.
PARAMETER: P_block2 RADIOBUTTON GROUP GRP1.
SELECT-OPTIONS S_ERDAT FOR VBRK-ERDAT .
AT SELECTION-SCREEN.
CHECK SY-UCOMM NE 'UC1'.
IF S_ERDAT IS INITIAL.
MESSAGE E038(001) WITH 'ERDAT IS MANDATORY'.
ENDIF.
*********************
Please Reward points.