cancel
Showing results for 
Search instead for 
Did you mean: 

Showing attachments of a product in webdynpro

gerd_hotz
Contributor
0 Kudos

Hello experts,

does anybody know how to show/open a attachment of a product (f.e. pdf. jpg etc.)

in webdynpro ?

I can select all attachments of a product and show the descriptions of this

attahcments in an alv in webydynpro,

but now I want to open such an attachment by selecting the row.

Is there a fm/programm for this ?

Hope someone can help me !

Thanks and best regards

Gerd

Accepted Solutions (1)

Accepted Solutions (1)

gerd_hotz
Contributor
0 Kudos

HEllo Mr. Jung,

the attachments are linked with Business Object Services as attachment in crm to an product.

(open a product in crm and then under tabstrip documents there are the attachments).

Now I want to show all attachments to a product and after selecting an attachment

system should open the attachment.

Some idea ?

Gerd

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> HEllo Mr. Jung,

>

>

> the attachments are linked with Business Object Services as attachment in crm to an product.

> (open a product in crm and then under tabstrip documents there are the attachments).

>

> Now I want to show all attachments to a product and after selecting an attachment

> system should open the attachment.

>

> Some idea ?

>

>

> Gerd

You aren't really dealing with a Web Dynpro ABAP question any longer. Now you just need to know how to read the Business Object Services and get the link. Not sure on that. Is it actually a URL that is stored in the Business Object Services. If so I would image you could just open the URL directly via a LinkToURL. For help on programming the Generic Object Services directly have a look at this help link:

[http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm]

Answers (3)

Answers (3)

gerd_hotz
Contributor
0 Kudos

Hi thanks,

but can you tell me what objecttype a product/material in crm is ?

Because I have to do this fm in crm.

Where can I see this ?

Thanks

GErd

Former Member
0 Kudos

i did this for Project systems . i am not very sure about CRM...you can go through the documentation of these 2 function modules you will have some idea what values to pass.

gerd_hotz
Contributor
0 Kudos

Hi Naresh,

thanks for very fast response,

but my problem is, that I've a material in r3 which has some attachments .

Now I want to show this material and the attachments in an alv, and by selecting

a row the attachment should be openend/downloaded from r3.

Gerd

Former Member
0 Kudos

Hi

you can use the function

'SREL_GET_NEXT_RELATIONS' to get list of all attachmnets and then this function 'SO_DOCUMENT_READ_API1' will give you the content of the attachment.

Regards

Naresh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You are going to have to read the binary data of this attachement. The process is going to depend upon how these attachments are stored in R/3. Are they maintained in DMS (the Document Mangement System) or linked via Business Object Services. This will make a huge difference.

Former Member
0 Kudos

Hi

Use

CALL METHOD CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE

EXPORTING

I_FILENAME = 'c:/test.doc'

I_CONTENT = content

I_MIME_TYPE = 'Doc'.

to open the file.

Regards

Naresh