DEAL - Deal System

APIs For This Group

ADDDEAL - Add Cyclical Deal

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            SBDEALREF         'Deal Reference'                    10A
BOTH            SBBEGIN           'Deal Beginning Date'               10A
BOTH            SBEND             'Deal End Date'                     10A
BOTH            SBBUYALOW         'Deal Buys Allowed'                  3 0
BOTH            SBNOTE            'Deal Note'                        100A
BOTH            RVDEALID          'Deal Id Created'                    7A

ADPDEAL - Add Permanent Deal

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            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDPROD            'Product ID'                        25A
BOTH            SBPRMTYP          'Permanent Type'                     2A
BOTH            SBTYPE            'Deal Type'                          2A
BOTH            SBAPPLY           'Deal Allowance Type Bill/Off/Auto'  1A
BOTH            SBFACTTYP         'Factor Type $,D,%'                  1A
BOTH            SBFACTVAL         'Factor Value '                      9 4
BOTH            SBUNIT            'Unit for Dollars'                   5 0
BOTH            SBMEMO            'Memo'                              15A    

ADTDEAL - Add Deal Template

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDLINESEQ         'Line Sequence'                      3A
BOTH            IDTEMPLAT         'Template Type '                     1A
BOTH            IDTYPE            'Deal Type'                          2A
BOTH            IDFACTTYP         'Factor Type $,D,%'                  1A
BOTH            SBAPPLY           'Deal Allowance Type Bill/Off/Auto'  1A
BOTH            SBEXCLUDE         'Exclude Flag '                      1 0
BOTH            SBUNIT            'Unit for Dollars'                   5 0
BOTH            SUNITPRO          'Unit Protect Flag '                 1 0

APRDEAL - Add Product & Product Allowance To Deal

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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A
BOTH            IDPROD            'Product ID'                        25A
BOTH            IDTYPE            'Deal Type {DLT in TABLCOD}'         2A
BOTH            IDFACTTYP         'Factor Type {DLF in TABLCOD}'       1A
BOTH			IDLINESEQ		  'Deal Line Sequence'				   3A
BOTH            SBDEALREF         'Deal Reference'                    10A
BOTH            SBBEGIN           'Deal Beginning Date'               10A
BOTH            SBEND             'Deal End Date'                     10A
BOTH            SBBUYALOW         'Deal Buys Allowed'                  3 0
BOTH            SBBUYR            'Buyer Group'                        5A
BOTH            SBNOTE            'Deal Note'                        100A
BOTH            SBAPPLY           'How to apply {DLA in TABLCOD}'      1A
BOTH            SBEXCLUDE         'Exclude Flag'                       1 0
BOTH            SBFACTVAL         'Factor Value'                       9 4
BOTH            SBUNIT            'Unit for Dollar'                    5 0

CPPDEAL - Copy Permanent Deal To One Location

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            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDPROD            'Product ID'                        25A
BOTH            IDPRMTYP          'Permanent Type'                     2A
BOTH            IDTYPE            'Deal Type'                          2A
BOTH            SBTOLOCN          'To Location'                        5A

CPMDEAL - Copy Permanent Deals To One or More 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            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDPROD            'Product ID'                        25A
BOTH            IDPRMTYP          'Permanent Type'                     2A
BOTH            IDTYPE            'Deal Type'                          2A
BOTH            SBLOCNFLG         'To Location Flag 1=ALL 0=LCNWORK'   1A

CPRDEAL - Copy Deal To 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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDLOCNC           'Next Location ID'                   5A
BOTH            IDDEAL            'Deal ID '                           7A
BOTH            IDDEALREF         'Deal Reference'                    10A
BOTH            IDBEGIN           'Deal Beginning Date'               10A
BOTH            IDEND             'Deal End Date'                     10A
BOTH            SBBUYALOW         'Deal Buys Allowed'                  3 0
BOTH            SBDLTFLG          'Delete Current Deal'                1A
BOTH            SBSUPL            'Supplier copied from '             10A 
BOTH            SBSUPLSUB         'Sub Supplier copied from'          10A
BOTH            RVCOPIED          'Deal Copied'                        1A 

DELDEAL - Delete Deal

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            IDDEAL            'DEAL ID'                            7A

DLPDEAL - Delete Permanent Deal

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            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDPROD            'Product ID'                        25A
BOTH            SBPRMTYP          'Permanent Type'                     2A
BOTH            SBTYPE            'Deal Type'                          2A

DLMDEAL - Delete Multiple Permanent Deals

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            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDPROD            'Product ID'                        25A
BOTH            SBPRMTYP          'Permanent Type'                     2A
BOTH            SBTYPE            'Deal Type'                          2A
BOTH            SBLOCNFLG         'To Location Flag 1=ALL 0=LCNWORK'   1A         

DLTDEAL - Delete Deal Template

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDLINESEQ         'Line Sequence'                      3A
BOTH            IDTEMPLAT         'Template Type '                     1A
BOTH            IDTYPE            'Deal Type'                          2A
BOTH            IDFACTTYP         'Factor Type'                        1A

UPDDEAL - Update Deal

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            IDDEAL            'Deal  ID'                           7A
BOTH            SBDEALREF         'Deal Reference'                    10A
BOTH            SBBEGIN           'Deal Beginning Date'               10A
BOTH            SBEND             'Deal End Date'                     10A
BOTH            SBBUYALOW         'Deal Buys Allowed'                  3 0
BOTH            SBBUYR            'Buyer Group'                        5A
BOTH            SBNOTE            'Deal Note'                        100A

UPPDEAL - Update Permanent Deal

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDPROD            'Product ID'                        25A
BOTH            SBPRMTYP          'Permanent Type'                     2A
BOTH            SBTYPE            'Deal Type'                          2A
BOTH            SBAPPLY           'Deal Allowance Type Bill/Off/Auto'  1A
BOTH            SBFACTTYP         'Factor Type $,D,%'                  1A
BOTH            SBFACTVAL         'Factor Value '                      9 4
BOTH            SBUNIT            'Unit for Dollars'                   5 0
BOTH            SBMEMO            'Memo'                              15A    

UPRDEAL - Update Product Allowance On Deal

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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A
BOTH            IDPROD            'Product ID'                        25A
BOTH            IDTYPE            'Deal Type'                          2A  
BOTH            IDFACTTYP         'Deal Factor'                        1A
BOTH            SBFACTVAL         'Factor Value'                       9 4
BOTH            SBUNIT            'Unit for Dollar'                    5 0

UPTDEAL - Update Deal Template

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDLINESEQ         'Line Sequence'                      3A
BOTH            IDTEMPLAT         'Template Type'                      1A 
BOTH            IDTYPE            'Deal Type'                          2A
BOTH            IDFACTTYP         'Factor Type $,D,%'                  1A
BOTH            SBLINESEQ         'New Line Sequence '                 3A 
BOTH            SBAPPLY           'Deal Allowance Type Bill/Off/Auto'  1A
BOTH            SBEXCLUDE         'Exclude Flag '                      1 0
BOTH            SBUNIT            'Unit for Dollars'                   5 0
BOTH            SUNITPRO          'Unit Protect Flag '                 1 0  

PLTDEAL - Pull all ‘C’ Template Records for Specific B/L/S template entry

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDTEMPLAT         'Template Type'                      1A

PTSDEAL - Pull specific ‘C’ Template Record for Specific B/L/S template entry

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            IDBUYR            'Buyer ID'                           5A
BOTH            IDLOCN            'Location ID'                        5A
BOTH            IDSUPL            'Supplier ID'                       10A
BOTH            IDSUPLSUB         'Sub-Supplier ID'                   10A
BOTH            IDLINESEQ         'Line Sequence '                     3A
BOTH            IDTEMPLAT         'Template Type'                      1A
BOTH            IDTYPE            'Deal type'                          2A
BOTH            IDFACTTYP         'Factor Type'                        1A

ALLDEAL - Add All Products To Deal 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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A
BOTH            IDSUPL            'Supplier ID '                      10A
BOTH            IDSUPLSUB         'Supplier Sub ID '                  10A
BOTH            SBTYPE            'Deal Type {DLT in TABLCOD}'         2A
BOTH            SBFACTTYP         'Factor Type {DLF in TABLCOD}'       1A
BOTH            SBDEALREF         'Deal Reference'                    10A
BOTH            SBBEGIN           'Deal Beginning Date'               10A
BOTH            SBEND             'Deal End Date'                     10A
BOTH            SBBUYALOW         'Deal Buys Allowed'                  3 0
BOTH            SBBUYR            'Buyer Group'                        5A
BOTH            SBNOTE            'Deal Note'                        100A
BOTH            SBAPPLY           'How to apply {DLA in TABLCOD}'      1A
BOTH            SBEXCLUDE         'Exclude Flag'                       1 0
BOTH            SBFACTVAL         'Factor Value'                       9 4
BOTH            SBUNIT            'Unit for Dollar'                    5 0

CPYDEAL - Copy Existing Deal

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            IDDEAL            'Deal  ID'                           7A
BOTH            SBDEALREF         'Deal Reference'                    10A
BOTH            SBBEGIN           'Deal Beginning Date'               10A
BOTH            SBEND             'Deal End Date'                     10A
BOTH            SBLOCN            'Location ID'                        5A
BOTH            SBBUYALOW         'Deal Buys Allowed'                  3 0
BOTH            SBDLTFLG          'Delete Current Deal'                1A
BOTH            SBSUPL            'Supplier copied from '             10A 
BOTH            SBSUPLSUB         'Sub Supplier copied from'          10A
BOTH			SBCPYALL		  'Ign SBLOCN, Cpy to all locns flag'  1A

DPADEAL - Delete Specific Product Allowance from Deal

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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A
BOTH            IDPROD            'Product ID'                        25A
BOTH            IDTYPE            'Deal Type {DLT in TABLCOD}'         2A
BOTH            IDFACTTYP         'Factor Type {DLF in TABLCOD}'       1A
BOTH			RVLASTRCD		  'Last Record for this Product'	   1A

DPRDEAL - Web - Delete Product Detail from Deal

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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A
BOTH            IDPROD            'Product ID'                        25A

PRODEAL - Web - Product Pricing Info

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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A
BOTH            IDPROD            'Product ID'                        25A
BOTH			RVCOSTEAC		  'Cost Each'						  13 6
BOTH			RVFWDDLACT 		  'Product Forward Dollars ACTUAL'	   9 4
BOTH			RVFWDDLDIF		  'Product Forward Dollars Diff.'	   9 4
BOTH			RVFWDDLPCT		  'Product Forward Dollars Prcnt '	   9 4
BOTH			RVINVDLACT 		  'Product Invoice Dollars ACTUAL'	   9 4
BOTH			RVINVDLDIF		  'Product Invoice Dollars Diff.'	   9 4
BOTH			RVINVDLPCT		  'Product Invoice Dollars Prcnt '	   9 4
BOTH			RVPRIDLACT 		  'Product Price I Dollars ACTUAL'	   9 4
BOTH			RVPRIDLDIF		  'Product Price I Dollars Diff.'	   9 4
BOTH			RVPRIDLPCT		  'Product Price I Dollars Prcnt '	   9 4
BOTH			RVNETDLACT 		  'Product Net Alw Dollars ACTUAL'	   9 4
BOTH			RVNETDLDIF		  'Product Net Alw Dollars Diff.'	   9 4
BOTH			RVNETDLPCT		  'Product Net Alw Dollars Prcnt '	   9 4
BOTH			RVDATING		  'Dating Date'						  10A
BOTH			RVDTEXTDAY		  'Dating Extra Dates'				   3 0

DAPDEAL - Web - Delete Product Detail & Allowances from Deal

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            'Location ID'                        5A
BOTH            IDDEAL            'Deal ID'                            7A