You are on page 1of 20

Guided Buying -Simplified & User Friendly Solution for the indirect Procurement

Author: Amit Jain

Declaration
I hereby declare that this document is based on my project experiences. To the best of my knowledge, this document does not contain
any material that infringes the copyrights of any other individual or organization. The Key members involved in the development of
the solution are Amit Jain (Solution Architect), Vinay Kadimi (JSP Developer), Papiya Chattopadhyaya (OAF Developer), Kunali
Somkuwar (OAF Developer + PL/SQL Developer), Y, Kiran (Web Designer)

Target Readers
Iprocurement
Indirect Procurement
Commodity Based Approved Supplier List
Smart Forms
Punch Out

Keywords
Iprocurement
Indirect Procurement
Commodity Based Approved Supplier List
Smart Forms
Punch Out

Page 1 of 20

Introduction

With the markets turning increasingly competitive every day, the systems have been witnessing the proliferation of the Supplier, Sites,
their offerings and Approved Supplier Lists data. The growing numbers have complicated the process of buying and ease of system
use thereby. The fact is corroborated by the increasing number of the support tickets in iprocurement track logged by relatively newer
users of the system.
Through close interaction with the users and business, we have devised Guided Buying solution simplifying the process of buying
and cranking up the effectiveness and productivity of the system.
Salient Features of the Footprint
1) Guided Buying for indirect procurement simplifying the process of procurement and enhancing the system
usability
2) Providing a more Agile and robust system to the users
3) Automatic switching responsibility and operating unit context based from the list of drop down
4) Enabling of Guided Buying for selective Operating units
5) Direct Punch out to Vinimaya site through clicking a button. Punch out will auto derive the Operating unit of
the Requesting Person using the solution
6) Category Hierarchy simplifying the search of the items to be ordered
7) Configurable Index Page Screens using the Custom Lookups
8) Auto Displaying the List of Preferred suppliers for the Item Category using commodity based Approved
Suppliers
9) Keyword and Supplier based Search capabilities
10)
Direct Landing for the users on the Smart Forms by choosing the category
11)
Auto Deriving of the HP Catalogs specific to the Operating unit and for the Category
12)
Easing out the complexity of ordering the items with the increasing Item Categories and preferred
suppliers through guided buying will result into lesser tickets logged by the users
13)
Ease of requesting the items.

Page 2 of 20

14)

HTML5.0 leveraged for UI design makes it browser dependent and compatible to Mobiles Devices.

Key Solution Points


1) Commodity based Approved Supplier Lists for Preferred Suppliers. Interface has been written for same.
2) Re-organization and logical classification of the Item Categories in Custom Lookups
3) Smart Forms based on Categories and Restrict by Preferred Suppliers
4) Operating Unit based Switch Context from the UI
5) Suppliers and Sites Defaulting on the Smart Forms
6) Operating Unit based Punch outs from the UI
7) Securing of the Buying pages from unauthorized access through Form Functions
8) Customizing Controller for iProcurement NonCatalog Page
Flow Diagram

Page 3 of 20

Page 4 of 20

Solution
Setting up the Custom Lookups
We have used the Custom Lookups table and a custom form to update the Lookup Values. An excerpt of the Category classification
data file for the ease of the use is as attached.

Category
Classification.xlsx

The Actual file used for the Category Lookups is as attached


XXAT_IPROCUREME
NT_LOOKUPS.xlsx

Once the Lookups are uploaded, we run a concurrent program in the environment to validate the Categories Name and populate the
category_id in Attribute13. The code is as attached.
XXAT_VALIDATE_IPR
OC_LOOKUP.sql

Setting up Smart Forms


As indicated below, please set up the smart forms for the rest of the categories along the same lines

Page 5 of 20

Landing Page (Entry point into the application)

Page 6 of 20

FIGURE 1
Brief on Functionality Points of Figure1

Page 7 of 20

The Page above will be registered as a Form Function so as to prevent the unauthorized access. Anyone attempting to access the URL
directly will be prompted to the SSO Login page.
1) Point 1 marked will display the description field of the User.
2) Point 2 will be the drop down of all the Operating Units to which the user has iProcurment Access. But by default the
Operating Unit which attached to the persons HR Assignment will be listed. The query used for the drop down is given in the
screenshot
3) Point 3 will be link to Vinimaya Catalog
A) Upon clicking the Catalog Button, using the AJAX call we will derive the operating unit from Point#2 and send the control
to the Vinimaya Punchout. The Content Zone ID for the punch out can be derived using PL/SQL Call.
B) Redirect the control to an intermediate OAF Page with Dummy AM Definition. However, the controller of this page will
set the Responsibility Context using the below code.
hashmap1.put("contentZoneId", oapagecontext.getSessionValueDirect("CZID"));
hashmap1.put("action", "shopping");
hashmap1.put("shopFlow", s1);
oapagecontext.removeParameter("OARespContextSwitcherValuesKey");
oapagecontext.removeTransactionTransientValue("OARespContextSwitcherValuesKey");
String key = (String)oapagecontext.getSessionValueDirect("respk");
oapagecontext.changeResponsibility(key, "ICX");
oapagecontext.setForwardURL("ICX_CAT_PUNCHOUT_LOGIN", (byte)0, null, hashmap1, false, "N", (byte)99);

Please see the controller file attached


XXCatalogCO.java

4) Point 5 tagged in the Figure 1 will extend the flexibility to the solution to go to the iProcurement Seeded Page and changing
the responsibility base on OU Context Switch. Redirect the control to an intermediate OAF Page with Dummy AM Definition.
However, the controller of this page will set the Responsibility Context using the below code.
oapagecontext.removeParameter("OARespContextSwitcherValuesKey");
oapagecontext.removeTransactionTransientValue("OARespContextSwitcherValuesKey");
oapagecontext.changeResponsibility((String)oapagecontext.getSessionValueDirect("respk"), "ICX");
oapagecontext.setForwardURL("OA.jsp?OAFunc=ICX_CAT_SHOP_HOME", null, (byte)0, null, hashmap, true, "Y", (byte)99);

Please see the controller file attached

Page 8 of 20

XXRedirToiProcClassi
cCO.java

5) Point6 he news section will display the news items based on the Lookup Type Values entered. Queries related to the existing
setups are shown in the screenshot above
6) Point 4 lands to the Guided Buying Page (Please Refer Figure2 below)

Page 9 of 20

Figure 2

Page 10 of 20

Brief on Functionality Points of Figure2


1) Point 1 takes the value of the operating unit as selected from Landing Page (Landing page). Besides, defaulting the OU from
the Landing Page, it also extends the flexibility to change the operating unit using the drop down.
2) Point 3 : The category classification Lookups also bags in the details if the Application Type is a Smart form or a Catalog. (I

3)

4)
5)
6)
7)
8)

shall attach a extract of the complete category lookups in the appendix). Catalog entries are represented by
For the Catalog
Application Type one the Lookups column also contains the Name of the Catalogs eg. HP, Vinimaya. We have a PL/SQL
Module to derive the content zone ID based on the Catalog Name and the OU selected from the Responsibility context switch.
Once the content Zone ID is derived, we land on the Catalog Punch out site using the logic as depicted in Figure1 Point 3
(B)
Point 4: Smart form entries are represented by
.For the Smart form links, we have the Category ID derived from the
Extended Lookups Table; find all the Preferred Suppliers for the Category ID specific to the OU and display the matching
result on the next page. We shall cover this section in the Figure 3. Once someone will click on the Smart form link, he/she will
be navigated to Figure4.
Point 5: News section is same as depicted in Figure1 Point 6
Point 6 uses the Policy URL, Meaning of the Lookups. Please refer XXAT_IPROCUREMENT_LOOKUPS.xlsx attached in
Custom Lookups section above
Point 7: Brief about the Category Description comes from Category_Detail_Description column. Please refer
XXAT_IPROCUREMENT_LOOKUPS.xlsx attached in Custom Lookups section above
Point 8: Banner Images for every Top Level Categorty will be different. Images are saved as Top_Category.png and placed
under OA_HTML/ imags/banners folder.
Point 2 is the Search Functionality based on the Keyword as captured under DFF Column of ASL Attributes and the Keywords
captured in the Smart Form Definiton
The query for Keyword search will be as follows:
SELECT Attribute6||'>>'|| Attribute8 FROM XXAT_LOOKUP_VALUES WHERE LOOKUP_ID=(SELECT LOOKUP_ID FROM XXAT_LOOKUP_TYPES
WHERE LOOKUP_TYPE='XXAT_IPROCUREMENT_LOOKUPS')
and Attribute9='Y' AND Attribute4='Y'
AND ATTRIBUTE13 IN (
--****for searching the Smart Forms-------select distinct category_id
from por_noncat_templates_all_vl
where instr(upper(keywords),upper(:1))<>0 --:1 will be input from the Textbox of Search functionality.
UNION
--****for searching the ASL--------

Page 11 of 20

select DISTINCT CATEGORY_ID from po_approved_supplier_list where category_id is not null


and nvl(disable_flag,'N')<>'Y'
AND trunc(review_by_date)>=TRUNC(SYSDATE)
AND instr(upper(attribute14),upper(:1))<>0
)

