Skip to content

Commit

Permalink
externalize Sales Order Create payload
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorwolf committed Nov 7, 2024
1 parent 610c535 commit 5786461
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
34 changes: 34 additions & 0 deletions tests/s4hana/API_SALES_ORDER_SRV-create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"SalesOrderType": "OR",
"SalesOrderTypeInternalCode": "TA",
"SalesOrganization": "1010",
"DistributionChannel": "10",
"OrganizationDivision": "00",
"SoldToParty": "10100003",
"PurchaseOrderByCustomer": "PO-GROUP-88",
"SalesOrderDate": "/Date(1720051200000)/",
"PricingDate": "/Date(1720051200000)/",
"RequestedDeliveryDate": "/Date(1720051200000)/",
"ShippingCondition": "01",
"CompleteDeliveryIsDefined": true,
"to_Item": [
{
"SalesOrder": "10",
"SalesOrderItem": "10",
"Material": "TG11",
"RequestedQuantity": "100",
"RequestedQuantityUnit": "PC",
"to_ScheduleLine": [
{
"SalesOrder": "10",
"SalesOrderItem": "10",
"ScheduleLine": "1",
"RequestedDeliveryDate": "/Date(1720051200000)/",
"ConfirmedDeliveryDate": null,
"OrderQuantityUnit": "PC",
"ScheduleLineOrderQuantity": "100"
}
]
}
]
}
39 changes: 4 additions & 35 deletions tests/s4hana/API_SALES_ORDER_SRV.http
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Authorization: Basic {{$dotenv s4hana_username}}:{{$dotenv s4hana_password}}
###
GET {{$dotenv s4hanahost}}/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder
?$top=10
&$skip=9
# &$skip=9
&$orderby=SalesOrder desc
&$expand=to_Item,to_Item/to_ScheduleLine
&$inlinecount=allpages
Authorization: Basic {{$dotenv s4hana_username}}:{{$dotenv s4hana_password}}
Expand All @@ -41,40 +42,8 @@ Accept: application/json
X-CSRF-Token: {{CSRF}}
Content-Type: application/json

{
"SalesOrderType": "OR",
"SalesOrderTypeInternalCode": "TA",
"SalesOrganization": "1010",
"DistributionChannel": "10",
"OrganizationDivision": "00",
"SoldToParty": "10100003",
"PurchaseOrderByCustomer": "PO-GROUP-88",
"SalesOrderDate": "\/Date(1720051200000)\/",
"PricingDate": "\/Date(1720051200000)\/",
"RequestedDeliveryDate": "\/Date(1720051200000)\/",
"ShippingCondition": "01",
"CompleteDeliveryIsDefined": true,
"to_Item": [
{
"SalesOrder": "10",
"SalesOrderItem": "10",
"Material": "TG11",
"RequestedQuantity": "100",
"RequestedQuantityUnit": "PC",
"to_ScheduleLine": [
{
"SalesOrder": "10",
"SalesOrderItem": "10",
"ScheduleLine": "1",
"RequestedDeliveryDate": "\/Date(1720051200000)\/",
"ConfirmedDeliveryDate": null,
"OrderQuantityUnit": "PC",
"ScheduleLineOrderQuantity": "100"
}
]
}
]
}
#< ./default-env-API_SALES_ORDER_SRV-create.json
< ./API_SALES_ORDER_SRV-create.json
###
@salesOrder={{createSalesOrder.response.body.d.SalesOrder}}
###
Expand Down

0 comments on commit 5786461

Please sign in to comment.