interactive list techniques
Download
Skip this Video
Download Presentation
Interactive List Techniques

Loading in 2 Seconds...

play fullscreen
1 / 35

Interactive List Techniques - PowerPoint PPT Presentation


  • 102 Views
  • Uploaded on

Interactive List Techniques. Detail Lists Program Flow in Detail Lists Events Page Headings SET TITLEBAR Data Transport Selecting Multiple Lines Field Selection System Fields for interactive Lists 補充:利用 ALV GRID 顯示資料. 1. Detail Lists. Program Flow in Detail Lists. Creating Data Lists.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Interactive List Techniques' - alana-coffey


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
interactive list techniques
Interactive List Techniques
  • Detail Lists
    • Program Flow in Detail Lists
    • Events
    • Page Headings
    • SET TITLEBAR
  • Data Transport
  • Selecting Multiple Lines
  • Field Selection
  • System Fields for interactive Lists
  • 補充:利用ALV GRID顯示資料
slide6
練習1-1

REPORT Z9901_0518A.

START-OF-SELECTION.

WRITE:/ \'BASIC LIST\', SY-LSIND.

AT LINE-SELECTION.

WRITE:/ \'DETAIL LIST\', SY-LSIND.

slide10
練習1-2

REPORT Z9901_0518A.

START-OF-SELECTION.

FORMAT HOTSPOT ON COLOR 3 INVERSE ON.

WRITE:/ \'BASIC LIST\', SY-LSIND.

TOP-OF-PAGE.

WRITE: \'TITLE1:\', SY-TITLE.

ULINE.

AT LINE-SELECTION.

WRITE:/ \'DETAIL LIST\', SY-LSIND.

TOP-OF-PAGE DURING LINE-SELECTION.

write:/ \'TITLE2\'.

slide13
練習1-3

REPORT Z9901_0518A NO STANDARD PAGE HEADING.

START-OF-SELECTION.

SET TITLEBAR \'T01\' WITH SY-DATUM.

FORMAT HOTSPOT ON COLOR 3 INVERSE ON.

WRITE:/ \'BASIC LIST\', SY-LSIND.

TOP-OF-PAGE.

WRITE: \'TITLE1:\', SY-TITLE.

ULINE.

AT LINE-SELECTION.

SET TITLEBAR \'T02\' WITH SY-LSIND.

WRITE:/ \'DETAIL LIST\', SY-LSIND.

TOP-OF-PAGE DURING LINE-SELECTION.

write:/ \'TITLE2\'.

slide17
練習2

REPORT Z9901_0518B.

START-OF-SELECTION.

TABLES Z9901SELECTION.

SELECT * FROM Z9901SELECTION.

FORMAT HOTSPOT ON COLOR 5 INVERSE ON.

WRITE:/ Z9901SELECTION-SNO, Z9901SELECTION-SNAME, Z9901SELECTION-CNO.

HIDE: Z9901SELECTION-CNO.

ENDSELECT.

AT LINE-SELECTION.

TABLES Z9901COURSE.

SELECT * FROM Z9901COURSE

WHERE CNO = Z9901SELECTION-CNO.

WRITE:/ Z9901COURSE-CNO, Z9901COURSE-CNAME, Z9901COURSE-CGRADE, Z9901COURSE-TEACHER.

ENDSELECT.

3 selecting multiple lines
3. Selecting Multiple Lines

DATA MARK.

WRITE:/ MARK AS CHECKBOX,

AT LINE-SELECTION.

DO.

CLEAR MARK.

READ LINE SY-INDEX FIELD VALUE MARK.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

IF MARK <> SPACE.

WRITE:/ Z9901SELECTION-SGRADE, Z9901SELECTION-SNAME.

MODIFY CURRENT LINE FIELD VALUE MARK FROM SPACE.

ENDIF.

ENDDO.

slide20
練習3

REPORT Z9901_0518C.

DATA MARK.

START-OF-SELECTION.

TABLES Z9901SELECTION.

SELECT * FROM Z9901SELECTION.

FORMAT HOTSPOT ON COLOR 5 INVERSE ON.

WRITE:/ MARK AS CHECKBOX,

Z9901SELECTION-SNO, Z9901SELECTION-SNAME, Z9901SELECTION-CNO.

HIDE: Z9901SELECTION-SGRADE, Z9901SELECTION-SNAME.

ENDSELECT.

slide21
練習3 (續)

AT LINE-SELECTION.

DO.

CLEAR MARK.

READ LINE SY-INDEX FIELD VALUE MARK.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

IF MARK <> SPACE.

WRITE:/ Z9901SELECTION-SGRADE, Z9901SELECTION-SNAME.

MODIFY CURRENT LINE FIELD VALUE MARK FROM SPACE.

ENDIF.

ENDDO.

6 alv grid dialog programming
6. 補充:利用ALV GRID顯示資料(應用物件導向及dialog programming)
slide30
修改程式碼

REPORT zpu101_01_alv_grid2 .

DATA gdt_spfli TYPE STANDARD TABLE OF zpu101_01_art.

DATA ok_code LIKE sy-ucomm.

DATA: container_r TYPE REF TO cl_gui_custom_container,

grid_r TYPE REF TO cl_gui_alv_grid.

START-OF-SELECTION.

* fill internal table

SELECT * FROM zpu101_01_art INTO TABLE gdt_spfli.

CALL SCREEN 100.

slide31
修改程式碼

MODULE create_control OUTPUT.

IF container_r IS INITIAL.

CREATE OBJECT container_r

EXPORTING container_name = \'CONTAINER_1\'.

CREATE OBJECT grid_r

EXPORTING i_parent = container_r.

CALL METHOD grid_r->set_table_for_first_display

EXPORTING i_structure_name = \' zpu101_01_art\'

CHANGING it_outtab = gdt_spfli.

ENDIF.

ENDMODULE.

slide34
練習:讓使用者以進階查詢方式,輸入團體編號範圍,進行查詢練習:讓使用者以進階查詢方式,輸入團體編號範圍,進行查詢
slide35
修改程式碼參考

REPORT zpu101_01_alv_grid2 .

DATA gdt_spfli TYPE STANDARD TABLE OF zpu101_01_art.

DATA ok_code LIKE sy-ucomm.

DATA: container_r TYPE REF TO cl_gui_custom_container,

grid_r TYPE REF TO cl_gui_alv_grid.

tables zpu101_01_show.

SELECT-OPTIONS team for zpu101_01_show-team.

START-OF-SELECTION.

* fill internal table

SELECT * FROM zpu101_01_art INTO TABLE gdt_spfli

where artid in team.

CALL SCREEN 100.

ad