cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment in Marketing Plan

0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

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

0 Kudos

Hi Sushant,

Please give me an elaborate example.

sorry for being so late.

Former Member
0 Kudos

Hi Abhinav,

Try method GET_WITH_FILE of class CL_CRM_DOCUMENTS.

- Pass parameter LOIO or PHIO details as per my first response.

- Pass file name in parameter FILE_NAME.

- Pass directory details in parameter DIRECTORY.

Regards,

Susanta

0 Kudos

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.

Former Member
0 Kudos

Hi Abhinav,

Its great that you have found a method.

Now try implementing it as per the example I provided in my last response.

Regards,

Susanta

Former Member
0 Kudos

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