‎2009 Apr 20 2:26 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'
I HAVE few more fields in the selection screen as BUKRS GJAHR MONAT which i can change them only HKONT i cannot change
‎2009 Apr 20 2:30 PM
Hi,
use this code to make it input disabled.
this code is tested and it works too
select-options s_hkont FOR bseg-hkont default '1000'.
AT selection-screen output.
loop at screen.
if screen-name cs 'S_HKONT'.
clear screen-input.
modify screen.
endif.
endloop.Regards,
Siddarth
Edited by: Siddharth Chordia on Apr 20, 2009 3:35 PM
‎2009 Apr 20 2:32 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'
>
> I HAVE few more fields in the selection screen as BUKRS GJAHR MONAT which i can change them only HKONT i cannot change
HI Manujnath,
" 1. By using screen Options you can make that field display.. so no one can change..
Loop at screen .
if screen-name = 'HKONT'. "Write your screen field at place of HKONT
screen-input = 0.
modify screen.
endif.
endloop.
" 2. By validation the screen field by writing the code at at selction-screen on field
at selction-screen on p_field. "write your selction screen field at [place of p+field
if hkont ne 1000.
write : ' error'.
endif.
Regards,
Prabhudas
‎2009 Apr 20 2:33 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:35 PM
if i give as
s_hkont FOR bseg-hkont default '23440104'.
AT selection-screen output.
loop at screen.
if screen-name cs 'S_HKONT'.
screen-input = space.
modify screen.
endif.
endloop.
it is directly going to output screen , i have to see the selction screen and change the BUKRS AND other fields only HKONT should be disabled.
i am not able to see selectio screen at all.
‎2009 Apr 20 2:37 PM
>
> it is directly going to output screen , i have to see the selction screen and change the BUKRS AND other fields only HKONT should be disabled.
>
> i am not able to see selectio screen at all.
Modif id is missing...
‎2009 Apr 20 2:38 PM
Hi,
would you please paste the code of your declaration part and the at selection-screen events..
so that it can be analyzed
regards,
Siddarth
‎2009 Apr 20 2:41 PM
my selection screen.
SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs
s_gjahr FOR bkpf-gjahr OBLIGATORY,
s_monat FOR bkpf-monat OBLIGATORY,
s_hkont FOR bseg-hkont default '1000' .
‎2009 Apr 20 2:43 PM
hi,
this is fine...
please paste the rest of the code.....
not able to understand where it is missing out on
regards,
Siddarth
‎2009 Apr 20 2:47 PM
Hi Sree , we had enough spoon fed you, now you know what to do.. so please put some efforts to understand the code people gave. Thanks.
‎2009 Apr 20 5:07 PM
Hello Sree,
You can try this code:
TABLES: bkpf, bseg.
SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs,
s_gjahr FOR bkpf-gjahr OBLIGATORY,
s_monat FOR bkpf-monat OBLIGATORY,
s_hkont FOR bseg-hkont DEFAULT '1000' MODIF ID mo1.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group1 = 'MO1'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Hope this helps.
BR,
Suhas
‎2009 Apr 20 2:33 PM
Hi,
you may do as mentioned below by keeping the field as obligatory and defaulting it to '1000'.
1. You give a text to the side of the parameter saying ' This will work only for 1000'.
2. And do a validation in 'AT selection screen' event '1000' value. If any thing else is entered you can give a error message.
Regards
Sitharamaraju
‎2009 Apr 20 2:35 PM
TABLES: bseg.
SELECT-OPTIONS: s_hkont FOR bseg-hkont DEFAULT '1000' MODIF ID jay.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'JAY'.
* screen-active = '0'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
‎2009 Apr 20 4:49 PM
Hi ,
You open the Program in SE51 ( Screen Painter ) with the Screen number of the Selection screen.( To obtain the screen number of selection screen; Open the program in SE38,Execute it. Once selection screen is displayed , Go to Menu Systems under that select Status . )
Now Click on the layout button. Double Click on the Field that you want to Make Uneditable and uncheck the property Input Field . Save the Screen and Activate it.
Now Execute your Program. You will see that field is Grayed Out.
Regards,
Nikhil
‎2009 Apr 20 5:26 PM
1 goto screen painter
2 select the field and double click on it..
(property window for the field opens)
3 select the appropriate option to disable the field, sothat user can not edit the account number, but can see it.
4 in source code, in the select query, statically specify the account number in the where clause
‎2009 Apr 20 6:12 PM
Here are my suggestions :
1. If you want to keep a single constant value for the account number, why use a select option, why not go for a parameters instead and assign 0 to screen-input for that field in the at selection-screen output.
2. Or the best would be to simply give a selection screen comment saying "Account no : 1000" and internally use a constant with a value 1000 and use that in the where clause.This way you won't have to take any extra efforts of disabling the field.
regards,
Advait