Processing TWMLIB : Three way matching library
CALCTWM
This entry point located in the TWMLIB process. It is initiated from the following events in receipt entry:
AM_RCTDAT
APRES_NBLIG
LIENS_LIG
The goal of this action is to give the possibility to manipulate the quantities being passed down through the three way matching alogrithm.
CALCTWM
Added an entry point in the three way matching library (TWMLIB.src) prior to the routine call TWLINTOL. The partner can insert logic to manipulate the quantities being passed down through the algorithm. This entry point is initiated from the following events in receipt entry:
AM_RCTDAT
APRES_NBLIG
LIENS_LIG
GPOINT="CALCTWM" : Gosub ENTREE From EXEFNC
Call TWMLINTOL(WVCRTYP,TYPORI,[M:PTH1]MATTOL(NOL),NOL,WVCRTYP,[M:PTH1]ITMREF(NOL),[M:PTH0]BPSNUM,POH_FND,[F:POQ]QTYPUU,[F:POQ]PUU,[F:POQ]QTYSTU-XRCTQTY-XRETQTY,
& [F:POQ]STU,[F:POQ]UOMPUUCOE,[F:POP]NETPRI,[F:POH]CUR,[F:POQ]ORDDAT,
& PTH_FND,XQTYUOM,XUOM,XQTYSTU,XSTU,XCOE,[M:PTH1]NETPRI(NOL),
& [M:PTH1]NETCUR(NOL),[M:PTH0]RCPDAT,1,0,[M:PTH1]UOM(NOL),0,[M:PTH1]STU(NOL),[M:PTH1]UOMPUUCOE(NOL),0,
& [M:PTH1]NETCUR,
& [M:PTH0]RCPDAT,TWMVAR,TWMMETRIC,TWMALLOW,TWMPODQTY,TWMPTDQTY,TWMPIDQTY,PODNETPRI,PIDNETPRI,PODNOTLIN,PIDNOTLIN,TWMSTA,
& REQRECDAT,RECDAT,TWMTSTA,TWMLINSTA,TWMEXP,ERR,ERRMSG) From TWMLIB
WVCRTYP – Document type. Receiving = 6.
TYPORI – Order source. 1=order, 2 = receipt.
TWMCOD – Matching tolerance code
NOL - Receipt line number (0…).
POH_FND – Purchase order available. 0=no 1=yes.
XRCTQTY – [F:POQ]RCPQTYSTU - [F:PTD]QTYSTU
XRETQTY – Return quantity. If any posted return to be reinstated on same PO line then
[F:PND]QTYSTU. If XRETQTY = [M:PTH1]QTYSTU(NOL) then XRETQTY = 0.
PTH_FND – Receipt available. 0=no 1=yes.
XQTYUOM - [M:ENM]QTYSTU(NOL) during receipt modification, else [M:PTH1]QTYUOM(NOL).
XUOM - [M:ENM]PCU(NOL) during receipt modification, else [M:PTH1]UOM(NOL).
XQTYSTU - [M:ENM]QTYSTU(NOL) during receipt modification, else [M:PTH1]QTYSTU(NOL).
XSTU - [M:ENM]STU during receipt modification, else [M:PTH1]STU(NOL).
XCOE - [M:ENM]PCUSTUCOE(J) during receipt modification, else [M:PTH1]UOMPUUCOE(NOL).
PIHFLG - 1. Invoice available – N/A for receipts.
PIDQTY - 0. Invoice quantity.
PIDQTYSTU – 0. Invoice quantity in stock UOM.
INVNETPRI – 0. Invoice net price
TWMVAR - Variance quantity in purchase UOM.
TWMMETRIC – Message array when tolerance is breeched. (TWMMETRIC(NOL-1))
TWMALLOW – Tolerance value.
TWMPODQTY – PO quantity ordered.
TWMPTDQTY – Received quantity.
TWMPIDQTY – Invoiced quantity.
PODNETPRI – PO net price. (Message box only)
PIDNETPRI – Invoice net price. (Message box only)
PODNOTLIN – Order amount-tax. (Message box only)
PIDNOTLIN – Invoice line amount-tax. (Message box only)
REQRECDAT – Expected receipt date.
RECDAT – Actual receipt date.
TWMLINSTA – Line receipt match status - Local menu 585.
TWMEXP – Description of match results.
ERR – Error state.
ERRMSG – Feeds to [M:TWS2]TWMEXP.
TWMSTA – Receipt Match status - Local menu 585.
TWMTSTA – Temporary match status. Block supersedes warning which supersedes
successful.