Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Selection screen

Former Member
0 Likes
1,139

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

15 REPLIES 15
Read only

Former Member
0 Likes
1,099

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

Read only

Former Member
0 Likes
1,099

>

> 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

Read only

Former Member
0 Likes
1,099

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.

Read only

0 Likes
1,099

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.

Read only

0 Likes
1,099

>

> 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...

Read only

0 Likes
1,099

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

Read only

0 Likes
1,099

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' .

Read only

0 Likes
1,099

hi,

this is fine...

please paste the rest of the code.....

not able to understand where it is missing out on

regards,

Siddarth

Read only

0 Likes
1,099

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.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,099

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

Read only

Former Member
0 Likes
1,099

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

Read only

former_member156446
Active Contributor
0 Likes
1,099
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.
Read only

Former Member
0 Likes
1,099

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

Read only

Former Member
0 Likes
1,099

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

Read only

Former Member
0 Likes
1,099

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