on 04-06-2012 8:48 AM
hi all,
In my work i need to upload a photo of an employee into the infotype, for which i use f4_filename FM and get the location of the image from the local system, from there i'm not able to convert that image into any of the formats( XSTRING, STRING or BYTE) if i can convert it into any one of these formats, i can take it from there... i'd appreciate your help.
*- if any one can provide any other information on how to convert a image into other formats i'd appreciate your help.
thanks.
upload your image, from the desktop, using CL_GUI_FRONTEND_SERVICES, method GUI_UPLOAD, with file type 'BIN' for binary, and put it into an internal table. I use an internal table defined like:
data: bintab type table of tbl1024.
Once you have done the upload, look at the robust FM list in SCMS* function modules, like SCMS_BINARY_TO_XSTRING, which will convert your binary table to an xstring. If you are using newer MSOffice files, like docx, etc., be sure to get the length of the file from the desktop and pass that through all your processes...this is critical. You can get the actual length with method FILE_GET_SIZE of the frontend services class.
As you noted, once you have the xstring, you can do what is needed to archive, etc.
To retrieve, get it back into an internal binary table, and download that with the same class, GUI_DOWNLOAD, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi David, thank you so much for your response, i've been struggling for this for a long time, your answer helped me a lot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.