System and method for providing a role table GUI via company group6772167Abstract A hybird Notes/DB2 environment provides a requisition catalog on the Web. Client browsers are connected to a GWA infrastructure including a first network dispatcher and a virtual cluster of Domino.Go servers. The network dispatcher sprays out browser requests among configured .nsf servers in virtual server cluster. Communications from this virtual server cluster are, in turn, dispatched by a second network dispatcher in a Domino cluster. External objects, primarily for a GUI, are served in a .dfs and include graphic files, Java files, HTML images and net.data macros. The catalog is built from supplier provided flat files. A front end is provided for business logic and validation, as also is a relation database backend. HTML forms are populated using relational database agents. A role table is used for controlling access both to Notes code and DB2 data. Large amounts of data are quickly transferred using an intermediate agent and window. Claims We claim: Description BACKGROUND OF THE INVENTION
TABLE 1
SERVERS AND SOFTWARE
Server Description Software
Domino.Go Servers S1-S3 AIX 4.3.2
Domino Go 4.6.2.6 with Denial
of Service Fix
Net.Data 2.0.8
DB2 CAE 5.2
DFS Client
Java Runtime 1.1.6
Domino End-User Servers S4-S6 AIX 4.3.2
Domino 4.6.4
DB2 CAE 5.2
Java Runtime 1.1.6
Domino Application Server 114 AIX 4.3.2
Domino Go 4.6.2.6 with Denial
of Service Fix
DB2 CAE 5.2
Java Runtime 1.1.6
Mercator 1.4.2 with Svc Pack 3
Hith Test API
Lotus VIM
C++ 3.6.4
UDB Server 129 AIX 4.3.2
UDB 5.2
Java Runtime 1.1.6
Content Staging Server 127 AIX 4.3.2
Domino 4.6.4
DB2 CAE 5.2
Java Runtime 1.1.6
2. Front End The Req/Cat Web front end provides several validation routines, including ZIP code validation, catalog search criteria, and chart of account validation. In the architecture of FIGS. 1 and 3, various programs, including ZIP code validation, catalog search and chart of account validation routines reside in application server 114, and the data tables, including the chart of accounts, reside in the relational database 129. ZIP code validation is provided to assure that the tax department is provided the information needed implement the correct tax rules on purchase orders in SAP 382. Chart of accounts validation includes the mapping of commodity codes to account codes. This is done to insure that all general ledger accounts associated with commodities are correct, and within this to insure that a description from SAP 382 is available for use by a customer to select correct general ledger (GL) account when doing financial validation on a requisition. Referring to FIG. 6, for ZIP code validation, when a purchaser access RCW, a user profile 130 is accessed. Profile 130 includes many defaults, one of which is delivery information (defaulted to all line items of requisition). One of the fields in profile 130 is ZIP code. When the purchaser enters his ZIP code, RCW searches ZIP code database 134, a database for ZIP codes which is fed periodically, say nightly, from the enterprise tax system 136. This same validation routine continues by creating a requisition 132 with item options, including deliver to information with a zip code field. The requester can change the deliver to information, 132, but any time it is changed, the ZIP code is checked against ZIP code database 134. Whereas previously, customer input of ZIP code was accepted without checking. By this invention, ZIP code validation is performed at the front end by a java or SQL program call to db2 database 134. Responsive to entry of ZIP code on a requisition or to the changing of delivery information which includes ZIP code on a requisition line item, the ZIP code is validated against a database of valid ZIP codes. In an alternative embodiment, the ZIP code database is refreshed from a trusted source, and the entered or changed ZIP code is checked for valid match with respect to state and city. A create requisition request goes to catalog search, which used to search by part number or description. Previously, this was a very limited search to just the catalogs. A search argument of %pen% was not a very crisp search for the customer. In order to improve the catalog search, in accordance with the present invention, searches may be conducted against a longer description and files up to 255 characters. Screen down searches are provided for sub-commodity. Wild card searches used to require %, but now assumes a wild card search in all cases. Searches are also provided against subcommodity. As a result, catalog searches now reference short description, long description, and catalog sub-commodity. A database catalog includes part number, short description, long description, oem part number, commodity code. Newly added is subcommodity. Referring to FIGS. 7 and 9, the method of the preferred embodiment of the invention is described for managing a chart of accounts 140. When creating a commodity list, which includes expense, capital, and resale accounts 142, commodities descriptions 180 are pushed to the correct commodity group. The resulting chart of accounts 140 is available from SAP 382. Previously an administrator had input a chart of accounts. Now, a company administrator, for example, may select from commodity accounts 142 the expense field, which results in drop-down display of a valid chart of accounts 144 from SAP chart of accounts 140 with account numbers 148 and commodity descriptions 146. The company administrator may then select from that valid chart of accounts 144 the correct commodity to push to company/commodity document 150. Referring to FIG. 8, the process for a requester to create requisition is set forth. By way of example, a requestor creates a requisition by doing in step 154 a search for "supplies", which will bring to him in step 156 a display presenting commodity W14, and thence in step 158 to a catalog (for example, a Staples catalog) which includes commodities (pens, erasers, calendars), from which the requester can create several line items. Upon selecting "proceed to accounting", the requester is presented a financial summary 160 including commodity code w14 pens for line item 1, w14 erasers for line item 2, and w14 for line item 3 calendars. The user may then request display of financial worksheet 162. In this window 162, the requester will see a title 164 expense, which can be changed, for example, by toggling to other categories, such as balance sheet. Selecting G/L account 166 may drop down a list showing several account codes 168 and related descriptions 170, depending upon what the company administrator has pushed to the commodity document 150 from which financial worksheet 162 is derived. Previously, a requester was provided in worksheet 162 one account code choice without description. By this invention, the requester is provided correct general ledger account codes and descriptions, resulting in less miscodes, more correct ledger entries, and correct SAP account codes. This improved general ledger account selection process avoids back end processing to correct erroneous entries. Thus, in accordance with a preferred embodiment of the invention, a method is provided for creating a valid chart of accounts from which an administrator 184 can facilitate and enable a requisitioner to select a valid general ledger account. First, there is push from an enterprise (erp) system a chart of accounts 140 with descriptions to a req/cat system database. The administrator selects from req/cat system database valid accounts with descriptions for a given commodity and purchase time period, and then pushes the selected account/description tuple to the company commodity groups, thus completing the setup of the commodity documents 150 to be used in the requisition creation process. A company commodity document 150 created by administrator 184 may include for each commodity code under each company, commodity code 152, which is a very broad catagory, short description 190, long description 191 (from procurement organization 182), key words 192, approvers 193, financial information 194 (including purchase type 198, and general ledger account 199), route-to buyer 195 (by plant association), preferred supplier 196 (which associates the commodity code to a catalog 158), and special handling code 197 (with drop list including, for example, skills matching, obi, administrative services)--all used to drive the customer to the correct commodity. To create a requisition, a user searches against commodities and catalogs in commodity description documents 150, which may be Notes documents or DB2 records, and creates one or more line items. These searches may be done by catalog and non-catalog, and driven based on descriptions entered by requester. A hierarchy of families may be provided as an alternative search approach. The requisitioner initiates a proceed to accounting process, which displays line items which may be selected by requisitioner; and then displays a financial worksheet created by a Java agent with fields which need to be selected or populated by the requisitioner from the company commodity document, based on purchase type, and which presents valid general ledger accounts numbers and descriptions to the requisitioner. 3. Back End Referring to FIG. 12, in a large enterprise, the requisition catalog requires a very large database. In accordance with the preferred embodiment of the invention, such a large data repository is provided by the using the IBM DB2 relational database 210. Other possible databases include Oracle, Sybase, and MSSQL. Lotus Notes databases are built upon an object model and classes: databases, views, and documents are classes used to access Notes data. But, these classes are set to be final and not extendible, and a Req/Cat Web database must be extendible. Consequently, referring to FIG. 12, in accordance with an embodiment of the present invention, DB2 access routines 208 are provided for accessing DB2 data 210. The Req/Cat Web application executes Lotus code, with access controlled on the code, and data obtained from and written to relational database 210. Normally, Notes saves all data as documents. There is a save method provided for that purpose. In accordance with a preferred embodiment of the invention, the Notes save method is intercepted and stopped, and execution passed to Req/Cat Web code for saving data to DB2. In the same way, execution of a Notes open method is intercepted and stopped, and then Req/Cat Web code executed to pull information in from DB2. Lotus Notes provides for web applications, and supports methods called webqueryopenagent, and webquerysaveagent. Notes also provides a saveoptions parameter. Setting saveoptions to zero tells Notes not to save a document. In accordance with the preferred embodiment of the invention, saveoptions is set to zero, and webquerysaveagent used to save data in DB2. The webquerysaveagent is written in Lotus Script, and calls Lotus Script extensions and also can also call its own APIs 200, 202, including the database api's 208. At this point, Req/Cat Web haves full control, and can save one or many tables, can explode the data model and write many tables. On the other side, instead of editing an existing document as is done with Notes, Req/Cat Web executes createnewdocument. As the document opens, Lotus Notes gives the query webqueryopenagent, and this is also written in Lotus Script, which has access to data base api's 202, where data from many database 210 tables may be read to construct a Lotus document from DB2. This configuration involves some naming standards and a hierarchy of interfaces. By way of example, database access routines are, by convention, data application programming interfaces (DAPI) 208. These are routines for accessing data 210 outside of the Req/Cat Web application. Referring to FIG. 10, a hierarchy of application program interfaces (APIS) includes core API's 200 containing everything necessary to connect to database 210. Next in hierarchy, to access specific data, are database API's (DAPI) 208, which interface to a single piece of data (such as company or employee information.) Below these rest the business logic code 204. In a programming environment, the top of pyramid represents the work of a core DB2 programmer. Below him are those people who use core DB2 API's and write, for example, DAPI's 208 to access individual DB2 tables within database 210, for example API's for countries. These core APIs 200, therefore, include a GET method, and update, insert, and delete routines. Third level 204 represents the application programmer who only needs to use these methods (ie, company dapi: IBM US) in their business logic 204 applications, including ability to update, for example. Referring to FIG. 11, this same pyramid is used to implement graphical APIs 206 on the user interface 212, business APIs 207 on the business logic 204 interface, and database APIs 208 on the database 210 interface. This illustrates that duties of programers can be separated, so that everyone need not know the complexities of the entire system. That is, some developers work on data manipulation, others on the user interface, and still others on business logic. The application developer need not know the names of the actual database, tables, or fields, or even how to access them. This also enables a DB2 administrator to alter a table, and only affect the one DAPI developer that wrote the specific table DAPI 202. All code is one routine, so changes to the database need only affect one piece of logic. Referring to FIG. 13, an example of this API implementation is illustrated. CoreDB2 220 is the core API 200 to connect to DB2 210. It contains two classes, configuration class DB2Config 222 and base class DB2Base 224. Calling DB2Config 222 determines database name 230, user identifier 231, and password 232--information that the database requires to establish a valid connection, and is passed to DAPI 208 for making that connection. (Without this method, user IDs and passwords would have to be hard coded in the application.) DB2Base 224 is extended by the DAPI 208 programmer for each DAPI 202 instance that is needed. It contains methods 240, 241 for connecting to and disconnecting from the database, a method 242 for defining the number of rows to return at a time, a method 243 for getting the next group of records, methods for reads 244, inserts 245, updates 246, and deletes 247, commit 248 and rollback 249 options, and a flag 250 to determine if all data has been retrieved. DAPIUserProfile 226 is a class for retrieving or updating information about an employee. It extends DB2Base 224 so the application 204 developer would not have to write the logic to access DB2 210, but could concentrate on the information about the employee. The DAPI 202 developer would need to know about the employee table (table and field names, for example) and would implement methods for selecting and displaying data. In an exemplary embodiment, DAPIUserProfile class methods include the following: 260 selectEmployeeByEmplID(employeeID, companyCode, countrycode) 261 selectEmployeeByWebID(employeeWebID) 262 selectEmployeeBothWays(employeeID, companyCode, countryCode,employeeWebID) 263 selectEmployeeByName(lastName, firstName) 264 insertEmployee(columnNames, DB2ColumnValues) 265 updateEmployeeByEmpID(employeeID, employeeCompanyCode, employeeCountryCode, UpdateNameValues . . . ) 266 updateEmployeeByWebID(employeeWebID, UpdateNameValues, UpdateByUserID) 267 deleteEmployeeByEmpID(employeeID, companyCode, countryCode,UpdateByUserID) 268 deleteEmployeeByWebID(employeeWebID, UpdateByUserID) 269 deleteEmployeesWhere(Condition, UpdateByUserID) 270 clearTable( ) Once the data is selected, a few of the properties that are available for a given employee include empWebID, empLastName, empFirstName, empIntPhoneNum, empExtPhoneNum, empEmailID, empID, empCompanyCode, empCountryCode, and empCountryName. An application 204 like the human resources (HR) application would then need to read HR data and insert it into the employee table if the employee did not exist, or update it if something changed, or delete it if the employee no longer exists. This application developer would then only have to know the methods and properties of the userProfile class 226 in order to write the application. An example of such an application is set forth in Table 2, with reference to the steps of FIG. 14. This table sets forth the HR load routine, a batch program to read HR data from a flat file and insert it into the DB2 user profile table.
TABLE 2
EXAMPLE APPLICATION
`in the following step, instantiate a DB2 config
object, and call it db2; the database name 230, etc.,
is determined by instantiating the db2 config object,
as defined by the core programmers`
272: Dim db2 As New DB2Config(session)
`the database information is known, and can be passed
to the employee profile.`
274: Print "The target DB2 database alias is "&
db2.getDB2DatabaseName ())
`All that must be done is to pass the DB2 class to the
userProfile.`
276: Dim eps As New userProfile(db2)
`Delete everything from the employee table to start the
bridge.`
278: I headerDivision = "" Then
Call eps.clearTable()
Else
Call eps.deleteEmployeesWhere("COGRP_CD= ""
&headerDivision &"")
End If
280: For count = 2 To records-1
`Read the next record and make sure that it can be
loaded without problems`
If ReadInputFile(inputFileNum, count, userid, al, cl
eps, cci) Then
Call eps.insertEmployee(DB2ColumnNames,
BuildDB2ColumnValues())
db2kAdditions = db2Additions+1
End If
Next...
In Table 3, a pseudo code example of use of the webquerysaveagent process is illustrated.
TABLE 3
WEQUERYSAVEAGENT EXAMPLE
Dimension db2 As New DB2Config(session)
Print "The target DB2 database alias is "&
db2.getDB2DatabaseName ())
Dimension eps As New userProfile(db2)
execute process 260 to selectemployee by employee id
if employee does not exist, then
execute process 264 to insert employee
else if employee changed, then
execute process 265 to update employee
else (employee not changed) information to user
"employee not changed"
no save
endif
In the example of Table 3, an application programmer 204 is using a dapi written by programmers 202. In this manner, the relational database 210 is used as the data source, instead of a Notes database, in a way that hides the complexities of DB2 database programming. That is, in a fashion to similar Notes programming--the idea is to allow a Notes programmer to use a familiar looking class 226 to load and save data. 4. Catalog Administration In accordance with the preferred embodiment of the invention, a requisition catalog administration function provides control, audit, and publishing procedures for flat files received from suppliers. Referring to FIG. 15, a system architecture for implementing catalog administration includes a requester browser 410, a buyer browser 412, with net.data connections 391 and 393 to a dedicated DB2 server and DB2 database 390 having a staging table 392 and a production table 394 through network dispatcher 102 and Go cluster 104. Go cluster 104 is also connected through network dispatcher 106 and Domino cluster 112 to Domino application server 114. A buyer 412 accesses staging table 392 via net.data connection 391, and a requester 410 accesses the production 394 table via net.data connection 393. This connection 391, 393 is implemented as a single path, and the requester and buyer provided different levels of authority to access different tables 392, 394 in DB2 390 over that same path. Buyer 412 can change selected fields in the staging table 392 and can update production table 394 from staging table 392. Requester 410 can only view (not change) the production table 394. The buyer at browser 412 is controlled by a GUI which contains access control list (ACL) control on fields, and edit authority for catalog access. Referring to FIG. 16, this architecture further includes a catalog flat file 314, an application program 384 within application server 114, catalog administration function 386, Req/Cat Web function 388, and WEB communications 396 and 398 connecting a catalog administration function with ACL control 400 and requester 402 to database 390. In operation, catalog flat file 314 is received by application server 114 through firewall 380 via EDI and loaded into DB2 database 390 by application program 384. Catalog administration function 386 specific users 400 audit control over certain fields in staging table 392, and publishes the catalog data to the live, or production, system 394. Function 386 presents to buyer 400 a staging table 392 with a GUI front end, with selected fields enable and other fields not enabled to be personalized. Catalog file 314 is a flat file containing catalog items in a column delimited format specified to supplier 300 by the enterprise. Application server 114 manages database 390 containing staging table 392 and production table 394. A catalog file 314 comes to application server 114, which includes a program 384 for moving data from that flat file to staging table 392. A buyer at terminal 400 accesses the staging table 392 on the web 396. He views catalog items and enters transactions with action button which transfers information from staging table 392 to production table 394. Production table 394 is referenced by req cat web 388, and staging table 392 is referenced by the catalog administration function 386 operated by the buyer 400. Typically, a buyer is member of procurement organization with responsibility for negotiating deals with suppliers. A requester 402 accesses production table 394 over web 398 to create and submit a requisition to SAP 382. In accordance with the preferred embodiment of the invention, control over what buyer 400 can change is provided by a GUI in a process which loads a catalog 392 from a supplier into a production system 394. Catalog files 314 come in from suppliers in an enterprise defined standard format, and the access to fields in that format is hard coded into the catalog administration function 386. Application server program 384 has error checking functions to assure validity of a catalog 314 from a supplier 300. Buyer 400 accesses staging table 392 through a catalog administration function 386 which has hard coded into it the access controls on the various fields in the catalog format. Production table 394, which is accessed by the requester 402, is updated periodically (upon buyer actuation) from the staging table 392. Implementation of the invention involves several code procedures: there is a program 384 which loads a file 314 that is received via EDI into a table 392 in DB2. There are routines 388 which allow a buyer 400 to browse certain catalogs in the staging table 392 and change certain fields while being inhibited from changing others. And there are the routines 386 which take the approved catalog and migrate the data from the staging DB2 table 392 to the production DB2 table 394. Referring to FIG. 17, a preferred embodiment of these processes are presented. In supplier system 300, supplier source data 310 is extracted and reformatted in step 312 to create catalog flat file 314 in the format specified by the enterprise. In step 316 that flat file is transmitted to the enterprise 302, as is represented by line 305, where it is accepted in step 320 into the enterprise EDI mailbox 322. In step 324, the data in the flat file in mailbox 322 is reformatted and put into generation data group (GDG) 328, a location for saving more than one file, so as to retain the last N iterations, and a archive entry made to processing log 326. In step 330, a delivery component executes to send data from GDG 328 to application server 114, as is represented by line 303, in the form of catalog flat file 340. In step 342, a delivery component receives the flat file and, as is represented by line 347, starts job scripts including MASSLOAD for reading the flat file and loading staging table 392, and as represented by line 345 alerts the buyer 352. As is represented by lines 311, 313 and 315, respectively, MASSLOAD 344 accesses database server 306 procedures catalog_s 360, product_s 362, and Req/Cat Web 364, and makes an archival entry to processing log 346. Catalog_S 360 is the staging table 392 for the catalog profile, which provides for each catalog the supplier name, the start and end dates of catalog validity, the currency, and so forth. Product_S 362 is the staging table 392 that holds the catalog parts, a listing by part number of price, description, and so forth. Req/Cat Web validate procedure 364 is a Java stored procedure for performing the initial validation of data received in flat file 340. Front end 370 is a GUI used by the buyer, for example to update the catalog 366. In operation, validation procedure 364 validates the format and identifies catalog changes to product_s 362, logging those changes in file 332. It then checks a flag in catalog 366, and if the flag is on invokes procedure 350 provided catalog_s 360 does not indicate any critical errors. Validate and load procedure 350 then moves the contents of product_s staging table 362 into the appropriate production table 368, writing any errors to processing log 348. (In the event that procedure 364 does not call procedure 350, then buyer 352 intervention is required via GUI 370. ) After procedure 364 completes execution, it may either stop, or if catalog 366 has a flag set on and catalog_s staging table 360 indicates no critical errors, then procedure 364 will invoke validation and migration procedure 350. After validate procedure 364 completes, it has written to prod_message_s file 332, and the buyer may use GUI 370 to read messages from file 332 and make any desired changes to staging table 362. They buyer may also choose to reject the catalog and, via step 354, contact the supplier to restart the process. This occurs if there is an error in the unit prices, which is an example of information in the catalog which a buyer is not authorized to change on his own. After the buyer has used GUI 370 to make the values in staging table 362 acceptable, he sets the flag in staging table 360 which allows migration procedure 350 to run to move data from staging table 362 into production table 368, a relational database, such as Net Commerce (NC) or IBM DB2. 5. Role Table GUI A preferred embodiment of the invention provides through use of a role table in DB2 database 129 (FIG. 3, or 390 in FIG. 16) very flexible access to DB2 tables without requiring involvement by a database administrator (DBA) to issue grants against the tables, thus bypassing the problem caused by Notes agents all coming from the same user (the Notes server ID). Everything in Lotus Notes, even code, is in documents which require access control list (ACL) controls on access. Consequently, the preferred embodiment of the invention uses Notes ACLs to access code. However, when accessing data, a role table 420 (see FIG. 19) is used to build roles and permissions, and an object model is provided to generically access data from database 210, thus extending Notes to access a non-Notes data source 210. In order to configure DB2 to work in a Notes application environment, a single sign off is provided after getting through Notes code ACLs. This does not involve use of any of DB2's role tables and grants, but rather a single web ID 434 known to the Notes code to access the DB2 data. Referring to FIG. 19, role table 420 includes for each of a plurality of user WEB ID's 422, the associated role 424 and level 426 of granularity at which the user is associated with the role. Example: for a role 424 of country administrator, the level 426 is the country id, and user with web ID 422 of 02 can update contract profiles for that country. Any person at a browser 100 attempting to access a row in a DB2 table 390 must pass the role table 420 check. Further, for accessing a supplier table in DB2 390, anyone can view the list of suppliers in the application that applies to the requesters country, but only the country administrator can update them. User 422 identifies a user profile 430, which specifies the user name 432, web identifier 434, charge information 436, including country, company, work location) and delivery information 438 (including street, office, and building). Thus, in accordance with the preferred embodiment of the invention, the web ID 434 for the browser user is used to control access to the Notes databases and to the DB2 databases. The Notes databases have code and documents which the user must access (including contract profiles, cost center profiles) and also tables in the DB2 database. A user must access both Notes databases and DB2 databases, and access to all of these databases is controlled based on the user web ID 434 through the use of role table 420. In order to make and use the preferred embodiment of the invention, an implementer and user would do the following: 1. Determine what levels of granularity are relevant to the application. (For example, the company that the user belongs to, the country, etc.) 2. Populate the DB2 table 420 with Web IDs 434 and associated roles 424 and levels 426. 3. Write procedures to locate a user 422 in table 420 and pull out associated roles 424 and levels 426. 4. Provide code routines or functions using these procedures which are authorized for execution by users with specific roles and levels. Code using these routines would then compare the roles and levels to the specific role and level that is required based on the function. For example, a user could be defined as a country administrator for France and a company administrator for a small company in the US. A routine that updates accounting information for the small company would not care about the country-level authority, so would look in role table 420 for company administrator role 424 for this user web ID 422. The level 426 of the role 424 would further restrict this user 422 from updating the accounting information for any company in the US other than the one corresponding to the level 426 to which he is assigned. The invention allows a person's access to DB2 tables to be limited by the contents of a second db2 table rather than the grants issued by the DBA. In the Notes environment of the preferred embodiment of the invention, the ID which is actually granted the authority to the table is the Notes Server machine since the server accessing the db2 tables is the Notes server. Since the user web id is once removed, this provides a mechanism for applying a level of authority to the user to then apply to the db2 table. That mechanism is the role table. Table 4 lists and describes the Req/Cat Web tables of the preferred embodiment of the invention.
TABLE 4
REC/CAT WEB ADMINISTRATION TABLES
ADMINISTRATION
FUNCTION TABLE DESCRIPTION
Access Authority REQCAT.TROLE_AUTHORITY Maps a user to a role
and the qualifier for
that role (i.e., what
level)
REQCAT.TROLE_CODE Defines the list of
valid roles - Global
Admin, Country
Admin, etc
Account numbers REQCAT.TACCOUNT_PROFILE Holds account codes
to
REQCAT.TLACCOUNT_PROFILE be validated against
REQCAT.TACCT_PROF_DETAIL Provides details
about
REQCAT.TLACCT_PROF_DETAIL the account codes
REQCAT.TACCT_VALIDATION1 Holds account codes
to
be validated against,
as well as what type
of validation is
occurring (i.e.,
against BMS, Remind,
Project numbers,
Customer numbers,
etc)
REQCAT.TACCT_VALID_TYPE Defines the list of
validation types
REQCAT.TCOMP_COA Defines the GL
account
REQCAT.TLCOMP_COA numbers that are
available for each
company code, and
provides a translated
description
Approver routing REQCAT.TAPPROVER_ASSIGN Links an approver to
a
type and a code (i.e.
I/T 0001)
REQCAT.TAPPROVER_PROFILE Defines the
approver's
name, Web ID, etc.
REQCAT.TAPPRV_TYPE_PROF Defines the types of
approvers available
to
the application
(capital, financial,
I/T, chemical,
safety,
tax)
REQCAT.TCATLG_APPROVAL Allows a catalog
administrator to flag
a catalog item as
requiring chemical or
safety approval in
specific locations.
For example, toner is
not considered a
chemical item except
in Vermont, because
of
special environmental
laws in that state.
Buyer routing REQCAT.TBUYER_PROFILE Defines the owner of
a
buyer code and
contact
information
REQCAT.TBUYER_ROUTING Links a buyer to a
commodity
REQCAT.TBUYER_SUPPLIER Links a buyer to a
supplier
Catalog profiles RC.CATALOG Defines the
characteristics of a
catalog - supplier,
expiration date,
currency, etc.
RC.CATPLREL Defines the plants
which are allowed to
access this catalog
Commodity families NC.CATEGORY Defines the global
list of commodity
groupings
Commodity codes RC.COMMOCODE Defines the global
list of commodities
and
identifies which
family each belongs
to
Company commodities RC.COMMCOMP Not all commodities
may be valid for all
companies. This table
identifies which
commodity codes the
company wants to use.
REQCAT.TCOMMCOMP_BUYER Some commodities
require that the user
select a buyer from a
predefined list. This
is the predefined
list.
REQCAT.TCOMM_COMP_COA This associates GL
account codes with
the
commodity code.
REQCAT.TCOMM_WLOC_RCV This defines for
which
work locations this
commodity is
`receivable`. This
flag is forwarded to
SAP for further use
in
receiving locations
RC.SUBCOMMODITY Some commodities are
too broad and the
need
exists for
sub-dividing the
goods
under this commodity
so that different
suppliers and
different purchase
processes can be
used.
RC.SUPPSUBCOMM This links a supplier
to a specific
subcommodity.
Companies RC.COMPANY Associates SAP
company
codes with associated
country. For example,
IBM US contains three
company codes for
IBM,
Lotus, and Tivoli.
Countries RC.COUNTRY Holds the list of ISO
country codes, i.e.,
US, FR, DE, etc
Company groups REQCAT.TCOMPGRP_TYP_PROF Defines the list of
valid grouping
types, such as
ACCOUNT, UPROF
REQCAT.TCOMPGRP_PROFILE Defines the list of
group names and links
them to their types,
such as IBMUS -
ACCOUNT and IBMUS -
UPROF
REQCAT.TCOMPANY_GROUPING Lists the company
codes that belong to
the specified
grouping
Plants RC.PLANT Associates plant
codes
with company and
country. A company
can have many plants,
a plant may belong to
only one company.
Suppliers RC.SUPPLIER Defines the
characteristics of a
supplier - name,
code, contact
information, location
RC.SUPPCOMP Defines which company
codes may reference
this supplier for
purchasing
Work locations REQCAT.TWORK_LOCATION Associates work
REQCAT.TLWORK_LOCATION locations with plant,
company, and country.
A plant can have one
or more work
locations, a work
location may belong
to
only one plant.
REQCAT.TWORKLOC_DELTOADDR For those work
locations which have
a
predefined CDC
(Chemical Delivery
Center) address
User profiles REQCAT.TEMPLOYEE_PROFILE Holds employee
information
Catalog parts see FIG. 18, DB2 NCF Hold part
information,
tables 368 category/
subcategory
information, etc.
6. Relational DB Agents In accordance with a preferred embodiment of the invention, in a Notes/DB2 hybrid environment, a Notes agent reads data from a DB2 table, and then dynamically populates that data to an HTML page. In this manner, an the existing infrastructure (including Notes, Domino Go, and DB2) is used to combine HTML and Java script web presentation with DB2 data. Referring to FIG. 20, Notes agents 440 are used as intermediaries. Each such agent 440 reads DB2 tables 390, collects data using SQL select statements, and builds web page 442 dynamically, writing out the Java script and HTML to present the page on a Web browser, such as Web browser 100. The results of the DB2 searches also helps to determine which HTML needs to be written, something which standard HTML cannot handle. Thus, conditional logic may be used. A plurality of agents 440 are provided. The premise is the same in all: figure out who is asking, and then tailor what is shown by what they are authorized to see. The example of Table YY is the supplier profile agent. This process makes use of the Notes connection function lsx:lc. This Lotus Script connection is a built in API for connectivity to relational databases. The lsx:lc connector is a Lotus provided API which allows connection to DB2. For example, to display a list of supplier profiles, two DB2 tables 390 must be read: one provides a list of suppliers and the other is role table 420 (FIG. 19). When role table 420 is read, the code tests the users ability to edit (country admin for country of supplier), and may display the web page differently depending thereon. A dynamic feature of the invention is that straight text may be displayed, or with text with hyperlinks to open a supplier profile, as an example. To make and use this preferred embodiment of the invention, the following is done: 1. Use the Lotus Script lsx:lc connector connect to DB2. 2. Depending on the DB2 table being read and the functions required, write functions to Create, Read, Update, and Delete with respect to the DB2 table. 3. Write the HTML to display the page, and then have the Notes agent 440 Print these HTML commands to the browser so that they appear in a meaningful presentation to the end user. 4. Use conditional logic to change the look of the page 442 based on the results of the DB2 390 lookups. Inputs to the method of this embodiment of the invention include the DB2 table to be read or updated, and the output includes HTML conditionally generated based on results of the DB2 table reads. The HTML page being populated may, for example, provide a list of suppliers. Such pages may also be used in the requisition or configuration area of the application, displaying commodity codes, suppliers, and so forth.
TABLE 5
EXAMPLE AGENT 440
This agent is invoked from the administration tab for `supplier`. It is
presenting the user with a view of suppliers that have been configured
on the system. Based on the access authority of the user, this list
will be presented either as just text, for the general user, or as
hotlinks for an administrator to then open an individual supplier
profile and update it.
Sub Initialize
//setting up variables
Dim src As New LCConnection ("db2")
Dim fldLst As New LCFieldList(100)
Dim suppname As LCField
Dim suppcode As LCField
Dim InfoView As AllInfoView
Dim session As New NotesSession
Dim doc As NotesDocument
Dim sqlQueryString As String
Dim flag As Variant
Dim admin As Integer
Admin=True
Dim lclsxSession As LCSession
Dim supplierdb As notesdatabase
Dim configview As notesview
Dim configdoc As notesdocument
Dim lookuptype As String
On Error Goto errHandler
Set supplierdb=session.currentdatabase
Set configview = supplierdb.getview("APPVIEW")
Set configdoc = configview.getfirstdocument
lookuptype = configdoc.HRFormat(0)
Set doc=session.DocumentContext
Set InfoView=New AllInfoView
//connect to DB2
InfoView.ConnectToDB2
//Query the role table for users roles and authority levels
If Not InfoView.CheckAdminPrivilegesOK (doc.CurrentUserName
(0))Then
Admin = False
End If
InfoView.DisconnectDB2
If (Admin = False) And (lookuptype = "DON")Then
Print"<script>alert(`You are not authorized to view Supplier
documents Please contact your procurement administrator if you have
questions`);"
Print "history.go(-3)</script>"
Exit Sub
End If
//Begin printing out HTML from the agent
Print "<link rel=stylesheet type=""text/css"" href=""/transform
/reqcat/css/default_styles.css"">"
Dim db2c As New db2config(session)
//Connect to DB2
src.database = db2c.getDB2DatabaseName() `"reqcat41"
src.Connect
//build the SQL Query
sqlQuerystring = "select SUNAME, SUID from RC.SUPPLIER"
sqlQuerystring = sqlQueryString & "order by SUNAME"
If (src.execute(sqlQueryString, fldLst) = 0) Then
Print "You do not have any supplier profiles to view."
End
End If
Set suppname = fldLst.Lookup ("SUNAME")
Set suppcode = fldLst.Lookup ("SUID")
//Print more HTML
Print "<TABLE width=`100%` cellpadding-`0` cellspacing=`0`>"
Print "<BR><TR><TD class=""banner"" bgcolor=""3366cc""
align=
""center""> Suppliers</TD></TR>"
Print "</TABLE>"
//If the user is an admin, then provide a button for adding new
suppliers
If Admin Then
Print "<form>"
Print "<input type=`button` name=`mybutton` value=`Add
Supplier Profile` onClick=""javascript: document.location.href=
`./SUPPLIER?OpenForm`;"" >"
Print "</form>"
Else
Print "<BR>"
End If
Print "<table cellpadding=2 cellspacing=0 border=0>"
Print "<tr><td class=""bannersublevel"" ><B>
Supplier</B></td>"
Print "</tr>"
//Toggling background color on alternate rows
flag = True
While (src.Fetch (fldLst) > 0)
If (flag) Then
Print "<tr bgcolor=#CCCCCC>"
flag = False
Else
Print "<tr bgcolor=#FFFFFF>"
flag = True
End If
//If user is an admin, then print the supplier name as a hotlink
If Admin Then
Print"<td class=""field""> <a href=./SUPPLIER?
OpenForm&"
& suppcode.text(0) & ">"&suppname.text(0) &"</a> </td>"
Else
//otherwise just print it as text
Print"<td class=""field"">"
&suppname.text(0)&"</td>"
End If
Print"<td class=""field"">" &suppcode.text(0)&"</td>"
Print "</tr>"
Wend
Print "</table>"
End
errHandler:
Print "<br>" & session.currentagent.name & " - Line # " &Str(Erl)
& " // Error " & Str(Err) & ": " & Error$
If (lclsxSession.Status <> LCSUCCESS) Then
Dim text As String
Dim extcode As Long
Dim exttext As String
Call lclsxSession.GetStatus (text, extcode, exttext)
If (lclsxSession.Status = LCFAIL_EXTERNAL)Then
Print "<br>DB2 message: " & exttext & " code #" &
Cstr(extcode)
Else
Print "<br>Connector message: " & text
End If
Else
Print Error$
End If
End Sub
7. Data Transfer In accordance with the preferred embodiment of the invention, a system and method is provided for transferring to a Req/Cat Web (RCW) application in a timely manner large quantities of data from web sites that exist outside of a firewall, or internal applications within the firewall but outside of the Req/Cat Web application. For the purpose of the description of this embodiment, RCW exists in a frame set in a browser. A frame set divides a screen into logical and user-friendly sections called frames. As part of security for browser 100, Netscape and Internet Explorer (IE) establish ownership of the frames: each frame is a window under control of browser 100. Browser 100 can open up a session in any frame desired. However, if all of the frames open on a browser are not owned by same session, then these frames cannot see the contents of each other. Consequently, the problem is presented: if RCW needs to access an outside supplier site 300 for information to get back through one its own the frames, as soon as data is written by that other site into one of the frame at browser 100, RCW no longer owns the frame and cannot access the information. So this aspect of the invention is concerned with data passing. In accordance with the preferred embodiment of the invention, the supplier 300 opens a new window through normal Java script commands and writes its data into it, along with the name of the agent to run in RCW application server 114. That new window then calls one of the RCW processes, which is able to see the data because it is not in a frame and is therefore available for RCW to access. That process causes an agent to runs (in RCW) that can see that data and write it to a frame on the RCW side, resulting in RCW owning both the data and the frame. This allows RCW to reach NOTES information, and write that information to other frames. RCW owns the data and the frame. Ownership is established in the RCW application. Consequently, by carefully tracking and controlling the sequence of opening windows, RCW can establish the origin from which data is coming, where the data is going, and which process owns it. Those are the high points. Review: two sites are talking to each other using an intermediate window, doing a handoff of data and of ownership of both data and frame such that when it is time to supply information to the RCW application, RCW owns the data, frame and process. Referring to FIG. 21, a system and method are provided for data transfer from a externally owned site to an application owned frame set which operates as follows. The RCW application opens a supplier site URL in a temporary frame 456. Upon user selection of go to supplier 451, as is represented by step 458, frame 456 opens the supplier window 460 as a separate browser session. Two windows are now open: the original application 450 with its window underlying, and a supplier window 460 over it with the supplier URL. The reason for doing this is that the supplier requires that the browser be full frame, not in a small frame set. The primary RCW application in window 450 is quiesced to a wait state. As is represented by steps 462, the user can now select from window 460 items to buy, search, or whatever the supplier deems is appropriate for a user to order his data. The user then issues the command to submit the order. In step 444, the supplier site then gathers content from order data entered at window 460, in step 446 formats the page, and in step 448 issues a call to Req/Cat Web to open third window 464 with first agent 480. The supplier uses an enterprise specified agent name for first agent 480 when opening third window 464. Third window 464 is a window, but not a frame, and thus the Req/Cat Web can get access to it even though it is opened by the supplier. First agent 480 includes an html form command 488 which defines the processing to be done on the contents 466 of the form now displayed in third window 464, and the supplier site writes into this third window 464 unique order identifying information. Once written, the browser activates the form. Once activated, it is a program in its own right, the html 488 that was written and any java script in it will execute. One of first things it does is look at the action in the form command and determine that this is the program that will run to deal with the contents of this form. That action program, or first agent 480, is a RCW action program on the RCW server that can see contents of third window 464 because it is not in a frame, and thus ownership is not critical. In step 482, first RCW agent 480 executes a program or process that writes the contents 466 of window 464 back into its frame set (temporary frame) 456, and then calls second agent 484 which references Java script code 454 and, as is represented by step 486, access Notes data on the Notes server, add content to the requisition, and issue the commands that send the order to be stored in the requisition. This is key, Req/Cat Web has used its own process 480 to write into its own window 450, and knows who owns the data. First agent 480 process opened window 464 and writes the data to temporary frame 456 and then kicks off another process, second agent 484, that can read that data, can read and write to all of the frames 452 in the application, can access information from Lotus notes, and write all the information into the requisition. Window 460 is provided by a supplier site from outside the application, and possibly also outside a firewall. Window 460 is an external application that allows execution of code 462 for performing search, select, submit (call enterprise server, which may be inside firewall), and order data, including gather content 444, formatting the page 446, and calling RCW 448 with the first agent 480 as an action form. Window 464 is a window opened by the supplier to include a Req/Cat Web agent, first agent 480. First agent 480 posts document contents to temporary data frame 456. As a variation, for skills matching, calls are made to the agents 486, 484 with a parameter after placing the data to retrieve in a Notes database. The second agent 484 retrieves the data, can look up and add supporting data from yet another Notes database. The key consideration here is, "who owns the frame". The server that owns the agent that last wrote a frame owns it, and can see its content, but cannot see any other frame's contents if they were written by another server's programs or agents. Window 464 and first agent 480 act as an intermediary. Content 466 is owned by the supplier server 300, but the first agent 480 is owned by the Req/Cat Web server 114. That first agent 480 then kicks off the rest of the process, passing the data and ownership to the RCW server 114 and the second agent 484. The second agent 484 can now can access Notes data on the Notes server 112, and issue the commands that send the order to be stored in the requisition. 8. Customizable Side Bar In accordance with the preferred embodiment of the invention, a customizable side bar is provided. Dynamic HTML is used by the navigator responsive to user input to change data presented at the screen without having to communicate with a remote server. Referring to FIG. 4, navigation frame or menu bar appears, typically, on the left of a display window, to display a plurality of menu boxes, including headers 491-494 and items 495-500. As a cursor is moved over the headers, each individual header is highlighted or some symbol 481, 483, 485, 487, respectively, rotated by, say, 45 degrees, so as to point either down or to the right, to indicate to the user the header which will, upon being clicked, toggled to either a collapsed or expanded state from its current expanded or collapsed state, respectively. As illustrated, headers 481 and 483 are in a collapsed state, and headers 485 and 487 are in an expanded state. When expanded, header 485 is expanded to show items 495-498, and header 487 to show items 499-500. The user may move the cursor to one of items 495-500, and select the item to update the data displayed in content frame 480. Heretofore, when the user selects (clicks on) a menu header 491, there is generally a pause as the request is made to the server to obtain a new page including an expanded menu bar 472 including a display of the included items. In accordance with a preferred embodiment of the invention, when server loads the window to a client, all of the information required to load the menu bar 472 is provided, including information for the expanded menu items (but not the content frame associated with them). If a menu header 485 is clicked when in the collapsed state, the menu items 496-498 are shown or made visible and the following menu headers and items are moved relative to the expanded menu bar. If a menu item 496 is clicked, then communication with the server is required to load the content frame 480. Upon initial load, all headers 491-494 are collapsed and all menu items are hidden. Menu headers 491-494 are displayed below each other with no gaps between them. Clicking on a last menu header merely shows all the menu items and moves nothing below it. Clicking on the first menu header would show all of its items and move every header and item a constant amount without changing its visibility state. (The display area 472 may be off of the window, but is available via the scroll bar 490.) In accordance with this embodiment of the invention, the result of selecting a header 491-494 is an instantaneous response from the client browser either expanding or collapsing the selected header and respectively displaying or removing from display the included items. This is done using dynamic html (dhtml), which allows creation of divisions within a document. These divisions are equivalent to tab items, menu items 495-500, or headers 491-494. In Netscape, these divisions are called layers. In Explorer, the layers are called divisions. These divisions can be hidden or shown, and moved relative distances on the screen. The current state of the art is to use these divisions for moving or flashing graphics, but not for business applications such as menu bars. In accordance with the present invention dhtml at the client creates subtle changes, business like, in the menu bar 472 without requiring server communications. The use of dhtml is described at developer.netscape.com. Java script code, executable at a client for inserting, showing, moving and updating a menu bar 472, is illustrated in Table 6.
TABLE 6
MENU BAR CODE
---- JavaScript (appNav.js) --------
// appNav Class Constructor
----------------------------------------------------
// This class implements a JavaScript Object intended to represent the
Navigator function appNav(menuVar) {
//methods
this.init = appNavInit;
this.sizeit = appNavSizeit;
this.toggletext = appNavToggleText;
this.isItem = appNavIsItem;
this.reverse = appNavReverse;
// properties
this.ns = document.layers;
this.ie = document.all;
this.loaded = 0;
this.whichone = 0;
this.whichgroup = 0;
if ( this.ns ) {
this.show = `show`;
this.hide = `hide`;
} else {
this.show = `visible`;
this.hide = `hidden`;
}
this.menus = menuVar;
this.max = menuVar.length;
this.images = new Array(this.max);
this.menuMove = new Array(this.max);
for (i=0;i < this.max; i++) this.menuMove[i] = 20 * (menuVar[i] -
1);
this.tabShow = [false, false, false, false, false, false, false,
false];
}
function appNavInit() {
var k=0;
if (this.loaded == 0) {
for (i=0; i < this.menuMove.length; i++) {
this.images[i] = new Array(this.menus[i]);
for (j=0; j < this.menus[i]; j++) {
this.images[i][j] = new Image();
pos = ("0"+i).slice(i>9,2) + ("0"+j).slice(j>9);
this.images[i][j].src = "../images/men" + pos
+".gif"
if (this.ie) {
document.images[k].src=this.images[i][j].src;
k++;
} else
document.layers["D"+pos].document.images[0].src=this.images[i][j].src;
}
}
this.loaded=1;
}
};
function appNavSizeit() {
if (this.loaded==1) {this.loaded = 0; this.init();}
};
function appNavToggleText(z) {
if (this.loaded==1) {
this.tabShow[z] = !this.tabShow[z]
for (j=1; j<this.menus[z]; j++) {
pos = ("0"+z).slice(z>9) + ("0"+j).slice(j>9);
if (this.ie)
text = document.all("D"+pos).style
else
text = document.layers["D"+pos]
if (this.tabShow[z])
text.visibility = this.show;
else
text.visibility = this.hide;
}
for (i=z+1; i<this.max; i++) {
for (j=0; j<this.menus[i]; j++) {
pos = ("0"+i).slice(i>9) + ("0"+j).slice(j>9);
if (this.ie) {
text = document.all("D"+pos).style
if (this.tabShow[z])
text.pixelTop += this.menuMove[z]
else
text.pixelTop -= this.menuMove[z]
} else {
text = document.layers["D"+pos]
if (this.tabShow[z])
text.top += this.menuMove[z]
else
text.top -= this.menuMove[z]
}
}
}
}
};
Advantages Over the Prior Art It is an advantage of the invention that there is provided a scalable database system in a web environment with optimal access performance characteristics for an expanding number of clients and a growing database. It is an advantage of the invention that there is provided a system and method for enabling a requester to select the correct general ledger account when doing financial validation on a requisition. It is an advantage of the invention that there is provided a system and method for utilizing Lotus script extensions in combination with a relational database to provide high capacity storage without performance degradation. It is an advantage of the invention that there is provided a system and method for enabling a buyer a means for editing catalog content before externalizing it to production for access by requesters. It is an advantage of the invention that there is provided a system and method for providing very flexible access to DB2 tables without requiring database administrator (DBA) involvement to issue grants against the tables, and bypassing the problem caused by Notes agents all coming from the same user (the Notes server ID). It is an advantage of the invention that there is provided a system and method utilizing an existing infrastructure including Lotus Notes, Domino Go, and DB2 to combine HTML and Java script web presentation with DB2 data. It is an advantage of the invention that there is provided a system and method for enabling transfer of data from a supplier site to a RCW application which does not entail frame spoofing. It is an advantage of the invention that there is provided a system and method for dramatically increasing the speed of operation of a navigation frame of a GUI. Alternative Embodiments It will be appreciated that, although specific embodiments of the invention have been described herein for purposes of illustration, various modifications may be made without departing from the spirit and scope of the invention. In particular, it is within the scope of the invention to provide a computer program product or program element, or a program storage or memory device such as a solid or fluid transmission medium, magnetic or optical wire, tape or disc, or the like, for storing signals readable by a machine, for controlling the operation of a computer according to the method of the invention and/or to structure its components in accordance with the system of the invention. Further, each step of the method may be executed on any general computer, such as an IBM System 390, AS/400, PC or the like and pursuant to one or more, or a part of one or more, program elements, modules or objects generated from any programming language, such as C++, Java, Pl/1, Fortran or the like. And still further, each said step, or a file or object or the like implementing each said step, may be executed by special purpose hardware or a circuit module designed for that purpose. Accordingly, the scope of protection of this invention is limited only by the following claims and their equivalents.
|
Same subclass Same class Consider this |
||||||||||
