SAP Knowledge Base Article - Public

2458877 - Post Attachment Using OData Services

Symptom

How to attach multiple attachments to a Service Request

Reproducing the Issue

1. Go To Administrator WorkCenter


2. Select OData Service Explorer subview


3. In the Overview, Select SAP OData Services


4. Select the Service Name:'c4codata and select the Test tab to open the OData Console


5. Under Entity Sets, select ServiceRequestCollection and select the Test tab

6. In the Request Method, select POST

7. Select JSON tab and paste Payload as follow:

{

        "CustomerID": "eg: 1000000",
        "DataOriginTypeCode": "eg: 1",

        "Name": {
          "__metadata": {
            "type": "c4codata.EXTENDED_Name"
          },
          "languageCode": "eg: E",
          "content": "eg: SRQ-Name"
        },
        "ProcessingTypeCode": "eg: SRRQ",

        "ServiceRequestAttachmentFolder":[
                {
                             "TypeCode": "10001",
      "MimeType": "text/plain",
      "Binary": "eg:VGVzdCBhdHRhY2htZW50",
      "Name": "Test CorpAcc1.txt",
      "CategoryCode": "eg: 2"
                 },
                 {
                             "TypeCode": "10001",
      "MimeType": "text/plain",
      "Binary": "eg: VGVzdCBhdHRhY2htZW50",
      "Name": "eg: Test CorpAcc2.txt",
      "CategoryCode": "eg: 2"
                 }
                 ]


}


To attach Images, they will Have to be converted to Binary form and posted.

Keywords

KBA , SRD-CC , Cross Components , How To

Product

SAP Business ByDesign 1805 ; SAP Business ByDesign 1808 ; SAP Business ByDesign 1811 ; SAP Cloud for Customer 1802 ; SAP Cloud for Customer 1805 ; SAP Cloud for Customer 1811