BKTL - Bracket Levels

APIs For This Group

ADDBKTL - Add Bracket Level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL       'Discount bracket level'     1  0
BOTH    DIS1TYP        'Discount 1st type'          1  0
BOTH    DIS2TYP        'Discount 2nd type'          1  0
BOTH    DIS1VAL        'Discount 1st value'         7  0
BOTH    DIS2VAL        'Discount 2nd value'         7  0
BOTH    DIS1UNT        'Discount 1st unit'          1  0
BOTH    DIS2UNT        'Discount 2nd unit'          1  0
BOTH    DISRATE        'Discount rate %'            3  1
BOTH    DISSAVG        'Discount savings'           5  0

CHKBKTL - Validate that Order meets Discount Bracket Level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDSOQSEQN      'Sequence'                    5 0
BOTH    RVMEETBKL      'Meet Bracket Level'          1 0

CPYBKTL - Copy Bracket Level To All Locations

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    SBBRACKET      'Bracket to be copied '       1 0

DELBKTL - Copy Bracket Level To All Locations

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL      'Discount bracket level'     1  0

DFTBKTL - This will return the next bracket level that can be added

BOTH            K3SOBJ            'K3S Object library'            10A
BOTH            COMP              'Company'                        1A
BOTH            COMPCOD           'Company code'                   3A
BOTH            USER              'User calling the program'      10A
BOTH            ERRORS            'Error indicator'                1A
BOTH            ERRMSG            'Error message'                100A
BOTH            ERRFIELD          'Field in error'                20A
BOTH            IDLOCN            'ID location'                    5A
BOTH            IDBUYR            'ID buyer'                       5A 
BOTH            IDSUPL            'ID supplier'                   10A
BOTH            IDSUPLSUB         'ID sub supplier'               10A
BOTH            RVNXTBKTL         'Next bracket level number'      1  0

SELBKTL - Select a Bracket Level to be active

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL       'Discount bracket level'     1  0

UPDBKTL - Update A Bracket Level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDBKTLVL       'Discount bracket level'      1  0
BOTH    SBDIS1TYP      'Discount 1st type'           1  0
BOTH    SBDIS2TYP      'Discount 2nd type'           1  0
BOTH    SBDIS1VAL      'Discount 1st value'          7  0
BOTH    SBDIS2VAL      'Discount 2nd value'          7  0
BOTH    SBDIS1UNT      'Discount 1st unit'           1  0
BOTH    SBDIS2UNT      'Discount 2nd unit'           1  0
BOTH    SBDISRATE      'Discount rate %'             3  1
BOTH    SBDISSAVG      'Discount savings'            5  0

PADBKTL - Add a Product bracket level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A
BOTH    SBBRKTLVL      'Bracket Level'               1A  
BOTH    SBCSTLEVL      'Bracket Cost Level'         11 4
BOTH	OPCMBLOCN	   'Combined Location'			 5A
BOTH	OPCMBSUPL	   'Combined Supplier'			10A
BOTH	OPCMBSUB	   'Combined Sub-Supplier'		10A

PUDBKTL - Update a Product bracket level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A
BOTH    SBBRKLEVL      'Bracket Level'               1A 
BOTH    SBCSTLEVL      'Bracket Level Cost '        11 4
BOTH	OPCMBLOCN	   'Combined Location'			 5A
BOTH	OPCMBSUPL	   'Combined Supplier'			10A
BOTH	OPCMBSUB	   'Combined Sub-Supplier'		10A

PDLBKTL - Delete a Product bracket level

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A
BOTH	OPCMBLOCN	   'Combined Location'			 5A
BOTH	OPCMBSUPL	   'Combined Supplier'			10A
BOTH	OPCMBSUB	   'Combined Sub-Supplier'		10A

PGDBKTL - Generate product bracket levels for all products of a supplier

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A 
BOTH    SBBRKLEVL      'Bracket Level'               1A  
BOTH    SBCSTPRCT      'Bracket Level Percent'       5 2

PRMBKTL - Remove all product bracket levels of a certain level for a Supplier

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A 
BOTH    SBBRKLEVL      'Bracket Level '              1A  

USLBKTL - Unselet Bracket Level for a Supplier

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A

PULBKTL - Pull previous Price To Bracket Level 9

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH	IDDATE		   'Retrieve Date from DLYPROD' 10A  

MLTBKTL - Update all Bracket Levels for a given Product

BOTH    K3SOBJ         'K3S Object Library'         10A
BOTH    COMP           'Company'                     1A
BOTH    COMPCOD        'Company Code'                3A
BOTH    USER           'User calling the program'   10A
BOTH    ERRORS         'Error indicator'             1A
BOTH    ERRMSG         'Error message'             100A
BOTH    ERRFIELD       'Field in error'             20A 
BOTH    IDLOCN         'ID location'                 5A
BOTH    IDBUYR         'ID buyer'                    5A 
BOTH    IDSUPL         'ID Supplier'                10A
BOTH    IDSUPLSUB      'ID sub supplier ID'         10A
BOTH    IDPROD         'Product ID'                 25A 
BOTH    SBCSTLEV1      'Bracket Cost Level 1'       11 4
BOTH    SBCSTLEV2      'Bracket Cost Level 2'       11 4
BOTH    SBCSTLEV3      'Bracket Cost Level 3'       11 4
BOTH    SBCSTLEV4      'Bracket Cost Level 4'       11 4
BOTH    SBCSTLEV5      'Bracket Cost Level 5'       11 4
BOTH    SBCSTLEV6      'Bracket Cost Level 6'       11 4
BOTH    SBCSTLEV7      'Bracket Cost Level 7'       11 4
BOTH    SBCSTLEV8      'Bracket Cost Level 8'       11 4
BOTH    SBCSTLEV9      'Bracket Cost Level 9'       11 4
BOTH	OPCMBLOCN	   'Combined Location'			 5A
BOTH	OPCMBSUPL	   'Combined Supplier'			10A
BOTH	OPCMBSUB	   'Combined Sub-Supplier'		10A