Advertisement
Y_SICHOV

decoupled infotype framework example

Jul 25th, 2020 (edited)
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report ZYS_DECOUPLED2
  3. *&---------------------------------------------------------------------*
  4. *&
  5. *&---------------------------------------------------------------------*
  6. REPORT zys_decoupled2.
  7.  
  8. DATA lo_0290_bl TYPE REF TO cl_hrpa_infotype_0290.
  9. DATA l_infty_container TYPE hrpad_infty_container_ref.
  10. DATA l_p0290_container TYPE REF TO cl_hrpa_infotype_container.
  11. DATA l_msg TYPE symsg.
  12. DATA l_hrpa_exception TYPE REF TO cx_hrpa_violated_assertion.
  13. DATA l_is_ok TYPE boole_d.
  14. DATA l_p0290 TYPE p0290.
  15. DATA lw_update_mode TYPE hrpad_update_mode.
  16. DATA : lr_message_list TYPE REF TO cl_hrpa_message_list.
  17. data lw_masterdata_buffer type ref to if_hrpa_masterdata_bl.
  18.  
  19. CREATE OBJECT lr_message_list.
  20.  
  21. CREATE OBJECT lo_0290_bl
  22. EXPORTING
  23. tclas = 'A'
  24. infty = '0290'.
  25.  
  26. l_p0290-infty = '0290'.
  27. l_p0290-pernr = '00028491'.
  28. l_p0290-begda = '20201201'.
  29. l_p0290-endda = '99991231'.
  30. l_p0290-subty = '26'.
  31.  
  32. CALL METHOD lo_0290_bl->if_hrpa_infty_bl~get_infty_container
  33. EXPORTING
  34. tclas = cl_hrpa_tclas=>tclas_employee
  35. pskey = l_p0290-pskey
  36. message_handler = lr_message_list
  37. no_auth_check = ''
  38. IMPORTING
  39. container = l_infty_container.
  40.  
  41. l_p0290_container ?= l_infty_container.
  42. l_infty_container ?= l_p0290_container->modify_primary_record( l_p0290 ).
  43.  
  44.  
  45. CALL METHOD lo_0290_bl->if_hrpa_infty_bl~insert
  46. EXPORTING
  47. message_handler = lr_message_list
  48. update_mode = lw_update_mode
  49. massn = ''
  50. massg = ''
  51. no_auth_check = ''
  52. IMPORTING
  53. is_ok = l_is_ok
  54. CHANGING
  55. container = l_infty_container.
  56.  
  57. cl_hrpa_masterdata_bl=>get_instance(
  58. importing
  59. masterdata_bl = lw_masterdata_buffer ).
  60.  
  61. lw_masterdata_buffer->if_hrpa_buffer_control~flush( EXPORTING no_commit = space ).
  62. "commit work.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement