Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PPF -> create follow up: Partner is not copied

Hello everybody,

i've implemented IF_EX_EXEC_METHODCALL_PPF~EXECTUE.

the creation of the follow up activity is working fine. also the partner is copied from the previous activity. The problem is, that the employee of the partner is not copied.

When i create a follow up in webui the partner employee is copied as well. this is implemented by using a copy control for bt.

My copy implementation:

DATA: lr_action_execute TYPE REF TO cl_action_execute,
lv_guid_ref       TYPE crmt_object_guid,
lv_actionname     TYPE ppfdtt,
lt_head_guids     TYPE crmt_object_guid_tab,
lt_orderadm_h     TYPE crmt_orderadm_h_wrkt,
lv_kind_ref       TYPE crmt_object_kind,
ls_orderadm_h     TYPE crmt_orderadm_h_wrk,
lv_desc           TYPE ppfdttt.

CREATE OBJECT lr_action_execute.

INCLUDE crm_object_kinds_con.

* get parameter from reference object
CALL METHOD lr_action_execute->get_ref_object
EXPORTING
io_appl_object = io_appl_object
ip_action      = ip_action
ip_preview     = ip_preview
ii_container   = ii_container
IMPORTING
ev_guid_ref    = lv_guid_ref
ev_actionname  = lv_actionname
ev_kind_ref    = lv_kind_ref.


* prepare text for copy
CALL METHOD lr_action_execute->prepare_actiontext
EXPORTING
iv_guid_ref   = lv_guid_ref
iv_actionname = lv_actionname.

INSERT lv_guid_ref INTO TABLE lt_head_guids.

* read relevant itmes of the source document
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_head_guids
IMPORTING
et_orderadm_h  = lt_orderadm_h.


READ TABLE lt_orderadm_h INTO ls_orderadm_h INDEX 1.
lv_desc = ls_orderadm_h-description.

* copy document
CALL METHOD lr_action_execute->copy_document
EXPORTING
io_appl_object     = io_appl_object
ip_application_log = ip_application_log
ip_action          = ip_action
ip_preview         = ip_preview
ii_container       = ii_container
iv_actiontext      = lv_desc
IMPORTING
rp_status          = rp_status.


Are I'm mising something?


Best...

Tags:
Not what you were looking for? View more on this topic or Ask a question