Thursday, July 19

Context menu is a dialog program page3...

go to page2 of this post...
From the left pane of UI elements, select Box and create a rectangle on the middle area of screen painter as shown below
Then create two input fields within the box. Enter various properties of each input field. Properties for Input field1 are shown in below screen shot.
After adding the two input fields, layout of the screen will look like shown below.
After adding the two input fields, layout of the screen will look like shown below.


Now go to flow logic of screen 9000. Uncomment the commented lines (Module status_9000 and module user command 9000).
Double click on Module_status_9000 and write below code.
prog sy-repid.
 
SET PF-STATUS 'ZGUI_9000'.
  
SET TITLEBAR 'TITLE'.
Double click on Module USER_COMMAND_9000  and write below code.
CLEAR OK_CODE.
OK_CODE = SY-UCOMM.
CASE OK_CODE
  .
  WHEN 'REPLACE'.
      TEXT1 = 'TEXT REPLACED'.
    WHEN 'CLEAR'.
      CLEAR text1.

      when 'ZOOM'.

        LOOP AT SCREEN.
    SCREEN-INTENSIFIED = 1.
    SCREEN-COLOR = 1111.
    MODIFY SCREEN.
    EXIT.

  ENDLOOP.

  when 'CALM DOWN'.
    SCREEN-INTENSIFIED = '0'.
     LOOP AT SCREEN.
  IF SCREEN-NAME = '9000'.
    SCREEN-INTENSIFIED = '0'.
    MODIFY SCREEN.
      EXIT.
  ENDIF.
  ENDLOOP.
        when 'EXIT'.
        LEAVE TO SCREEN 0.
ENDCASE.
In order to populate the context menu, we need to write below code in forms we already declared above in the menu painter. You will see 2 subroutines already created in the tree structure of the Program.

No comments:

Post a Comment

You are welcome to express your views here...