Create a Sales Delivery document
Typ |
Description |
Table |
|
Primary |
DocEntry |
Primary mandatory |
no |
GET |
yes |
POST |
yes |
SalesOrder
Property |
Description |
Table |
ORDR |
Primary key |
DocEntry/i |
$transaction |
no |
$branch |
no |
$mask |
no |
Name |
Type |
Description |
|
DocEntry |
Edm.Int32 |
|
|
DocNumber |
Edm.Int32 |
|
|
Reference2 |
Edm.String(11) |
|
|
TaxDate |
Edm.DateTimeOffset |
|
|
DocumentDate |
Edm.DateTimeOffset |
|
|
DocDueDate |
Edm.DateTimeOffset |
|
|
BPLId |
Edm.DateTimeOffset |
|
|
Remarks |
Edm.DateTimeOffset |
|
|
CardCode |
Edm.String(20) |
|
|
CardName |
Edm.String(1) |
|
|
Printed |
Edm.Int32 |
|
|
DocumentStatus |
Edm.String(1) |
|
Join to Entiy Object |
Relation |
SalesOrderLines |
DocEntry |
BusinessPartner |
CardCode |
Post
Field |
Type |
Description |
||
---|---|---|---|---|
DocumentDate |
Date |
Document Date. Default=Today |
||
TaxDate |
Date |
Tax Date. Default=SAP Standard |
||
DocDueDate |
Date |
Sets or returns the document due date (for example, Delivery Date in sales orders, Value Date in invoices, Valid To in quotations, and so on). Mandatory in Sales documents |
||
Reference2 |
String(11) |
Reference 2 on document level |
||
Comments |
String(255) |
Long comments |
||
CardCode |
String(20) |
Business Partner |
||
CardName |
String(100) |
Name of Business Partner |
||
Address |
String(255) |
Address of Business Partner |
||
NumAtCard |
String |
Define the Reference Number from Business Partner |
||
TrackingNumber |
String |
Define the Tracking Number |
||
TransportationCode |
String |
Define the Transportation code |
||
DocumentsOwner |
String |
Define the Document Owner |
||
WoDocEntry |
Number |
Linked Work order DocEntry |
||
WoLineNumber |
Number |
Linked Work order Line Number |
||
Allocation |
Boolean |
|
||
ExternalDocEntry |
Number |
|
||
WoLineNumber2 |
Number |
Linked Work order Bill of Material position |
||
RetrievalDocument |
boolean |
|
||
BaseType |
String |
|
||
BaseDocEntry |
Number |
Base DocEntry or Work order |
||
BaseLineNumber |
Number |
Base Line Number (example RDR1.LineNumber) |
||
PDocType |
String |
|
||
DocumentPerWorkOrder |
boolean |
true=If you defined WoDocEntry, the system split this for every Work order |
||
PriceType |
string |
|
||
Series |
string |
Define the Document Series |
||
BatchGroup |
boolean |
Define the batch grouping true (standard) = one line for all batches with same item code false = for every batch a new item line |
||
DontDelete |
boolean |
don't delete entries from table BEAS_PLANDOCUMENT_LINE |
||
DelReservation |
boolean |
|
||
ReservationDocEntry |
Link to Reservation BEAS_RESERVATION_LINE.RES_DOCENTRY |
|||
ResevationLineNumber |
Link to Reservation BEAS_RESERVATION_LINE.RES_LINENUM |
|||
GenerateQcOrder |
boolean |
|
||
Sort |
string(255) |
|
||
DocumentLines |
DocumentLines |
|
||
specialLines |
String |
|
||
PTICode |
String |
|
example: Create a SalesDelivery Document from SalesOrder
odata4/v1/SalesDelivery
{
"CardCode":"S001",
"DocumentLines": [
{"ItemCode": "RM",
"WhsCode":"01",
"Quantity":2
}
]
}
Create Delivery document based on a sales order 25, Line 1
and linked to reservation DocEntry 20, Line 1, which we have to delete
{
"CardCode":"S001",
"DelReservation":true,
"RetrievalDocument":true,
"DocumentLines": [
{"ItemCode": "RM",
"WhsCode":"01",
"Quantity":2 ,
"BaseType":"17",
"BaseDocEntry":25
"BaseLineNumber":1
"ReservationDocEntry":20,
"ReservationLineNumber":1
}
]
}
Create Delivery document from Sales order
{
"CardCode":"C23900",
"DocDate":"2019-09-28",
"DocDueDate":"2019-10-02",
"RetrievalDocument":true, we create a document from another document
"NumAtCard":"4443212240-1",
"TrackingNumber":"3394922",
"Comments":"This are the notes \nfor the \"created\" document",
"DocumentLines": [
{"ItemCode": "RM",
"BaseType":"17", 17 = type sales order
"BaseDocEntry":147, this is the docentry from sales order
"BaseLineNumber":0,
"WhsCode":"01",
"Quantity":1
}
]
}
Create Delivery from sales order and delete based reservation
{
"CardCode":"C23900",
"DocDate":"2019-09-28",
"DocDueDate":"2019-10-02",
"Reference2":"Test \"Delivery\"",
"RetrievalDocument":true, we create a document from another document
"DelReservation":true, Command for Delete Reservation
"Comments":"This are the notes \nfor the \"created\" document",
"DocumentLines": [
{"ItemCode": "RM_B",
"BaseType":"17",
"BaseDocEntry":149,
"BaseLineNumber":1,
"WhsCode":"01",
"Quantity":1 ,
"DistNumber":"20190426",
"ReservationDocEntry":45, // DocEntry and Line Number from Reservation
"ReservationLineNumber":1
}
]
}