Skip to Content

API_SALES_ORDER_SRV

Following error in POST payload.

My GET-response in JSON:

{
  "d" : {
    "results" : [
      {
        "__metadata" : {
          "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('992330')",
          "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('992330')",
          "type" : "API_SALES_ORDER_SRV.A_SalesOrderType",
          "etag" : "W/\"datetimeoffset'2019-01-09T08%3A41%3A03.6829150Z'\""
        },
        "SalesOrder" : "992330",
        "SalesOrderType" : "OR1",
        "SalesOrganization" : "GH34",
        "DistributionChannel" : "01",
        "OrganizationDivision" : "00",
        "SalesGroup" : "",
        "SalesOffice" : "",
        "SalesDistrict" : "",
        "SoldToParty" : "100010",
        "CreationDate" : "\/Date(1546992000000)\/",
        "CreatedByUser" : "223418",
        "LastChangeDate" : null,
        "LastChangeDateTime" : "\/Date(1547023263682+0000)\/",
        "PurchaseOrderByCustomer" : "1234",
        "CustomerPurchaseOrderType" : "",
        "CustomerPurchaseOrderDate" : null,
        "SalesOrderDate" : "\/Date(1546992000000)\/",
        "TotalNetAmount" : "0.00",
        "TransactionCurrency" : "EUR",
        "SDDocumentReason" : "",
        "PricingDate" : "\/Date(1546992000000)\/",
        "RequestedDeliveryDate" : "\/Date(1546992000000)\/",
        "ShippingCondition" : "01",
        "CompleteDeliveryIsDefined" : false,
        "ShippingType" : "",
        "HeaderBillingBlockReason" : "",
        "DeliveryBlockReason" : "",
        "IncotermsClassification" : "CFR",
        "IncotermsTransferLocation" : "1",
        "CustomerPaymentTerms" : "0140",
        "PaymentMethod" : "",
        "OverallSDProcessStatus" : "A",
        "TotalCreditCheckStatus" : "",
        "OverallTotalDeliveryStatus" : "",
        "OverallSDDocumentRejectionSts" : "A",
        "to_Item" : {
          "results" : [
            {
              "__metadata" : {
                "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='992330',SalesOrderItem='10')",
                "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='992330',SalesOrderItem='10')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderItemType"
              },
              "SalesOrder" : "992330",
              "SalesOrderItem" : "10",
              "HigherLevelItem" : "0",
              "SalesOrderItemCategory" : "TAD",
              "SalesOrderItemText" : "Paketit ",
              "PurchaseOrderByCustomer" : "1234",
              "Material" : "203852",
              "MaterialByCustomer" : "",
              "PricingDate" : "\/Date(1546992000000)\/",
              "RequestedQuantity" : "50",
              "RequestedQuantityUnit" : "KPL",
              "ItemGrossWeight" : "0.000",
              "ItemNetWeight" : "0.000",
              "ItemWeightUnit" : "KG",
              "ItemVolume" : "0.000",
              "ItemVolumeUnit" : "",
              "TransactionCurrency" : "EUR",
              "NetAmount" : "0.00",
              "MaterialGroup" : "",
              "Batch" : "",
              "ProductionPlant" : "GH34",
              "StorageLocation" : "",
              "ShippingPoint" : "F001",
              "ShippingType" : "",
              "DeliveryPriority" : "0",
              "IncotermsClassification" : "CFR",
              "IncotermsTransferLocation" : "1",
              "CustomerPaymentTerms" : "0140",
              "SalesDocumentRjcnReason" : "",
              "ItemBillingBlockReason" : "",
              "SDProcessStatus" : "A",
              "DeliveryStatus" : "",
              "OrderRelatedBillingStatus" : "A",
              "to_Partner" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='992330',SalesOrderItem='10')/to_Partner"
                }
              },
              "to_PricingElement" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='992330',SalesOrderItem='10')/to_PricingElement"
                }
              },
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='992330',SalesOrderItem='10')/to_SalesOrder"
                }
              },
              "to_ScheduleLine" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='992330',SalesOrderItem='10')/to_ScheduleLine"
                }
              }
            }
          ]
        },
        "to_Partner" : {
          "results" : [
            {
              "__metadata" : {
                "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='TA')",
                "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='TA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "SalesOrder" : "992330",
              "PartnerFunction" : "TA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='TA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='LA')",
                "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='LA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "SalesOrder" : "992330",
              "PartnerFunction" : "LA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='LA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='MA')",
                "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='MA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "SalesOrder" : "992330",
              "PartnerFunction" : "MA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='MA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='TS')",
                "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='TS')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "SalesOrder" : "992330",
              "PartnerFunction" : "TS",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='TS')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='XI')",
                "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='XI')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "SalesOrder" : "992330",
              "PartnerFunction" : "XI",
              "Customer" : "XI_GH34",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8000/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='992330',PartnerFunction='XI')/to_SalesOrder"
                }
              }
            }
          ]
        },
        "to_PricingElement" : {
          "results" : [

          ]
        }
      }
    ]
  }
}





