on 2006 Jul 18 12:21 PM
Hi,
Could u please tell me the purpose of the class: CL_CRM_DOCUMENTS and the method in that class GET_INFO_FOR_FOLDER.
Iam sure of Reward Points.
Hi Radhika,
You can use the class CL_CRM_DOCUMENTS for attachments to business transactions(like opportunities). You can use the method GET_INFO_FOR_FOLDER to retrieve the properties of the document already attached to the business transaction by passing the document id.
Thanks & Regards,
Karthik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Radhika,
You want to attach a document from URL like the URL maybe www.sap.com/sample.doc. In this case you can use CL_CRM_DOCUMENTS~CREATE_WITH_URL. The document maybe a doc, ppt, pdf or any.
Sample code,
data: ls_bus_obj type SIBFLPORB,
error type SKWF_ERROR.
data: lt_url type SDOKCNTASCS,
ls_url like line of lt_url.
ls_bus_obj-instid = give product guid.
ls_bus_obj-typeid = 'BUS1178'. (for products)
ls_bus_obj-catid = 'BO'.
ls_url-line = 'HTTP:www.sap.com/EVENTCONSUMER.DOC'.
append ls_url to lt_url.
CALL METHOD CL_CRM_DOCUMENTS=>CREATE_WITH_URL
EXPORTING
URL = lt_url
BUSINESS_OBJECT = ls_bus_obj
This will make the attachment from URL to products.
Regards,
Karthik.
Hi Karthik,
Thanks for ur response.
Now Iam able to attach the URL but the only thing is while displaying the document name it is displaying some 30 digit number. Actually it should display whatever we are giving in the ls_url-line right?? (It shud be 'HTTP:www.sap.com/EVENTCONSUMER.DOC' according to your example)
Thanks alot for ur help...
Hi Karthik,
Thankyou very much for your help Now I achieved Document name also.
One more doubt in the same requirement.
In COMMPR01 Iam displaying this URL in Documents tab.
Documents tab has a folder called DOCUMENTS.
This Documents folder has 2 folders under that, like PICTURES and TEXTS.
I need to display this URL under TEXTS folder but by using those methods iam able to attach the URL under DOCUMENTS folder itself but it should be under TEXTS.
Hope Iam clear
Thanks once again.
Hi Karthik,
See the following code
data: ls_bus_obj type SIBFLPORB,
error type SKWF_ERROR.
data: lt_url type SDOKCNTASCS,
ls_url like line of lt_url.
ls_bus_obj-instid = 'D351564E1124084A830F161F593EEF1B'.
ls_bus_obj-typeid = 'BUS1178'.
ls_bus_obj-catid = 'BO'.
data : lt_loio type SKWF_IO.
data : lt_iv_name type SKWF_DESCR.
ls_url-line = 'http://www.dictionary.com'.
append ls_url to lt_url.
lt_iv_name = 'Dictionary'.
CALL METHOD CL_CRM_DOCUMENTS=>CREATE_WITH_URL
EXPORTING
URL = lt_url
BUSINESS_OBJECT = ls_bus_obj
<b>PARENT_FOLDER =</b>
IMPORTING
LOIO = lt_loio.
CALL METHOD CL_CRM_DOCUMENTS=>RENAME_OBJECT
EXPORTING
IS_IO = lt_loio
IV_NAME = lt_iv_name.
Parent_folder ia a structure of type SKWF_IO. It has 3 components OBJTYPE, CLASS and OBJID.
What values should i pass to PARENT_FOLDER parameter??
Thanks in Advance.
User | Count |
---|---|
33 | |
2 | |
1 | |
1 | |
1 | |
1 | |
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.