Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ICON for the mimetype

OttoGold
Active Contributor
0 Kudos

Ladies and gentlemen,

I wonder if there is a way how to automatically get a ICON name for a mimetype? (for example data type W3CONTTYPE or any other reasonable type of the file...?).

Example: I need to display a list of attachments and would like to set the ICON according the data type of the attached file. Is there a functionmodule for this or something like that?

Would be great to know,

thank you,

regards Otto

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

The possible icon names are:

ICON_JPG

ICON_XLS

ICON_HTM

ICON_PPT

ICON_DOT

ICON_PDF

ICON_BMP

ICON_GIF

ICON_HLP

ICON_DOC

ICON_RTF

ICON_TIF

ICON_WRI

ICON_VSD

So, a conversion from the mime type to the file extension would be sufficient to build the icon name:

-> SDOK_FILE_NAME_EXTENSION_GET function module.

You'll need maybe to customize SDOKFEXT_C table (source of the function module) with the missing mime types/extensions. The standard ones are defined in SDOKFEXT.

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

The possible icon names are:

ICON_JPG

ICON_XLS

ICON_HTM

ICON_PPT

ICON_DOT

ICON_PDF

ICON_BMP

ICON_GIF

ICON_HLP

ICON_DOC

ICON_RTF

ICON_TIF

ICON_WRI

ICON_VSD

So, a conversion from the mime type to the file extension would be sufficient to build the icon name:

-> SDOK_FILE_NAME_EXTENSION_GET function module.

You'll need maybe to customize SDOKFEXT_C table (source of the function module) with the missing mime types/extensions. The standard ones are defined in SDOKFEXT.

0 Kudos

Thank you Sandra,

I wasn´t sure if this approach can work. But together with: FOPC_GET_ICON_MIME_DATA, where one can learn how to test the icon exists, I can use the extension and concatenate it with the ICON_. Not a difficult one:))

Thank you, regards Otto

0 Kudos

forgot to say you hello, Otto, by the way, sorry

> FOPC_GET_ICON_MIME_DATA, where one can learn how to test the icon exists

in case someone looks for this question, this FM seems to be only available in an ECC system (most of installs anyway), we can also use ICON_CHECK