Latihan Screen Painter

Created By: agus eRyanta Version: 1.0 Last Updated: March 19, 2010

1. SE 80 – Create New Program with TOP Include. 2. Activate all include and create their object. 3. Create – Screen (Right Click on Program’s Name).

Screen type : ‘normal’

4. Activate. Open Layout Screen 100. Create I/O Field with name ‘d_text’ activate close layout.


5. Create GUI Status (Right Click on Program’s Name) Click ‘OK’.

status ‘STANDARD’.

6. Click menu Extras

Adjust Template

List Viewer. Then activate.

7. Go

Flow Logic. Activate and click double MODULE STATUS_0100. Create Object Yes place at output include. Change ‘xxxxxxxx’





8. Unremark SET PF-STATUS 'xxxxxxxx' ‘STANDARD’.



Open include F01.9. add: 13. LEAVE PROGRAM. SET TITLEBAR 'xxx'. Open MODULE STATUS_0100. Fill 10. LEAVE TO SCREEN 0. Open include TOP. Add syntax: CASE sy-ucomm. ENDCASE. WHEN '&F03' OR '&F15'. title code: TITLE. place at input 12. Create GUI Titles (Right Click on Program’s Name) title with text that you want. Go to flow logic screen 100. Change xxx with ‘TITLE’ Unremark 11. WHEN '&F12' OR 'EXIT'. add: 3 . Back to screen activate MODULE USER_COMMAND_0100 include.

Select all. Open layout screen 100. and place at screen by left click. Then press F6. 4 .14. Activate All and Test Execute 15. 17. Insert table name: SCARR then klik ‘Get From Dictionary’. Create I/O Field from Table 16. Text: choose ‘header’. Click OK.

