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
673

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

8 REPLIES 8
Read only

Former Member
0 Likes
643

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

Read only

Former Member
0 Likes
643

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

Read only

Former Member
0 Likes
643

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!

Read only

Former Member
0 Likes
643

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

Former Member
0 Likes
643
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

Read only

Former Member
0 Likes
643

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.

Read only

Former Member
0 Likes
643

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

Read only

faisalatsap
Active Contributor
0 Likes
643

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