Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modif id

Former Member
0 Likes
2,076

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,418

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

Read only

0 Likes
1,418

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

Read only

0 Likes
1,418

Hi Usha,

check my post, and follow the same steps...it will not trouble you..

Regards

vijay

Read only

0 Likes
1,418

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

Read only

0 Likes
1,418

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

Read only

Former Member
0 Likes
1,418

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

Read only

rahulkavuri
Active Contributor
0 Likes
1,418

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

Read only

Former Member
0 Likes
1,418

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

Read only

Former Member
0 Likes
1,418

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

Read only

Former Member
0 Likes
1,418

Hi Usha,

Can u paste ur code

Read only

Former Member
0 Likes
1,418

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.