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: 

Upload Image Problem

Former Member
0 Kudos

Hello,

We want to print an image on a SAP script, this SAPscript is a bespoke (Z) script

We are trying to upload an image dynamically (is image of a product, so differs on each call). We have successfully achieved this using PERFORM import_bitmap_bds IN PROGRAM saplstxbitmaps.

The problem now is that our Z program is called from a standard SAP program via a call to a function 'in update task'.

The function used in import_bitmap_bds (GUI_UPLOAD) cannot be used in background.

Is there an alternative to this, only suggestions I can find relate to using 'OPEN DATASET', but this seems to be only for text or excel.

All suggestions welcome,

Conor.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Conor,

well, I haven't much experience in these issues, but you may try to develop your own implementation of form IMPORT_BITMAP_BDS(SAPLSTXBITMAPS), subtituting WS_UPLOAD by an OPEN DATASET/READ DATASET, which can indeed be used for uploading files in background, no matter if they are Excel sheets or text or whatever. Just declare OPEN DATASET... IN BINARY MODE and READ the dataset into an internal table, just like WS_UPLOAD does in the standard program.

I'm sorry I can't give you more advice, but this may have helped you. Please let me know. Best regards,

Alvaro

9 REPLIES 9

Former Member
0 Kudos

Hi Conor,

well, I haven't much experience in these issues, but you may try to develop your own implementation of form IMPORT_BITMAP_BDS(SAPLSTXBITMAPS), subtituting WS_UPLOAD by an OPEN DATASET/READ DATASET, which can indeed be used for uploading files in background, no matter if they are Excel sheets or text or whatever. Just declare OPEN DATASET... IN BINARY MODE and READ the dataset into an internal table, just like WS_UPLOAD does in the standard program.

I'm sorry I can't give you more advice, but this may have helped you. Please let me know. Best regards,

Alvaro

Former Member
0 Kudos

Hi,

Why don't you upload all the images to SAP then use the program then there is no need to call this function module, you can upload the image using SE78 or RSTXLDMC program, upload all the Logo's in SAP then use the Script

Regards

Sudheer

0 Kudos

Hi Sudheer,

Uploading all the images is not really parctical because there 5000 + and as well we have new products being generated during the year. This is why we want to create then dynamically.

Thanks.

0 Kudos

Conor, have u got any solution for the problem. I am also having similar issue.

Appreciate you can share the outcome.

Thanks in advance

regards

thiru

0 Kudos

Hi Thiru,

I've been around the block with this one and I dont think it can be done - not upto speed on ABAP objects, so can not say if it can be done via ABAP objects.

PERFORM import_bitmap_bds IN PROGRAM saplstxbitmaps uses GUI_UPLOAD but I wont work in background because the presentation server is not visiable so I tried using C13Z_FILE_UPLOAD_BINARY to transfer the file to the app server from Presentation server before I called PERFORM import_bitmap_bds IN PROGRAM saplstxbitmaps and still wont work in background - if you make a breakthrough please let me know.

Regards,

Conor.

Former Member
0 Kudos

Hi,

Check OAOR tcode to upload the logo or images into SAP which will have OBJECT ID.

In you script in image window you have to impost that OBJECT ID which will directly print the image.

At this time I dont have system to give you in detail. But I am sure that you can achieve this.

Thanks,

Deepak.

0 Kudos

Hi Deepak

We have 5000+ images and will have new images every week so its not practical to upload them (images are of materials) what we need to do is upload them dynamically which will create one image called ZIMAGE (we will over write this each time) but we need to get this done in background (we can do it in foreground using PERFORM import_bitmap_bds IN PROGRAM saplstxbitmaps but this does not work in background.

0 Kudos

Hi,

You can handle a BDC for OAOR.

Or else check with HR ABAP how they upload employees images into SAP. They will handle mass image upload.

Thanks,

Deepak.

0 Kudos

Hi Deepak,

Will look at the BDC option with OAOR thanks for that. We dont use HR in SAP we have another system that takes care of that .

Thanks again.

Conor.