on 12-08-2011 6:45 AM
Dear all
I was creating a marketing plan in CRM. I saved a excel file as attachment in the element of marketing plan. Now I want to get the data in excel file .
Please suggest.
Edited by: Abhinav Saxena(CRM) on Dec 8, 2011 9:08 AM
Hi Sushant,
I put the C:\Documents and Settings\abhinav\Desktop in the directory, when execute the method the system return the following message:
Exception NOT_TRANSFERRED triggered
Message ID: BL
Message number: 008
No log was created for object SDOK and sub-objekt UNDEFINED
please help.
Edited by: Abhinav Saxena(CRM) on Dec 17, 2011 5:36 AM
Edited by: Abhinav Saxena(CRM) on Dec 17, 2011 5:36 AM
Edited by: Abhinav Saxena(CRM) on Dec 17, 2011 5:37 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sushant,
Please give me an elaborate example.
sorry for being so late.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Susanta
I want to get the content of my excel file that I attached to my marketing plan in a table guide me through GET_WITH_TABLE method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhinav,
- Table SMOATTACHLNK is the attachment Link table to link attachments to Business Objects like Marketign Plan.
- Table SMOATTACHMNT is the attachment Header table containing all the file attributes like Name, size, physical path, logical path etc.
- Link between SMOATTACHLNK and SMOATTACHMNT:
1. Pass Project GUID to SMOATTACHLNK-PARENTID, and extract SMOATTACHLNK-SFAATTACHMNT.
2. Pass extracted SMOATTACHLNK-SFAATTACHMNT to SMOATTACHMNT-SFAATTACHMNT, and extract PHIO_ID, PHIO_CLASS, LOIO_ID, and LO_CLASS.
- Get the content of file
Use class CL_CRM_DOCUMENTS. It has so many methods to deal with attachment and its content.
For example, to get the binary content of attachment,
1. Create object of class CL_CRM_DOCUMENTS, and use method GET_DOCUMENT with exporting parameter IO-OBJTYPE = P, IO-CLASS = PHIO_CLASS, and IO-OBJID = PHIO_ID (Process by using PHIO details). Similarly, we can also use LOIO details as IO-OBJTYPE = L, IO-CLASS = LO_CLASS, and IO-OBJID = LOIO_ID as exporting parameter.
2. Importing parameter CONTENT_BIN of class CL_CRM_DOCUMENTS will contain contents of the attachment in Binary format.
Hope this helps.
Regards,
Susanta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
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.