Double click the module place at include output 22. Create Push Button with FctCode ‘DISPLAY’. scarrcurrcode. scarr-url) WHERE carrid = scarr-carrid. 23. 5 . Membuat Logic SELECT FROM TABLE 20. 19. Add syntax: SELECT SINGLE mandt carrid carrname currcode url FROM scarr INTO (scarr-mandt. 21. scarr-carrid. Click OK. Go To flow logic screen 100.18. scarr-carrname. Create MODULE m_get_scarr. Go To include TOP add: TABLES: scarr.

28. Add this syntax: WHEN 'DISPLAY'. Test Execute Insert ID : AA 6 . Double click and place at include output. IF screen-name EQ 'SCARR-CARRID'. Back to flow logic screen 100. 26. Create MODULE m_set_screen. Membuat Field OBLIGATORY 25.24. screen-required = '1'. Membuat Trigger Untuk Tombol DISPLAY 29. 27. Add this syntax: LOOP AT SCREEN. CALL SCREEN 100. Back to flow logic screen 100. ENDIF. 30. MODIFY SCREEN. Double click MODULE user_command_0100. ENDLOOP.

7 . Create push button with FctCode ‘DISABLE’. Open layout screen 100.Click Display 31. 33. Membuat Tombol DISABLE dan ENABLE 32. Create push button with FctCode ‘ENABLE’.

LOOP AT SCREEN. '0'. WHEN 'ENABLE'. LOOP AT SCREEN.34. IF screen-group1 screen-input = MODIFY SCREEN. EQ 'GR1'. ENDLOOP. ENDLOOP. Click double: module m_set_screen. WHEN 'DISABLE'. Add syntax: CASE sy-ucomm. ENDIF. ENDCASE. IF screen-group1 screen-input = MODIFY SCREEN. Grouping all I/O Field with group’s name : GR1. EQ 'GR1'. '1'. 35. 8 . ENDIF. Back to flow logic screen 100. WHEN OTHERS.

9 . Test Execute Click Display Click DISABLE Click Enable 37. Open layout screen 100 and create push button with FctCode ‘PUPUP’.36. Create POP UP Screen 38.

click double MODULE user_command_0100. Back to flow logic screen 100. Now create screen 110.39. 40. Now Create GUI Status for pop up. Screen Type: ‘Modal dialog box’ 41. 10 . Add this syntax: WHEN 'POPUP'. Activate. CALL SCREEN 110 STARTING AT 50 10.

Create Function Code ‘YES’.Expand Application Toolbar. Select icon for FctCode ‘YES’. 11 .

ENDCASE. 12 . WHEN 'YES'. Activate MODULE STATUS_0110. WHEN 'NO'. Place at include input. LEAVE PROGRAM.Create Function Code ‘NO’. 42. Double click and place at include output. CALL SCREEN 100. 44. Click double: MODULE USER_COMMAND_0110. 43. Go To flow logic screen 110. Add this syntax: CASE sy-ucomm. Back to flow logic screen 110.

47.45. Open layout screen 100. Go to flow logic screen 100. 48. Click double MODULE user_command_0100. Open include TOP. Open layout screen 110. 49. Change: 13 . Tambahkan Ceck Box. Create text like: 46.

50. 14 . Test Execute. Fill Field Name : ‘x_rb’. Add: 53. Press ‘POPUP’ or check ‘Display with Pop Up’ then press ‘DISPLAY’. create 3 radio button by press F6. Subscreen 52. Then press get from program. Open layout screen 100. 51. Open include TOP.

. d_subscreen = '120'. ENDCASE. Go to flow logic screen 100 Add: module status_0100. 55. WHEN x_rb-rb_3. ENDIF. block all radio button right click radio button Give function code XRAD 54. d_subscreen = '0120'. Create subscreen area with name ‘SUB1’. WHEN x_rb-rb_2. WHEN x_rb-rb_1. CASE 'X'. d_subscreen = '0130'. 15 . IF d_subscreen IS INITIAL. d_subscreen = '0140'.Grouping the radio button group define.

Go to include TOP.56. 130 and 140 with type ‘Subscreen’. Add: 58. Create 3 subscreen @ screen 120. Go to flow logic screen 100. 16 . Add: 57.

Tab Strip 61. Test Execute 60.Layout: Do same steps for subscreen 2 and subscreen 3 59. Open layout screen 100. Create tabstrip with name ‘TAB1’ and 3 strip. 17 .

63. Add: CONTROLS: tab1 TYPE TABSTRIP.62. Field with 64. STRIP2. STRIP3 for @ strip. Give Name and FctCode STRIP1. Go to include TOP. 18 . Create subscreen over tabstrip with name ‘SUB2’ ‘SUB2’. and fill Ref.

65. 66. Syncronize radio button to tabstrip. Tes Execute 19 . Tes Execute 67. Double click MODULE status_0100. Go to flow logic screen 100. Go to flow logic screen 100. Add syntax: 69. 68.

DATA: t_spfli TYPE TABLE OF ty_spfli WITH HEADER LINE. 72. tab1-activetab = 'STRIP2'. PERFORM f_clear. Double click MODULE user_command_0100. connid TYPE spfli-connid. Table Control 75. x_rb-rb_3 = 'X'. 71.70. WHEN 'STRIP3'. tab1-activetab = 'STRIP3'. PERFORM f_clear. Double click Perform f_clear. PERFORM f_clear. cityfrom TYPE spfli-cityfrom. WHEN 'STRIP2'. 73. tab1-activetab = 'STRIP1'. x_rb-rb_3. 20 . x_rb-rb_1 = 'X'. Go to flow logic screen 100. END OF ty_spfli. cityto TYPE spfli-cityto. x_rb-rb_2. Go to include TOP. x_rb-rb_2 = 'X'. Add : TYPES: BEGIN OF ty_spfli. 74. Syncronize tabstrip to radio button. Add syntax: WHEN 'STRIP1'. Add syntax: CLEAR: x_rb-rb_1.

Add syntax: SELECT connid cityfrom cityto FROM spfli INTO TABLE t_spfli WHERE carrid = scarr-carrid. 21 . Add one strip more with name STRIP4. Field strip4 with SUB3. fill Ref. 77.T_data harus implicit table with header line 76. Go to layout screen 100. Over strip4 add subscreen with name ‘SUB3’. Go to flow logic screen 100. Double click MODULE m_get_scarr.

Then click on table control with color red. Choose all: 80. Press F6. *TEBEL1 harusnya TABEL1 79.78. Then open layout screen 150. Pres OK. 22 . Create table control with name TABEL1. Create screen 150 with type subscreen. fill Field Name with x_spfli then pres get from program.

Press OK.81. Check separators: *TEBEL1 harusnya TABEL1 82. Press outside of Table Control. Fill Field Name with SPFLI. Text choose header. Press F6 again. cityfrom and cityto. 83. then press get from dictionary. Choose connid. 23 .

Go to flow logic screen 100. ENDLOOP. 24 . Drag and Drop the header text to header in table control. Go to flow logic screen 150. Add syntax: call subscreen sub3 including sy-cprog '150'. Edit this syntax: WHEN 'DISPLAY'. CALL SCREEN 110 STARTING AT 50 10. 87. LOOP AT t_spfli. 85. tab1-activetab = 'STRIP4'. ENDLOOP. PROCESS AFTER INPUT. WHEN cb_popup.84. 88. Go to flow logic screen 100. add syntax: LOOP AT t_spfli WITH CONTROL tabel1. PERFORM f_clear. 86. Add: tabel1 TYPE TABLEVIEW USING SCREEN '150'. CASE 'X'. double click module user_command_0100. Go to include TOP.

Test Execute 91. And add syntax: WHEN 'STRIP4'. CALL SCREEN 110 STARTING AT 50 10. PERFORM f_clear. tab1-activetab = 'STRIP4'. PERFORM f_clear. tab1-activetab = 'STRIP4'.ENDCASE. WHEN 'POPUP'. sd 25 . 90. 89.

Sign up to vote on this title
UsefulNot useful