on 10-07-2014 2:31 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.