Tuesday, 17 November 2009

CRM: Copying attachments from service ticket to follow up document

I've got another request which I hope will be easy to implement. Copying all attachments from a service ticket to a follow up document. Hint: CL_CRM_DOCUMENTS.

To get all attachments:

CL_CRM_DOCUMENTS=>GET_INFO
Supply BUSINESS_OBJECT (instid = order's GUID, typeid = order's object_type, catid = 'BO'

To copy to another business object:

CL_CRM_DOCUMENTS=>COPY
Supply BUSINESS_OBJECT & NEW_BUSINESS_OBJECT

It seems that we don't need to use GET_INFO to be able to use the COPY function to copy all documents from the original service ticket to the follow up document. This has yet to be proven by me.. I'll implement it tomorrow and update this blog again.

Update 1: The COPY method is spot on! No further processing needs to be done.

No comments:

TOUCHTAB report, regenerate all ABAPs related to changed/modified structure

I was working on S4HANA OnPremis and tried to do an enhancement to BP's additional info structure by appending fields, but decided that ...