话不多说,先上炫图。
1 *&---------------------------------------------------------------------* 2 *& Report ZCHENH041 3 *& 4 *&---------------------------------------------------------------------* 5 *& 6 *& 7 *&---------------------------------------------------------------------* 8 9 REPORT zchenh042.10 11 DATA: BEGIN OF data OCCURS 1,12 text(25),13 value1 TYPE p,14 value2 TYPE p,15 value3 TYPE p,16 value4 TYPE p,17 END OF data.18 19 20 PERFORM frm_get_data.21 PERFORM frm_show_data.22 23 24 *&---------------------------------------------------------------------*25 *& Form FRM_GET_DATA26 *&---------------------------------------------------------------------*27 * text28 *----------------------------------------------------------------------*29 * --> p1 text30 * <-- p2 text31 *----------------------------------------------------------------------*32 FORM frm_get_data .33 data-text = '苹果'.34 data-value1 = 11111.35 data-value2 = 12345.36 data-value3 = 15678.37 data-value4 = 19876.38 APPEND data.39 40 data-text = '华为'.41 data-value1 = 22222.42 data-value2 = 23456.43 data-value3 = 26789.44 data-value4 = 29876.45 APPEND data.46 47 data-text = '小米'.48 data-value1 = 33333.49 data-value2 = 34567.50 data-value3 = 36789.51 data-value4 = 39876.52 APPEND data.53 54 data-text = '魅族'.55 data-value1 = 54321.56 data-value2 = 55555.57 data-value3 = 56789.58 data-value4 = 59876.59 APPEND data.60 61 data-text = '联想'.62 data-value1 = 67890.63 data-value2 = 66666.64 data-value3 = 65432.65 data-value4 = 61234.66 APPEND data.67 ENDFORM. " FRM_GET_DATA68 *&---------------------------------------------------------------------*69 *& Form FRM_SHOW_DATA70 *&---------------------------------------------------------------------*71 * text72 *----------------------------------------------------------------------*73 * --> p1 text74 * <-- p2 text75 *----------------------------------------------------------------------*76 FORM frm_show_data .77 CALL FUNCTION 'GRAPH_3D'78 EXPORTING79 dim1 = '手机品牌'80 dim2 = '月销量'81 mail_allow = 'X'82 titl = '国产手机五大厂商手机销量对比'83 TABLES84 data = data.85 ENDFORM. " FRM_SHOW_DATA
1 *&---------------------------------------------------------------------* 2 *& Report ZCHENH041 3 *& 4 *&---------------------------------------------------------------------* 5 *& 6 *& 7 *&---------------------------------------------------------------------* 8 9 REPORT zchenh041.10 11 DATA: BEGIN OF data OCCURS 1,12 text(25),13 value TYPE p,14 END OF data.15 16 17 PERFORM frm_get_data.18 PERFORM frm_show_data.19 20 21 *&---------------------------------------------------------------------*22 *& Form FRM_GET_DATA23 *&---------------------------------------------------------------------*24 * text25 *----------------------------------------------------------------------*26 * --> p1 text27 * <-- p2 text28 *----------------------------------------------------------------------*29 FORM frm_get_data .30 data-text = '苹果'.31 data-value = 12345.32 APPEND data.33 34 data-text = '华为'.35 data-value = 22222.36 APPEND data.37 38 data-text = '小米'.39 data-value = 11111.40 APPEND data.41 42 data-text = '魅族'.43 data-value = 54321.44 APPEND data.45 46 data-text = '联想'.47 data-value = 63625.48 APPEND data.49 ENDFORM. " FRM_GET_DATA50 *&---------------------------------------------------------------------*51 *& Form FRM_SHOW_DATA52 *&---------------------------------------------------------------------*53 * text54 *----------------------------------------------------------------------*55 * --> p1 text56 * <-- p2 text57 *----------------------------------------------------------------------*58 FORM frm_show_data .59 CALL FUNCTION 'GRAPH_2D'60 EXPORTING61 mail_allow = 'X'62 so_title = '标题'63 titl = '2D标题'64 valt = '手机月销量(中国大陆)'65 winszx = '60'66 winszy = '50'67 TABLES68 data = data.69 ENDFORM. " FRM_SHOW_DATA