on 2022 Jan 25 8:39 AM
Hi,
we are creating SAP PPM projects, phases and tasks using:
- Projects are created using FM BAPI_BUS2172_CREATE
- Phases are created using FM BAPI_BUS2173_CREATE
- Tasks are created using FM BAPI_BUS2175_CREATE
This works fine!
Now we want to include existing template roles, like done under "Resources", "Include role", however we only found BAPI_BUS2177_CREATE. This though would create new roles and not link to existing template roles.
Once added, we would then assign the roles to tasks via BAPI_BUS2175_ROLE_ASSIGN_ADD which also works fine for manually included roles.
Any BAPI available to achieve the role inclusion (as DPR participant)?
Thanks,
Jonas
f
Request clarification before answering.
Hi,
thanks for your answer.
I tested the example and I have another question.
The GUID I pass to the lc_object_manager->load_projects is my project guid I receive from BAPI_BUS2172_CREATE and this guid has objecT_type DPO.
The method though seems to request a PPO, which is a phase in my understanding, not the project itself.
Hence, the method comes back with NO projects at all, saying it did not found anything.
Can you please tell me which GUID you pass and where you get it from?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Im not using a BAPI but it works for me:
DATA: lo_ui_log TYPE REF TO cl_dpr_ui_log_res_main.
DATA ls_obj_event TYPE dpr_ts_obj_event.
CALL METHOD lc_object_manager->load_projects
EXPORTING
iv_guid = lv_guid
IMPORTING
et_projects = lt_project.
READ TABLE lt_project INTO DATA(ls_project) INDEX 1.
IF sy-subrc NE 0.
RETURN.
ENDIF.
DATA(lr_tasks) = ls_project-reference->get_all_tasks( ).
lo_ui_log = cl_dpr_ui_log_res_main=>get_instance( ).
ls_obj_event-guid = ls_data-participant_guid.
ls_obj_event-object_type = 'MTG'
ls_obj_event-root_guid = ls_project-guid.
ls_obj_event-root_object_type = 'DPO'.
lo_ui_log->role_include( ls_obj_event ).
CALL FUNCTION '/RPM/SAVE_CHANGES'
IMPORTING
ev_rc = lv_rc
et_msg = lt_msg.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.