2009 Mar 25 3:27 PM
Hello SDN Community, I have researched this extensively in forums and found much helpful information in getting the select-option working in a subscreen. Also found information that discussed using standard AT SELECTION-SCREEN statements to process the sub-screen with.
I encountered problems when that from the LOOP AT SCREEN within the AT SELECTION-SCREEN OUTPUT, I set the INPUT/OUPUT attributes to zero, the field was still open for input when it displayed. For when I do this on other fields of my screen, they are "greyed out".
Has anyone any experience setting field attributes from within loop at screen for embedded select-option subscreen? Would appreciate any insight you might have.
Thank you,
Dean Atteberry.
P.S.- I put this thru the debugger and I can see the INPUT and OUTPUT attributes getting changed. But when displays, it is like the change didn't happen.
Full description of my processing below...
I have a screen with four radio-buttons. Under the first radio-button is my embedded subscreen with one SELECT-OPTION for AUFNR. Under the other three radio-buttons are single fields declared regular way in main screen.
In my PBO of main screen I have loop at screen that enables/disables INPUT and OUPTUT attributes based on which radio-button is selected. This prevents confusion from user entering values in fields other than the one the radio-button is selected for.
For my embedded select-option subscreen, I have an AT SELECTION-SCREEN OUTPUT statement in which I have a LOOP AT SCREEN. Within that, based on radio-buttons, I either enable or disable the INPUT and OUTPUT attributes for the S_AUFNR-LOW and S_AUFNR-HIGH fields.
Edited by: Dean Atteberry on Mar 25, 2009 4:39 PM
2009 Mar 25 5:05 PM
>> I think that you are trying to change select options within main screen, whereby it should be
>> changed in PBO of that subscreen. You said you do it in AT SELECTION-SCRREN OUTPUT which
>> will be only applicable for selection screen (I guess your main screen here). Do loop at screen in
>> PBO module of this subscreen not in PBO of the selection screen and see if that helps.
Hi Marcin, thank you for your reply. My "main screen" is not my "selection screen". Please allow me to further clarify...
My "main screen" has four radio buttons with a subscreen area under the first one and single fields under the others.
My "subscreen" is auto-generated by Selection-Screen and Select-Options statements which are in my TOP module.
I call my auto-generated select-option subscreen in my PBO with...
call subscreen sca_ordr including sy-repid scr_0121.
and in my PAI with...
call subscreen sca_ordr.
In order to do LOOP AT SCREEN for my system-generated select-option subscreen, I use the AT SELECTION-SCREEN OUTPUT event in which to put my loop.
When I walk thru this in the debugger, I can see it setting INPUT/OUTPUT fields to zero, but when the screen displays, there are no changes to my subscreen.... Fields should be "greyed out" instead they are open for intput.
Doing my best to accurately describe in as few words as possible. Thank you for your ideas!
Dean.
2009 Mar 25 3:52 PM
Hi Dean,
I think that you are trying to change select options within main screen, whereby it should be changed in PBO of that subscreen. You said you do it in AT SELECTION-SCRREN OUTPUT which will be only applicable for selection screen (I guess your main screen here). Do loop at screen in PBO module of this subscreen not in PBO of the selection screen and see if that helps.
Regards
Marcin
2009 Mar 25 5:05 PM
>> I think that you are trying to change select options within main screen, whereby it should be
>> changed in PBO of that subscreen. You said you do it in AT SELECTION-SCRREN OUTPUT which
>> will be only applicable for selection screen (I guess your main screen here). Do loop at screen in
>> PBO module of this subscreen not in PBO of the selection screen and see if that helps.
Hi Marcin, thank you for your reply. My "main screen" is not my "selection screen". Please allow me to further clarify...
My "main screen" has four radio buttons with a subscreen area under the first one and single fields under the others.
My "subscreen" is auto-generated by Selection-Screen and Select-Options statements which are in my TOP module.
I call my auto-generated select-option subscreen in my PBO with...
call subscreen sca_ordr including sy-repid scr_0121.
and in my PAI with...
call subscreen sca_ordr.
In order to do LOOP AT SCREEN for my system-generated select-option subscreen, I use the AT SELECTION-SCREEN OUTPUT event in which to put my loop.
When I walk thru this in the debugger, I can see it setting INPUT/OUTPUT fields to zero, but when the screen displays, there are no changes to my subscreen.... Fields should be "greyed out" instead they are open for intput.
Doing my best to accurately describe in as few words as possible. Thank you for your ideas!
Dean.
2009 Mar 25 6:52 PM
Hi Dean,
I got your idea. Check this test report, it works fine for me.
REPORT z_test.
SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
PARAMETERS pa_check AS CHECKBOX DEFAULT 'X'.
PARAMETERS pa TYPE sflight-carrid.
SELECT-OPTIONS so FOR pa.
SELECTION-SCREEN END OF SCREEN 0200.
CALL SCREEN 0100.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CS 'SO'.
IF pa_check = 'X'.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
"Flow logic of screen 100
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN sub_area INCLUDING 'Z_TEST' '0200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN sub_area.
When you check parameter pa_check the select-options will be disabled for input (INPUT = 0), otherwise it is input enabled (INPUT = 1).
Regards
Marcin
2009 Mar 26 2:00 PM
Thank you, Marcin, for the coding example. I got it running in my system and then started comparing to my code.
myBad!! - I left out the MODIFY SCREEN statement. Did everything else right and left out one line of code. oh, well, all in a days work!
Thank you again for the very helpful coding example.
Dean.
2009 Mar 26 2:10 PM
No problem Dean. Btw just as a reminder: marking the thread as closed doesn't assign any points to the contributors (of course if you plane to distribute any;) ).
Regards
Marcin
2009 Mar 26 8:15 PM
Ouch! myBad twice in one week! 8-(
Thank you for all your help! 8-)
Dean.
2009 Mar 26 8:41 PM
Thanks for appreciation and sorry for remainding you:)
Cheers
Marcin
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |