Skip to Content
avatar image
Former Member

Handling File Upload/Download using NW Gateway and SAP R/3 with attached DMS

Hey everyone,

first time posting here. I'm new to the SAP world (aside from my study years which were 10 years ago) and only have little experience in ABAP and SAP in general.

I currently have a requirement to have an oData Service which is capable of uploading / downloading files from SAP.

To be more precise: Documents (Word, Excel, PowerPoint, PDF, etc) shall be attached to internal orders as business documents and sent to the archive System, which is IXOS. I have already done some research and found out that my oData Service has to call 'ARCHIV_CONNECTION_INSERT' RFC at some point to link the document in the archive to the business document (internal order). But I have no idea how i can put the document there in the first place.

I have already created a Service with CRUD operations on internal orders (using COAS table, the RFCs i found didn't allow for update) which is working find. I need some guidance how i can extend this Service (or create a new one) to upload/download documents and send them to IXOS. The service shall later be consumed by an ASP.NET application.

Any hint into the right direction will be greatly appreciated!

Cheers.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 05, 2015 at 05:18 PM

    Hi,

    You may be interested in the following links:

    For file upload/download part: How To Upload and Download Files Using SAP NW Gateway SP06

    For archiving part: Document Archiving SAP and IXOS (DMS) Server

    Regards,

    Ekansh    

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Ekansh Saxena

      Hello there,

      it's been a while and i have done some Research and tested a few things.

      I have changed the code to use the GOS API. With GOS_API_GET_ATTA_LIST i can succesfully retrieve the attachments for an internal order. In the GET_STREAM method i receive the Content of the attachments and they Display correctly in the Gateway Client. Sadly this is only true for GOS attachments which are not stored in the Archive System.

      GOS_API_GET_ATTA_LIST Returns GOS attachments as well as ARL documents (the ones i'm interested in). Unfortunately, I don't get the arc_doc_id for the documents which i Need to retrieve the document from the repository. This is the result i get for an ARL document from GOS_API_GET_ATTA_LIST:

      All ARL documents look the same (except the CrDate), the AttaId is actually the ID of the SAP Business object. Without the arc_doc_id i am not able to distinguish them. Om the other Hand, this is table TOA01 filtered for the same Business object:

      When i use Transaction KO03 and open the attachment list, i get the same result as the GOS FM Returns. All archived documents have the same generic Name and no filename or creation time. However when i doubleclick on one of them it opens the correct document, so there must be some kind of link from the GOS attachment list to the ArchiveLink tables, but i don't know how to get this Connection.

      Further, i have tried to get the binary Content for an archived file. I use ARCHIV_GET_CONNECTIONS to get all ArchiveLink entries for a specific Business object. This funtion works fine and Returns the same result as the screenshot i posted above. But i'm not able to get the actual Content of These files. The first function i tried was "ARCHIV_GET_TABLE" which had a sy-subrc of 3 although i don't know if i passed the correct Parameters (i used the "sap_object" and "ar_object" from the screenshot above and took arc_doc_id as object_id).

      The second attempt was "SCMS_AO_TABLE_GET" where i used the arc_doc_id for arc_id and sap_object for doc_id, this was not successful as well (sy-subrc = 2).

      Any advice would be really appreciated as i'm running against a wall and have no idea (read: not enough SAP knowledge) to further investigate this.

      Cheers.

      nw_21.png (42.4 kB)
      nw_22.png (33.3 kB)