I'm following the tutorial How to create a QR code and show it in a Smartform. Unfortunately when I try to convert the PNG image to BMP using the method i_igs_image_converter->execute i get a sy-subrc = 1 (communication error) error. According to the comments and this post seems that the issue solves installing SAP ERP 6 release 731 and apply OSS note 2042588. Unfortunately at this time, the company I'm working for is unable to install SAP enhancements and OSS notes. At this moment I confirmed that I can load the image and save it in a XString variable, According to the code the method convert_image only converts the QRcode to bitmap in order to display the result. Is there another way to display the PNG image without the need to convert to bitmap image?, in case that no, IS there a way to avoid using i_igs_image_converter class and load the image directly in a custom control?
The code involved is the following:
FORM convert_image .
CREATE OBJECT i_igs_image_converter .
i_igs_image_converter->input = 'image/png'.
i_igs_image_converter->output = 'image/x-ms-bmp'.
i_igs_image_converter->width = width.
i_igs_image_converter->height = height.
CALL METHOD i_igs_image_converter->set_image
blob = mime
blob_size = l_content_length.
CALL METHOD i_igs_image_converter->execute
communication_error = 1
internal_error = 2
external_error = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL METHOD i_igs_image_converter->get_image
blob = blob
blob_size = blob_size
blob_type = blob_type.
errnum TYPE i,
errmsg TYPE string.
IMPORTING message = errmsg
number = errnum
IF sy-subrc = 0.
IF p_rad1 = 'X'.
CALL SCREEN '9000'. "Calling the screen for qrcode display
PERFORM show_smart_form. "calling the smartform for qrcode display
ENDFORM. " CONVERT_IM
Thanks in advance for your help. Best regards