Skip to Content
0

set field in selection screen as NO INPUT

Apr 25, 2017 at 06:05 AM

132

avatar image
Former Member

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.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
avatar image
Former Member Apr 25, 2017 at 06:58 AM
0

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'.
Share
10 |10000 characters needed characters left characters exceeded
Evgeny Gubenko Apr 25, 2017 at 06:43 AM
0

Hi!

You should use PBO event for this.

Put your loop under AT SELECTION SCREEN OUTPUT event

Evgeny

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi Apr 25, 2017 at 09:43 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 25, 2017 at 11:47 AM
0

hii martin,

there are some selection events:

INITIALIZATION. triggers only one time.

AT SELECTION-SCREEN OUTPUT. it works like PAI/ PBO from modulepool.
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 25, 2017 at 12:05 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded