Hello Rafal,
Please refer to this link to do the first part http://help.sap.com/saphelp_crm700_ehp01/helpdata/en/45/efb658c3f406f6e10000000a155369/frameset.htm
Here you can see that you have to activate the business function CRM_IC_CEBP.
In customizing go to:
Customer Relationship Management
Interaction Center WebClient
Basic Functions
Define Script Profiles
Search for your profile and set the flag "Save".
In the Interaction Center the transcript will be saved with the activity clipboard
You can read the activity clipboard using the following code:
DATA: lr_clip_cuco TYPE REF TO if_crm_ui_bol_clipboard,
ct_content TYPE crmt_ui_cb_content_tab.
lr_clip_cuco ?= cl_crm_ui_bol_clipboard_srv=>get_instance( iv_controller = me ).
CALL METHOD lr_clip_cuco->get_content
CHANGING
ct_content = ct_content.
Get the instance of the log and then serch the document that you want to save the log.
This for sure will solve your problem.
Regards,
Caíque