‎2007 Sep 06 9:09 PM
Hi Gurus,
We have used dynamic subscreen for select options.
For one transaction i.e. cycle in display mode, as this element is dynamically coming on the screen, we can not change its property using loop at screen.
Is there any way by which we can change property of that select option to disable it for input.
Please suggest...
Cheers: Sam
‎2007 Sep 06 9:21 PM
I guess you are embedding your selection-screen into a subscreen area on a dynpro, if that is the case, you can manipulate the selection-screen elements like this.
Notice here, that you should be handling the PBO for the selection screen in the AT SELECTION-SCREEN OUTPUT event.
report zrich_0001 .
tables: mara.
* Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
at selection-screen output.
check sy-dynnr = '1010'.
loop at screen.
if screen-name = 'P_RAD3'.
screen-input = '0'.
modify screen.
endif.
endloop.
start-of-selection.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
module user_command_0100 input.
endmodule.
Regards,
Rich Heilman
‎2007 Sep 06 9:31 PM
Thanks for the reply Rich....Let me try this....
is there any thing else that i can try or if you have any other suggestions for me...
Truly appreciate ur time and effort...I am new to ABAP and in the learning phase...
Thanks
Sam
‎2007 Sep 06 9:42 PM
Gurus, Please suggest....the screen is coming dynamically so we cannot use loop at screen...what else can i try....
Cheers: Sam
Message was edited by:
Sam williams
‎2007 Sep 06 11:12 PM
Hi,
I am not sure 100% about this.
Why don't you create 2 subscreens 1 with all fields and other one without field you want to disable.
then call the subscreen according to your condition.
a®
‎2007 Sep 06 11:15 PM
hey a@s,
can u provide me some example to do this.....
Thanks
Sam
‎2007 Sep 06 11:28 PM
Hi,
Check this.
SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(5) TEXT-009.
SELECTION-SCREEN POSITION 10.
SELECT-OPTIONS : S_CORR FOR Table-field MATCHCODE OBJECT mcd.
SELECT-OPTIONS : S_werks FOR T001w-werks.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 1020.
SELECTION-SCREEN BEGIN OF SCREEN 1030 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(5) TEXT-009.
SELECTION-SCREEN POSITION 10.
SELECT-OPTIONS : S_CORR FOR Table-field MATCHCODE OBJECT mcd.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 1030.
In module pool declare subscreen area and do the below.
PROCESS BEFORE OUTPUT.
MODULE STATUS_100.
if <your condition > = 1. "<<<<<<<<
CALL SUBSCREEN ANA_SCA INCLUDING 'YHPRMAIN' '1020'.
else.
CALL SUBSCREEN ANA_SCA INCLUDING 'YHPRMAIN' '1030'.
endif.
PROCESS AFTER INPUT.
CALL SUBSCREEN ANA_SCA.
MODULE USER_COMMAND_100.
Please check the syntax , I am not near to my system
a®
‎2007 Sep 06 11:32 PM
Hi,
If it giving any syntax error the s_werks not found something then
SELECTION-SCREEN BEGIN OF SCREEN 1030 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(5) TEXT-009.
SELECTION-SCREEN POSITION 10.
SELECT-OPTIONS : S_CORR FOR Table-field MATCHCODE OBJECT mcd.
SELECT-OPTIONS : S_werks FOR T001w-werks no-display "<<<<<<<< check this NO DISPLAY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 1030.
a®