2020 Oct 22 1:59 PM
I'm sending an image to my odata soy my odata calls a fm that converts my xstring image to binary (SCMS_XSTRING_TO_BINARY) table so i can save it in my directory, this is my code:
data: lv_path type string value '/registrocarga/mifile.jpg'.
open dataset lv_path for output in binary mode message lv_msg.
if sy-subrc eq 0.
mensaje = 'S'.
loop at lt_orblk assigning field-symbol(<dat>).
transfer <dat> to lv_path.
endloop.
close dataset lv_path.
else.
mensaje = 'E'.
endif.
delete dataset lv_path.
all my code executes it with sy-subrc eq 0 but when i go to tx al11 to check if the images are there, they are not.
I have to mention that i use tx cg3z to test if i'm able to storage files in my directory and i could save 1 test image and that al11 repository is a shared folder between two systems ( i don't know if that's relevant)
Any ideas what i coul d be happening ?
I'm sending an image to my odata soy my odata calls a fm that converts my xstring image to binary (SCMS_XSTRING_TO_BINARY) table so i can save it in my directory, this is my code:
data: lv_path type string value '/registrocarga/mifile.jpg'.
open dataset lv_path for output in binary mode message lv_msg.
if sy-subrc eq 0.
mensaje = 'S'.
loop at lt_orblk assigning field-symbol(<dat>).
transfer <dat> to lv_path.
endloop.
close dataset lv_path.
else.
mensaje = 'E'.
endif.
delete dataset lv_path.
all my code executes it with sy-subrc eq 0 but when i go to tx al11 to check if the images are there, they are not.
I have to mention that i use tx cg3z to test if i'm able to storage files in my directory and i could save 1 test image and that al11 repository is a shared folder between two systems ( i don't know if that's relevant)
Any ideas what i coul d be happening ?
2020 Oct 22 2:20 PM
2020 Oct 22 4:16 PM
You're right! thank you a lot! Can i ask you something else? i'm triying to save an image is coming as base64 in xstring so i use SCMS_BASE64_ENCODE_STR but alfter save, download and open that image in windows it tells me that is not a correct format, maybe i'm saving in incorrect format ?
2020 Oct 23 6:43 AM
Pic --> Base64 --> Xstring ?
so when you open the file you expect Windows will understand to do a Xstring --> Base64 --> Pic ?
Why didn't you save directly the pic ? Pic --> Binary File and Windows will be really happy with this
2020 Oct 22 2:33 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |