‎2009 Apr 20 2:09 PM
Hi all,
in the selection screen i need to have field account number , the account number 1000 should be standard no one can change . if i put default they can have an option to change how can i restrict with out changing the account number .
s_hkont FOR bseg-hkont default '1000'
Moderator message - Duplicate post locked
Edited by: Rob Burbank on Apr 20, 2009 9:51 AM
‎2009 Apr 20 2:12 PM
do something like this in the initialization.
initialization.
loop at screen.
if screen-name = 'S_HKONT'.
screen-input = 0.
screen-output = 1.
modify screen.
endif.
endloop.
Regards,
Ravi
‎2009 Apr 20 2:13 PM
hi,
* by writing below statement
at selction-screen on p_eld. "Field is nothing but you r input field
if p_input NE 1000.
write . "Do not change the input field.
endif.
other wise you can make tha field in display mode..
at selction-screen OUTPUT.
LOOP AT SCREEN
IF SCREEn-NAME = 'P_FIELD'.
screen-input = o.
modify screen.
endif.
Regards,
Prabhudas
‎2009 Apr 20 2:13 PM
Hi Sree,
After creating selection screen and actvating, it generates the one automated screen 1000 by SAP.
go to that screen 1000.
open the layout.
and change the field properties(go to Program tab ) and select input field = Not requied.
and check output only.
and also you can use the Loop at Screen option as well.
Thanks!
‎2009 Apr 20 2:14 PM
s_hkont FOR bseg-hkont default '1000' MODIF-ID DIS.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN
IF SCREEN-GROUP1 = 'DIS'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
‎2009 Apr 20 2:15 PM
Initailization:
s_hkont-Low = '1000'.
Append s_hkont.
Loop at screen.
If screen-name cs 's_hkont'.
Screen-input = 0.
Endif.
Modify screen.
Endloop.OR:
Initialization.
s_hkont-Low = '1000'.
Append s_hkont.
At selection-screen output.
Loop at screen.
If screen-name cs 's_hkont'.
Screen-input = 0.
Endif.
Modify screen.
Endloop.Regards,
Gurpreet
‎2009 Apr 20 2:15 PM
Hi,
pass the default value to that selection screen parameter as '1000' and write the below code in AT SELECTION SCREEN OUTPUT event.
parameters : p_accnt.
AT SELECTION SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_ACCNT'.
screen-input = 0.
MODIFY screen.
endif.
ENDLOOP.
‎2009 Apr 20 2:16 PM
hi sree ManjuNath ,
Give the default value as 1000
apart form the that
modify the screen attributes in the event at selection-screen output
loop at screen
if screen-group1 eq 'ABC'.
screen-input = 0.
modify screen.
endif.
endloop.
regards,
Jaya rama kumar
‎2009 Apr 20 2:34 PM
Hi,
Test following Sample Code Hope will solve out your problem,
TABLES: bseg.
SELECT-OPTIONS: sohkont FOR bseg-hkont.
INITIALIZATION.
sohkont-sign = 'I'.
sohkont-option = 'EQ'.
sohkont-low = '1000'.
IF sohkont[] IS INITIAL.
APPEND sohkont.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'SOHKONT-LOW' or screen-name = 'SOHKONT-HIGH' or screen-name = '%_SOHKONT_%_APP_%-OPTI_PUSH'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Best Regards,
Faisal