‎2011 Jul 25 1:32 PM
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
‎2011 Jul 25 3:05 PM
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.
‎2011 Jul 25 3:25 PM
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
‎2011 Jul 25 4:07 PM
Sorry, I thought you can't send the document. I've never worked with ARCHIVOBJECT_CREATE_TABLE. So I can't help.