Solution : https://service.sap.com/sap/support/notes/449993 (SAP Service marketplace login required)
Key words :
call function 'sdok_phio_create_as_copy' exporting object_class = l_props-class_ph source_object_id = l_object tables properties_to_change = lt_propty to_relations = lt_to_relations exceptions, call function 'swuo_get_templates_api' exporting wf_id_def = l_wfd_key-wfd_id wf_version = '9999' tables properties = lt_props exceptions, call function 'swd_get_latest_wf_version' exporting act_task = p_wf_id importing act_wfdkey = l_wfd_key exceptions, message id sy-msgid type 'e' number sy-msgno, sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4, swuoprop structure swuopropexceptions obj_not_specified open_failed copy_failedand import, workflow additional key words document templates, l_object-class = l_props-class_ph, lt_propty type standard table, l_object-objid = l_props-objid_ph
Related Notes :
571302 | Collective note relating to Transports in workflow |