Givin me errors: Error while parsing an XML stream or Exception was raised. And giving link to SAP note 1797736. Anyway to debugg? Traces? Some transactions? oData debugg? Sharpers guys? Anyone?
<br>
Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Feb 08, 2019 at 09:48 AM

    Trying to use POST schema:

    {
        "__metadata" : {
          "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('')",
          "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('')",
          "type" : "API_SALES_ORDER_SRV.A_SalesOrderType",
          "etag" : "W/\"datetimeoffset'2019-01-09T08%3A41%3A03.6829150Z'\""
        },
        "SalesOrderType" : "OR1",
        "SalesOrganization" : "GH34",
        "DistributionChannel" : "01",
        "OrganizationDivision" : "00",
        "SalesGroup" : "",
        "SalesOffice" : "",
        "SalesDistrict" : "",
        "SoldToParty" : "100010",
        "PurchaseOrderByCustomer" : "1234",
        "CustomerPurchaseOrderType" : "",
        "CustomerPurchaseOrderDate" : null,
        "SalesOrderDate" : "\/Date(1546992000000)\/",
        "TransactionCurrency" : "EUR",
        "SDDocumentReason" : "",
        "PricingDate" : "\/Date(1546992000000)\/",
        "RequestedDeliveryDate" : "\/Date(1546992000000)\/",
        "ShippingCondition" : "01",
        "CompleteDeliveryIsDefined" : false,
        "ShippingType" : "",
        "HeaderBillingBlockReason" : "",
        "DeliveryBlockReason" : "",
        "IncotermsClassification" : "CFR",
        "IncotermsTransferLocation" : "1",
        "CustomerPaymentTerms" : "0140",
        "PaymentMethod" : "",
        "to_Item" : [
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderItemType"
              },
              "SalesOrderItem" : "10",
              "HigherLevelItem" : "0",
              "SalesOrderItemCategory" : "TAD",
              "SalesOrderItemText" : "Paketit ",
              "PurchaseOrderByCustomer" : "1234",
              "Material" : "203852",
              "MaterialByCustomer" : "",
              "PricingDate" : "\/Date(1546992000000)\/",
              "RequestedQuantity" : "50",
              "RequestedQuantityUnit" : "KPL",
              "MaterialGroup" : "",
              "Batch" : "",
              "ProductionPlant" : "GH34",
              "StorageLocation" : "",
              "ShippingPoint" : "F001",
              "ShippingType" : "",
              "DeliveryPriority" : "0",
              "IncotermsClassification" : "CFR",
              "IncotermsTransferLocation" : "1",
              "CustomerPaymentTerms" : "0140",
              "SalesDocumentRjcnReason" : "",
              "ItemBillingBlockReason" : "",
              "to_Partner" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_Partner"
                }
              },
              "to_PricingElement" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_PricingElement"
                }
              },
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_SalesOrder"
                }
              },
              "to_ScheduleLine" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_ScheduleLine"
                }
              }
            }
          ],
        "to_Partner" : [
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TA')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "TA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='LA')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='LA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "LA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='LA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='MA')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='MA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "MA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='MA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TS')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TS')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "TS",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TS')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='XI')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='XI')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "XI",
              "Customer" : "XI_GH34",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='XI')/to_SalesOrder"
                }
              }
            }
          ],
        "to_PricingElement" : {
            
        }
    }
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2019 at 09:49 AM
    also tried to use payloads like this:
    {
        "SalesOrder" : "",
        "SalesOrderType" : "OR1",
        "SalesOrganization" : "GH34",
        "DistributionChannel" : "01",
        "OrganizationDivision" : "00",
        "SalesGroup" : "",
        "SalesOffice" : "",
        "SalesDistrict" : "",
        "SoldToParty" : "100010",
        "PurchaseOrderByCustomer" : "1234",
        "CustomerPurchaseOrderType" : "",
        "CustomerPurchaseOrderDate" : null,
        "SalesOrderDate" : "/Date(1546992000000)/",
        "TransactionCurrency" : "EUR",
        "SDDocumentReason" : "",
        "PricingDate" : "/Date(1546992000000)/",
        "RequestedDeliveryDate" : "/Date(1546992000000)/",
        "ShippingCondition" : "01",
        "CompleteDeliveryIsDefined" : false,
        "ShippingType" : "",
        "HeaderBillingBlockReason" : "",
        "DeliveryBlockReason" : "",
        "IncotermsClassification" : "CFR",
        "IncotermsTransferLocation" : "1",
        "CustomerPaymentTerms" : "0140",
        "PaymentMethod" : "",
        "to_Item" : [
            {
              "SalesOrderItem" : "10",
              "HigherLevelItem" : "0",
              "SalesOrderItemCategory" : "TAD",
              "SalesOrderItemText" : "Paketit ",
              "PurchaseOrderByCustomer" : "1234",
              "Material" : "203852",
              "MaterialByCustomer" : "",
              "PricingDate" : "/Date(1546992000000)/",
              "RequestedQuantity" : "55",
              "RequestedQuantityUnit" : "KPL",
              "MaterialGroup" : "",
              "Batch" : "",
              "ProductionPlant" : "GH34",
              "StorageLocation" : "",
              "ShippingPoint" : "F001",
              "ShippingType" : "",
              "DeliveryPriority" : "0",
              "IncotermsClassification" : "CFR",
              "IncotermsTransferLocation" : "1",
              "CustomerPaymentTerms" : "0140",
              "SalesDocumentRjcnReason" : "",
              "ItemBillingBlockReason" : "",
              "to_Partner" : {
              },
              "to_PricingElement" : {
              },
              "to_SalesOrder" : {
              },
              "to_ScheduleLine" : {
              }
              }
          ],
        "to_Partner" : [
            {
              "PartnerFunction" : "TA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
              }
            },
            {
              "PartnerFunction" : "LA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
              }
            },
            {
              "PartnerFunction" : "MA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
              }
            },
            {
              "PartnerFunction" : "TS",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
              }
            },
            {
              "PartnerFunction" : "XI",
              "Customer" : "XI_GH34",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
              }
            }
          ],
    
    
        "to_PricingElement": []
    
    
    }
    
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2019 at 09:50 AM
    also this tried
    {
        "__metadata" : {
          "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('')",
          "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder('')",
          "type" : "API_SALES_ORDER_SRV.A_SalesOrderType",
          "etag" : "W/\"datetimeoffset'2019-01-09T08%3A41%3A03.6829150Z'\""
        },
        "SalesOrderType" : "OR1",
        "SalesOrganization" : "GH34",
        "DistributionChannel" : "01",
        "OrganizationDivision" : "00",
        "SalesGroup" : "",
        "SalesOffice" : "",
        "SalesDistrict" : "",
        "SoldToParty" : "100010",
        "PurchaseOrderByCustomer" : "1234",
        "CustomerPurchaseOrderType" : "",
        "CustomerPurchaseOrderDate" : null,
        "SalesOrderDate" : "\/Date(1546992000000)\/",
        "TransactionCurrency" : "EUR",
        "SDDocumentReason" : "",
        "PricingDate" : "\/Date(1546992000000)\/",
        "RequestedDeliveryDate" : "\/Date(1546992000000)\/",
        "ShippingCondition" : "01",
        "CompleteDeliveryIsDefined" : false,
        "ShippingType" : "",
        "HeaderBillingBlockReason" : "",
        "DeliveryBlockReason" : "",
        "IncotermsClassification" : "CFR",
        "IncotermsTransferLocation" : "1",
        "CustomerPaymentTerms" : "0140",
        "PaymentMethod" : "",
        "to_Item" : [
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderItemType"
              },
              "SalesOrderItem" : "10",
              "HigherLevelItem" : "0",
              "SalesOrderItemCategory" : "TAD",
              "SalesOrderItemText" : "Paketit MASAT",
              "PurchaseOrderByCustomer" : "1234",
              "Material" : "203852",
              "MaterialByCustomer" : "",
              "PricingDate" : "\/Date(1546992000000)\/",
              "RequestedQuantity" : "50",
              "RequestedQuantityUnit" : "KPL",
              "MaterialGroup" : "",
              "Batch" : "",
              "ProductionPlant" : "GH34",
              "StorageLocation" : "",
              "ShippingPoint" : "F001",
              "ShippingType" : "",
              "DeliveryPriority" : "0",
              "IncotermsClassification" : "CFR",
              "IncotermsTransferLocation" : "1",
              "CustomerPaymentTerms" : "0140",
              "SalesDocumentRjcnReason" : "",
              "ItemBillingBlockReason" : "",
              "to_Partner" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_Partner"
                }
              },
              "to_PricingElement" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_PricingElement"
                }
              },
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_SalesOrder"
                }
              },
              "to_ScheduleLine" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderItem(SalesOrder='',SalesOrderItem='10')/to_ScheduleLine"
                }
              }
            }
          ],
        "to_Partner" : [
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TA')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "TA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='LA')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='LA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "LA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='LA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='MA')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='MA')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "MA",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='MA')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TS')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TS')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "TS",
              "Customer" : "100010",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='TS')/to_SalesOrder"
                }
              }
            },
            {
              "__metadata" : {
                "id" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='XI')",
                "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='XI')",
                "type" : "API_SALES_ORDER_SRV.A_SalesOrderHeaderPartnerType"
              },
              "PartnerFunction" : "XI",
              "Customer" : "XI_GH34",
              "Supplier" : "",
              "Personnel" : "0",
              "ContactPerson" : "0",
              "to_SalesOrder" : {
                "__deferred" : {
                  "uri" : "http://content.fi:8600/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrderHeaderPartner(SalesOrder='',PartnerFunction='XI')/to_SalesOrder"
                }
              }
            }
          ],
        "to_PricingElement" : {
            
        }
    }
    
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2019 at 03:32 PM

    Hi Joni,

    Honestly I am not sure about SCP OData development but in traditional code based development, there is a gateway framework funtion module /IWBEP/FM_MGW_HANDLE_REQUEST which gets invoked for any OData call from the UI and then it further does the processing or delegates the task. You can put an external breakpoint on the same user from which you are triggering the call and check.

    Also, the error which you encountered generally comes when there is (are) data format issues in the payload like a Date field is not marked nullable but given a null value, decimals not enclosed within double quotes, boolean values not passed correctly, etc.

    Further, you can look - https://blogs.sap.com/2018/01/11/posting-sales-orders-into-s4hana-cloud-api-part-1/

    BR.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.