SalesDelivery

Create a Sales Delivery document

 

Entity Collections Properties

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

 

Fields

Name

Type

Description

DocEntry

Edm.Int32

Entity Relation: SalesOrderLines -> DocEntry

Database: "ORDR"."DocEntry"

DocNumber

Edm.Int32

Database: "ORDR"."DocNum"

Reference2

Edm.String(11)

Database: "ORDR"."Ref2"

TaxDate

Edm.DateTimeOffset

Database: "ORDR"."TaxDate"

DocumentDate

Edm.DateTimeOffset

Database: "ORDR"."DocDate"

DocDueDate

Edm.DateTimeOffset

Database: "ORDR"."DocDueDate"

BPLId

Edm.DateTimeOffset

Database: "ORDR"."BPLId"

Remarks

Edm.DateTimeOffset

Database: "ORDR"."Comments"

CardCode

Edm.String(20)

Entity Relation: BusinessPartner -> CardCode

Database: "ORDR"."CardCode"

CardName

Edm.String(1)

Database: "ORDR"."CardName"

Printed

Edm.Int32

Database: "ORDR"."Printed"

DocumentStatus

Edm.String(1)

Database: "ORDR"."DocStatus"

 

Relations

Join to Entiy Object

Relation

SalesOrderLines

DocEntry

BusinessPartner

CardCode

 

Post

 

Field

Type

Description

Address

String(255)

Address of Business Partner

Allocation

Boolean

Use this for Work order allocation function

only for transfer function

 

1. Define "Alocation":true

2. Define Work order reference on line level

 

beasscript-logo-small

instance bsl b
setvar=ll_workorder1=20
b.post=Transfer={"allocation":false,"DocumentLines":[&
  {"ItemCode":"RM","Quantity":0.1,"WhsCode":"01","ToWhsCode":"02","BaseType":"wo","BaseDocEntry":<ll_workorder1>,"BaseLinenumber":10,"BaseLineNumber2":10}]}

BaseDocEntry

Number

Base DocEntry or Work order

BaseLineNumber

Number

Base Line Number (example RDR1.LineNumber)

BaseType

String

Example: 17=Sales Order, 13=PreInvoice

Note:

Only  if RetrievalDocument=false

Base Information on Header Level have higher Priority. But use base information on line Level

BatchGroup

boolean

true (standard) = one line for all batches with same item code
Note: Group Batches, Serials, BinCode
If you've 2 lines with same item + warehouse, the system create only one line and sumarize the Quantity

For sales order set this to "false"

false = for every batch a new item line

CardCode

String(20)

Business Partner

CardName

String(100)

Name of Business Partner

Comments

String(255)

Long comments

DelReservation

boolean

Delete all resevation entries, which defined in

ReservationDocEntry,ReservationLineNumber

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

DocumentDate

Date

Document Date. Default=Today

DocumentLines

DocumentLines

This define the Document lines

More see the Line object from this document

 

Note: Current Text- and Sum line types not supported

DocumentPerWorkOrder

boolean

true=If you defined WoDocEntry, the system split this for every Work order

DocumentsOwner

String

Define the Document Owner

DontDelete

boolean

don't delete entries from table BEAS_PLANDOCUMENT_LINE

ExternalDocEntry

Number

Use this for provision - transfer process

set the externalDocentry (from ExternalPurchaseOrder) and Allocation:true

GenerateQcOrder

boolean

if true, the system create a QC document, if a QC document is defined for this transaction and item

Current supported:

- Manual Receipt

NumAtCard

String

Define the Reference Number from Business Partner

PDocType

String

empty: Read from Reservation. Define filter in property "Filter"

bsl: you define the line in the JSON string

all other: You read this from table BEAS_PLANDOCUMENT_LINE

Define the filter in "Filter" and the DocEntry in Parameter "PDocEntry"

 

Related to follow Properties

Filter=[filter for BEAS_RESERVATION" or "BEAS_PLANDOCUMENT_LINE"]

PDocEntry=[BEAS_PLANDOCUMENT_LINE.LineNumber]

PriceType

string

Define the price determination for every line

manuell  = use price defined in BEAS_PLANDOCUMENT_LINE or Json String

none = no price (use SAP Standard functionality)

zeroprice = price is always 0

 

if not defined:

if this is a retrieval document, then "none"

for all other: use beas standard price determination

(Related to setting "mw_zubuchen_price_e" and "mw_zubuchen_price_k"

 

PTICode

String

Point of Issue User Association. Reference to table USR8/OPTI for location Argentinia. beas 2020.09

Reference2

String(11)

Reference 2 on document level

ReservationDocEntry


Link to Reservation BEAS_RESERVATION_LINE.RES_DOCENTRY

ResevationLineNumber


Link to Reservation BEAS_RESERVATION_LINE.RES_LINENUM

RetrievalDocument

boolean

true=Retrieval document from SAP Document

Example Sales order to Delivery order

 

Note:

Define BaseDocument on LineLevel true

Header information are not copied from target to source document !

 

beas support "Expenses Management" from Sales Order to a target document

("CINF"."EnblExpns"=Y, system read entries from Table "RDR3")
Base document is the Document, which is defined in first line

 

false=save only link to another document (in beas fields)

Series

string

Define the Document Series
See Administration -> System Initialization -> Document Numbering

Sort

string(255)

none:  use same sorting as defined in JSON String
Example: "Sort":"none"

empty (=Not defined, Standard):
Retrieval document: By base line number, Warehouse, DistNumber

      New documents: By Warehouse, ItemCode, DistNumber

or define own order (DataWindow syntax)

Example: base document line descending: "Sort:","base_linenum desc"

Field names: See table BEAS_PLANDOCUMENT_LINE

specialLines

String

Not available in Incoming Goods or Work order receipt/issue function

 

This allow to define special lines in one String

 

lineType=afterLine [=Text] ++ lineType=afterLine [=Text] ++

 

lineType: T = Test, S=Summary

afterLine: -1 = in first row, all other: Number of item line

text = for Text lines:

 

Example:

specialline

you need follow string

T=-1=Text at first row++T=0=my textline++S=0

 

beas 2020.08

TaxDate

Date

Tax Date. Default=SAP Standard

TrackingNumber

String

Define the Tracking Number

TransportationCode

String

Define the Transportation code

WoDocEntry

Number

Linked Work order DocEntry

WoLineNumber

Number

Linked Work order Line Number

WoLineNumber2

Number

Linked Work order Bill of Material position

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
 }

 ]

}