Application Development 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: 

Screen Modifications

Former Member
0 Kudos

Hi Experts,

I am facing a problem with selection-screen.

I my selection-screen there is a check box. When this check box is checked an other parameter will be appeared on the screen. But when this check box is unselected this parameter is not disappearing on the screen.

I have used the below code in my program in event AT SELECTION-SCREEN OUTPUT

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(33) TEXT-M00 . "Local Language

PARAMETERS : P_LOCALL AS CHECKBOX.

SELECTION-SCREEN END OF LINE.

SELECT-OPTIONS:

S_N_TEXT FOR TSADVT-NATION_TEX NO INTERVALS OBLIGATORY MODIF ID LNG.

AT SELECTION-SCREEN OUTPUT.

IF NOT P_LOCALL IS INITIAL.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = C_LNG.

SCREEN-INVISIBLE = C_N_0.

SCREEN-INPUT = C_N_1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = C_LNG.

SCREEN-INVISIBLE = C_N_1.

SCREEN-INPUT = C_N_0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Can any tell me how to resolve the problem.

3 REPLIES 3

former_member191735
Active Contributor
0 Kudos

Try using screen-INTENSIFIED.

JozsefSzikszai
Active Contributor
0 Kudos

hi,

modify:

PARAMETERS : P_LOCALL AS CHECKBOX USER-COMMAND uc01.

replace this:

IF NOT P_LOCALL IS INITIAL.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = C_LNG.

SCREEN-INVISIBLE = C_N_0.

SCREEN-INPUT = C_N_1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = C_LNG.

SCREEN-INVISIBLE = C_N_1.

SCREEN-INPUT = C_N_0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

with:

LOOP AT screen.

IF SCREEN-GROUP1 = 'LNG'.

IF p_locall IS INITIAL.

screen-active = '0'.

ELSE.

screen-active = '1'.

ENDIF.

MODIFY screen.

ENDIF.

ENDLOOP.

hope this helps

ec

Former Member
0 Kudos

Hi Raghvendra,

Try the following code which is kind of modified version of the previous post. Use event AT SELECTION-SCREEN and not AT SELECTION-SCREEN OUTPUT as it gets triggerred only once (PBO).

See below:


PARAMETERS : P_LOCALL AS CHECKBOX USER-COMMAND UC01.

AT SELECTION-SCREEN.       "put your code under this event
  LOOP AT screen.
    IF SCREEN-GROUP1 = 'LNG'.
      IF sy-ucomm eq 'UC01'.  "only for the checkbox clicking
        IF p_locall IS INITIAL.
          screen-active = '0'.
        ELSE.
          screen-active = '1'.
        ENDIF.
      ENDIF.
      MODIFY screen.
    ENDIF.
  ENDLOOP.

Hope this helps.

Thanks

Sanjeev