ExternalPurchaseOrder

List of all Purchase order created for Work order Routing position for external production  (External Production -> Provision)

externalPurchaseOrder

It's possible to link to PurchaseOrderLines. See WorkorderProvisionBoM

 

Entity Collections Properties

ExternalPurchaseOrder

 

Property

Description

Table

OPOR

Primary key

DocEntry/i

$transaction

no

$branch

no

$mask

no

 

Fields

Name

Type

Description

DocEntry

Edm.Int32

Database: "OPOR"."DocEntry"

DocNumber

Edm.Int32

Database: "OPOR"."DocNum"

Reference2

Edm.String(11)

Database: "OPOR"."Ref2"

TaxDate

Edm.DateTimeOffset

Database: "OPOR"."TaxDate"

DocumentDate

Edm.DateTimeOffset

Database: "OPOR"."DocDate"

DocDueDate

Edm.DateTimeOffset

Database: "OPOR"."DocDueDate"

BPLId

Edm.DateTimeOffset

Database: "OPOR"."BPLId"

Remarks

Edm.DateTimeOffset

Database: "OPOR"."Comments"

CardCode

Edm.String(20)

Entity Relation: BusinessPartner -> CardCode

Database: "OPOR"."CardCode"

CardName

Edm.String(1)

Database: "OPOR"."CardName"

Printed

Edm.Int32

Database: "OPOR"."Printed"

DocumentStatus

Edm.String(1)

Database: "OPOR"."DocStatus"

ExternalDocEntry

Edm.Int32

Document Number for the external Process.

The process is the Purchase Order + Provision process

Database: "BEAS_OWING_SUPPLIES"."DocEntry"

ExternalStatus

Edm.String(1)

Status of the Process. C=Closed, O=Open

Database: case when "POR1"."LineStatus"='O' and coalesce("BEAS_OWING_SUPPLIES"."DocStatus",'C') <> 'C' then 'O' else 'C' end

ExternalWhsCode

Edm.String(20)

The warehouse for external process. This is the warehouse on which the material must be trasnfered

 

Database: "BEAS_OWING_SUPPLIES"."WhsCode"

OrderQuantityWhsUnit

Edm.Int32

Database: "POR1"."InvQty"

DeliveredQuantity

Edm.Int32

Database: coalesce((select sum("PDN1"."InvQty") from "PDN1" where "PDN1"."BaseEntry"="POR1"."DocEntry" and "PDN1"."BaseType"=22 and "PDN1"."BaseLine"="POR1"."LineNum"),0)

ScrapQuantity

Edm.Int32

Database: (select sum(coalesce("U_von_lag",0)) from "PDN1" where "PDN1"."BaseEntry"="POR1"."DocEntry" and "PDN1"."BaseLine"="POR1"."LineNum")

CanceledQuantity

Edm.Decimal

Database: coalesce((select sum("RPD1"."InvQty") from "PDN1" inner join "RPD1" on "RPD1"."BaseEntry"="PDN1"."DocEntry" and "RPD1"."BaseType"=20 and "RPD1"."BaseLine"="PDN1"."LineNum" where "PDN1"."BaseEntry"="POR1"."DocEntry" and "PDN1"."BaseType"=22 and "PDN1"."Ba

 

Relations

Join to Entiy Object

Relation

PurchaseOrderLines


BusinessPartner

CardCode

WareHouse

ExternalWhsCode

WorkorderRouting


WorkorderPos


Workorder


 

Functions

Function

Parameter

Description

getAddress

ExternalDocEntry/i

Return the delivery Address in correct format for defined Purchase Order

ExternalPurchaseOrder/getAddress(DocEntry)

Return:

{"address": "WhsStreet\n\nWhsCity GA 122345\nUSA"}

 

Function

Property

Description

setReady(ExternalDocEntry)

Example

ExternalPurchaseOrder/setReady(1024)

 

Example:

Get all informations from open documents:

ExternalPurchaseOrder?$filter=ExternalStatus = 'O'&$select=ExternalPurchaseOrder,PurchaseOrderLines/*,PurchaseOrderLines/WareHouse