‎2006 Jun 01 10:48 AM
Hi,
I am using Modif id to open up certain fields depending on the check box in a report selection screen. There is also an obligatory field in the screen. If the obligatory field is entered and then the check box is checked, the fields open up. But if the obligatory field is not entered, there is an error msg to fill the obligatory field.
Is there any way that the fields open up as soon as the check box is checked, without checking the obligatory field ?
Thank you
usha
‎2006 Jun 01 10:50 AM
Usha,
Attach a USER-COMMAND to the check box and then the code your write will fire immeidately so that you don't have wait for the mandatory field.
Regards,
Ravi
Note :Please mark the helpful answers
‎2006 Jun 01 10:58 AM
Thanx ravi.But, i have attached an USER-COMMAND. Still i am facing this problem. if the mandatory field is field is entered, it works fine.
Thank you
Usha
‎2006 Jun 01 11:16 AM
Hi Usha,
check my post, and follow the same steps...it will not trouble you..
Regards
vijay
‎2006 Jun 01 1:19 PM
Hello Vijay,
Thanx a lot. Your post helped me. The problem is solved.
In AT SELECTION SCREEN event, i am checking if the check box is checked and execute is pressed. If so, im making the date field obligatory at that point. Hence if it is not filled, the system throws an error.
Thank you,
usha
‎2007 Feb 20 11:17 AM
hello,
i want the exact definition of Modif Id.If the interviewer asks me what is Modif Id.Then what i have to say to convince him
‎2006 Jun 01 10:51 AM
HI Usha,
Remove the obligatory additon for that parameter and do the validation for the entry only if it is opened up.
<b>if p_check = 'X'.
if p_matnr is initial.
message e000 with 'Enter Material'.
endif.
endif.</b>
Regards,
Ravi
‎2006 Jun 01 10:55 AM
I have tried in a similar fashion, we nshud not have obligatory in such cases as at the AT-SELECTION SCREEN OUTPUT EVENT error messages keep popping up in case of any errors
<b>
U can have a flag at the at selection-screen output which will possibly work</b>
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_FILE(25) TYPE C,
O_FILE(25) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
*Selection Screen 2
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: CAL_TRA RADIOBUTTON GROUP G1 USER-COMMAND FLAG,
SESSION RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B2.
*Selection Screen 3
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
PARAMETERS: MODE DEFAULT 'X' MODIF ID BL1,
UPDATE DEFAULT 'X' MODIF ID BL1.
SELECTION-SCREEN END OF BLOCK B3.
*Selection Screen 4
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-003.
PARAMETERS: SES_NAM TYPE APQI-GROUPID MODIF ID BL2,
KEP_TRAS TYPE C DEFAULT 'X' MODIF ID BL2,
LOC_DATE TYPE SY-DATUM MODIF ID BL2,
USER TYPE SY-UNAME DEFAULT SY-UNAME MODIF ID BL2.
SELECTION-SCREEN END OF BLOCK B4.
************************************************************************
* At Selection-Screen Output *
************************************************************************
AT SELECTION-SCREEN OUTPUT.
IF CAL_TRA = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = '1'.
ENDIF.
IF SCREEN-GROUP1 = 'BL2'.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF SESSION = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = '0'.
ENDIF.
IF SCREEN-GROUP1 = 'BL2'.
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.Message was edited by: Rahul Kavuri
‎2006 Jun 01 10:55 AM
Hi Usha,
first you remove the obligatory option for the fields.
second for those fields check the initial condition in at selection screen event.
at selection-screen.
if sy-ucomm = 'ONLY'.
if not s_matnr[] is initial.
message e000 with 'please enter material'.
endif.
endif.some thing like this...
similarly for other fields which you want to check the initial condition.
this will workk...
Regards
vijay
‎2006 Jun 01 10:56 AM
Hi
something like this:
Hi
Something like this:
PARAMETERS: rad1 RADIOBUTTON GROUP r1 USER-COMMAND aaa,
rad2 RADIOBUTTON GROUP r1.
PARAMETERS: p_field TYPE c MODIF ID mmm.
AT SELECTION-SCREEN OUTPUT.
IF rad2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MMM'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Max
‎2006 Jun 01 11:04 AM
‎2006 Jun 01 11:09 AM
hi usha,
1. We have to use TWO EVENTS.
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN
2. Just copy paste in new program.
(its as per what u require,
1 checkbox, 1 compulsry field, 2 optional/disabled fields)
3.
report abc.
DATA : FLAG TYPE I.
*----
parameters : a(10) type c MODIF ID A.
parameters : b(15) type c MODIF ID A.
parameters : COMPUL(15) type c.
parameters : chkc type checkbox user-command CH.
*----
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'A'.
SCREEN-INPUT = FLAG.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*----
AT SELECTION-SCREEN .
IF SY-UCOMM = 'CH'.
IF COMPUL IS INITIAL.
MESSAGE 'PLEASE ENTER ' TYPE 'S'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
IF SY-UCOMM = 'CH' AND CHKC = 'X'.
IF COMPUL IS NOT INITIAL.
FLAG = 1.
ENDIF.
ENDIF.
regards,
amit m.