Please see the screenshot below for the Search Keyword as Event

Figure3

Page 12 of 20

Once some one will click on Levl 3 category, the matcing preferred Suppliers will be pulled as shown in the Figure 4

Figure4
Brief on Functionality Points of Figure4

Page 13 of 20

1) Point1 : This will be the drop down to select the Mode of Ordering (if we want to Order by Amount, Services, Goods). Based
upon the selection from the drop down, we shall be navigated to the appropriate Smart Form in the Store.
2) Point 2: The grid contains all the matching records for the Preferred Suppliers in the Grid. So if the data retrieved in the grid
cant be displayed on single page, instead of user navigating to different pages for the Search result, he can directly key-in the
Supplier Name/ Keywords/ Both to retrieve the matching result. (Please refer for Figure5)
3) Point 3 and 6: Query that will be used to pull the Suppliers in the Grid is as below. But, we are grouping the records while
displaying the dataset on the grid. All the columns from the query below will be visible only upon expanding the + sign next to
the Vendor Name
SELECT a.asl_id,
c.vendor_name c_vendor_name,
address_line1
|| ' '
|| address_line2
|| ' '
|| address_line3
|| ' '
|| city
|| ' '
|| state
|| ' '
|| zip
|| ' '
|| province
|| ' '
|| country
c_address,
d.vendor_site_code c_vendor_site,
f.first_name || ' ' || f.middle_name || ' ' || f.last_name
c_contact_person,
f.area_code || '-' || f.phone c_contact_phone,
f.EMAIL_ADDRESS c_email,
TO_CHAR (c.vendor_id) c_vid,
TO_CHAR (d.vendor_site_id) d_vsid,
TO_CHAR (f.vendor_contact_id) f_vcid,
TO_CHAR (j.template_id) temp_id,
item_type,
a.attribute14 key_words FROM po_approved_supplier_list a,
po_asl_statuses b,
ap_suppliers c,
ap_supplier_sites_all d,
ap_supplier_contacts f,
mtl_parameters e,
po_asl_attributes g,
mtl_categories h,
hr_operating_units i,
por_noncat_templates_all_vl j
WHERE 1 = 1
AND a.category_id IS NOT NULL
AND i.organization_id = :1
AND a.asl_status_id = b.status_id
AND a.vendor_id = c.vendor_id
AND a.vendor_site_id = d.vendor_site_id(+)
AND a.owning_organization_id = e.organization_id(+)
AND a.vendor_site_id = f.vendor_site_id(+)
AND a.category_id = :2
AND a.asl_id = g.asl_id(+)
AND a.category_id = h.category_id
AND h.disable_date IS NULL
AND h.end_date_active IS NULL AND h.enabled_flag = 'Y'
AND d.org_id = i.organization_id
AND j.category_id = a.category_id
AND
f.INACTIVE_DATE IS NULL

Once we expand the + sign next to the Supplier Name, it will dispay all the Supplier Site , Smart Form Details based on 3 criteria
A) Supplier name
B) Keywords
C) Item Type (Order By)
Please refer Figure5 below
4) Point 4: Category Selected from the Index Page/ Search Page as shown in Figure 2 and 3 will be displayed on the Top.
5) Point5 : Go Back Button Navigates back to the Index Page.

Page 14 of 20

Figure 5
Brief on Functionality Points of Figure 5

1) Point 1: This take the users to the Standard Iprocurement Page. This functionality is same as depicted in Figure 1
Functioanlity Point# 5
2) Point 2: Global Sourcing Manager information is derived from a Custom Lookup. The Database function written to retrieve
the contact details of the Gloal Sourcing Manager is as below:
FUNCTION xxat_get_global_sourcing_mgr (p_category_id NUMBER, p_org_id NUMBER) RETURN VARCHAR2
IS
l_emp_number number;
l_ret_message varchar2(1000);
BEGIN
-- get person id

Page 15 of 20

select attribute8 into l_emp_number


