APIPAC_DISTLINE

(SQL View)
Index Back

Voucher Distribution Table

Voucher Line Distribution Record

SELECT A.BUSINESS_UNIT , B.VOUCHER_ID , A.VOUCHER_LINE_NUM , A.DISTRIB_LINE_NUM , A.BUSINESS_UNIT_GL , A.ACCOUNT , A.STATISTICS_CODE , A.STATISTIC_AMOUNT , A.JRNL_LN_REF , A.DESCR , C.IPAC_LN_AMT , B.PROCESS_INSTANCE , A.BUSINESS_UNIT_PO , A.PO_ID , A.LINE_NBR , A.SCHED_NBR , A.PO_DIST_LINE_NUM , A.ASSET_FLG , A.BUSINESS_UNIT_AM , A.ASSET_ID , A.PROFILE_ID , A.COST_TYPE , A.VAT_TXN_TYPE_CD , A.VAT_INV_AMT , A.VAT_NONINV_AMT , A.BUSINESS_UNIT_RECV , A.RECEIVER_ID , A.RECV_LN_NBR , A.RECV_SHIP_SEQ_NBR , A.RECV_DIST_LINE_NUM , A.VAT_RECOVERY_PCT , A.VAT_BASIS_AMT , A.VAT_CALC_AMT , A.VAT_RCVRY_AMT , A.VAT_NRCVR_AMT , A.TAX_CD_VAT_PCT , A.ECTRANSID , A.ECQUEUEINSTANCE , A.ECTRANSINOUTSW , %subrec(CFS16_AN_SBR,A) , A.ALTACCT , A.DEPTID , A.VAT_REBATE_PCT , A.VAT_REBATE_AMT , D.ACCOUNTING_DT , A.VAT_TRANS_AMT , A.VAT_APORT_CNTRL , A.ENTRY_EVENT , %subrec(VCHRD_USER_SBR,A) , %subrec(PUR_USR_DST_SBR,A) , A.OPEN_ITEM_KEY , %subrec(WM_WO_SBR,A) , A.TAG_NUMBER , A.SERIAL_ID , A.DISTRIB_SEQ_NUM , C.IPAC_LN_AMT ,( SELECT SUM(A1.MERCHANDISE_AMT) FROM PS_DISTRIB_LINE A1 WHERE A1.BUSINESS_UNIT = A.BUSINESS_UNIT AND A1.VOUCHER_ID = A.VOUCHER_ID AND A1.VOUCHER_LINE_NUM = A.VOUCHER_LINE_NUM) , ( SELECT COUNT(A2.DISTRIB_LINE_NUM) FROM PS_DISTRIB_LINE A2 WHERE A2.BUSINESS_UNIT = A.BUSINESS_UNIT AND A2.VOUCHER_ID = A.VOUCHER_ID AND A2.VOUCHER_LINE_NUM = A.VOUCHER_LINE_NUM) , C.IPAC_QUANTITY FROM PS_DISTRIB_LINE A, PS_AP_IPAC_HDR B, PS_AP_IPAC_DETAIL C, PS_APIPAC_VCHR D , PS_PYMNT_VCHR_XREF P WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.VOUCHER_ID = B.VOUCHER_ID_RELATED AND B.BUSINESS_UNIT = C.BUSINESS_UNIT AND B.VOUCHER_ID = C.VOUCHER_ID AND B.IPAC_HDR_SEQ_NUM = C.IPAC_HDR_SEQ_NUM AND A.VOUCHER_LINE_NUM = C.IPAC_ORIG_LN_ITM AND D.BUSINESS_UNIT = B.BUSINESS_UNIT AND D.VOUCHER_ID = B.VOUCHER_ID AND P.BUSINESS_UNIT = A.BUSINESS_UNIT AND P.VOUCHER_ID = B.VOUCHER_ID_RELATED AND P.PYMNT_CNT = 1 AND %Sql(FUND_CODE,A.) = (CASE WHEN ( SELECT X.ALC FROM PS_BANK_CD_TBL X WHERE X.SETID = P.BANK_SETID AND X.BANK_CD = P.BANK_CD) = B.CUSTOMER_ALC THEN ( SELECT %Sql(FUND_CODE,FND.) FROM PS_TAS_FUND_CD_TBL FND , PS_TAS_DEFN_TBL TASDFN WHERE %Join(COMMON_KEYS, TAS_FUND_CD_TBL FND, TAS_DEFN_TBL TASDFN) AND TASDFN.TAS_GWA = C.IPAC_RECVR_TAS AND FND.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC SETCNTL WHERE SETCNTL.RECNAME = ( SELECT EDITTABLE FROM PSRECFIELD RECFLD WHERE RECFLD.RECNAME = 'CF16_AN_SBR' AND RECFLD.FIELDNAME = ( SELECT FIELDNAME FROM PS_FS_CF_TEMPLATE WHERE ORIG_CF_NAME = 'FUND_CODE')) AND SETCNTL.SETCNTRLVALUE = A.BUSINESS_UNIT AND SETCNTL.REC_GROUP_ID = ( SELECT REC_GROUP_ID FROM PS_REC_GROUP_REC RGR1 WHERE RGR1.RECNAME = ( SELECT EDITTABLE FROM PSRECFIELD RECFLD WHERE RECFLD.RECNAME = 'CF16_AN_SBR' AND RECFLD.FIELDNAME = ( SELECT FIELDNAME FROM PS_FS_CF_TEMPLATE WHERE ORIG_CF_NAME = 'FUND_CODE'))))) WHEN ( SELECT X.ALC FROM PS_BANK_CD_TBL X WHERE X.SETID = P.BANK_SETID AND X.BANK_CD = P.BANK_CD) = B.ALC THEN ( SELECT %Sql(FUND_CODE,FND.) FROM PS_TAS_FUND_CD_TBL FND , PS_TAS_DEFN_TBL TASDFN WHERE %Join(COMMON_KEYS, TAS_FUND_CD_TBL FND, TAS_DEFN_TBL TASDFN) AND TASDFN.TAS_GWA = C.IPAC_SENDER_TAS AND FND.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC SETCNTL WHERE SETCNTL.RECNAME = ( SELECT EDITTABLE FROM PSRECFIELD RECFLD WHERE RECFLD.RECNAME = 'CF16_AN_SBR' AND RECFLD.FIELDNAME = ( SELECT FIELDNAME FROM PS_FS_CF_TEMPLATE WHERE ORIG_CF_NAME = 'FUND_CODE')) AND SETCNTL.SETCNTRLVALUE = A.BUSINESS_UNIT AND SETCNTL.REC_GROUP_ID = ( SELECT REC_GROUP_ID FROM PS_REC_GROUP_REC RGR WHERE RGR.RECNAME = ( SELECT EDITTABLE FROM PSRECFIELD RECFLD WHERE RECFLD.RECNAME = 'CF16_AN_SBR' AND RECFLD.FIELDNAME = ( SELECT FIELDNAME FROM PS_FS_CF_TEMPLATE WHERE ORIG_CF_NAME = 'FUND_CODE'))))) END)

  • Parent record: VOUCHER_LINE
  • # PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
    1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
    2 VOUCHER_ID Character(8) VARCHAR2(8) NOT NULL Voucher ID
    3 VOUCHER_LINE_NUM Number(5,0) INTEGER NOT NULL Voucher Line Number

    Default Value: 1

    4 DISTRIB_LINE_NUM Number(5,0) INTEGER NOT NULL Distribution Line

    Default Value: 1

    5 BUSINESS_UNIT_GL Character(5) VARCHAR2(5) NOT NULL GL Business Unit

    Prompt Table: SP_BUPRCR_NONVW

    6 ACCOUNT Character(10) VARCHAR2(10) NOT NULL Account

    Prompt Table: %EDIT_ACCOUNT

    7 STATISTICS_CODE Character(3) VARCHAR2(3) NOT NULL Statistics Code

    Prompt Table: STAT_BUGL_VW

    8 STATISTIC_AMOUNT Signed Number(17,2) DECIMAL(15,2) NOT NULL Specifies the amount associated with a statistical account on a journal line or a distribution line. It represents a quantity rather than a monetary amount and is qualified by the Unit of Measure associated with the STATISTICS_CODE or statistics ACCOUNT.
    9 JRNL_LN_REF Character(10) VARCHAR2(10) NOT NULL Identifies a document, person, invoice, date, or any other piece of information that is associated with a journal line. It can be manually entered, or be defaulted from an accounting entry definition or from a Journal Generator Template. The journal line reference is optional, but helpful if you need to trace back to the source of the transaction.
    10 DESCR Character(30) VARCHAR2(30) NOT NULL Description
    11 MERCHANDISE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Merchandise Amt F_KDHIL_R87H8 062804 MLM: Added new Line Amount Received Label
    12 PROCESS_INSTANCE Number(10,0) DECIMAL(10) NOT NULL Process Instance
    13 BUSINESS_UNIT_PO Character(5) VARCHAR2(5) NOT NULL PO Business Unit
    14 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
    15 LINE_NBR Number(5,0) INTEGER NOT NULL Line Number: 11/24/08 - Added TARGET label [PC product]
    16 SCHED_NBR Number(3,0) SMALLINT NOT NULL Schedule Number
    17 PO_DIST_LINE_NUM Number(5,0) INTEGER NOT NULL PO Distribution Line Number
    18 ASSET_FLG Character(1) VARCHAR2(1) NOT NULL Assets Applicable

    Y/N Table Edit

    Default Value: N

    19 BUSINESS_UNIT_AM Character(5) VARCHAR2(5) NOT NULL AM Business Unit

    Prompt Table: %EDITTABLE5

    20 ASSET_ID Character(12) VARCHAR2(12) NOT NULL Asset Identification

    Prompt Table: %EDITTABLE6

    21 PROFILE_ID Character(10) VARCHAR2(10) NOT NULL Asset Profile ID

    Prompt Table: %EDITTABLE7

    22 COST_TYPE Character(1) VARCHAR2(1) NOT NULL Cost Type

    Prompt Table: %EDITTABLE18

    23 VAT_TXN_TYPE_CD Character(4) VARCHAR2(4) NOT NULL Specifies a user-defined category of business transaction that is subject to VAT accounting and reporting. The VAT code and the VAT transaction type are used in conjunction with the VAT account type to obtain the ChartFields for accounting entries. Some examples of VAT Transaction Types are Exempt Sales Exempt Purchases Triangulation EU Sales and Domestic Sales.

    Prompt Table: VAT_TXN_CD

    24 VAT_INV_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Invoice Amount
    25 VAT_NONINV_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Non-Invoice Amount
    26 BUSINESS_UNIT_RECV Character(5) VARCHAR2(5) NOT NULL Receiving Business Unit
    27 RECEIVER_ID Character(10) VARCHAR2(10) NOT NULL Receiver number
    28 RECV_LN_NBR Number(5,0) INTEGER NOT NULL Receipt Line
    29 RECV_SHIP_SEQ_NBR Number(3,0) SMALLINT NOT NULL Receiver Shipping Sequence
    30 RECV_DIST_LINE_NUM Number(5,0) INTEGER NOT NULL Receiver Distrib Line
    31 VAT_RECOVERY_PCT Signed Number(7,2) DECIMAL(5,2) NOT NULL VAT Recovery Percent
    32 VAT_BASIS_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the amount on a sale (receivables item) or purchase (Payables voucher) transaction that is subject to VAT taxation. Depending on other parameters this amount may represent the gross or net amount of the transaction and may or may not include freight charges.
    33 VAT_CALC_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Calculated Amount
    34 VAT_RCVRY_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Recovery Amt
    35 VAT_NRCVR_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Non Recoverable
    36 TAX_CD_VAT_PCT Signed Number(9,4) DECIMAL(7,4) NOT NULL Specifies the tax percentage that corresponds to the VAT code. If more than one VAT authority is linked to a VAT code this will represent an aggregate percentage.
    37 ECTRANSID Character(15) VARCHAR2(15) NOT NULL Electronic Commerce Transaction ID. Used in EDI Manager. One of three(3) Key Fields(ECTRANSID, ECTRANSINOUTSW, ECQUEUEINSTANCE) used in Electronic Commerce(EC) Staging Tables. ECTRANSID in EDI Manager identifies a transaction type(like "PO" for Purchase Orders)
    38 ECQUEUEINSTANCE Number(9,0) DECIMAL(9) NOT NULL Electronic Commerce Queue Instance ID. Used in EDI Manager. One of three(3) Key Fields(ECTRANSID, ECTRANSINOUTSW, ECQUEUEINSTANCE) used in Electronic Commerce(EC) Staging Tables.
    39 ECTRANSINOUTSW Character(1) VARCHAR2(1) NOT NULL Electronic Commerce Inbound/Outbound Switch. Used in EDI Manager. One of three(3) Key Fields(ECTRANSID, ECTRANSINOUTSW, ECQUEUEINSTANCE) used in Electronic Commerce(EC) Staging Tables. The field value is "I" for Inbound Transactions, and "O" for Outbound.
    I=Inbound
    O=Outbound
    40 OPERATING_UNIT Character(8) VARCHAR2(8) NOT NULL Operating Unit ChartField

    Prompt Table: %EDIT_OPER_UNIT

    41 PRODUCT Character(6) VARCHAR2(6) NOT NULL Product ChartField

    Prompt Table: %EDIT_PRODUCT

    42 FUND_CODE Character(5) VARCHAR2(5) NOT NULL Fund Code

    Prompt Table: %EDIT_FUND_CODE

    43 CLASS_FLD Character(5) VARCHAR2(5) NOT NULL Class Field

    Prompt Table: %EDIT_CLASS_FLD

    44 PROGRAM_CODE Character(5) VARCHAR2(5) NOT NULL Program Code ChartField

    Prompt Table: %EDIT_PROG_CODE

    45 BUDGET_REF Character(8) VARCHAR2(8) NOT NULL Budget Reference

    Prompt Table: %EDIT_BUD_REF

    46 AFFILIATE Character(5) VARCHAR2(5) NOT NULL Affiliate

    Prompt Table: AFFILIATE_VW

    47 AFFILIATE_INTRA1 Character(10) VARCHAR2(10) NOT NULL IntraUnit Affiliate1

    Prompt Table: %EDIT_INTRA01

    48 AFFILIATE_INTRA2 Character(10) VARCHAR2(10) NOT NULL Operating Unit Affiliate

    Prompt Table: %EDIT_INTRA02

    49 CHARTFIELD1 Character(10) VARCHAR2(10) NOT NULL Expansion chartfield 1

    Prompt Table: %EDIT_CHARTFLD1

    50 CHARTFIELD2 Character(10) VARCHAR2(10) NOT NULL Expansion Chartfield 2

    Prompt Table: %EDIT_CHARTFLD2

    51 CHARTFIELD3 Character(10) VARCHAR2(10) NOT NULL Expansion Chartfield 3

    Prompt Table: %EDIT_CHARTFLD3

    52 ALTACCT Character(10) VARCHAR2(10) NOT NULL Alternate Account

    Prompt Table: %EDIT_ALTACCT
    Set Control Field: ALTACCT_SETID

    53 DEPTID Character(10) VARCHAR2(10) NOT NULL Department

    Prompt Table: %EDIT_DEPT

    54 VAT_REBATE_PCT Signed Number(7,2) DECIMAL(5,2) NOT NULL VAT Rebate Percent
    55 VAT_REBATE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Rebate Amt
    56 BUDGET_DT Date(10) DATE Budget Date
    57 VAT_TRANS_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Represents the sale or purchase amount against which the VAT is applicable.
    58 VAT_APORT_CNTRL Character(1) VARCHAR2(1) NOT NULL VAT Apportionment Control
    D=Distribution GL Business Unit
    G=Transaction GL Business Unit
    T=Transaction Business Unit
    59 ENTRY_EVENT Character(10) VARCHAR2(10) NOT NULL Entry Event

    Prompt Table: EE_AP_CODES_VW
    Set Control Field: BUSINESS_UNIT

    60 USER_VCHR_CHAR1 Character(1) VARCHAR2(1) NOT NULL User Character Field
    61 USER_VCHR_CHAR2 Character(1) VARCHAR2(1) NOT NULL User Character Field 2
    62 USER_VCHR_DEC Signed Number(28,3) DECIMAL(26,3) NOT NULL User Amount Field
    63 USER_VCHR_DATE Date(10) DATE User Date
    64 USER_VCHR_NUM1 Number(3,0) SMALLINT NOT NULL User Number field
    65 USER_DIST_CHAR1 Character(1) VARCHAR2(1) NOT NULL Custom Character 1
    66 CUSTOM_C100_D1 Character(100) VARCHAR2(100) NOT NULL Custom Field 1
    67 CUSTOM_C100_D2 Character(100) VARCHAR2(100) NOT NULL Custom Field 2
    68 CUSTOM_C100_D3 Character(100) VARCHAR2(100) NOT NULL Custom Field 3
    69 CUSTOM_C100_D4 Character(100) VARCHAR2(100) NOT NULL Custom Field 4
    70 CUSTOM_DATE_D Date(10) DATE Custom Date
    71 CUSTOM_C1_D Character(1) VARCHAR2(1) NOT NULL Custom Character 2
    72 OPEN_ITEM_KEY Character(30) VARCHAR2(30) NOT NULL Open Item Key

    Prompt Table: %RECNAME_EDIT

    73 BUSINESS_UNIT_WO Character(5) VARCHAR2(5) NOT NULL Business Unit Work Order

    Prompt Table: SP_BU_WM_NONVW

    74 WO_ID Character(10) VARCHAR2(10) NOT NULL Work Order Identification

    Prompt Table: %EDIT_WO_ID

    75 WO_TASK_ID Number(5,0) INTEGER NOT NULL Task Number

    Prompt Table: %EDIT_WO_TASK

    76 RSRC_TYPE Character(1) VARCHAR2(1) NOT NULL Work Order Management Resource Types
    1=Labor
    2=Tools
    3=Material
    77 RES_LN_NBR Number(5,0) INTEGER NOT NULL Resource Line No.

    Prompt Table: %EDIT_RES_LINE

    78 TAG_NUMBER Character(12) VARCHAR2(12) NOT NULL Tag Number
    79 SERIAL_ID Character(20) VARCHAR2(20) NOT NULL Serial ID
    80 DISTRIB_SEQ_NUM Number(5,0) INTEGER NOT NULL Distribution Sequence
    81 IPAC_LN_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Line Amount
    82 MERCH_AMT_TTL Signed Number(28,3) DECIMAL(26,3) NOT NULL PO Total Value
    83 COUNTER Number(10,0) DECIMAL(10) NOT NULL Counter
    84 QTY_VCHR Signed Number(17,4) DECIMAL(15,4) NOT NULL Quantity Vouchered