cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload and display Image in FPM FORM UIBB

Former Member
0 Kudos

Hi Experts,

I have a requirement to upload and display image in FPM FORM UIBB. I have created two elements in UI of type image and file upload.

Once I upload the image, I get information like, MIME type, Name and content in XSTRING format.

Please let me know, how I can use XSTRING information to display an Image.

Regards,

Sunil

Accepted Solutions (0)

Answers (1)

Answers (1)

jitin_kharbanda
Participant
0 Kudos

Hello Sunil,

I've not faced any such requirement yet but I guess you should try the following to achieve this.

In get_definition method of Form UIBB, you need to prepare the field catalog, say the image field name is IMAGE in your structure.

then, prepare the field catalog as:-

ls_fields-NAME = 'IMAGE'.

ls_fields-IMAGE_REF = 'IMAGE'.

ls_fields-DEFAULT_DISPLAY_TYPE = 'IM'.

ls_fields-MIME_TYPE_REF =  MIME type you received (in STRING format)

ls_fields-FILE_NAME_REF =  FILE name you received (in STRING format)

append ls_fields to ET_FIELD_DESCRIPTION.

in get_data method of form

populate the image content in IMAGE field of CT_DATA.

EV_DATA_CHANGED = 'X'.

to convert XSTRING to STRING, please refer   http://scn.sap.com/thread/1098684

Try this and let me know if this helps.

If you achieve this by some other solution, do post that.

--

Thanks

Jitin Kharbanda

Former Member
0 Kudos

Hi Jitin,

I tried this approach, but not able to achieve the required functionality, let me know if you tried with any other approach.

Regards,

Sunil