from xxat_lookup_values
where lookup_id= (select lookup_id from xxat_lookup_types
where lookup_type='XXAT_GLOBAL_SOURCING_MGR' )
and attribute5 = p_category_id
and attribute6 = p_org_id;
-- join person-id from usr for usr_udf_person_id
select 'OR Contact Global Sourcing Manager '||USR_UDF_COMMON_NAME ||'(Email :' ||USR_EMAIL ||'Telnet :'||USR_UDF_TELEPHONE_NUMBER||')'
into l_ret_message
from usr
where usr_udf_person_id = l_emp_number;
if l_ret_message is null
then
l_ret_message := 'Appropriate Sourcing contact not available in directory';
end if;
return l_ret_message;
EXCEPTION
WHEN OTHERS
THEN
RETURN 'Appropriate Sourcing contact not available in directory';
END xxat_get_global_sourcing_mgr;

3) Point3 : Upon clicking the (+) sign it will expand results for the Supplier Sites (based on the selected Operating Unit) and
the Order by option selected from the Drop Down. Refer Figure 6

Page 16 of 20

Figure 6
Brief on Functionality Points of Figure 6

1) Point1 : When we click on the listed Supplier, it redirects to OAF Page with Dummy AM Definition. However, the controller
of this page will set the Responsibility Context using the below code. The parameters passed in the URL to the intermediate
page will be SupplierID, SupplierSiteID, SupplierContactID , SmartFormID and the Flag indicating that the page is being
accessed by Guided Buying Application and not elsewhere.
2) The intermediate page will put the values of the Supplier_id, Suplier_Site_Id, Supplier_Contact_ID in a HashMap
3) It will set the Responsibility Context
4) Redirect the control to the Seeded Page OA.jsp?OAFunc=ICX_CAT_NONCAT_REQUEST_STORE

Page 17 of 20

if(pageContext.isLoggingEnabled(1))
pageContext.writeDiagnostics(this, "processRequest.calling getRespKey method for supplier site id= "+
(String)pageContext.getSessionValueDirect("SuppSiteId"), 1);
String respKey = getRespKey((String)pageContext.getSessionValueDirect("SuppSiteId"),pageContext,webBean);
if(respKey !=null && !"".equals(respKey))
pageContext.changeResponsibility(respKey , "ICX");
if(pageContext.isLoggingEnabled(1))
pageContext.writeDiagnostics(this, "processRequest. RespKey for supplier site id= "+(String)pageContext.getSessionValueDirect("SuppSiteId")+" is
"+respKey , 1);
HashMap SuppHashMap = new HashMap();
SuppHashMap.put("SuppId",pageContext.getSessionValueDirect("SuppId"));
SuppHashMap.put("SuppSiteId",pageContext.getSessionValueDirect("SuppSiteId"));
SuppHashMap.put("SuppContactId",pageContext.getSessionValueDirect("SuppContactId"));
SuppHashMap.put("TemplateId",pageContext.getSessionValueDirect("TemplateId"));
SuppHashMap.put("fromRentCar",pageContext.getSessionValueDirect("fromRentCar"));
//debugStmt("inside of XXATNonCatFrwdCO "+pageContext.getSessionValueDirect("SuppId")+","+pageContext.getSessionValueDirect("SuppSiteId"),
pageContext,webBean);
if(pageContext.isLoggingEnabled(1))
pageContext.writeDiagnostics(this, "processRequest. Forwarding to ICX_CAT_NONCAT_REQUEST_STORE " , 1);
pageContext.setForwardURL("OA.jsp?OAFunc=ICX_CAT_NONCAT_REQUEST_STORE",

XXATNonCatFrwdCO
.java

5) Once the Control reaches to the seeded page NonCatalogRequestPG, we have customized the Controller of the Page.
We shall first capture the values set in the HashMap from the intermediate page.
suppName = (String)oapagecontext.getParameter("SuppId");
suppSite= (String)oapagecontext.getParameter("SuppSiteId");
suppContact= (String)oapagecontext.getParameter("SuppContactId");
templatedId = (String)oapagecontext.getParameter("TemplateId");
fromRentCar = (String)oapagecontext.getParameter("fromRentCar");

6) Subsequently, the following lines of code will be used to default the LOV selection

Page 18 of 20

String SuppDtlsQuery = getSuppDtlsQuery(suppName,suppSite,suppContact,oapagecontext,oawebbean);


---------execStmt.append(" AND PoVendors.VENDOR_ID = "); execStmt.append(suppName)
execStmt.append(" AND PoVendorSitesAll.VENDOR_SITE_ID=");execStmt.append(suppSite);
if(suppContact != null && suppContact != "null" && !"null".equals(suppContact) && !"".equals(suppContact))
{
execStmt.append(" AND PoVendorContacts.VENDOR_CONTACT_ID = ");
execStmt.append(suppContact);
}

XXNonCatalogReque
st1CO.java

Page 19 of 20

Figure7

Page 20 of 20

You might also like