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

ARCHIVOBJECT_CREATE_TABLE with RFC ?????

Former Member
0 Likes
2,380

Hi dears,

I've to send a pdf file from sap system to another one by RFC.

For that I use FM ARCHIVOBJECT_CREATE_TABLE and I upload file from back end.

CALL FUNCTION 'SCMS_UPLOAD'

EXPORTING

filename = gv_filep

binary = 'X'

frontend = 'X'

IMPORTING

filesize = i_size

TABLES

data = docs

EXCEPTIONS

error = 1

OTHERS = 2.

Once my itab docs is filled, I pass it to FM by RFC:

On the other sap system I call in my rfc fm ARCHIVOBJECT_CREATE_TABLE.

Datas are transfered in binary (docs type STANDARD TABLE OF tbl1024)

but ARCHIVOBJECT_CREATE_TABLE give me sy-subrc = 1 (error archive).

If I run both FM on the same system it works.

My second idea was to use a text table instead of binary (docs TYPE STANDARD TABLE OF DOCS)

but if run my prog (everything in one system) with text table the file is well created (pdf file) in archive link but when I click on it I've message error The file is damaged and could not be repaired.

any help is welcome.

VIncent

3 REPLIES 3
Read only

AlexanderOv
Product and Topic Expert
Product and Topic Expert
0 Likes
1,827

Hi,

why don't you send this file via RFC? You can create special RFC function for receiving this document. And call the function:


CALL FUNCTION 'Z_FILE_RECEIVE'
    DESTINATION 'TARGET'
    EXPORTING
        I_TAB_FILE = docs[]
    EXCEPTIONS 
        COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT 
        SYSTEM_FAILURE        = 2 MESSAGE MSG_TEXT.

Read only

Former Member
0 Likes
1,827

This is what I'm doing and then I've a sy-subrc eq 1: error archive.

However docs datas are the same, unicode identical as weel on both systems.

Vincent

Read only

AlexanderOv
Product and Topic Expert
Product and Topic Expert
0 Likes
1,827

Sorry, I thought you can't send the document. I've never worked with ARCHIVOBJECT_CREATE_TABLE. So I can't help.