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

Hiding fields

Former Member
0 Likes
1,762

Hello All,

i am calling a selection screen as a sub screen. Now in some cases i need hide this selection screen.

How can i do it?

Regards,

Lisa

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,710

Hi,

try like this....


 LOOP AT SCREEN.
     IF screen-group1 = 'B2' OR screen-group1 = 'B3'.----->modif id of the selection screen parameters or select options...
       screen-active = 0.------>to make invisible
     ELSE.
       screen-active = 1.

      ENDIF.
     MODIFY SCREEN.
   ENDLOOP.

18 REPLIES 18
Read only

Former Member
0 Likes
1,710

what about not calling it for these cases?

Read only

0 Likes
1,710

How can i stop calling it. my call statement is in flow logic.

Read only

Former Member
0 Likes
1,711

Hi,

try like this....


 LOOP AT SCREEN.
     IF screen-group1 = 'B2' OR screen-group1 = 'B3'.----->modif id of the selection screen parameters or select options...
       screen-active = 0.------>to make invisible
     ELSE.
       screen-active = 1.

      ENDIF.
     MODIFY SCREEN.
   ENDLOOP.

Read only

0 Likes
1,710

Hello Roy,

Where do i need to write this logic?

Regards,

Lisa

Read only

0 Likes
1,710

Hi,

just below your selection screen in...


AT SELECTION-SCREEN OUTPUT.

regards

debarshi

Read only

0 Likes
1,710

I have screen in that user can select in what mode he can go like CREATE, DISPLAY, CHANGE.

when he selects display then i need to hide this selection screen. Now could you please tell me how can do it.

Regards,

Lisa

Read only

0 Likes
1,710

where ever you designed the selection screen, under that place the logic. see my post.

Read only

0 Likes
1,710

Do you mean change the flow logic of a standard program

Read only

0 Likes
1,710

I included some code in the flow logic of the standard program

Read only

0 Likes
1,710

Hi,


AT SELECTION-SCREEN OUTPUT.

loop at screen.
 
if screen-name = 'DISPLAY'.
 IF screen-group = 'BL1'.
 screen-active = 1. ----> fields will be shown
 screen-input = 0. -------> input off
else.
screen-active = 0.------------>  other field will be invisible
 endif.
 modify screen.
endif.
 
endloop.

Try like this...might work

Regards

Debarshi

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
1,710

Hi Lisa ,

Use

At selection-screen output.
Loop at screen.
"write ur logic.
Endloop.

Thanks & Regards

Read only

Former Member
0 Likes
1,710

you have to use at selection-screen output event in this case.

though it is module pool, but you are calling selection-screen as subscreen. you have to palce the logic there .

at selection-screen output.
if <some condition>. "place your condtion here
loop at screen.

if screen-name = 'ABC'.
 screen-active = 0. "hide the fields
 modify screen.
endif.

endloop.
endif.

Read only

0 Likes
1,710

Hello Vijay,

How does it works? Could you please make a small program and tell me.

initial i need a screen with one field and three buttons like CREATE,DISPLAY and CHANGE . after the user enter some value if he press DISPLAY button.

i need another screen where it should contain subscreen. when it is display it should be able to hide else. we should display this screen.

Regards,

Lisa

Read only

0 Likes
1,710
REPORT  ztest_sub.

DATA: ok_code TYPE sy-ucomm.

SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.

PARAMETERS: p_matnr TYPE matnr.

SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1100.


AT SELECTION-SCREEN OUTPUT.
  IF ok_code = 'DISP'.
    LOOP AT SCREEN.
      IF screen-name CS 'P_MATNR'.
        screen-input = 0.  "if you want to input disable 
*        screen-active = 0.  "if you want to Hide 
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

START-OF-SELECTION.

  CALL SCREEN 100.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'YYY'.  "I just set the status
  "here i added the buttons DISP , CHANGE etc

ENDMODULE.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  IF sy-ucomm EQ 'BACK'.
    LEAVE TO SCREEN 0.
  ENDIF.
  "handle the other buttons tooo..

ENDMODULE.                 " USER_COMMAND_0100  INPUT

flow logic

PROCESS BEFORE OUTPUT.
  CALL SUBSCREEN sub INCLUDING sy-repid '1100'.
  MODULE status_0100.
*
PROCESS AFTER INPUT.
  MODULE user_command_0100.

i have a subscreen area sub. along with other elements. in the element list add the ok_code also.

Read only

Former Member
0 Likes
1,710

Hi,

This may help u.....


AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
   IF SCREEN-NAME/GROUP1/GROUP2/... = '...'.
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
   ENDIF.
ENDLOOP.

Edited by: Sukriti Saha on Oct 24, 2008 4:01 PM

Read only

arjun_thakur
Active Contributor
0 Likes
1,710

hi,

just change the visibility property of the fields according to the condition.

Read only

former_member342104
Participant
0 Likes
1,710

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'OUT'.

SCREEN-INVISIBLE = 0.

SCREEN-INPUT = 1.

SCREEN-REQUIRED = 1.

MODIFY SCREEN.

ELSE.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

SCREEN-REQUIRED = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,710

Hi,

Create a blank subscreen and call the selection screen or the blank screen based on the condtion.

In PBO, declare the program name and subscreen number as varaibles, and change the value of the screen number based on the condtion.

Thanks & Regards,

Navneeth K.