Application Development 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: 

set field in selection screen as NO INPUT

Former Member
0 Kudos

Hi,

i am using below code to make fields on selection screen as "no input". so far, so good, but: report is displaying alv, and after going back to selection screen the fields are editable and "open for input". Same goes when i save a variant and return.

how can i set the "no input" permanent ? i also have tried it inside "at selection screen", etc....

br Martin

initialization.
  papbegps = '19000101'.
  papendps = '99991231'.
  papbegda = sy-datum.

  LOOP AT SCREEN.
    IF screen-name = 'PAPBEGPS' OR screen-name = 'PAPENDPS' OR
      screen-name = 'PAPBEGDA' OR screen-name = 'PAPENDDA'.
      screen-input = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Martin,

Use the loop at screen inside : AT SELECTION-SCREEN OUTPUT.

Please follow the below code.Hope it will solve your issue...

Thanks,

Vijay SR

TABLES : pernr.


INFOTYPES: 0000.


INITIALIZATION.
  pnpbegps = '19000101'.
  pnpendps = '99991231'.
  pnpbegda = sy-datum.


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'PNPBEGPS' OR screen-name = 'PNPENDPS' OR
      screen-name = 'PNPBEGDA' OR screen-name = 'PNPENDDA'.
      screen-input = '0'.
*      screen-active = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.




START-OF-SELECTION.


  WRITE : 'abc'.
5 REPLIES 5

former_member400468
Active Participant
0 Kudos

Hi!

You should use PBO event for this.

Put your loop under AT SELECTION SCREEN OUTPUT event

Evgeny

Former Member
0 Kudos

Hi Martin,

Use the loop at screen inside : AT SELECTION-SCREEN OUTPUT.

Please follow the below code.Hope it will solve your issue...

Thanks,

Vijay SR

TABLES : pernr.


INFOTYPES: 0000.


INITIALIZATION.
  pnpbegps = '19000101'.
  pnpendps = '99991231'.
  pnpbegda = sy-datum.


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'PNPBEGPS' OR screen-name = 'PNPENDPS' OR
      screen-name = 'PNPBEGDA' OR screen-name = 'PNPENDDA'.
      screen-input = '0'.
*      screen-active = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.




START-OF-SELECTION.


  WRITE : 'abc'.

raymond_giuseppi
Active Contributor
0 Kudos

INITIALIZATION is only executed once, so at next PAI/PBO the attributes of the dynpro are not changed and come from dynpro definition. As already written, move your code in the PBO, AT SELECTION-SCREEN OUTPUT.

0 Kudos

hii martin,

there are some selection events:

INITIALIZATION. triggers only one time.

AT SELECTION-SCREEN OUTPUT. it works like PAI/ PBO from modulepool.

Former Member
0 Kudos

thank you very much guy -> at selection-screen output works 🙂