Hi all!
I`m trying to upload a binary file (JPG image) to application server.
I created the functional module ZFM_UPLOAD, which takes the file data table in TABLES parameter.
In that table I have some usual fields:
filename TYPE char24
extension TYPE char3
filebody TYPE RAWSTRING
So I want to call my ZFM_UPLOAD via RFC. The problem is I get an error message that I only can use flat types like RAW in RFC function modules.
But if I set filebody type to RAW, I should also set the length of the field in bytes.
If I set some length (i.e. 32000) there are no any errors. My FM is called successfully and file is uploaded to application server but wher I try to open it I of course get the message that file is probably damaged.
So I need to find some way to pass the string of bytes of variable length to function module calling by RFC.
Or maybe there is another way to upload binary file to application server in backend via RFC?
Any help is appreciated!
Best regards,
Anton.