Вывод диаграмм на abap

Ниже кусок кода который выводит диаграммы с помощью функционального модуля GRAPH_MATRIX_3D который выводит вот такой график

graph_3d.jpg

  1. BEGIN OF ty_performance,
  2. company(15) TYPE c,
  3. q1 TYPE i,
  4. q2 TYPE i,
  5. q3 type i,
  6. q4 type i,
  7. END OF ty_performance,
  8.  
  9. BEGIN OF ty_opttable,
  10. options(30) TYPE c,
  11. END OF ty_opttable.
  12.  
  13.  
  14. DATA: it_performance TYPE STANDARD TABLE OF ty_performance,
  15. wa_performance TYPE ty_performance,
  16. it_opttable type standard table of ty_opttable,
  17. wa_opttable type ty_opttable.
  18.  
  19.  
  20.  
  21.  
  22. CLEAR WA_PERFORMANCE.
  23. CLEAR wa_opttable.
  24.  
  25. wa_performance-company = 'Company A'.
  26. wa_performance-q1 = 78.
  27. wa_performance-q2 = 68.
  28. wa_performance-q3 = 79.
  29. wa_performance-q4 = 80.
  30. append wa_performance to it_performance.
  31. wa_performance-company = 'Company B'.
  32. wa_performance-q1 = 48.
  33. wa_performance-q2 = 68.
  34. wa_performance-q3 = 69.
  35. wa_performance-q4 = 70.
  36. append wa_performance to it_performance.
  37. wa_performance-company = 'Company C'.
  38. wa_performance-q1 = 78.
  39. wa_performance-q2 = 48.
  40. wa_performance-q3 = 79.
  41. wa_performance-q4 = 85.
  42. append wa_performance to it_performance.
  43. *appending values into the options internal table
  44. wa_opttable-options = 'P3TYPE = TO'.
  45. APPEND wa_opttable TO it_opttable.
  46. wa_opttable-options = 'P2TYPE = VB'.
  47. APPEND wa_opttable TO it_opttable.
  48. wa_opttable-options = 'TISIZE = 1'.
  49. APPEND wa_opttable TO it_opttable.
  50.  
  51. CALL FUNCTION 'GRAPH_MATRIX_3D'
  52. EXPORTING
  53. col1 = 'Quarter 1'
  54. col2 = 'Quarter 2'
  55. col3 = 'Quarter 3'
  56. col4 = 'Quarter 4'
  57. dim1 = 'In Percentage%'
  58. set_focus = 'X'
  59. titl = 'Company Performances'
  60. data = it_performance
  61. opts = it_opttable
  62. EXCEPTIONS
  63. others = 1.

Комментарии