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

Select Options for Field

Former Member
0 Likes
1,055

Hi all,

I have a requirement to make a select options low field disable and high field editable.

Can anyone guide me on this.......!!!

Awiting u r reply.

Regards,

Rashmi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,003

Hi,

check this...

INITIALIZATION.

  LOOP AT SCREEN.
    IF screen-name = 'S_NAME-LOW'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Hi,

check this...

INITIALIZATION.

  LOOP AT SCREEN.
    IF screen-name = 'S_NAME-LOW'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

6 REPLIES 6
Read only

Former Member
0 Likes
1,003

you write the code under "at-selection-screen output" event.....make one loop on screen....and make the screen enable & disable as you wish..


ELECTION-SCREEN BEGIN OF BLOCK b1 .

SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN COMMENT 40(25) text-010  .
SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) text-002 FOR FIELD pernr.
PARAMETERS pernr TYPE pa0001-pernr.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) text-008 FOR FIELD ename.
PARAMETERS ename TYPE pa0001-ename.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) text-003 FOR FIELD persg.
PARAMETERS persg TYPE pa0001-persg.
SELECTION-SCREEN COMMENT 45(15) text-009 FOR FIELD werks.
PARAMETERS werks TYPE pa0001-werks.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) text-004 FOR FIELD persk.
PARAMETERS persk TYPE pa0001-persk.
SELECTION-SCREEN COMMENT 45(15) text-005 FOR FIELD kostl.
PARAMETERS kostl TYPE pa0001-kostl.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) text-006 FOR FIELD orgeh.
PARAMETERS orgeh TYPE pa0001-orgeh.
PARAMETERS orgehtxt TYPE person-orgeh_txt .
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) text-007 FOR FIELD plans.
PARAMETERS plans TYPE pa0001-plans.
PARAMETERS planstxt TYPE person-plans_txt .
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b1.

***********************************************************************
*AT SELECTION-SCREEN OUTPUT.
************************************************************************
AT SELECTION-SCREEN OUTPUT .
  LOOP AT SCREEN.
    IF screen-name = 'ENAME'
    OR screen-name = 'PERSG'
    OR screen-name = 'PERSK'
    OR screen-name = 'KOSTL'
    OR screen-name = 'WERKS'
    OR screen-name = 'ORGEH'
    OR screen-name = 'PLANS'
    OR screen-name = 'ORGEHTXT'
    OR screen-name = 'PLANSTXT'.
      screen-input = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

  LOOP AT SCREEN.
    IF screen-name = 'ORGEHTXT'
    OR screen-name = 'PLANSTXT'.
      screen-output = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Edited by: Arunima Rudra on Jan 8, 2009 5:39 PM

Read only

Former Member
0 Likes
1,003

write this coding ..


TABLES : knc1.

select-options : s_UM01U for knc1-UM01U.

initialization.
loop at screen.

  if screen-name = 'S_UM01U-LOW'.
    screen-input = 0.
  endif.
  modify screen.

endloop.

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:35 PM

Read only

Former Member
0 Likes
1,003

Hi,

You can write as below code.


SELECT-OPTIONS: anlage FOR ever-anlage.

At SELECTION-SCREEN OUTPUT.
  Loop at screen.
    if screen-name = 'ANLAGE-LOW'.
    Screen-input = 0.
    Modify screen.
    ENDIf.

  ENDLOOP.

Hope this may be helpful.

Regards,

Sravanthi

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:35 PM

Read only

Former Member
0 Likes
1,004

Hi,

check this...

INITIALIZATION.

  LOOP AT SCREEN.
    IF screen-name = 'S_NAME-LOW'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Read only

Former Member
0 Likes
1,003

Thnkx a ton .........!!!

Read only

Former Member
0 Likes
1,003

Hi ,

Try this, i think this will satisfy your requirement.



REPORT  ZTEST.

TABLES LFA1.

SELECT-OPTIONS S_LIFNR FOR LFA1-LIFNR.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF SCREEN-NAME CS 's_lifnr-low'.
      SCREEN-ACTIVE = 1.
      SCREEN-INPUT = 0.
      SCREEN-OUTPUT = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards,

Florian