Skip to Content
avatar image
Former Member

set field in selection screen as NO INPUT

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.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Apr 25, 2017 at 06:58 AM

    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'.
    
    Add comment
    10|10000 characters needed characters exceeded

  • Apr 25, 2017 at 06:43 AM

    Hi!

    You should use PBO event for this.

    Put your loop under AT SELECTION SCREEN OUTPUT event

    Evgeny

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 25, 2017 at 09:43 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 25, 2017 at 11:47 AM

    hii martin,

    there are some selection events:

    INITIALIZATION. triggers only one time.
    
    AT SELECTION-SCREEN OUTPUT. it works like PAI/ PBO from modulepool.
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 25, 2017 at 12:05 PM

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

    Add comment
    10|10000 characters needed characters exceeded