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. PK = primary key (present in every index); SETn = leading/alternate key of that index.

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 SET2
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 SET3
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 SET3
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 SET3
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 SET3
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 85—MA531, 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 SET4
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.5—AP125, 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 6—MA531, 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 8—MA531, 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 1—AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
#PTL-VEN-ITEM
VEN_ITEM
Alpha 32—MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
#PTL-VEN-AGRMT-REF
VEN_AGRMT_REF
Alpha 30—MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
#PTL-PROD-TAX-CAT
PROD_TAX_CAT
Alpha 15—MA531, 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 14—MA531, PO30.1, PO30.2, PO30.3, PO30.4, PO31.1, PO31.2, PO33.1 +2 more
#PTL-CREATED-BY
CREATED_BY
Alpha 10—MA531, 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 8—AP125, 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 10—AP125, 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 15—MA531, 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 are listed in index order; ↓ marks a descending key. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
PTLSET1
  1. COMPANY
  2. RETURN-NUMBER
  3. RET-LINE-NBR
PrimaryAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
PTLSET2
  1. COMPANY
  2. RETURN-NUMBERA
  3. RET-LINE-NBR
SubsetWhere ITEM-TYPE = "I"AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
PTLSET3
  1. COMPANY
  2. ORIG-PO-NBR
  3. ORIG-PO-REL
  4. ORIG-PO-CODE
  5. ORIG-PO-LN-NBR
  6. RETURN-NUMBER
  7. RET-LINE-NBR
SubsetWhere ORIG-PO-NBR != SpacesAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
PTLSET4
  1. COMPANY
  2. RETURN-NUMBER
  3. RET-LINE-NBR
  4. ITEM-TYPE
KeyChangeAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)

Relations

Relationship map — 1:1 lookups/parents on the left, 1:M children on the right (up to 14 each)
ICCATEGORYICCOMPANYPORECADJLNITEMLOCITEMMASTPOLINEPORECLINEPORETURNHDMMDISTPOTRANSDTLSOHDETAILPORETURNLN

One to one (10) — lookups and parents

RelationTableRulesConditionField map
IccategoryICCATEGORYRequiredWhen PTL-ITEM-TYPE = "I"
PTL-COMPANY→ICA-COMPANY
PTH-RETURN-FRM-LOC→ICA-LOCATION
ITL-GL-CATEGORY→ICA-GL-CATEGORY
IccompanyICCOMPANYRequired
PTL-COMPANY→ICC-COMPANY
InspreturnsPORECADJLNRequired
PTL-COMPANY→PJL-COMPANY
"IN"→PJL-DOC-TYPE
PTL-DOC-NBR-NUM→PJL-DOC-NBR-NUM
PTL-ORIG-PO-LN-NBR→PJL-LINE-NBR
ItemlocITEMLOCRequiredWhen PTL-ITEM-TYPE = "I"
PTL-COMPANY→ITL-COMPANY
PTH-RETURN-FRM-LOC→ITL-LOCATION
PTL-ITEM→ITL-ITEM
ItemmastITEMMASTRequiredWhen PTL-ITEM-TYPE = "I" Or PTL-ITEM-TYPE = "N"
ICC-ITEM-GROUP→ITE-ITEM-GROUP
PTL-ITEM→ITE-ITEM
Original PoPOLINERequired
PTL-COMPANY→PLI-COMPANY
PTL-ORIG-PO-NBR→PLI-PO-NUMBER
PTL-ORIG-PO-REL→PLI-PO-RELEASE
PTL-ORIG-PO-CODE→PLI-PO-CODE
PTL-ORIG-PO-LN-NBR→PLI-LINE-NBR
PorecadjlnPORECADJLNRequiredWhen PTL-DOC-NBR-NUM != Zeroes
PTL-COMPANY→PJL-COMPANY
"IN"→PJL-DOC-TYPE
PTL-DOC-NBR-NUM→PJL-DOC-NBR-NUM
PTL-ORIG-PO-LN-NBR→PJL-LINE-NBR
Porecadjln2PORECADJLNRequiredWhen PTL-DOC-NBR-NUM != Zeroes
PTL-COMPANY→PJL-COMPANY
"RA"→PJL-DOC-TYPE
PTL-DOC-NBR-NUM→PJL-DOC-NBR-NUM
PTL-ORIG-PO-LN-NBR→PJL-LINE-NBR
PoreclinePORECLINERequiredWhen PTL-REC-NUMBER != Zeroes
PTL-COMPANY→PRL-COMPANY
PTL-REC-NUMBER→PRL-REC-NUMBER
PTL-ORIG-PO-LN-NBR→PRL-LINE-NBR
ReturnheaderPORETURNHDRequired
PTL-COMPANY→PTH-COMPANY
PTL-RETURN-NUMBER→PTH-RETURN-NUMBER

One to many (3) — child tables

RelationTableRulesConditionField map
MmdistMMDISTValid When PTL-ITEM-TYPE != "I"
PTL-COMPANY→MMD-COMPANY
"PO"→MMD-SYSTEM-CD
PTH-RETURN-FRM-LOC→MMD-LOCATION
"VR"→MMD-DOC-TYPE
Spaces→MMD-DOC-NUMBER
PTL-RETURN-NUMBER→MMD-DOC-NBR-NUM
Spaces→MMD-PO-CODE
PTL-RET-LINE-NBR→MMD-LINE-NBR
Zeroes→MMD-COMPONENT-SEQ
Spaces→MMD-AOC-CODE
—→MMD-LINE-SEQ
—→MMD-REQ-LOCATION
—→MMD-API-OBJ-ID
PotransdtlPOTRANSDTL
PTL-COMPANY→POT-COMPANY
"VR"→POT-DOC-TYPE
PTL-RETURN-NUMBER→POT-DOC-NBR-NUM
PTL-RET-LINE-NBR→POT-LINE-NBR
—→POT-TRANS-SEQ
SohdetailSOHDETAILValid When PTL-ITEM-TYPE = "I"
PTL-COMPANY→SDT-COMPANY
PTH-RETURN-FRM-LOC→SDT-LOCATION
PTL-ITEM→SDT-ITEM
—→SDT-UOM
—→SDT-LOT
—→SDT-SUBLOT
—→SDT-BIN

Programs

Updated by (224)

Referenced by (11)