on 11-07-2023 12:32 PM
Hello,
I'm developing a Adobe form in which I have a Image Field which I want to show images ( 1 to 5 images ) previously attached to the QM notification. I am able to do it but the point is when I attach more than 1 image it just shows the last attached image.
This is my code which is in a loop in the images, there is not errors. I think that the problem is that by concatenating the xstrings of each images doesn't work and it just shows the last image.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_input_len
IMPORTING
buffer = lv_buffer
TABLES
binary_tab = lt_hex_cont
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
CONTINUE.
ELSE.
FIELD-SYMBOLS: <lv_img> TYPE xstring.
READ TABLE lt_ref INTO ls_ref WITH KEY instid_a = <ls_srgbtbrel>-instid_a.
IF sy-subrc = 0.
CONCATENATE ls_ref-mncod '_IMG' INTO lv_ref.
ASSIGN (lv_ref) TO <lv_img>.
IF sy-subrc = 0.
* <lv_img> = lv_buffer.
CONCATENATE <lv_img> lv_buffer INTO <lv_img> IN BYTE MODE.
ENDIF.
ENDIF.
ENDIF.<br>
Any ideas?
Regards.
You cannot simply concatenate binary data (xstring) of the files to "merge them".
Simplest and probably most correct solution is use five image fields in Adobe form. And map each to separate image data (xstring).
If you want to merge images, then you would need some complex image processing library (depending on image format - BMP, JPEG, PNG...). That would be probably something outside of ABAP server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your quick answer!
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
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.