cancel
Showing results for 
Search instead for 
Did you mean: 

Determine ICON

rohit_trivedi
Participant
0 Kudos

Hi Guys,

I've a MIMETYPE ( W3CONTTYPE ) of a KM document.

I want to determine document icon based on MIMETYPE or document extension.

Is there a standard method avaible?

Thanks and regards,

Rohit.

Accepted Solutions (0)

Answers (2)

Answers (2)

rohit_trivedi
Participant
0 Kudos

Hi Shweta,

Thanks for your response.

However, my question is not regarding implemenation.

I want to know if this information ( Icon, MIME Type ) is available in system.

My question is the same as in this thread for java -

/message/648254#648254 [original link is broken]

I need similar solution for ABAP.

Thanks and regards,

Rohit.

Former Member
0 Kudos

Hi Rohit,

I can explain how I had derived this functionality.

If you are aware of the file extention, then follow below method.

u2022 In the context, create an attribute for the image, say image_src, of type string.

u2022 In a TableColumn of table control, insert a button as a cell variant in the column.

u2022 Bind the imageSource property of that button to the context attribute image_src.

u2022 Set the attribute value of the image_src in the code.

Code:

ls_output-image_src = 'ICON_XLS'.

Or

ls_output-image_src = 'ICON_PDF'.

Where u2018ICON_XLSu2019 and u2018ICON_PDFu2019 are the constant values for the image_src and

LS_OUTPUT is the workarea of type context_node.

Regards,

Shweta