cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Attachments

Former Member
0 Kudos

Dear GW Experts,

We are facing an issue with attachments in Gateway. We are using SAP DMS for our attachments. since gateway sends the attachment in Binary format and we are not able to find any BAPI/FM to create DMS attachments as none of them accepts binary format. We tried to use BAPI_DOCUMENT_CREATE2 but it needs the path as import parameter and but since the document get attached in background in the create stream method in the DPC class we cannot use a path in front end like (c:\temp\test.txt), so please advice how to achieve this.

)

Regards

IK

Accepted Solutions (0)

Answers (2)

Answers (2)

alouati
Explorer
0 Kudos

Hi Imran,

you can use function module ARCHIV_CREATE_TABLE

the FM accept input type binary ( DOCUMENT).

Regars,

Amine

EkanshCapgemini
Active Contributor
0 Kudos

Hi Imran,

You can try this approach:

  1. Receive the XSTRING in create_stream method and pass this xstring to the backend RFC.
  2. In backend RFC, convert the XSTRING to BINARY using FM 'SCMS_XSTRING_TO_BINARY'
  3. Store this BINARY file on the application server itself using OPEN DATASET
  4. Now use your BAPI_DOCUMENT_CREATE2 and pass the actual file path of the application server to create the document in DMS
  5. If the document is created in DMS succesfully, Delete the file from the application server using FM 'SCMS_FILE_DELETE'.

Regarrds,
Ekansh

EkanshCapgemini
Active Contributor
0 Kudos

Hi Imran,

Did you solve this issue?

If yes, please close this thread.

Regards,

Ekansh

Former Member
0 Kudos

no yet, go busy with other things, will check and let you know if your suggestions were successful.