PORETURNLN – PO Return Line

System
Purchase Order (PO)
Prefix
PTL
Primary key
COMPANY, RETURN-NUMBER, RET-LINE-NBR
Fields
48
Updated by
224 programs
Referenced by
11 programs

PORETURNLN is the PO Return Line table in Lawson Purchase Order (prefix PTL). It is indexed by COMPANY, RETURN-NUMBER, RET-LINE-NBR (PTLSET1); alternate indexes: PTLSET2, PTLSET3 and PTLSET4. It is related 1:1 to ICCATEGORY, ICCOMPANY, PORECADJLN, ITEMLOC, ITEMMAST, POLINE, PORECLINE and PORETURNHD and 1:M to MMDIST, POTRANSDTL and SOHDETAIL. It is updated by AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 and 216 more and referenced by IC130, IC242, IC282, MA540, MM280, MM80.1, MM80.2, PO231 and 3 more. The table has 48 fields, 4 indexes and 13 documented relations.

About PORETURNLN

No description in the Lawson data dictionary.

Fields (48)

Column = COBOL field name without the PTL- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored.

Field / columnTypeDescription & valuesUpdated by
PTL-COMPANY PK
COMPANY
Numeric 4The company number.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-RETURN-NUMBER PK
RETURN_NUMBER
Numeric 10This is the number assigned to the return for purposes of referencing the return internally and with the customer or vendor.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-RETURN-NUMBERA
RETURN_NUMBERA
Alpha 10 (Right Justified)MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-REFERENCE-NO
REFERENCE_NO
Alpha 25 (Right Justified)AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-RET-LINE-NBR PK
RET_LINE_NBR
Numeric 6This field contains the line number.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ORIG-PO-NBR
ORIG_PO_NBR
Alpha 14 (Right Justified)This is the original purchase order number the return line is from.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ORIG-PO-REL
ORIG_PO_REL
Numeric 4This is the release number of the original purchase order the return line is from.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ORIG-PO-CODE
ORIG_PO_CODE
Alpha 4This is the purchase order code.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ORIG-PO-LN-NBR
ORIG_PO_LN_NBR
Numeric 6This is the line number of the original purchase order the return line is from.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-DOC-NBR-NUM
DOC_NBR_NUM
Numeric 10For return lines created from inspection rejections, this field holds the document number of the rejection to allow for drill backs.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-REC-NUMBER
REC_NUMBER
Numeric 10The receiver number the return line was created from as a result of a receiving buyer message.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ITEM
ITEM
Alpha 32This field contains the item identifier.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-MATCH-DTL-KEY
MATCH_DTL_KEY
Alpha 85MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-DESCRIPTION
DESCRIPTION
Alpha 30 (Lower Case)This is the item description.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ITEM-TYPE
ITEM_TYPE
Alpha 1This field identifies the line item type.
  • I Inventoried
  • N Non-stock
  • X Special
  • S Service
MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-RETURN-QTY
RETURN_QTY
Signed 13.4This is the quantity on the return line.AP20.1, AP20.2, AP20.3, AP20.4, AP20.5, AP20.7, AP25.1, AP25.2 +52 more (list truncated in source)
PTL-ADJUSTMENT-QTY
ADJUSTMENT_QTY
Signed 13.4This field contains the desired quantity.AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-CATCH-WT-QTY
CATCH_WT_QTY
Signed 13.4This field contains the desired quantity.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-DETAIL-BAL-FL
DETAIL_BAL_FL
Alpha 1
  • Y Yes
  • N No
MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO32.2 +3 more
PTL-ENTERED-UOM
ENTERED_UOM
Alpha 4This is the valid unit of measure of the entered quantity.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-ENT-UOM-MULT
ENT_UOM_MULT
Signed 13.7This is the multiplier that relates the entered unit of measure to stock unit of measure.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-VPRI-UOM
VPRI_UOM
Alpha 4This field contains the valid stock unit of measure for this item.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-VPRI-UOM-MULT
VPRI_UOM_MULT
Signed 13.7This field contains the multiplier for converting this unit of measure to the stock unit of measure.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-UNIT-COST
UNIT_COST
Signed 18.5AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-INSP-REQ-FL
INSP_REQ_FL
Alpha 1This flag indicates whether this item has to be inspected when received via purchase order.
  • N No
  • Y Yes
MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-TAX-CODE
TAX_CODE
Alpha 10This field contains a code representing specific tax information. This must be valid Tax Code.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-TAX-USAGE-CD
TAX_USAGE_CD
Alpha 10The tax usage coe for the vendor. This filed is required if the AP Company inidcates that VAT reporting required.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-LAST-DST-SEQ
LAST_DST_SEQ
Numeric 3This is the sequence number of the last distribution line for this return line.AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-LAST-POT-SEQ
LAST_POT_SEQ
Numeric 6MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO32.2 +4 more
PTL-CANCEL-OPTIONS
CANCEL_OPTIONS
Alpha 1This option indicates at header or line level, whether both a return and return purchase order should be canceled, or just one or the other. If a cancel option is chosen at line level, a cancel quantity must also be entered. Once a cancel option is set, it cannot be changed or undone. N
  • Y Canceled
AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-ICN-CODE
ICN_CODE
Alpha 8MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-SUPLMNTARY-QTY
SUPLMNTARY_QTY
Signed 13.4This field contains the desired quantity.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-WEIGHT
WEIGHT
Signed 9.3This field contains the unit weight of the item based on the stocking UOM.MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-INTRASTAT-NBR
INTRASTAT_NBR
Numeric 12The number assigned by the Intrastat system to a transaction that involves Intrastat reporting after it has been added.AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-VR-CXL-UPD-SOH
VR_CXL_UPD_SOH
Numeric 1AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-VEN-ITEM
VEN_ITEM
Alpha 32MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-VEN-AGRMT-REF
VEN_AGRMT_REF
Alpha 30MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-PROD-TAX-CAT
PROD_TAX_CAT
Alpha 15MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-CM-CONTRACT
CM_CONTRACT
Numeric 15
PTL-MFG-CONTRACT
MFG_CONTRACT
Numeric 15
PTL-CONTRACT-GROUP
CONTRACT_GROUP
Alpha 4
PTL-GTIN
GTIN
Numeric 14MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-CREATED-BY
CREATED_BY
Alpha 10MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-LAST-UPDT-DATE
LAST_UPDT_DATE
Numeric 8 (yyyymmdd)AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-LAST-UPDT-TIME
LAST_UPDT_TIME
Numeric 8AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-LAST-UPDATE-BY
LAST_UPDATE_BY
Alpha 10AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
PTL-GLBL-LINE-TYPE
GLBL_LINE_TYPE
Alpha 15MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
PTL-TEMP-HOLD
TEMP_HOLD
Alpha 1
  • S Sent for Approval
  • A Approved by Engine

Indexes (4)

Keys marked * are descending. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
PTLSET1COMPANY, RETURN-NUMBER, RET-LINE-NBRPrimaryAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
PTLSET2COMPANY, RETURN-NUMBERA, RET-LINE-NBRSubsetWhere ITEM-TYPE = "I"AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
PTLSET3COMPANY, ORIG-PO-NBR, ORIG-PO-REL, ORIG-PO-CODE, ORIG-PO-LN-NBR, RETURN-NUMBER, RET-LINE-NBRSubsetWhere ORIG-PO-NBR != SpacesAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
PTLSET4COMPANY, RETURN-NUMBER, RET-LINE-NBR, ITEM-TYPEKeyChangeAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)

Relations

One to one (10) — lookups and parents

RelationTableRulesConditionField map
IccategoryICCATEGORYRequiredWhen PTL-ITEM-TYPE = "I"PTL-COMPANYICA-COMPANY, PTH-RETURN-FRM-LOCICA-LOCATION, ITL-GL-CATEGORYICA-GL-CATEGORY
IccompanyICCOMPANYRequiredPTL-COMPANYICC-COMPANY
InspreturnsPORECADJLNRequiredPTL-COMPANYPJL-COMPANY, "IN"PJL-DOC-TYPE, PTL-DOC-NBR-NUMPJL-DOC-NBR-NUM, PTL-ORIG-PO-LN-NBRPJL-LINE-NBR
ItemlocITEMLOCRequiredWhen PTL-ITEM-TYPE = "I"PTL-COMPANYITL-COMPANY, PTH-RETURN-FRM-LOCITL-LOCATION, PTL-ITEMITL-ITEM
ItemmastITEMMASTRequiredWhen PTL-ITEM-TYPE = "I" Or PTL-ITEM-TYPE = "N"ICC-ITEM-GROUPITE-ITEM-GROUP, PTL-ITEMITE-ITEM
Original PoPOLINERequiredPTL-COMPANYPLI-COMPANY, PTL-ORIG-PO-NBRPLI-PO-NUMBER, PTL-ORIG-PO-RELPLI-PO-RELEASE, PTL-ORIG-PO-CODEPLI-PO-CODE, PTL-ORIG-PO-LN-NBRPLI-LINE-NBR
PorecadjlnPORECADJLNRequiredWhen PTL-DOC-NBR-NUM != ZeroesPTL-COMPANYPJL-COMPANY, "IN"PJL-DOC-TYPE, PTL-DOC-NBR-NUMPJL-DOC-NBR-NUM, PTL-ORIG-PO-LN-NBRPJL-LINE-NBR
Porecadjln2PORECADJLNRequiredWhen PTL-DOC-NBR-NUM != ZeroesPTL-COMPANYPJL-COMPANY, "RA"PJL-DOC-TYPE, PTL-DOC-NBR-NUMPJL-DOC-NBR-NUM, PTL-ORIG-PO-LN-NBRPJL-LINE-NBR
PoreclinePORECLINERequiredWhen PTL-REC-NUMBER != ZeroesPTL-COMPANYPRL-COMPANY, PTL-REC-NUMBERPRL-REC-NUMBER, PTL-ORIG-PO-LN-NBRPRL-LINE-NBR
ReturnheaderPORETURNHDRequiredPTL-COMPANYPTH-COMPANY, PTL-RETURN-NUMBERPTH-RETURN-NUMBER

One to many (3) — child tables

RelationTableRulesConditionField map
MmdistMMDISTValid When PTL-ITEM-TYPE != "I"PTL-COMPANYMMD-COMPANY, "PO"MMD-SYSTEM-CD, PTH-RETURN-FRM-LOCMMD-LOCATION, "VR"MMD-DOC-TYPE, SpacesMMD-DOC-NUMBER, PTL-RETURN-NUMBERMMD-DOC-NBR-NUM, SpacesMMD-PO-CODE, PTL-RET-LINE-NBRMMD-LINE-NBR, ZeroesMMD-COMPONENT-SEQ, SpacesMMD-AOC-CODE, MMD-LINE-SEQ, MMD-REQ-LOCATION, MMD-API-OBJ-ID
PotransdtlPOTRANSDTLPTL-COMPANYPOT-COMPANY, "VR"POT-DOC-TYPE, PTL-RETURN-NUMBERPOT-DOC-NBR-NUM, PTL-RET-LINE-NBRPOT-LINE-NBR, POT-TRANS-SEQ
SohdetailSOHDETAILValid When PTL-ITEM-TYPE = "I"PTL-COMPANYSDT-COMPANY, PTH-RETURN-FRM-LOCSDT-LOCATION, PTL-ITEMSDT-ITEM, SDT-UOM, SDT-LOT, SDT-SUBLOT, SDT-BIN

Programs

Updated by (224)

Referenced by (11)