Odata服务的有效负载

时间:2017-10-04 09:22:57

标签: api odata sapui5

是否有任何步骤/程序来确定给定odata服务的有效负载? 我目前有一个列入白名单的odata服务 Process Purchase Orders

我无法弄清楚A_PurchaseOrder的有效负载情况。

无论我继续尝试多少有效负载,我总是无法解析XML Stream。

2 个答案:

答案 0 :(得分:0)

您可以点击请求并查看它。对于A_PurchaseOrder

 {
 "PurchaseOrder": "string",
 "CashDiscount1Days": 999,
 "CashDiscount2Days": 999,
 "NetPaymentDays": 999,
 "CashDiscount1Percent": 99.999,
 "CashDiscount2Percent": 99.999,
 "PurchaseOrderDate": "/Date(1492041600000)/",
 "ValidityStartDate": "/Date(1492041600000)/",
 "ValidityEndDate": "/Date(1492041600000)/",
 "CreationDate": "/Date(1492041600000)/",
 "to_PurchaseOrderItem":[{
         "PurchaseOrder": "string",
         "OrderQuantity": 9999999999.999,
         "OrderPriceUnitToOrderUnitNmrtr": 99999,
         "OrdPriceUnitToOrderUnitDnmntr": 99999,
         "NetPriceAmount": 999999999.999,
         "NetPriceQuantity": 99999,
         "PurchaseOrderItem": "string",
         "OverdelivTolrtdLmtRatioInPct": 99.9,
         "UnderdelivTolrtdLmtRatioInPct": 99.9,
         "ItemNetWeight": 9999999999.999,
         "ItemVolume": 9999999999.999,
         "to_AccountAssignment":[{
                 "PurchaseOrder": "string",
                 "PurchaseOrderItem": "string",
                 "AccountAssignmentNumber": "string",
                 "SettlementReferenceDate": "/Date(1492041600000)/",
                 "Quantity": 9999999999.999,
                 "MultipleAcctAssgmtDistrPercent": 99.9,
                 "PurgDocNetAmount": 99999999999.999
             }],

         "to_PurchaseOrderPricingElement": [{
                 "PurchaseOrder": "string",
                 "ConditionQuantity": 99999,
                 "ConditionToBaseQtyNmrtr": 9999999999,
                 "ConditionToBaseQtyDnmntr": 9999999999,
                 "PurchaseOrderItem": "string",
                 "PricingDocument": "string",
                 "FactorForConditionBasisValue": 3.14,
                 "PricingDocumentItem": "string",
                 "PricingProcedureStep": "string",
                 "PricingProcedureCounter": "string"
             }],

         "to_ScheduleLine":[{
                 "PurchasingDocument": "string",
                 "ScheduleLineCommittedQuantity": 9999999999.999,
                 "PurchasingDocumentItem": "string",
                 "ScheduleLine": "string",
                 "ScheduleLineDeliveryDate": "/Date(1492041600000)/",
                 "ScheduleLineOrderQuantity": 9999999999.999,
                 "ScheduleLineDeliveryTime": "PT15H51M04S",
                 "SchedLineStscDeliveryDate": "/Date(1492041600000)/"
             }]
         }
         ]
 }

答案 1 :(得分:0)

试试这个有效载荷。

    {
 "PurchaseOrder": "0120",
 "CashDiscount1Days": 999,
 "CashDiscount2Days": 999,
 "NetPaymentDays": 999,
 "CashDiscount1Percent": 99.999,
 "CashDiscount2Percent": 99.999,
 "PurchaseOrderDate": "/Date(1492041600000)/",
 "ValidityStartDate": "/Date(1492041600000)/",
 "ValidityEndDate": "/Date(1492041600000)/",
 "CreationDate": "/Date(1492041600000)/",
 "to_PurchaseOrderItem":[{
         "PurchaseOrder": "0120",
         "OrderQuantity": 9999999999.999,
         "OrderPriceUnitToOrderUnitNmrtr": 99999,
         "OrdPriceUnitToOrderUnitDnmntr": 99999,
         "NetPriceAmount": 999999999.999,
         "NetPriceQuantity": 99999,
         "PurchaseOrderItem": "string",
         "OverdelivTolrtdLmtRatioInPct": 99.9,
         "UnderdelivTolrtdLmtRatioInPct": 99.9,
         "ItemNetWeight": 9999999999.999,
         "ItemVolume": 9999999999.999,
         "to_AccountAssignment":[],

         "to_PurchaseOrderPricingElement": [],

         "to_ScheduleLine":[]
         }
         ]
 }