DEAL - Deal System

APIs For This Group

ADDDEAL - Add 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            OPBEGIN           'Customer Deal Begin Date'          10A
BOTH            OPEND             'Customer Deal End Date'            10A
BOTH            OPDATING          'Customer Dating Date '             10A
BOTH            OPNOTE            'Customer Note'                    100A
BOTH            OPEXPIRE          'Expiry Date'                       10A
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            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    

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 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            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            OPBEGIN           'Customer Deal Begin Date'          10A
BOTH            OPEND             'Customer Deal End Date'            10A
BOTH            OPDATING          'Customer Dating Date '             10A
BOTH            OPNOTE            'Customer Note'                    100A
BOTH            OPEXPIRE          'Expiry Date'                       10A
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

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            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

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
BOTH            OPBEGIN           'Customer Deal Begin Date'          10A
BOTH            OPEND             'Customer Deal End Date'            10A
BOTH            OPDATING          'Customer Dating Date '             10A
BOTH            OPNOTE            'Customer Note'                    100A
BOTH            OPEXPIRE          'Expiry Date'                       10A

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 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