Application Development and Automation 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: 
Read only

Problem saving in al11

former_member666258
Participant
0 Likes
1,477

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 ?

4 REPLIES 4
Read only

FredericGirod
Active Contributor
1,349

Why ?

  delete dataset lv_path.
Read only

0 Likes
1,349

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 ?

Read only

0 Likes
1,349

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

Read only

RaymondGiuseppi
Active Contributor
1,349

You create a file and immediately delete it?