BPC

Вызов выполнения скрипт логики BPC в ABAP программе (в т.ч. в BADI)

  1. REPORT ZTST3.
  2. DATA: lv_docname TYPE uj_docname ,
  3. lv_mode TYPE uj_run_mode ,
  4. lv_user type UJ_USER_ID ,
  5. lo_dispatch TYPE REF TO cl_ujk_dispatch,
  6. lt_lgx TYPE ujk_t_script_logic_scripttable .
  7. DATA: lo_old_context type ref to if_uj_context ,
  8. lo_user type ref to CL_UJE_USER .
  9. lo_old_context = cl_uj_context=>get_cur_context( ).
  10. CALL METHOD lo_old_context->GET_USER_OBJ
  11.  
  12. RECEIVING RO_USER = lo_user.
  13. lv_user = lo_user->D_OBJ_ID.
  14. lv_mode = 'EXECUTE' .
  15. lv_docname = '\ROOT\WEBFOLDERS\ZBP\ADMINAPP\Z_INCOME\ZINBDRCHAIN.LGF'. " путь до файла со скрипт логикой
  16. CREATE OBJECT lo_dispatch.
  17. CALL METHOD lo_dispatch->get_file
  18. EXPORTING
  19. i_appset = 'ZBP' " application
  20. i_application = 'Z_INCOME' " model
  21. i_user = lv_user
  22. i_filename = lv_docname
  23. IMPORTING
  24. et_lgx = lt_lgx.
  25. CALL FUNCTION 'UJK_SCRIPT_LOGIC_EXECUTE'
  26. EXPORTING
  27. I_APPSET = 'ZBP' " application
  28. I_APPLICATION = 'Z_INCOME' " model
  29. I_USER = lv_user
  30. I_LOGIC = lt_lgx
  31. I_FILE_TYPE = 'LGF'
  32. I_MODULE = uj00_c_mod_name_dm
  33. I_LGF = lv_docname
  34. I_MODE = lv_mode.
Подписка на BPC