2020 Jun 12 5:14 PM
Hi All,
I have checked multiple SCN threads and tried few solutions but couldn't get excepted outcome.
I am trying to get GOS Document data using FM SO_DOCUMENT_READ_API1. Data outputted by parameter object_content is being used for further processing and attaching document data to VA01 using 'SO_OBJECT_INSERT'.
But attached document file is corrupt and not opening. Can anybody suggest what is missing.
Hi All,
I have checked multiple SCN threads and tried few solutions but couldn't get excepted outcome.
I am trying to get GOS Document data using FM SO_DOCUMENT_READ_API1. Data outputted by parameter object_content is being used for further processing and attaching document data to VA01 using 'SO_OBJECT_INSERT'.
But attached document file is corrupt and not opening. Can anybody suggest what is missing.
2020 Jun 12 5:44 PM
Hi sachin.adak,
Are you having problems with downloading or uploading the file as after reading your explanation I am not certain?
If the problem is with downloading the file then are you having the same problem when downloading the file in GUI (VA03)?
Regards,
Bartosz
2020 Jun 12 7:56 PM
2020 Jun 12 8:03 PM
Yeap, please share your code used for uploading and attaching the file.
2020 Jun 13 12:23 PM
Hi All,
My requirement is to load GOS attachment through custom program. I am fetching attachment details using FM SO_DOCUMENT_READ_API1 . This FM has OBJECT_CONTENT parameter which gives us attachment data.
I am using FM SCMS_BINARY_TO_XSTRING to get XSTRING value and then again passing to 'SCMS_XSTRING_TO_BINARY' to get final table which will be passed to 'SO_DOCUMENT_INSERT' FM parameter OBJCONT_BIN.
Resultant Attachment gets linked to documents but PDF fails to open. I tried passing various sizes in BINLENGTH parameter as per attachment size still it fails.
Please suggest.
Thanks
2020 Jun 13 3:17 PM
Hello sachin.adak
The devil is in the details. If you don't provide your detailed code then there is no chance for anyone to guess what the issue is.
Kind regards,2020 Jun 13 4:08 PM
It seems that you are doing a copy of GOS attachment. If you currently use SO_DOCUMENT_READ_API1 + SO_DOCUMENT_INSERT, why don't you avoid converting the types of parameters by using SO_DOCUMENT_INSERT_API1 instead of SO_DOCUMENT_INSERT?
2020 Jun 13 6:29 PM
Hi Sandra,
I tried using SO_DOCUMENT_INSERT_API1 but still PDF file is not opening.
Now I am not doing any conversions for Data returned by SO_DOCUMENT_READ_API1. Directly SO_DOCUMENT_READ_API1 gives table OBJECT_CONTENT and same is mapped to OBJECT_CONTENT table of FM SO_DOCUMENT_INSERT_API1.
But still PDF fails to open.
Below standard program is doing the same:
RSSOOT01 - Program for object type SOFM: Office document.
Please suggest.
2020 Jun 13 7:51 PM
I don't know what you're doing, but you do it wrong. See Mateusz request.
2020 Jun 17 4:43 PM
Hi Sandra,
Actually we are migrating GOS attachments data from ECC to S4 system using RFC.
But attachments except TXT are not opening. Here are my findings:
1. We linked 1 PDF file on ECC side manually to Sales Doc. FM SO_DOCUMENT_READ_API1 is used to read the data for that PDF on ECC
--------------------------------------------------------------------------------------------------------------------
2. Now we linked same PDF on S4 side manually to Sales Doc.. FM SO_DOCUMENT_READ_API1 is used to read the data for that PDF on S4 side.
Upon comparing data for the same PDF file attached manually on 2 different system in debug mode, we see there is significant difference. That's the reason attachments data fetched from ECC and uploaded via FM SO_DOCUMENT_INSERT_API1 in S4 corrupts the file.
Could you suggest how can we migrate attachments From ECC to S4 in such cases where data itself is stored in different format by 2 different systems foe same PDF file .
Thanks,
2020 Jun 17 5:48 PM
By debug you see a difference, it's just due to your buggy program or to an incorrect analysis. The storage technology of GOS attachments is identical between ECC and S4.
2020 Jun 17 6:00 PM
Sandra,
I am using stanadrd FM RKC_OFFICE_DOCUMENT_COPY to get PDF data.
Line 32 of this FM has SO_DOCUMENT_READ_API1 that fetches PDF data .
So there is no question of bug in custom program as data is directly being fetched by passing parameters to RKC_OFFICE_DOCUMENT_COPY in SE37.
There is no Custom Code involved at all.
2020 Jun 17 6:13 PM
2020 Jun 19 8:32 AM
SAP is already looking into it since a week. Just thought of discussing on this forum so that if anybody has faced similar issue and found a solution then it will help us to get rid of our issue.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |