Académique Documents
Professionnel Documents
Culture Documents
Page 1 of 35
Table of Contents
Table of Contents _____________________________________________________________ 2 Table of Figures ______________________________________________________________ 3 Purpose _____________________________________________________________________ 5 Oracle MSCA Overview ________________________________________________________ 5 MSCA User Interface __________________________________________________________ 6 MSCA Application Framework ___________________________________________________ 7
MSCA Object Beans ________________________________________________________________ 7 MSCA Java Event-Listener Model _____________________________________________________ 8 MSCA Bean APIs ___________________________________________________________________ 9
Bean APIs ________________________________________________________________________________ 9 Sub classes associated with the MWA Bean _____________________________________________________ 9 Menu Item Bean ________________________________________________________________________ 9 Commonly Used Menu Item Bean APIs ______________________________________________________ 9 Page Bean _____________________________________________________________________________ 10 Commonly Used Page Bean APIs___________________________________________________________ 10 Flexfield Bean __________________________________________________________________________ 10 Commonly Used Flexfield APIs ____________________________________________________________ 10 Field Bean _____________________________________________________________________________ 10 Commonly used Field Bean APIs ___________________________________________________________ 11
Customizing MSCA Oracle Recommended Best Practices ___________________________ 18 Setting Up a Development Environment __________________________________________ 18
Download and Install the Required JDK _______________________________________________ 19 Select and Install a Java IDE _________________________________________________________ 19
NetBeans Installations Special Instructions ____________________________________________________ 19 NetBeans Post Installation Instructions _______________________________________________________ 19
Case 2: Addition of extra fields on Quick Ship Page to collect FOB terms, freight terms, and document shipset _________________________________________________________________ 28
Understand the Functional Requirement ______________________________________________________ 28 Identify the Quick Ship Current State _________________________________________________________ 28 Identify the Quick Ship To Be State _________________________________________________________ 28 Code Changes and Additions ________________________________________________________________ 29 Create DocumentShipSetLOV Java Class _____________________________________________________ 29 Create CustomEZShipFunction Java Class ____________________________________________________ 31 Create CustomEZShipPage Java Class _______________________________________________________ 31
Index ______________________________________________________________________ 34
Table of Figures
FIGURE 1 ORACLE MSCA INFORMATION FLOW........................................................................................................................5
Page 3 of 35
FIGURE 2 MSCA APPLICATION COMPONENTS .........................................................................................................................6 FIGURE 3 MSCA GRAPHICAL INTERFACE .................................................................................................................................6 FIGURE 4 MSCA CHARACTER MODE INTERFACE ......................................................................................................................6 FIGURE 5 MSCA APPLICATIONS FLOW ...................................................................................................................................7 FIGURE 6 MSCA OBJECT INTER-RELATION MODEL ...................................................................................................................7 FIGURE 7 MSCA JAVA BEAN HIERARCHIES .............................................................................................................................9 FIGURE 8 MSCA FIELD BEAN HIERARCHIES ...........................................................................................................................11 FIGURE 9 UPDATING A FORM FUNCTION ...............................................................................................................................15 FIGURE 10 CREATING AK REPOSITORY ATTRIBUTE ..................................................................................................................16 FIGURE 11 DEFINING A REGION IN THE AK REPOSITORY ...........................................................................................................17 FIGURE 12 LINKING A REGION IN THE AK REPOSITORY .............................................................................................................17 FIGURE 13 DEFINE THE DFI ATTRIBUTES ...............................................................................................................................18 FIGURE 14 SELECTING PROJECT PROPERTIES IN NETBEANS .......................................................................................................20 FIGURE 15 NETBEANS ADD JAR/FOLDER ..............................................................................................................................21 FIGURE 16 GET MSCA FORM INFORMATION ........................................................................................................................22 FIGURE 17 DISPLAYING FUNCTION/HOT KEYS ........................................................................................................................22 FIGURE 18 CURRENT XXXXX QUICK PICK FORM....................................................................................................................24 FIGURE 19 CLASS HIERARCHY DIAGRAM ...............................................................................................................................26 FIGURE 20 "TO BE" STATE SCREEN FLOW .............................................................................................................................27 FIGURE 21 QUICK SHIP CURRENT STATE ...............................................................................................................................28 FIGURE 22 QUICK SHIP FIELD ADDITIONS ..............................................................................................................................28 FIGURE 23 QUICK SHIP CLASS EXTENSIONS............................................................................................................................29
Page 4 of 35
Purpose
This developers guide is intended to provide all of the information necessary to understand and customized the Oracle Mobile Supply Chain Applications (MSCA) within XXXXXs implementation architecture. The content is a compilation (hopefully in an orderly fashion) of Oracle White Papers, worldwide web blogs, independent articles, presentations on the topic, and personal experience obtained while reverse engineering previous customizations to XXXXXs MSCA implementation.
From an application component perspective, MSCAs layered architecture includes (see below): 1. 2. 3. 4. presentation layer consisting handheld devices such as RF Barcode Scanners, laptops, etc, application access via Telnet, application logic comprised of managers and services, and data access through PL/SQL packages, SQL scripts, and EJBs.
Page 5 of 35
The choice of a user interface type is usually driven by the capabilities of the handheld devices being used. At XXXXX, the handheld devices limit the user interface to Character Mode.
Page 6 of 35
Because each of these beans is written in Java, each one can consequently be extended with additional functionality. Customers should have a strong grasp of what a bean is, how the three types of mobile beans relate to each other, and finally how they connect to Oracle Applications Desktop ERP. When constructing a page, it is important to note that ERP forms connect to a MenuItemBean, which in turn links to a PageBean, which in turn contains many FieldBeans, as shown below.
Page 7 of 35
This model adapts nicely to customization. As indicated in Figure 7 and will be seen in the MSCA customizations examples, MSCA was designed to be customized by extending the base (or seeded) Java classes. The approach capitalizes on the characteristics of object oriented languages; in particular, Java.
Page 8 of 35
Note: Throughout this document MWA (Mobile Web Applications) and MSCA are used interchangeably. Bean APIs public void addListener(MWAListener) public void removeListener(MWAListener) Add a listener to event listener list Remove a listener from event listener list.
Note: oracle.apps.mwa.eventmodel.MWAListener is an Interface which handles the event and is derived from java.util.EventListener. Sub classes associated with the MWA Bean Menu Item Bean MenuItemBean is the base class for all user developed menu item level beans Commonly Used Menu Item Bean APIs public java.lang.String getFirstPageName() public void setFirstPageName(java.lang.String) public java.lang.String getMenuConfirmMessage() Get name of the first page within the menu item. Set name of the first page within the menu item. get the menu confirmation message
Page 9 of 35
set the menu confirmation message When the user tries to go to main menu, it asks for confirmation something like, Go to Menu?" This message can be changed using this method
Page Bean The PageBean is the base class for all user developed page level beans. Commonly Used Page Bean APIs public void addFieldBean(FieldBean) public void addFieldBean(int index,FieldBean) public void removeFieldBean(FieldBean) public String getName() public Session getSession() Add the bean at end of page Add the bean at specified index Removes the field bean from the page Get fully qualified class path of the page Get the session of page bean. The return type session(oracle.apps.mwa.container.Session) is derived from the class oracle.apps.mwa.container.BaseSession Sets the session for the page. Get the Page Title Set the Page Title
Flexfield Bean The FlexFieldBean is used to handle the Flex Field beans in Mobile Applications. This implements the following interfaces:
Commonly Used Flexfield APIs public oracle.apps.fnd.flexj.Flexfield getFlexfield() Returns the underlying FlexField or returns null on error protected Boolean addSegmentBean(oracle.apps.fnd.flexj.Segment add a segment to Flex field Seg) protected void removeSegmentBean(oracle.apps.fnd.flexj.Segment removes a segment Seg) Field Bean The FieldBean is the base class for all user developed field level beans. Examples of FieldBeans are TextFieldBean, ButtonFieldBean, LOVFieldBean, MultiListFieldBean, ListFieldBean, HeadingFieldBean, and SeparatorFieldBean.
Page 10 of 35
Commonly used Field Bean APIs public String getName() public void setName(java.lang.String) public String getPrompt() public void setPrompt(java.lang.String) public void setHidden(boolean) Get Unique Id for the field Set Unique Id for the field Get Label for the field. Set Label for the field. Make the field visible or not.
InputableFieldBean InputableFieldBean is the base class for all user developed field beans which has a value property to be inputable during "runtime". This class is the super class for Text field, Read only Text field, LOV field. The Commonly used APIs public void setEditable(boolean) Set whether the field is read only or not.
Page 11 of 35
public void Mandatory or not. setRequired(boolean Required) This is used to XXXer the case of the values entered by the user. For public void example, setXXXer ("U") makes the user input to Upper Case after the setXXXer(java.lang.String) user types in the value. public java.lang.String Get the value entered by the user getValue() public void Set the value in the field setValue(java.lang.String) public void Set data stream delimiter setBarcodeDelimiter(char) public int Get data stream delimiter getBarcodeDelimiter() public void Set The DFI - Data Field Indicator setDFIs(java.lang.String[] ) public java.lang.String[] Get the DFI getDFIs() public void Set the DFI required flag setDFIRequired(boolean) As indicated in the class diagram, Inputable beans have Text Field Bean and LOV field Bean as most commonly used subclasses. LOVFieldBean LOV is commonly used component in Oracle Applications. It provides the user with list of values and user has to choose one of them. The common requirements exist for constructing a LOV are: 1. Source for List of values (mostly an SQL query or an PLSQL procedure which returns the query result as REF CURSOR) 2. The various values associated with each selection (e.g., Emp Id, Emp Name, Department, Description) 3. The values displayed in the UI and values used in background (e.g., Usually EMP Name is displayed in the screen, not the EMP Id. But we get the Emp Id of selected Emp Name and use it for further processing) 4. Data types of each parameters passed to SQL Query or PLSQL procedure and their values(if we use bind parameters or IN parameters) 5. An array to get the values associated with the selected value by the user. 6. Criteria for validation check to be performed, if the user manually enters the value in the LOV field rather than selecting one by clicking "torch lite" icon, we can either validate it via an API or accept is just like that. Commonly Used APIs public java.lang.String getlovStatement() Get SQL query or PL/SQL procedure with a reference cursor output parameter. Page 12 of 35
public void setlovStatement(java.lang.String) public java.lang.String[] getSubfieldNames() public void setSubfieldNames(java.lang.String[]) public java.lang.String[] getSubfieldPrompts() public void setSubfieldPrompts(java.lang.String[]) public boolean[] getSubfieldDisplays()
Set SQL query or PL/SQL procedure with a reference cursor output parameter. get unique names of subfields of each value Set Key names of subfields. Get prompts of subfields. Set prompts of subfields. Get display properties of subfields. Set display properties of subfields. This controls which values are displayed in UI. For example, Empid is usually not displayed in UI though it is a part of the LOV)
public java.lang.String[] getInputParameterTypes() Get parameter data type list. Public void setInputParameterTypes(java.lang.String[]) public java.lang.String[] getInputParameters() public void setInputParameters(java.lang.String[]) public void setSelectedValues(java.util.Vector) public java.util.Vector getSelectedValues() public void setValue(java.lang.String) public void setValidateFromLOV(boolean) Set parameter data type list. Get input parameter list. Set input parameter list. Sets the return vector. obtain a vector of String values for the chosen LOV When we setValue we also have to clear the subfield values for this bean. Set the validateFromLOV property. (Default is true)
TextFieldBean The TextFieldBean is a common means of data input to mobile applications either via scanning a value or by manually typing in to it. This can also be used to display some values by making this field as read only so that user cannot edit or enter any value into this field. Commonly Used APIs public void setIsPassword(boolean IsPassword) Indicates the field to store a password.
HeadingFieldBean The HeadingFieldBean is the base class for all user developed heading field beans. This class is the bean class for two types of headings: HEADING1 and HEADING2. Default heading type is HEADING1. Heading Field is mainly used to set Titles for each regions of a Mobile page.
Page 13 of 35
Commonly used APIs public void setHeadingType(short) public short getAlignment() public void setAlignment(short) ListFieldBean The ListfieldBean is bean which holds a fixed list of values. In OAF, it is called as poplist. Please see the image below for a List Bean. Commonly used APIs public java.lang.String getValue() Get field value. public void setValue(java.lang.String Value) Set field value. public java.lang.String getListSource() public void setListSource(java.lang.String) public void setListSource(java.util.Vector) ButtonFieldBean The ButtonFieldBean is the base class for all user developed button field beans. This class is the bean class for button. Commonly used APIs public java.lang.String getNextPageName() public void setNextPageName(java.lang.String) Get block name of the block to be navigated after button is pressed. Set block name of the block to be navigated after button is pressed. Get list of options with each option separated by comma. Set list of options with each option separated by comma. Set list of options via a vector. Set the type of headings. Value of this property is either FieldBean.HEADING1 or FieldBean.HEADING2. return the heading alignment set the heading alignment value of this property is either HeadingFieldBean.LEFT or HeadingFieldBean.CENTER
*For those who are familiar with OAF, setNextPageName is something like SetForwardURL ()
Page 14 of 35
Referencing Figure 9, Query up the existing functions that suit your menu option and copy the data to a new form function. The WebHTML tab must be modified to point to the new Custom function pages. Also make certain that your new form function is pointed to by some menu structure.
a. Navigation: AK Developer ->Define Attributes b. Create record necessary information like Attribute ID, Attribute Name, Label, etc.
2. Define a Controller Before creating a region in AK Repository, we need to have a controller to associate to the AK Region. Following is a sample controller class for an AK Region package xxx.oracle.apps.inv.utilities; import oracle.apps.fnd.common.VersionInfo; public class CustomInvResourceTable { public CustomInvResourceTable() { } public static final String RCS_ID = "$PkgHeader:$"; public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion ()"$PkgHeader:$", "xxx.oracle.apps.inv.utilities"); public static final String AK_CAR_SIGN = "XXWMS_CAR_SIGN"; .............. } 3. Define a AK Region: a. Navigation: AK Developer ->Define Regions b. Create a record with Region Id, Region Name etc and associate the controller class which we created in the previous step.
Page 16 of 35
4. Link AK Regions and AK Attributes (Figure 11) a. Navigation: AK Developer ->Define Regions b. Click on Region Items Button
5.
Create new record and link the attribute(s) we created previously. If you plan to use the field as DFI, you have to define the DFI attributes in "Default Varchar2 Value" Column. For example, a value like "DFI=Q REQ=N" means that when a barcode is scanned on that field using the hand held mobile device, Q will be stripped from the barcode and the remaining value will be stored in the field. In this case, The Barcode should have the value like "Q123456" (see Figure 13).
Page 17 of 35
Using the AK Repository allows attribute and DFI values to be retrieved using the various MSCA APIs discussed earlier. Specific examples are provided in the Case Studies section of this document.
6. Within the Project Navigator, select the project you created, right mouse click on it, and select properties (see below).
7. The Project Properties pop-up window will appear (see Figure 8). From within the pop-up window, select Libraries from the categories region (left side) and then click the Add Jar/Folder button. This will open a file selection dialog window.
Page 20 of 35
8. From the file selection dialog window, navigate to and select the MSCALib folder and click Open. Then click OK from the Project Properties window. The class files you will likely need to reference in any new or modified Java classes will now be available.
Page 21 of 35
Repository and run queries to traverse the repository elements and get the name of the Java class file. A second way is a simple query that is as effective and a little quicker. The following is a query that takes a menu label (the actual text of the label) and returns information about the menu item including the underlying Java class file.
SELECT mev.prompt "Menu Prompt" ,ffv.function_name "Function" ,ffv.user_function_name "User Function" ,ffv.form_id ,ffv.web_host_name "MWA Host" ,ffv.web_html_call "Java Class" FROM fnd_form_functions_vl ffv, fnd_menu_entries_vl mev WHERE mev.function_id = ffv.function_id AND UPPER (ffv.function_name) LIKE '%' || UPPER (NVL (:functionname, ffv.function_name)) || '%' AND UPPER (ffv.user_function_name) LIKE '%' || UPPER (NVL (:userfunctionname, ffv.user_function_name)) || '%' AND UPPER (ffv.web_html_call) LIKE '%' || UPPER (NVL (:javaclassname, ffv.web_html_call)) || '%' AND UPPER (mev.prompt) LIKE '%' || UPPER (NVL (:menuprompt, mev.prompt)) || '%' ORDER BY user_function_name; Note: The above code was written using TOAD as a development tool. The query may require modification to run with other PL/SQL development tools.
Page 22 of 35
MSCA Button
Custom class files should be put in the directories that correspond to the class purpose as identified above.
6. Make the changes. 7. Test 8. If necessary, revise any documentation to reflect the As Built condition.
This is a relatively simple customization (thus the first case study). The following provides the details on the analysis and coding that occurred to complete the CR work. Create Test Data Sets To be able to understand current state and validate the To Be state, sales orders with various line configurations were created and released to the shop floor. The sales orders and configurations included:
Page 24 of 35
2095175 thru 2095177 several lines each with nothing being serialized 2095178 thru 2095180 several lines each with one line for item 970043293 serialized being one of them 2095181 thru 2095183 single line orders for 970043293
Identify the XXXXX Quick Pick Current State The key element of this change is the removal of the Query button. The function of the Query button is similar to the Serial Triggered button except the Query button is intended to process order lines where the items are not serialized and the Serial Triggered button performs the same functionality for order lines where the items are serialized. So, the very first thing that had to be done was to determine if the Serial Trigger would process serialized and unserialized line items. As it turns out, the Serial Triggered listener, which is actually accomplished in the page listener class, will process serialized and unserialized items. If this had not been the case, the customization would have been considerably more complex. To analyze the current state, it was necessary to traverse the menus and forms and document the process flow from MSCA Form and Java Classes perspective as follows: 1. Start the MWA Telnet Server in the XXXD environment. $ su - applXXXd Password: $ cd $MWA_TOP/bin $ startMWA starting MWA Telnet Port $ MWA Telnet Server Release: 1.0.8.4 [December 12th 2002] Created server socket : listening on port 10302 Server startup is successful. $ 2. Telnet to and login to MSCA (use regular Oracle credentials). Telnet to: telnet cosuaor20 10302 Select handheld Device Select responsibility Navigate to XXXXX Quick Pick function
Login to MSCA
Page 25 of 35
3. Identify the Java class files associated with each of the functions /forms.
Function XXXXX Quick Pick XXXXX Quick Pick Form N/A N/A N/A N/A
Note:
Method to Determine Class Query (see User Guide) Ctrl-x (see Users Guide) Code Review Code Review Code Review Code Review
In this customization, only one class will be modified. However, it is necessary to review all related class files to ensure the change being made will not adversely affect and other application functionality.
Page 26 of 35
Document and Build the Required Changes The code change associated with this customization was a simple modification to the previously built custom class XXXXXQueryPickWavePage and are shown below: //----- CR 15202 Approved Change Request //----- Remove all of the buttons from the page. Then recreate the Serial //----- Triggered button and the Cancel button with the cancel button below //----- Serial Triggered. Then change the prompt on the Serial Triggerd button //----- to Process Line. removeFieldBean(mQueryBtn); removeFieldBean(mCancelBtn); removeFieldBean(mSeriXXXriggeredBtn); addFieldBean(mSeriXXXriggeredBtn); addFieldBean(mCancelBtn); mSeriXXXriggeredBtn.setPrompt("Process Line"); //----------
Page 27 of 35
Case 2: Addition of extra fields on Quick Ship Page to collect FOB terms, freight terms, and document shipset
This is a case study published by Oracle on Customizing MSCA in 2002. The code modifications and additions are included as additional reference information. In this case study, Oracle followed the intent of the customization steps previously identified but not in complete detail. Understand the Functional Requirement A large computer manufacturer would like to add extra fields on the quick ship page and therefore allow their mobile shipping employees to scan this extra information at time of using the LPN Quick Ship page provided by Oracle. In order to do this, the custom code developer must extend the existing base class and add additional fields. For this case, it is best to examine the custom source code and analyze the changes made. From a high level, first the developer will create the three necessary fields that extend from INVFieldBean. Identify the Quick Ship Current State
Page 28 of 35
Code Changes and Additions The following code segments are associated with the Quick Ship customization. XXXhough the functional requirement specifies three additional LOVs will be created, it is not necessary to include the code for all three in this Developers Guide. Instead, one complete set of code for one additional LOV (DocumentShipSetLOV) is included. Create DocumentShipSetLOV Java Class Note that the package for the custom LOV will reside in the $JAVA_TOP directory structure identified in the package definition. This is where all standard and custom LOV classes reside.
package oracle.apps.inv.lov.server; import java.sql.SQLException; import java.util.Vector; import oracle.apps.fnd.common.VersionInfo; import oracle.apps.inv.utilities.InvResourceTable; import oracle.apps.inv.utilities.server.UtilFns; import oracle.apps.mwa.beans.*; import oracle.apps.mwa.container.MWALib; import oracle.apps.mwa.container.Session; import oracle.apps.mwa.eventmodel.*; // Referenced classes of package oracle.apps.inv.lov.server: // InvLOVFieldBean public class DocumentShipSetLOV extends InvLOVFieldBean implements MWAFieldListener { private String mDocumentShipSetCode; private String mDocumentShipSetMeaning; private String mDocumentShipSetDesc; private static String namePrompt = ""; private static String descPrompt = ""; public DocumentShipSetLOV() { super(); setName("INV.DocumentShipSet"); setlovStatement("XXCS_WMS_UTIL.GET_SHIP_DOCS"); String paramTypes[] = {"C", "S"};
Page 29 of 35
this.setInputParameterTypes(paramTypes); boolean[] displays = {true, true, false}; this.setSubfieldDisplays(displays); this.setRequired(false); this.setHidden(false); this.setValidateFromLOV(true); String[] subprompts = {"A", "A", "A"}; setSubfieldPrompts(subprompts); addListener(this); } public void fieldEntered(MWAEvent e) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException { UtilFns.log("DocumentShipSet: fieldEntered"); setSubPrompts(e.getSession()); } public void fieldExited(MWAEvent e) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException { Session ses = e.getSession(); UtilFns.log ("DocumentShipSetLOV: fieldExited" + this.getValue() + "."); if (e.getAction().equals("MWA_SUBMIT")) { try { this.setReturnValues(); } catch (Exception exception) { UtilFns.log("Exception in DocumentShipSetLOV - fieldExited" + exception); throw new AbortHandlerException("Exception in DocumentShipSetLOV - fieldExited" + exception); } } } private void setReturnValues() { Vector vector = this.getSelectedValues(); if (vector != null) { this.mDocumentShipSetCode = (String) vector.elementAt(2); this.mDocumentShipSetMeaning = (String) vector.elementAt(0); this.mDocumentShipSetDesc = (String) vector.elementAt(1); } } public void clear() { this.setValue(""); this.mDocumentShipSetCode = ""; this.mDocumentShipSetMeaning = ""; this.mDocumentShipSetDesc = ""; } public String getDocumentShipSetCode() { return this.mDocumentShipSetCode; } public String getDocumentShipSetMeaning() { return this.mDocumentShipSetMeaning; } public String getDocumentShipSetDesc() { return this.mDocumentShipSetDesc; } public void setSubPrompts(Session session) { if (namePrompt.equals("")) {
Page 30 of 35
try { namePrompt = "DocumentShipSetPrompt"; descPrompt = "DocumentShipSetDescription"; } catch (Exception sqlexception) { UtilFns.error("Error initialising the lov propmts for DocumentShipSet Lov", sqlexception); } } String[] subprompts = {namePrompt, descPrompt, "A"}; setSubfieldPrompts(subprompts); } }
Create CustomEZShipFunction Java Class As was described in the theory a custom function is class is needed which the Function Definition in EBS will point to. The following code segment creates that class. package oracle.apps.inv.wshtxn.server; import oracle.apps.mwa.beans.*; import oracle.apps.mwa.container.*; import oracle.apps.mwa.eventmodel.*; import oracle.apps.fnd.common.VersionInfo; import oracle.apps.inv.utilities.server.*; public class CustomEZShpFunction extends EZShpFunction implements MWAAppListener { public CustomEZShpFunction() { super(); setFirstPageName("oracle.apps.inv.wshtxn.server.CustomEasyShipPage"); } } Create CustomEZShipPage Java Class This class extends the base EZShipPage class to add the additional LOV. Again, note the package definition which corresponds to the $JAVA_TOP directory structure where the custom class needs to reside.
package oracle.apps.inv.wshtxn.server; import oracle.apps.mwa.beans.*; import oracle.apps.mwa.container.*; import oracle.apps.mwa.eventmodel.*; import oracle.apps.fnd.common.VersionInfo; import oracle.apps.inv.lov.server.CarrierLOV; import oracle.apps.inv.lov.server.ShipMethodLOV; import oracle.apps.inv.lov.server.DeliveryLOV; import oracle.apps.inv.lov.server.UomLOV; import oracle.apps.inv.utilities.*; import oracle.apps.inv.utilities.server.*; import oracle.apps.mwa.presentation.telnet.*; import oracle.apps.inv.lov.server.*; import java.sql.*; import java.lang.*; import java.util.Vector;
Page 31 of 35
/** * EasyShipPage.java */ public class CustomEasyShipPage extends EasyShipPage implements MWAPageListener { FreightTermsLOV mFreightTermsLOV; FOBCodeLOV mFOBCodeLOV; DocumentShipSetLOV mDocumentShipSetLOV; TextFieldBean NumberOfLPNField, additionalInfoField; public CustomEasyShipPage(Session s) { super(s); } public void pageExited(MWAEvent e) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException { } public void pageEntered(MWAEvent e) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException { super.pageEntered(e); //Be sure to set inputparameters, otherwise LOV will popup everytime field exited. String[] deliveryInputs = {" ", "oracle.apps.inv.wshtxn.server.CustomEasyShipPage.EasyShip.Delivery", "ORGID"}; mDeliveryLOV.setInputParameters(deliveryInputs); String[] ShipMethodInputs = {" ", "ORGID", "oracle.apps.inv.wshtxn.server.CustomEasyShipPage.EasyShip.ShipMethod"}; mShipMethodLOV.setInputParameters(ShipMethodInputs); //Add new Field NumberOfLPNField = new TextFieldBean(); NumberOfLPNField.setName("NumberOfLPN"); NumberOfLPNField.setPrompt("# LPN's"); addFieldBean(5, NumberOfLPNField); //Add LOV Field mFreightTermsLOV = new FreightTermsLOV(); mFreightTermsLOV.setName("FreightTerms"); mFreightTermsLOV.setPrompt("Freight Terms"); String[] FreightTermsInputs = {" ", "ORGID", "oracle.apps.inv.wshtxn.server.CustomEasyShipPage.FreightTerms"}; mFreightTermsLOV.setInputParameters(FreightTermsInputs); mFreightTermsLOV.setRequired(false); mFreightTermsLOV.addListener(this); addFieldBean(6, mFreightTermsLOV); //Add new Field additionalInfoField = new TextFieldBean(); additionalInfoField.setName("AdditionalInformation"); additionalInfoField.setPrompt("Add Info"); addFieldBean(7, additionalInfoField); //Add LOV Field mFOBCodeLOV = new FOBCodeLOV(); mFOBCodeLOV.setName("FOB"); mFOBCodeLOV.setPrompt("FOB"); String[] FOBCodeInputs = {" ", "ORGID", "oracle.apps.inv.wshtxn.server.CustomEasyShipPage.FOB"}; mFOBCodeLOV.setInputParameters(FOBCodeInputs); mFOBCodeLOV.setRequired(false); mFOBCodeLOV.addListener(this); addFieldBean(8, mFOBCodeLOV); //Add LOV Field mDocumentShipSetLOV = new DocumentShipSetLOV(); mDocumentShipSetLOV.setName("DocumentShipSet"); mDocumentShipSetLOV.setPrompt("Doc Set"); String[] DocumentShipSetInputs = {" ", "oracle.apps.inv.wshtxn.server.CustomEasyShipPage.DocumentShipSet"}; mDocumentShipSetLOV.setInputParameters(DocumentShipSetInputs);
Page 32 of 35
mDocumentShipSetLOV.setRequired(false); mDocumentShipSetLOV.addListener(this); addFieldBean(9, mDocumentShipSetLOV); //get the handle of the Done button field bean Vector v = getFieldBeanList(); FieldBean doneButton = (FieldBean) v.elementAt(10); FieldBean deliveryID = (FieldBean) v.elementAt(0); //create custom listener and add it to Deliveryid CustomDeliveryListener cdl = new CustomDeliveryListener(); deliveryID.addListener(cdl); //create custom listener and add it to Done button CustomRcvDoneListener crdl = new CustomRcvDoneListener(); doneButton.addListener(crdl); } }
Page 33 of 35
Index
$
$JAVA_TOP, 19, 23, 29, 31 F3
F
Back Key, 22 Field Bean, 11 Field Bean Sub-class Diagram, 11 FieldBean, 7 FieldEntered, 8 FieldExited, 8 FlexFieldBean, 10 form functions In MSCA, 14 framework. See Application Framework
A
Add Jar/Folder, 20 addFieldBean, 10 addListener, 9 addSegmentBean, 10 AK Repository, 15 AppEntered, 8 AppExited, 8 Application Framework, 7 Applications Flow, 7 attribute In AK Repository, 18
G
general approach to Customizing MSCA, 23 getAlignment, 14 getBarcodeDelimiter, 12 getDFIs, 12 getFirstPageName, 9 getFlexfield, 10 getInputParameters, 13 getInputParameterTypes, 13 getlovStatement, 12 getMenuConfirmMessage, 9 getName, 10, 11 getNextPageName ButtonFieldBean, 14 getPrompt, 10, 11 getSelectedValues, 13 getSession, 10 getSubfieldDisplays, 13 getSubfieldNames, 13 getSubfieldPrompts, 13 getValue, 12 ListFieldBean, 14 GUI, 6
B
back key F3, 22 best practices w.r.t Customizing MSCA, 18 ButtonFieldBean, 14
C
Character Mode, 6 Class Types and Locations, 23 Controller In AK Repository, 16 Create Labels In AK Repository, 15 CTRL-G, 8 ctrl-x, 22
D
Define a AK Region, 16 Defining Labels In AK Repository, 15 Development Environment setting up, 18
H
HeadingFieldBean, 13 Hot Keys, 22
E
Event-Listener Model, 8 IDE, 19
Page 34 of 35
J
JDeveloper, 18 JDK, 19
L
Link AK Regions, 17 ListfieldBean, 14 LOVFieldBean, 12
M
MenuItemBean, 7 Mobile Supply Chain Applications, 5
N
NetBeans, 18
P
PageBean, 7 PageEntered, 8 PageExited, 8
setDFIs, 12 setEditable, 11 setFirstPageName, 9 setHeadingType, 14 setHidden, 11 setInputParameters, 13 setInputParameterTypes, 13 setIsPassword, 13 setlovStatement, 13 setMenuConfirmMessage, 10 setName, 11 setNextPageName ButtonFieldBean, 14 setPrompt, 10, 11 setRequired, 12 setSelectedValues, 13 setSession, 10 setSubfieldDisplays, 13 setSubfieldNames, 13 setSubfieldPrompts, 13 setValidateFromLOV, 13 setValue, 12, 13 SpecialKeyPressed, 8 startMWA, 21 stopMWA, 21
R
REF CURSOR, 12 removeFieldBean, 10 removeListener, 9 removeSegmentBean, 10 RF, 5 TCP/IP, 5 Telnet, 5 TextFieldBean, 13
U S
UI, 6 User Interface, 6
W
WebHTML, 15
Page 35 of 35