Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Uploading Mime image into BDS

Hi,

I am trying to use almost similar algorithim to store an image into BDS. But in my case the image is stored in MIME. The content of the image is TYPE xstring. This Xstring content is all I have to store the image into BDS.

I am having problem in converting the image to BDS BMP format using :

CALL FUNCTION 'SAPSCRIPT_CONVERT_BITMAP_BDS'
  EXPORTING
    color                    = 'X'
    format                   = 'BMP'
    resident                 = p_resident
    bitmap_bytecount         = l_bytecount
    compress_bitmap          = 'X'
  IMPORTING
    bds_bytecount            = l_bds_bytecount
  TABLES
    bitmap_file              = l_bitmap
    bitmap_file_bds          = l_bds_content.

I am not passing anything in the l_bds_bytecount. l_bitmap is defined as-

DATA: BEGIN OF l_bitmap OCCURS 0,
        l(64) TYPE x,
      END OF l_bitmap.

mr = cl_mime_repository_api=>if_mr_api~get_api( ).
mr->get(
  EXPORTING
    i_url                  = lv_path
  IMPORTING
    e_content              = lv_content ).

l_bitmap-l = lv_content.

Could anybody help me out how to get the converted BMP using this function?

Many Thanks,

Rajib Shome

Former Member
Not what you were looking for? View more on this topic or Ask a question