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

Handling RAW/RAWSTRING data in RFC Function Modules

Former Member
0 Likes
3,192

Hi Experts,

Considering that RAWSTRING datatype is not allowed in declarations in RFC function modules, how do we handle upload of images into a ztable through a FM?

The RAW datatype supports data upto size 255 only, and i can find no image which is that small.

FYI - I have a ztable with field PHOTO of base type RAW.

        I have a RFC FM which i use for uploading images from my computer to the ztable (this RFC FM is to be used in SAP Gateway)

My image doesn't fit in the field with RAW datatype, and the FM doesn't allow declaration of field with RAWSTRING datatype, which would indeed be the ideal declaration for saving an image.

Is there a way to work around with this problem?

Any kind of help is really appreciated.

Thank You in advance,

-Nimish Kate

3 REPLIES 3
Read only

Former Member
1,530

Hello

Some days ago I made something similar using a Table Type with line type HRB2A_RAW255. I used it in export tab at my RFC, and it worked.

Can you try this?

Read only

0 Likes
1,530

Hi Thiago,

my RFC is basically for a list of entries, which have images attached. So for multiple entries and their images, I need to use Tables.

Read only

0 Likes
1,530

Sorry I don't get your issue.

First of all. There is no standard data type called RAWSTRING in ABAP. Instead RAW32000 , RAW128, RAW255 Etc are there . All of these can hold Binary strings. Do a search with RAW* in SE11.

Also if you need multiple entries, why can't you have Table types and use them in EXPORT/IMPORT/TABLES. ( *TABLES are still allowed in RFC context ).

Check FM APAR_EBPP_GET_SDINVOICE_DETAIL. I have used this in Gateway services.

Check the TABLE definition " T_PDF "(It uses LINE parameter with data element TABL1024 ) It is used to send the Billing doc details in XSTRING format which is quite inline with what you are asking for.

R