‎2008 Oct 24 11:28 AM
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
‎2008 Oct 24 11:29 AM
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.
‎2008 Oct 24 11:29 AM
‎2008 Oct 24 12:22 PM
How can i stop calling it. my call statement is in flow logic.
‎2008 Oct 24 11:29 AM
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.
‎2008 Oct 24 12:24 PM
‎2008 Oct 24 12:27 PM
Hi,
just below your selection screen in...
AT SELECTION-SCREEN OUTPUT.
regards
debarshi
‎2008 Oct 24 12:31 PM
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
‎2008 Oct 24 12:36 PM
where ever you designed the selection screen, under that place the logic. see my post.
‎2008 Oct 24 12:38 PM
‎2008 Oct 24 12:44 PM
I included some code in the flow logic of the standard program
‎2008 Oct 24 12:45 PM
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
‎2008 Oct 24 11:31 AM
Hi Lisa ,
Use
At selection-screen output.
Loop at screen.
"write ur logic.
Endloop.Thanks & Regards
‎2008 Oct 24 11:31 AM
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.
‎2008 Oct 24 12:37 PM
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
‎2008 Oct 24 12:45 PM
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 INPUTflow 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.
‎2008 Oct 24 11:31 AM
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
‎2008 Oct 24 11:31 AM
hi,
just change the visibility property of the fields according to the condition.
‎2008 Oct 24 11:33 AM
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.
‎2008 Oct 24 11:33 AM
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.