Advertisement
Guest User

Показывает историю изменений к Z-объекту

a guest
May 15th, 2013
5,437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.94 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report  ZPM_EQT_POST_CD
  3. *&
  4. *&---------------------------------------------------------------------*
  5. *& Показывает историю изменения к ZPM_OPER
  6. *& Вызывается из программы ZPM_EQT_POST
  7. *&---------------------------------------------------------------------*
  8. REPORT  ZPM_EQT_POST_CD.
  9.  
  10. parameters: p_eqopr type zpm_oper-eqopr.
  11.  
  12. data: lv_object_id type cdhdr-objectid.
  13. data: lv_objekt type cdobjectcl.
  14. data: lv_username type cdusername.
  15.  
  16. data: lt_headers        type  cdhdr occurs 0 with header line.
  17. data: lt_positions      type cdshw occurs 0 with header line.
  18.  
  19. data: lt_chdoc type bank_tab_cd_chdoc with header line.
  20.  
  21. lv_objekt = 'ZPM_OPER'.
  22. lv_object_id = p_eqopr.
  23.  
  24. call function 'CHANGEDOCUMENT_READ_HEADERS'
  25.   exporting
  26.     objectclass       = lv_objekt
  27.     objectid          = lv_object_id
  28.     username          = lv_username
  29.   tables
  30.     i_cdhdr           = lt_headers[]
  31.   exceptions
  32.     no_position_found = 1
  33.     others            = 2.
  34.  
  35. loop at lt_headers.
  36.   refresh lt_positions[].
  37.  
  38.   call function 'CHANGEDOCUMENT_READ_POSITIONS'
  39.     exporting
  40.       changenumber      = lt_headers-changenr
  41.     importing
  42.       header            = lt_headers
  43.     tables
  44.       editpos           = lt_positions[]
  45.     exceptions
  46.       no_position_found = 1
  47.       others            = 2.
  48.  
  49.   loop at lt_positions.
  50.     move-corresponding lt_headers to lt_chdoc.
  51.     move-corresponding lt_positions to lt_chdoc.
  52.     append lt_chdoc.
  53.   endloop.
  54. endloop.
  55.  
  56. data: gs_header_description type bank_str_cd_header_description.
  57.  
  58. if lines( lt_chdoc ) > 0.
  59.   call function 'BANK_API_CHDOC_DISPLAY'
  60.     exporting
  61.       i_sortsequence        = 'D'
  62.       i_flg_selectionscreen = ' '
  63.       i_applicationid       = sy-repid
  64.       i_header_description  = gs_header_description
  65.     changing
  66.       c_tab_chdocread       = lt_chdoc[].
  67. endif.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement