Está en la página 1de 64

Basics Of Oracle Apps Training Material (Step by Step Learning of Oracle Apps)

What happens when you login to Oracle Apps? Why is it called apps? What is a profile option? What is org_id. Why is it important. Relationship between Applications and Modules Where to find/deploy the code (Forms tier/Middle tier or DB Tier) The testing cycle in Oracle Apps Difference between forms and form functions and menu What is a Concurrent Program What is concurrent Manager What is a Value set What is a lookup in oracle apps How does lookup differ from Value Sets Descriptive Flex field Basics in Oracle Apps How to make context sensitive descriptive flexfields ( step by step) Key Flex fields Basics Setting up your PC for development environment Your first custom form from scratch Your first pl/sql concurrent program from scratch Oracle FNDLOAD Script Examples Restart or Bounce Apache in Oracle Apps 11i Playing with CUSTOM.pll Read Only Schema in Oracle APPS 11i Create Oracle FND_USER with System Administrator ( Using Script ) A New Custom Form in Oracle Apps Forms Customization Steps in Oracle Applications Reports Customization Steps in Oracle Applications Your first Migration program in Apps. Migrate Customers FNDLOAD for Oracle Web ADI API to Update FND_USER and Add Responsibility Forms Personalization Example 1 Various Examples of Forms Personalizations [ Everything that you wanted to know about FP ] Oracle Fusion Development Tools Debugging In Oracle Applications XML Publisher Concurrent Program Report Audit Trail in Oracle Apps Hierarchy Profile Options in Oracle Apps

Design and Development of Open Interfaces in Oracle Apps Customization of Reports in Oracle Apps How to find the Request Group for Concurrent program Smart Descriptive Flex fields Using XML Publisher with Pre-Printed Stationary Procure to Pay, Order to Cash, End to End Cycle Functional Documents What happens when you login to Apps? Firstly and surely there is a URL for oracle applications that is structured possibly in below format, although it can vary from version of apps. http://machinename:portnumber/OA_HTML/US/ICXINDEX.htm http://machinename:portnumber /oa_servlets/AppsLogin When you join an Oracle Apps development team for an employer, you will first be given URL of the development environment. In any Oracle Apps implementation project (assuming it has gone live), there are minimum of three environments, each with different URL's and different database instances. These are:--------------Development environment Testing environment Production environment You will most probably, as a techie, be given url,username ad password of the development environment. What happens when you login(no advanced info here):-------------------------------------A. Your login gets authenticated against a table named fnd_user for your username and password. The screen below is where username and password defined. This screen is called user definition screen. Only system administrators have access to this screen. B. As you can see above, this username xxpassi is attached to two responsibilities (this will be discussed in details in latter training lesson). It is this assignment to the responsibility that controls what a logged in person can do and can't do. In laymans words, a responsibility is a group of menu.

C. When you successfully login you will see below screens. This screen below will prompt you to change your password, to a value different than that assigned by System Administrator.

Click on either of the above Responsibility Names, will initiate Oracle Apps( Note: You might be prompted to install jinitiator..just keep clicking OKOK for all Jinitiator messages). Effectively, what I mean to say is that you do not need to download jinitiator from anywhere; Oracle will do this automatically (provided your DBAs got this cofiged) for you during your first logon attempt from the PC. Once your jInitiator gets installed

Hurray, we have logged into apps. Some notes on advanced info (beginners may ignore this): Oracle internally uses a login named GUEST, prior to invoking validation of actual username. Some people regard this as a security threat, but it isnt. Your DBAs can change the guest password from its default value after installation. Oracle uses a DB User account named applsyspub to which it first connects during validation of LOGIN. This user account has very restricted privileges and has access to below objects (primarily for authentication purposes):FND_APPLICATION FND_UNSUCCESSFUL_LOGINS FND_SESSIONS FND_PRODUCT_INSTALLATIONS FND_PRODUCT_GROUPS FND_MESSAGES FND_LANGUAGES_TL FND_APPLICATION_TL FND_APPLICATION_VL FND_LANGUAGES_VL FND_SIGNON FND_PUB_MESSAGE FND_WEBFILEPUB FND_DISCONNECTED FND_MESSAGE FND_SECURITY_PKG FND_LOOKUPS Why call it Apps and not Oracle ERP ? Ever wondered why is Oracles eBusiness Suite nicknamed apps? Is it just the short name of Oracle Applications? Possibly yes, however this question is an excuse for me to explain to you the evolution of APPS schema. I started working in Oracle Financials 9 years ago. Those days each module had its own database schema(which we still have). However, a purchasing user (until version 10.6) used to connect to PO schema (by the virtue of the screen being a PO screen).

Hence, if a report or screen of AR ( Oracle Receivables ) module wanted to access a table named PO_HEADERS_ALL, they would then use notation PO.PO_HEADERS_ALL However, now we have several database schemas(in most cases one schema per module). The tables are still owned by their respective schema, but now we have a central schema named APPS. Oracle ERP simply connects to APPS database schema for all its operations(with a couple of exceptions that are best ignored for now). Hence, if Oracle wants to create anew table named PO_HEADERS_ALL, they will do the following Step 1. Connect to po/po@XX_DEVDB Create table PO_HEADERS_ALL ( ...all columns here ) Step2. Grant all on po_headers_all to apps ; Step 3. connect to apps/apps@XX_DEVDB Create or replace synonym PO_HEADERS_ALL for PO.PO_HEADERS_ALL By following the above steps, as you can see, APPS schema is able to access PO_HEADERS_ALL without the notation po.po_headers_all In Oracle ERP, now we have 100s of schemas, example po, ar, ap, gl etc. But the screens, reports, workflows etc in Oracle Applications connect to APPS schema only. Just like saying, ALL ROADS LEAD TO ROME. Here, all schema lead to APPS. Hence if you have a pseudo report that joins ap_invoices_all table( in AP schema) to PO_HEADERS_ALL table( in AP schema), you will simply need to do the below once connected to APPS. Selelct 'x from po_headers_all p, ap_invoices_all a where a.po_Id = p.po_Id Note, prior to version 10.6(of Oracle ERP not database version), one had to do Selelct 'x from PO.po_headers_all p, AP.ap_invoices_all a where a.po_Id = p.po_Id Note: To keep matters simple, I havent considered org_Id in this example. Org_Id will be covered in one of the following chapters ( have a look at index). Moral of the Story is:All the pl/sql packages will be created in APPS Schema All the views will be created in APPS Schema For each table in individual schema, there will exist one synonym in APPS schema Tables are not created in APPS schema. Every implementation has at least 1 custom schema, where custom tables are created. For each custom table created by you, you will need to create a Synonym in APPS schema As a developer, you will either connect to APPS Schema or to the custom schema where you will create new tables. Some notes:Custom tables are generally required in Oracle ERP because:1. You wish to create a custom screens ( your own screen to capture some info) for a functionality that is not delivered by Oracle 2. Pre-Interface tables ( Interface will certainly be discussed in one of the latter chapters) 3. Temp processing 4. Staging of data for third party extract interfaces.and much more

What are Profile Options in Oracle Apps ? Profile Options provide flexibility to Oracle Apps. They are a key component of Oracle Applications, hence these much be understood properly. I will be taking multiple examples here to explain what profile options mean. I will also try to explain by stepping into Oracle shoes "How will you design a program that is flexible", by using Profile Options. Following that, if you still have questions regarding profile options, then leave a comment and I promise to respond. For the learners of Oracle Apps, understanding profile options is mandatory. What is profile option? The profile option acts like a Global Variable in Oracle. Why does Oracle provide profile options? These are provided to keep the application flexible. The business rules in various countries and various companies can be different. Hence the profile options are delivered by Oracle in such a manner to avoid hard-coding of logic, and to let the implementation team at site decide the values of those variables. Enough definitions, give me some scenarios where profile options are used by Oracle.... 1. There are profile options which can turn the debugging on, to generate debug messages. Say one of 1000 users reports a problem, and hence you wish to enable debugging against just that specific user. In this case you can Turn On the debugging profile option "again that specific user". 2. There are profile options that control which user can give discount to their customers at the time of data entry. You can set profile option "Discount Allowed" to a value of either Yes or No against each Order Entry user. 3. Lets assume an Organization has department D1 and D2. Managers of both the Departments have "HRMS Employee View" responsibility. But you do not want Manager of D2 to be able to see the list of Employees in Organization D1. Hence you can set a profile option against the username of each of these users. The value assigned to such profile option will be "Name of the Organization" for which they can see the employees. Of course, the SQL in screen that displays list of employees will filter off the data based on logged in users profile option value. Lets take an example. Lets assume you are a developer in Oracle Corporation building a screen in ERP. Let us further assume that you are developing an Order Entry screen. Assume that business requirements for your development work is:1. Screen should be flexible to ensure that different users of the screen can give different levels of discounts. For example, a clerk Order Entry User can give no more than 5% discount. But Sales Manager can enter an Order with 15% discount. 2. There should not be any hard-coding regarding the maximum permissible discount. 3. In the screen there will be a discount field. 4. When the discount value is entered in discount field, an error will be raised if user violates the maximum permissible discount. Here is how Oracle will code this screen 1. They will define a profile option named "OEPASSI Maximum Discount Allowed". 2. The short name of this profile option is "OEPASSI_MAX_DISCOUNT" 2. In the when-validate-item of the discount field(assuming Oracle Forms), following code will be written IF :oe_line_block.discount_value > fnd_profile.value('OEPASSI_MAX_DISCOUNT') THEN message( 'You cant give discount more than ' || fnd_profile.value('OEPASSI_MAX_DISCOUNT') || '%' ) ; raise form_trigger_failure ;-- I mean raise error after showing message END IF ; Here is how, the client implementing Oracle Order Entry will configure their system. 1. Navigate to System administration and click on system profile menu. 2. For Clerk User(JOHN), set value of profile "OEPASSI Maximum Discount Allowed" to 5

For Sales Manager User(SMITH), set value of profile "OEPASSI Maximum Discount Allowed" to 15 Question: This sounds good, but what if you have 500 Order Entry Clerks and 100 Order Entry Sales Managers? Do we have to assign profile option values to each 600 users? Answer : Well, in this case, each Clerk will be assigned Responsibility named say XX Order Entry Clerk Responsibility Each Sales Manager will be assigned Responsibility named say XX Order Entry Sales Manager Responsibility In this case, you can assign a profile option value to both these responsibilities. XX Order Entry Clerk Responsibility will have a value 5% assigned against it. However, XX Order Entry Sales Manager Responsibility will have a profile option value of 15% assigned. In the when-validate-item of the discount field, following code will then be written IF :oe_line_block.discount_value > fnd_profile.value('OEPASSI_MAX_DISCOUNT') THEN message( 'You cant give discount more than ' || fnd_profile.value('OEPASSI_MAX_DISCOUNT') || '%' ) ; raise form_trigger_failure ;-- I mean raise error after showing message END IF ; Please note that our coding style does not change even though the profile option is now being assigned against responsibility. The reason is that API fnd_profile.value will follow logic similar to below. Does Profile option value exist against User? --Yes: Use the profile option value defined against the user. --No: Does Profile option value exist against Responsibility -----Yes: Use the profile option value defined against the current responsibility in which user has logged into. -----No: Use the profile option value defined against Site level.

Profile Options Examples Screenshots You have reached this page from Profile Options Training Article Firstly, lets define the responsibility for Clerk, as we discussed in Article.

Next, lets define the sales manager responsibility, as we discussed in Article.

Lets define user JOHN, that is Clerk

And also, lets define user SMITH ( Sales manager )

Now, we need to define the profile option for discount, hence go to responsibility "Application Developer"

When you click on menu "Profile" above, you will then see below screen for defining profile option. Please note that the "Name" field is the short name of profile option, and it is this name used in API call to FND_PROFILE.value

Now, after having defined a profile option, its time to assign these to JOHN & SMITH. Hence go to responsibility "System Administrator"

Click on Menu Profile/System, as below

The profile option assignment screen looks like below. Enter JOHN in USER, OEPASSI% in Profile, to select profile named "OEPASSI Maximum Discount Allowed"

Assign a value of 5 to the user.

Click on torch, to return to search screen as below

and this time we will assign value of 15 against user SMITH.

OK, what if we have too many clerks, we can also simply assign profile value to Responsibility of Clerk. Doing so, all the users that use this responsibility, will inherit profile option value against Responsibility.

10

Assign 5% max discount for Clerks

Now, lets sel ect Sales Manager responsibility in profile screen

Search on this...as below......

11

Assign value 15% to Sales Manager responsibility.

That's it for setup. Any questions? leave your question by click on link Leave Comment for this article Thanks Anil Passi <!--[if !vml]--><!--[endif]--> ORG_ID and Multi Org In Oracle Apps In this Oracle Apps training article, we will learn about org_id. I hope that you have read and understood the significance of profile options that we discussed in the earlier chapter. Before I tell you what is org_id, lets do some questions & answers:Why do we need org_id In any global company, there will be different company locations that are autonomous in their back office operations. For example, lets take the example of a gaming company named GameGold Inc that has operations in both UK and France. Please note the following carefully:1. This company(GameGold Inc) has offices in both London and Paris 2. UK has different taxation rules that France, and hence different tax codes are defined for these countries. 3.GameGold Inc has implemented Oracle Apps in single instance(one common Oracle Apps database for both UK & France). 4. When "UK order entry" or "UK Payables" user logs into Oracle Apps, they do not wish to see tax codes for their French sister company. This is important because French tax codes are not applicable to UK business. 5. Given the single database instance of GameGold Inc, there is just one table that holds list of taxes. Lets assume that the name of the Oracle table is ap_tax_codes_all 6. Lets assume there are two records in this table. Record 1 tax code -"FRVAT" Record 2 tax code - "UKVAT" 7. Lets further assume that there are two responsibilities Responsibility 1 - "French order entry". Responsibility 2 - "UK order entry" 8. Now, users in France are assigned responsibility 1 - "French order entry" 9. Users in UK will be using responsibility named "UK order entry" 10. In the Order Entry screen, there is a field named Tax Code(or VAT Code).

12

11. To the French user, from the vat field in screen, in list of values UKVAT must not be visible. 12. Also, the "French order entry" user should only be able to select "FRVAT" in the tax field. 13. Similarly, UK order entry user, that uses responsibility "UK Order Entry", only "UKVAT" should be pickable. How can all this be achieved, without any hard coding in the screen. Well....the answer is org_id ORG_ID/Multi-Org/Operating Unit are the terminologies that get used interchangeably. In brief steps, first the setup required to support this.... The screenshots are at the bottom of the article 1. You will be defining two organizations in apps named "French operations" and "UK Operations". This can be done by using organization definition screen. 2. In Oracle Apps, an organization can be classified as HRMS Org, or Inventory Warehouse Org, or Business Group, Operating Unit Org or much more types. Remember, Organization type is just a mean of tagging a flag to an organization definition. 3. The two organizations we define here will be of type operating unit. I will be using words org_Id & operating unit interchangeably. 4. Lets say, uk org has an internal organization_I'd =101 And french org has orgid =102. Qns: How will you establish a relation betwee uk responsibility and uk organization. Ans: By setting profile option MO : Operating unit to a value of UK Org, against uk order entry responsibility Qns: How will the system know that UKVAT belongs to uk org? Ans: In VAT code entry screen(where Tax Codes will be entered), following insert will be done Insert into ap_vat_codes_all values(:screenblock.vatfield, fnd_profile.value('org_id'). Alternately, use USERENV('CLIENT_INFO') Next question, when displaying VAT Codes in LOV, will oracle do: select * from ap_vat_codes_all where org_id=fnd_profile.value('ORG_ID')? Answer: almost yes. Oracle will do the following 1. At the tme of inserting data into multi-org table, it will do insert into (vatcode,org_id) .... 2. Creates a view in apps as below Create or replace view ap_vat_codes as Select * from ap_vat_codes_all where org_id = fnd_profile.value('ORG_ID') 3. In the lov, select * from ap_vat_codes , If the above doesn't make sense, then keep reading. May be quick revesion is necessary:_ 1. In multi org environment(like uk + france in one db), each Multi-Org Table will have a column named org_id. Tables like invoices are org sensitive, because UK has no purpose to see and modify french invoices. Hence a invoice table is a candidate for ORG_ID column. By doing so, UK Responsibities will filter just UK Invoices. This is possible because in Apps, Invoice screens will use ap_invoices in their query and not AP_INVOICES_ALL. 2. Vendor Sites/Locations are partitined too, because UK will place its ordersfrom dell.co.uk whereas france will raise orders from dell.co.fr. These are called vendor sites in Oracle Terminology. 3. Any table that is mutli-org (has column named org_id), then such table name will end with _all 4. For each _all table , Oracle provides a correspondong view without _all. For examples create or replace view xx_invoices as select * from xx_invoices_all where org_id=fnd _profile.value('org_id'). 5. At the time of inserting records in such table, org_id column will always be populated. 6. If you ever wish to report across all operating units, then select from _all table. 7. _all object in APPS will be a synonym to the corresponding _all table in actual schema. For example po_headers_all in apps schema is a synonym for po_headers_all in PO schema. 8. When you connect to SQL*Plus do the below connect apps/apps@dbapps ;

13

--assuming 101 is French Org Id execute dbms_application_info.set_client_info ( 101 ); select tax_code from ap_tax_codes ; ---Returns FRVAT --assuming 102 is UKOrg Id execute dbms_application_info.set_client_info ( 102 ); select tax_code from ap_tax_codes ; ---Returns UKVAT Now some screenshots

14

Applications in Oracle Apps In this training chapter I will explain what Application means, in Oracles context. As a thumbrule, for one module there is one single application. Uptill 8 years ago, it was mandatory for each table to be registered against an Application in Oracle Financials; but now such a relation no longer exist. Oracle is a mixture of various applications like Payables, General Ledger, Payroll, Human Resources, manufacturing. You can call these modules, but officially these are called applications. Hence the name Oracle Applications(i think) Is there a relation between application and table:Indirectly/logically there is, as the table is owned by a specific schema, and then a schema is related to an Application( though logically, as this relation is not enforced by the System).

15

What precautions do I take when creating a new table in oracle apps:Ans: Find out from DBA's the schema in which your custom tables are meant to be created. Create the desired table in custom schema. Note: If your custom table will support multi-org, then its name must finish with _all and also it must have a integer column named org_id Qns: For an Oracle Apps developer, what else must be the consideration with respect to Application. Ans: I will jump the training ship to explain this. In case you do not understand, then wait for the training lesson on concurrent programs. a. Each program has an executable. For example reports have rdf, sql*plus has .sql file, forms has .fmx, Unix Shell Script has .prog(in apps) & D2k libraries have .plx b. When you register an executable with Oracle Apps, you must then register this against an Application. c. Each application is mapped to a specific path,say to a directory in unix box. For example, Applicaton XXPO (that holds PO Customizations) may map to /home/oracle/apps/appl/po d. Say you have developed/customized a report for PO Module. Assume your report executable name is XXPOPRINT.rdf . If you register this executable with XXPO applicaton, then this rdf must be copied/ftp'ed to /home/oracle/apps/appl/po e. When running this report in Oracle Apps, oracle will ask below series of questions to itself I see that user is running XXPOPRINT.rdf, which applicaton is this report registered against? Oh well, it is XXPO application, then where is the directory location where I can expect to find this file? Oh ok, application definition of XXPO is mapped to /home/oracle/apps/appl/po (as per application definition), hence lets pick the rdf from /home/oracle/apps/appl/po/reports/US Here lies the significance of applicaton in oracle apps. Now some notes:1. Profile options can be defined at application level too. 2. All the Forms & Reports are attached to an Application. 3. Each application has a base path, which effectively is also the Environment variable on operating system. The below image can be clicked to see how applications are defined in Oracle Apps. One needs to navigate to System Administrator responsibilotu. and select Menu /Application/Register. As a developer, it is not your responsibility to define this, however I suggest that you understand this well.

Oracle Apps Deployment Training When you are a fresh new Oracle Apps developer, your fundamental question is...where to find the piece of code that you are being asked to customize? Before I begin to explain you this, first some fundamentals. 1. You will most likely find that any implementation of oracle apps will involve at least two machines, i.e. Database tier and then at least one web tier. 2. Oracle thought very logically to decide which executable runs on database tier and which on web/forms tier(also known as mid-tier). Any executable that has intense database operations is stored at database tier. To give you some examples.... sql files, oracle report java concurrent programs, sql*loader are all deployed in database tier of

16

Oracle Applications. 3. Any executable that has intense UI operations is deployed at forms tier. Examples are Oracle Forms fmx files, jsp files, pll/plx etc. Qns: The above sounds good in most cases, but what if you have to build a form that has intense database processing. Ans: Well the form will still be deployed in the mid-tier, otherwise your form will never be run. However, for such forms, you must handle most of the database processing within pl/sql packages. The api's that you build in pl/sql must have well defined parameters. I am saddened to see that some apps programmers write tons of sql code/DMLs inside the oracle forms triggers. In this era of high speed networks, such aproach may be justified to an extent, but what if some other developer desires to use validations developed for your form in other areas of apps.? Hence building pl/sql api's is the preferred approach. Qns: Why do we have multiple middle tiers for one database. Ans: Most implementations install multiple mid-tiers to distribute the user load. The user requests are first sent to a load balancer switch, this switch the decides which middle tier to use. Hence, if one server has 1000 user cpacity, then you can have 5mid tiers to handle 5000 concurrent users. Qns: That's fine for the theory, but how do multiple mid-tiers impact my forms deployment? Ans: You will need to deploy your forms file to each middle tier machine (unles shared APPL_TOP) has been implemented. Qns: Where do I pick the fmb files delivered by oracle? Ans: These are picked from $AU_TOP/forms/us Qns: Where do I deploy the fmx file on mid tier, assuming a purchasing screen has been customized. Ans: This will be deployed at $XXPO_TOP/forms/us Basically by deployment I mean that fmx file will be copied to xxpo_top/forms/us Have you read the previous article on applications? Qns: Where do I deploy a pl/sql package? Ans: All of the pl/sql packages are installed in apps schema. This includes your custom packages and also oracle delivered packages. Qns: Ehere do we create the database views? Ans: Views will be created in apps schema too. Qns: How do I generate fmx, should this be done on pc or on the mid tier? Ans: This must always be done on the mid tier For example use below steps Step 1 FORMS60_PATH=$FORMS60_PATH:$AU_TOP/forms/US Step 2 export FORMS60_PATH Step 3 cd $XXPO_TOP/forms/US Step 4 ----Below in one single line f60gen module=XXPOSCREEN.fmb userid=apps/apps module_type=form batch=no compile_all=special Qns:I have deployed the form at $XXPO_TOP but I can't run it,I get message can not find form Ans: Firstly find out the application to which this form is registered against. In reality the forms are attached to form functions and it is the form function that is attached to an application

17

Qns: How can I generate CUSTOM.pll or any other Forms Library Ans: ----Below statements in one single line cd $AU_TOP/resource f60gen module=$AU_TOP/resource/CUSTOM.pll userid=apps/apps output_file=./CUSTOM.plx module_type=LIBRARY f60gen module=$AU_TOP/resource/XX_POENT.pll userid=apps/apps output_file=./XX_POENT.plx module_type=LIBRARY Qns: All the above sounds good, but how on earth do I connect to Mid Tier to generate forms Ans: For Mid-Tier server, you will be provided with a Unix Username & Password. Before you start moaning, let me clarify that I assume that hosting o/s will be Unix. As soon as you logon to your mid-tier, your environment should automatically be setup based on scripts within .profile file. To know whether your environment has been setup on Unix box, do the below: echo $FND_TOP If the above returns blank, then it means you need to contact your DBAs to find out why environment variables are not being populated on your sign-on to Unix ...Ditto for DB Tier Please let me know if you have any questions.

Oracle Apps Training Testing Environments

18

3. Define an executable attached to this procedure. This can be done by navigating to the responsibility Application Developer, and selecting the menu /Concurrent/Executable

4. Define the concurrent program This can be done by navigating to responsibility Application Developer and then selecting menu /Concurrent/Program

5. Attach this program to a report group. Go to System Administrator responsibility, and select /Security/Responsibility/Request

19

Concurrent manager in Oracle Apps Lets discuss the very basics of Concurrent Managers, again the very basics for the beginners that read http://getappstraining.blogspot.com Two things are obvious:1. Concurrent Manager is related to Concurrent Programs 2. Concurrent manager manages the concurrent(oops I mean parallel) execution of concurrent programs. So what's left to explain?.....Well nothing much, but I gave a commitment to one of my readers that I shall write something about concurrent managers today. And now when I begin to write, I realize it is worth writing something in plain English on this topic. Lets explain this with some Q&A Question : How to run a concurrent program? Answer: In oracle apps you have a concurrent program submission screen. You can submit the concurrent program from that screen. Question: What happens when you submit a concurrent program? Answer: There is something known as Concurrent Manager that runs in the background all the time. This background process, called Concurrent Manager ideally will be running 24x7. As the name suggests, purpose of a concurrent manager is to manage the submitted concurrent programs. Question: When I submit a concurrent program( or call it concurrent request), how does concurrent manager pick this up? Answer: Concurrent manager will be running in the background waiting for a concurrent program to be submitted. As soon as a concurrent program is submitted, it then gets put in an execution queue by concurrent manager. Question: Why does the Concurrent manager put a concurrent program into a queue? Why doesn't the manager simply let the program run? Answer: Because at any given point in time a concurrent manager can run no more than say 10 programs concurrently. This figure of 10 is configurable of course. First the manager puts a submitted program into a queue, next the manager checks if there is a slot available (i.e. Less than 10 programs are currently running). If a slot is found available, the concurrent manager then runs the program, or else it keeps the concurrent program in a queue with status Pending. Question: If we have two concurrent programs, that must never run in parallel(oops I mean concurrently)....can concurrent manager manage such scenarios? Answer: Of course it can. When you define a concurrent program, you can specify if there are any incompatible programs. If incompatible concurrent programs exist, then concurrent manager will wait for the incompatible program to complete. Question: Is that all what concurrent manager does? Answer: Much more, if interested, then read on. Concurrent manager is responsible for below things too.. Managing the printer:An Oracle Report is registered as a concurrent program too. During submission or during the definition of concurrent program, we can specify the printer where report gets printed. Concurrent manager will send the output of the program to that printer. Managing the programs completion statusFor example a pl/sql concurrent program can set retcode=2 to make a program complete with warning. Hence concurrent manager not just executes the program, but it manages the completion status of the program too. Classpath of a java program:A concurrent program can be of type java too. If for this specific concurrent program you wish to use a set of java libraries, then you can specify the path of that library in concurrent program definition. Concurrent

20

manager will amend the CLASSPATH to reflect the path of the java library. Interaction with host concurrent programWhen running a host concurrent program, the concurrent manager passes the apps password as a parameter to the unix script Tracing a concurrent program Concurrent manager enable the session trace for the concurrent program, if enable trace checkbox is checked in program definition. You can then go to user dump directory and do tkprof on the file. Optimization options:The concurrent program definition provides an option to specify optimization mode, like choose, fist rows,all rows, rule based etc. The concurrent manager will alter the optimization mode of the session before the submission of the program. Obviously this option has no relevance to Host type concurrent program. More? ...well I am bored with concurrent managers now, I guess you too are by now.... Value set basics in Oracle Apps An article on Value Sets, for beginners that follow http://getappstraining.blogspot.com Question: What is value set? Answer: It is a set of values Question: Why do we need value sets? Answer: You do not always want a user to enter junk free text into all the fields. Hence, Oracle Apps uses value set to validate that correct data is being entered in the fields in screen. Question: Is value set attached to all the fields that require validations? Answer : A big NO Question: Then where lies the usage of value sets? Answer: Broadly speaking, value sets are attached to segments in Flexfields. You can argue that value sets are also attached to parameters of concurrent program(but in reality oracle treats parameters as Descriptive Flexfields) Question: This is insane, flexfields havent been covered in http://getappstraining.blogspot.com as yet? Answer: Agreed, hence lets restrict value set explanation to their usage in concurrent program parameters. Question: Any examples? Answer: For the namesake, lets add a Parameter to the concurrent program that we defined in Concurrent Program Training Lesson link. Lets add a parameter named cost centre, the values to this parameter must be restricted to one of the three values, i.e. HR, SEC, IT. At the time of submission of the concurrent program the user should be able to pick a cost centre from a list. This is where value set gets used. Lets now define a simple value set as described above. Step 1. Go to Application Developer, and select menu /Validation/Set

21

Step 2. Now define a value set of type Independent. We will cover the other most widely used Type Table latter.

Step 3. Now, lets add three independent values to the value set for this Cost Centre list. Hence click on menu Values within Validation

22

Step 4. Here we add the values for IT, HR, SEC to this independent value set.

CONTROL-S to save the data Step 5. Now let us go back to Concurrent Program that we created in earlier training lesson and Click on Parameters

Step 6. Now lets create a parameter, and attach the value set that we created to this parameter.

23

Step 7. Now to test this, lets go to receivables manager and click on Requests.

Click on Request, Step 8. Submit New Request, and then click on OK.

24

Step 9 Now, we can see the values defined in the value set here.

Lookup Types and Lookup codes in Oracle Apps An article on Lookups, for beginners that follow http://getappstraining.blogspot.com Question : What is a lookup in Oracle Apps Answer: It is a set of codes and their meanings. Question: Any examples? Answer: The simplest example is say a lookup type of Gender. This will have definitions as below Code Meaning -----------------M Male F Female U Unknown Question: But where is it used, any examples of its usages? Answer: Let us say that there is a table for employees, and this table named PER_PEOPLE_F & has following columns ---FIRST_NAME LAST_NAME DATE_OF_BIRTH GENDER Question: Will the gender column in above table hold the value of M or F or U? Answer: Correct, and the screen that displays people details will in reality display the meaning of those respective codes (i.e. Male, Female, Unknown etc) instead of displaying the code of M or F or U Question: hmmm...so are lookups used to save the bytes space on database machine? Answer: Noooo. Imagine a situation as below a. There are 30,000 records in people table of which 2000 records have gender value = U. In the screen, their Gender is being displayed as "Unknown". Now lets say you want this to be changed to "Undisclosed". To implement this change, all you have to do is to change the meaning of the lookup codes for lookup type GENDER. Hence it will look like Code Meaning

25

-----M F U

------------Male Female Undisclosed

Here lies the beauty of lookups, you do not need to modify 2000 odd records in this case. Question : Any other usage of lookups? Answer : Sure, lets take another example. In HRMS, there is a field named Ethnicity. By default Oracle ERO delivers the below values Lookup code lookup meaning -----------------------------------AS Asian EU European Now, if your client wants to track Ethnicity at a granular level, they can amend the Oracle delivered lookup definition as below Lookup code lookup meaning -----------------------------------ASI Asian-Indian ASP Asian-Pakistani EU European Hence these values will then be available in the list of values for Ethnicity field. Question: Are we saying that all the lookups delivered by oracle can be modified? Answer: Depends. If oracle has a lookup called termination status, and if based on the termination status code Oracle has some rules defined within Payroll Engine....!! Surely Oracle Payroll Engine will not like it if you end date an existing status code or add a new status code to termination. For this very reason, Oracle flags some lookups as System lookups, and the lookup entry screen will not let you modify those lookup codes. Question: OK, what if I do not wish to modify existing Lookup codes, but only wish to add new Lookup codes to an existing Oracle delivered Lookup Type? Answer: You can do so, provided the Oracle delivered Lookup Type is flagged as Extensible. Please see the screenshot Question: Can we add our own new lookup types? Answer: Yes you can, for this you will first define a lookup type and will then define a set of lookup codes against the Lookup Type. In our example above, GENDER is the LOOKUP_TYPE Question: Does a LOOKUP_TYPE get attached to a Descriptive Flexfieldjust like Value Sets? Answer: Not really. There is no direct relation between lookup and Descriptive Flexfield. Now, the screenshots. Click on the menu as below to invoke Lookup Screen.

26

Once in the screen, you can define your lookup type and lookup codes as below.

Difference between Lookups and Value Sets I hope you have read the previous articles on Value Sets and also on Lookups. It is important for the learners to read things in Sequence. Hence you may decide to browse through the Training Index Page. Difference 1 Value sets can be attached to parameters of a concurrent program, whereas Lookups can't. Difference 2 Certain types of Lookups are maintainable by the users too, for example HR Users will maintain "Ethnic Minority" lookups. Value Sets are almost never maintained by end users, with the exception of GL Flexfield codes. Value sets are usually maintained by System Administrators. Difference 3 Value sets can contain values that are a result of an SQL Statement. Hence it is possible to make Value Set list of values dynamic. On the contrary, Lookup Codes are Static list of values. Here comes the end of another simple article...

27

Descriptive Flexfield Basics in Oracle Apps

An article on basics of Descriptive flexfields, for beginners that follow http://getappstraining.blogspot.com A training article on Descriptive flexfields, also refered as DFF First some basic Question and answers, and then we will do screenshots detailing how flexfields are configured.
Question: What does DFF mean? Answer: DFF is a mechanism that lets us create new fields in screens that are delivered by Oracle. Question: Oh good, but can these new fields be added without modifying/customization of the screen?. Answer: Yes, certainly. Only some setup is needed, but no programmatic change is needed to setup DFF. Question: Why the word Descriptive in Name DFF? Answer: I think Oracle used this terminology because by means of setup...you are describing the structure of

these new fields. Or may be Oracle simply used a silly word to distinguish DFF from KFF(discussed in latter training lesson).
Question: Are these DFF's flexible? Answer: A little flexible, for example, depending upon the value in a field, we can make either Field1 or

Field2 to appear in DFF.


Question: So we create new fields in existing screen, but why the need of doing so? Answer: Oracle delivers a standard set of fields for each screen, but different customers have different needs,

hence Oracle lets us create new fields to the screen.


Question: Are these new fields that get created as a result of DFF free text?

I mean, can end user enter any junk into the new fields that are added via DFF? Answer: If you attach a value set to the field(at time of setup of dff), then field will no longer be free text. The entered value in the field will be validated, also a list of valid values will be provided in LOV.
Question : Will the values that get entered by the user in dff fields be updated to database? Answer: Indeed, this happens because for each field that you create using DFF will be mapped to a column in

Oracle Applications.
Question: Can I create a DFF on any database column? Answer: Not really. Oracle delivers a predefined list of columns for each table that are meant for DFF usage.

Only those columns can be mapped to DFF segments. These columns are named similar to ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3 ETC. Usually Oracle provides upto 15 columns, but this number can vary.
Question: Can I add hundreds of fields to a given screen? Answer: This depends on the number of attribute columns in the table that screen uses. Also, those columns

must be flagged as DFF enabled in DFF Registration screen. Don't need to worry much about this because all the ATTRIBUTE columns are by default flagged for their DFF usage.
Question: Hmmm, I can see that DFFs are related to table and columns... Answer: Yes correct. Each DFF is mapped to one table. And also each segment(or call it field) is mapped to one

of the attribute columns in that table.


Question: I want these fields to appear in screen only when certain conditions are met. Is it possible? Answer: Yes, we have something known as Context Sensitive Descriptive Flexfields.

In Order to do this, we will follow the below steps(screenshots will follow) :1. Navigate to the DFF Registration screen in Oracle Apps and query on Table AP_BANK_BRANCES. Now click on Reference Field 2. Navigate to DFF Segments screen and query on the Title of the Bank Branch and Unfreeze the Flexfield 28

and add segments as to Section "GLOBAL Data Elements" as shown in screenshots.


Here are the screenshots......The descriptions are embedded within the screenshots. We are in "Bank Branches screen" below, that is available in Payables responsibility. We need to add a new field as below.

Once having noted down the table, we try to find the Title of the DFF for that Table. We go to Flexfield/Register

Here we pick the Title of the respective DFF

Query on that DFF Title from Descriptive Flexfield Segment Screen

29

Add a new segment under "Global Data Elements"

The options for making mandatory or enabling validations for the new field.

30

Once you finalize the changes, you will be prompted to Freeze the DFF definition. Click on OK

Now, we see the fruits of our configuration

31

Context Sensitive Descriptive Flexfields

32

When the user selects Type=SWIFT, we see the relevant SWIFT field appear in Flexfield window

When user selects Type=CHIPS, we see CHIP Id field appearing in Flexfield window.

33

Key Flexfields Basics

Please find an article on the very basics of Key Flexfields. Question : We have already covered Descriptive Flexfield in detail in previous article, should we still bother learning key flexfield? Answer : Indeed we must learn this. When I myself learnt Oracle Apps, all I had was the cryptic definitions in Oracle Manual, and it took me weeks to get my head around the differences between Key Flexfields and Descriptive Flexfields. Now I hope you can learn this crystal clear in minutes.
Question: Key Flexfields help us capture additional fields, and so does descriptive flexfield too? What is the

deal here? Answer: Ok, lets assume for a minute that there is no such thing as a key flexfield. All we have is a descriptive flex (lets assume). Requirement is this:Your client wants to capture values in following additional fields for a purchase order transaction and invoices... Company name: GM Cost Centre: IT Project: OFP --means Oracle Fusion Project Expense Type: OCC -- Oracle Consultant Cost In a DFF ONLY WORLD, when your client raises Purchase Order to IT Consulting Company, in PO_DISTRIBUTIONS_ALL table record you will store ATTRIBUTE1 :- GM ATTRIBUTE2 :- IT ATTRIBUTE3 :- OFP ATTRIBUTE4 :- OCC When an invoice is received from consulting company, the Payables clerk will capture the Invoice Line accounting as below in AP_INVOICE_DISTRIBUTIONS_ALL ATTRIBUTE1 :- GM ATTRIBUTE2 :- IT ATTRIBUTE3 :- OFP ATTRIBUTE4 :- OCC These 4 text values for fields(above) are physically being duplicated in each module, for the related/unrelated transactions. Imagine further when this transaction flows to Oracle General Ledger, would you again expect oracle to physically store the 4 columns into table GL_JE_LINES? If so your table GL_JE_LINES will have following values in its DFF (Descriptive Flex) columns.... ATTRIBUTE1 :- GM ATTRIBUTE2 :- IT ATTRIBUTE3 :- OFP ATTRIBUTE4 :- OCC Surely, such design using a descriptive flexfield will be flawed, as it causes duplication of data at various places. Now that you understand why Descriptive flexfield does not fit into this design, lets consider a new scenario.
Consider an alternate approach.( using KFF )

Lets have a table named gl_code_combinations with following columns. CODE_COMBINATION_ID SEGMENT1 SEGMENT2 SEGMENT3 SEGMENT4 Lets capture A SINGLE record in this table as below:34

CODE_COMBINATION_ID : 10902 SEGMENT1 : GM SEGMENT2 : IT SEGMENT3 : OFP SEGMENT4 : OCC Note the above combination of 4 fields can be uniquely identified by 10902(CODE_COMBINATION_ID). In PO_DISTRIBUTIONS_ALL table, we will have below column with value CODE_COMBINATION_ID : 10902 NOTE: Now we are not storing all four columns here in PO Dist table, as we store the Unique ID of the record in Key Flexfield table. Again, in Account Payables, even though the clerk will enter in screen values for four columns (four each segment), the database will only store value 10902 in column CODE_COMBINATION_ID of payables distributions table. Ditto for the entry in GL_JE_LINES table in oracle general ledger, only the ID that references those 4 columns will be stored. Hence all the tables(PO Dist, AP Dist, GL JE Lines) will reference just the CODE_COMBINATION_ID.
Now some Q & A below Question: Does this mean, for each key flexfield, there will be a dedicated table? And such table will hold the unique combination of field values that can be reused? Answer: correct. For gl accounting key flexfield, there is a table named gl_code_combinations. Other examples are grades in oracle human resources. A grade can be defined as a combination of say Clerk + Senior or Clerk + Junior. These combinations will be stored in per_grades table. Question: do all the tables which are used for storing key Flexfields have columns named segment1,segment2...segmentx? Answer : Correct, it is a standard practice used by oracle. Thee segments columns are generic columns so that each client can call them by whatever name as they desire. Question: Does Oracle deliver Key-Flexfields out of the box, which will pop-up a window with relevant fields, as configured during setup. Answer : Yes, and if value sets are attached, the fields can be validated too. Question : Is there a step by step example of setting up key flexfield. Answer : Have a look at article for Setting up Special Information Types in HRMS using Key FlexField . For change in perspective, I have covered a HRMS Key Flexfield, named Special Information Types. Install tools for Oracle Apps Development

This article is for setting up the PC for Oracle Apps development, for the readers of
http://getappstraining.blogspot.com 9i/10g Oracle Client

--------------------------This will install Workflow Builder SQL*Plus Once installed, you must then try to connect to the apps schema of your development database.
D2K, with forms version 6i

--------------------------This will install 35

Oracle Forms Oracle Reports Next, you need to upgrade the default version of installed Forms 6i by downloading and applying patch 3596539 from Metalink.

Once installed, ensure that you can connect to apps schema from Oracle Forms and Oracle Reports.
A Unix client

--------------------------A unix shell program like ssh or putty or any others, that a. Lets you do ftp or sftp with your servers b. Lets you logon to your middle tier or the database tier to Unix Prompt Note: I am assuming a Unix install for Oracle Applications.
Oracle jDeveloper for OAF ( Optional:- Only needed if developing extensions to OAF).

Download patch 4045639 from Metalink. Please note that this patch comes bundled with jDeveloper and all the Apps related libraries.

Oracle IDE --------------------------A rapid pl/sql development tool like TOAD or PL/SQL developer or Golden or SQL*navigator. Note this is optional, but I suggest you get used to one of these. My personal favorite is Pl/SQL developer from http://www.allroundautomations.com/plsqldev.html

36

Workflows -------------I suggest you create a directory similar to c:\oracle\wf Next you need to ensure that you are able to connect to apps schema from the workflow builder. Once connected, open workflow named Standard, and save this as WFSTD.wft. Click on File/Open in Workflows Builder

Connect to database to apps schema

Open workflow Standard and save it as WFSTD.wft. You will require this wft file for building all new Workflows.

37

Next we need to do the following:1. Ensure that you are able to connect to apps schema from all the above tools. 2. FTP any given Oracle delivered report to your PC. Next you need to ensure that you are able to open that report. This is equivalent to sanity checking your Reports install, but is optional step. 3. FTP the following files from your mid tier, to a directory named c:\oracle\forms TEMPLATE.fmb APP*.pll FND*.pll Note: These files are available on $AU_TOP/forms/US or from $AU_TOP/resource Add directory c:\oracle\foms to your registry path named FORMS60_PATH. In order to do this, do windows run, regedit, inside registry follow path HKEY_LOCAL_MACHINE/SOFTWARE/Oracle. You will see a variable named FORMS60_PATH.

After setting your registry path, open the forms designer, and see if you can open template.fmb without any problems. If you are prompted that any specific library is missing, then ftp that library too into your c:\oracle\forms. In case, when opening the form, you get an error like "xyz.pll is missing" and if you believe xyz.pll is already there on your pc, the you should try to open xyz.pll itself. The error might be related to some other pll being referred indirectly by xyz.pll. In simple words you need to recursively ftp all the form files, which are needed as foundation for forms development in apps. Similarly, you need to add c:\oracle\reports to the REPORTS60_PATH in registry. You are now ready to roll with your Oracle Apps development tasks.. A New Custom Form in Oracle Apps

In this training article (for the readers of http://getappstraining.blogspot.com ), we will learn the steps needed to develop a custom Oracle Apps form from the very scratch. In the previous chapter we learnt "how to customize an existing oracle delivered form" 38

Question: Why bother teaching this when Oracle fusion is destined to replace oracle forms by OA Framework? Answer: Well firstly I am yet to hear an official word from Oracle in this regard, but I agree it is highly likely

that fusion will se demise of Oracle Forms. However more importantly Oracle will support current tech stack indefinitely, I.e Release 12 will be supported for foreseen time as per Apps Unlimited statement. Hence, many of the clients will keep using this technology for decades. Yes, I won't bother my kid learning Oracle form though.
Question : Ok, what are the steps for building a screen from scratch? Answer: Below steps in brief A) Open up TEMPLATE.fmb, and save this as XXHELLOAPPS.fmb B) Create a new window, by right clicking on Window/new

Name this window as XXHELLOAPPS,and assign it SubClass Type WINDOW from picklist. C) Create a new canvas and name it XXHELLOAPPS , ensuring its Sublcass Type is Content D) Make the windows property reference canvas XXHELLOAPPS and vice versa make the canvas reference windows XXHELLOAPPS. E) Now create a block named XXHELLOAPPS . Lets keep this a control block for simplicity. F) go to form level property, and set first navigation block to XXHELLOAPPS. G) Add a label and a field named Hello_World to this block. H) Generate the form on PC using Control-T keystrokes. This will ensure that nothing critical has been missed out. I) FTP the form file to $XXPO_TOP/forms/US Surely, this XX will be replaced by the naming convention at your client/company. J) cd to $XXPO_TOP/forms/US And f60gen on XXHELLOAPPS.fmb This will create a file executable as XXHELLOAPPS.fmx K) Go to Application Developer responsibility Menu /applicaton/form Register the form L) Register the Forms Function Have you read he article form functions[http://getappstraining.blogspot.com/2006/10/oracle-forms-functionsmenus-and-their.html] yet? This forms function must be registered against application "XX Purchasing". M) Now add a menu item so that this forms function becomes available to specific responsibility. Thats it, you will be able to open up this form from the responsibility.
Now some important notes:1. If you have a table based block, and if that block has some description type fields, then try not to fetch them

from post query trigger. Instead, develop a view in apps schema and assign that view as base tale to this block. This has a benefit that users will be able to query on the description field if need be. Indeed you will need to do dml on the actual table yourself by overriding on-insert, on-update, on-delete and on-lock triggers. 2. For each block in the screen, create a form level package spec and package body. Your triggers in the block/block fields will make calls to that package. 3. Try not to do to much pl/sql within the form. Always do such database intensive operations in a database level package. 4. Try not using global variables, unless really needed. Give preference to the creation of form package variables. 5. In a multi record block, always add a field for Current Record Indicator.
Steps for your first pl/sql Concurrent Program in Oracle Apps I think this topic is already covered partially in one of the previous training lesson[ for concurrent programs], but I would like to touch base on this again. Lets revisit some basics first

39

Question: What are the ingredients for a concurrent program? Answer: A concurrent executable and a program attached to that executable. Question: Will executable for a pl/sql concurrent program be a database stored procedure? Answer: Yes, but in addition to above you can also register a procedure within a package as an executable. However, you can't make a Function to become the executable for a stored procedure. Question: Does this stored procedure need to have some specific parameters, in order to become an executable of a concurrent program? Answer: Yes, such procedure must have at least two parameters ( errbuff out VARCHAR2, retcode out NUMBER) Question: Can we add additional parameters to such pl/sql procedures that happen to be Conc Prog Executables? Answer: Sure you can, but those parameters must be defined after the first two parameters. Effectively I mean first two parameters must always be errbuff and retcode. The sequence of the remaining parameters must match with the sequence in which parameters are registered in define concurrent program-parameters window. Question: Can those parameters be validated or will these parameters be free text? Answer: These parameters can be attached to a value set, hence this will avoid users passing free text values. Question: What are the possible things that a concurrent pl/sql program can do? Answer: Firstly your stored procedure would have been created in apps. This concurrent program will connect to "apps schema" from where access to all the tabes across every module will be available. You can do the following:1. Insert records in tables(usually interface or temp tables) 2. Update and delete records 3. Initiate workflows 4. Display messages in the output file or the log file of the concurrent program. 5. Make this concurrent program complete with status Error or Warning or Normal. Question: Please give me an example of a pl/sql concurrent program in Oracle apps in real life? Answer: Lets say you have an external application which is integrated with apps. Assume that it is Siebel application where the new customer records are created. Siebel is assumingly hosted on a Oracle database from where it has database links to your Oracle apps database. In this case, siebel inserts sales order records into your custom staging tables. You can then develop a concurrent process which will do the following:-------Loop through the records in that staging table Check if the customer already exists in Oracle AR TCA If customer already exists, thencall the api to update existing customer If this is a new customer, then update existing TCA Customer/Party record Question: Ok, how do I do the above? Answer: Find the steps below for doing so Step 1 Connect xxschema/password Create table xx_stage_siebel_customers ( customer_Id integer, customer name varchar2(400)); Grant all on xx_stage_siebel_customers to apps ; Step 2 Connect apps/apps_password Create or replace synonym xx_stage_siebel_customers for xxschema.xx_stage_siebel_customers ; Step 3 ( again in apps schema) Create or replace procedure xx_synch_siebel_cust ( errbuff out varchar2, retcode out varchar2 ) is n_ctr INTEGER := 0 ; Begin

40

for p_rec in ( select * from xx_synch_siebel_cust ) LOOP Select count(*) into n_ctr from hz_parties where party_number = p_rec.customer_number; If n_ctr=0 then Hz_party_create(pass appropriate parameters here). Else Hz_party_update(pass appropriate parameters here); End if; END LOOP ; delete from xx_synch_siebel_cust ; End xx_synch_siebel_cust Step 4 Create concurrent program executable ( for example of screenshot, visit link ) Step 5 Create concurrent program for that executable Step 6 Add this concurrent program to request group Now your program is ready to roll.... Oracle FNDLOAD Script Examples PLEASE USE THIS LINK FOR FNDLOAD ON APPS2FUSION.COM In this article I wish to give real working examples of Oracle's FNDLOAD utility. Besides that, I have included some useful notes on FNDLOAD utility I have used FNDLOAD successfully in past for several different entities/data types within Oracle 11i for almost all my previous clients, ever since this utility became available. Some of the examples in this FNDLOAD article include:FNDLOAD to transfer Request Groups FNDLOAD for moving Concurrent Programs FNDLOAD to download and upload Forms Personalizations ( or Personalisations depending on where you are located ) To FNDLOAD Web ADI, visit the link Web ADI FNDLOAD Use FNDLOAD for transferring value set definitions. -->Please note that when transferring Key Flex Fields and Descriptive flex fields the respective value sets against each segment will be extracted and loaded automatically. Also, FNDLOAD can be used to migrate Key FlexFields, Descriptive Flexfields, Responsibilities and almost every other FND entity. Please note that the text written down here could get wrapped in the browser. Hence you may have to use \ to continue the single line command on Unix, in case you find the lines wrapping In my case I am ensuring that $CLIENT_APPS_PWD has the apps password before running the scripts -----------------------------------------------------------------------------------------##To FNDLOAD Request groups FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct XX_MY_REPORT_GROUP_NAME.ldt REQUEST_GROUP REQUEST_GROUP_NAME="XX_MY_REPORT_GROUP_NAME" APPLICATION_SHORT_NAME="XXGMS" ##Note that ##--------## <> will be your Application Shortname where request group is registered ## XX_MY_REPORT_GROUP_NAME Will be the name of your request group ## ##To upload this Request Group in other environment after having transferred the ldt file

41

FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct ----------------------------------------------------------------------------------------##To FNDLOAD Concurrent Programs FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CUSTOM_ORACLE_INTERFACE_PROG.ldt PROGRAM APPLICATION_SHORT_NAME="XXGMS" CONCURRENT_PROGRAM_NAME="XX_CUSTOM_ORACLE_INTERFACE_PROG" ##Note that ##--------## XXGMS will be your custom GMS Application Shortname where concurrent program is registered ## XX_CUSTOM_ORACLE_INTERFACE_PROG Will be the name of your request group ## XX_CUSTOM_ORACLE_INTERFACE_PROG.ldt is the file where concurrent program definition will be extracted ## ##To upload FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CUSTOM_ORACLE_INTERFACE_PROG.ldt -----------------------------------------------------------------------------------------##To FNDLOAD Oracle Descriptive Flexfields $FND_TOP/bin/FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XX_PO_REQ_HEADERS_DFF.ldt DESC_FLEX APPLICATION_SHORT_NAME=PO DESCRIPTIVE_FLEXFIELD_NAME='PO_REQUISITION_HEADERS' ##Note that ##--------## PO is the Application Shortname against which descriptive flexfield against PO Headers is registered ## PO_REQUISITION_HEADERS is the name of Descriptive Flexfield against PO Requisition Headers ## Use the SQL below to find the name of DFF, rather than logging into the screen (ooops via jinitiator) ########----->SELECT ########----->application_id, DESCRIPTIVE_FLEXFIELD_NAME, application_table_name ########----->FROM ########-----> fnd_descriptive_flexs_vl ########----->WHERE ########-----> APPLICATION_TABLE_NAME like '%' || upper('&tab_name') || '%' ########----->ORDER BY APPLICATION_TABLE_NAME ########----->/ ## To upload into another environment $FND_TOP/bin/FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct XX_PO_REQ_HEADERS_DFF.ldt ## OK another example for DFF against FND_LOOKUPS FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XX_FND_COMMON_LOOKUPS_DFF.ldt DESC_FLEX APPLICATION_SHORT_NAME=FND DESCRIPTIVE_FLEXFIELD_NAME='FND_COMMON_LOOKUPS' ## OK another example for DFF against Project Accounting Expenditure Types FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XX_PA_EXPENDITURE_TYPES_DESC_FLEX_DFF.ldt DESC_FLEX APPLICATION_SHORT_NAME=PA DESCRIPTIVE_FLEXFIELD_NAME='PA_EXPENDITURE_TYPES_DESC_FLEX' -----------------------------------------------------------------------------------------##To FNDLOAD Oracle Menus $FND_TOP/bin/FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct ICX_POR_SSP_HOME.ldt MENU MENU_NAME="ICX_POR_SSP_HOME" ##Note that

42

##--------## Oracle Menus are not attached to applications. Hence no need to include application short name ## ICX_POR_SSP_HOME is the menu name. This can be validated via below SQL ## select user_menu_name from fnd_menus_vl where menu_name = 'ICX_POR_SSP_HOME' ; ## Also note that we do not pass in the User_menu_name in this example ## OK, now to upload this file $FND_TOP/bin/FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct ICX_POR_SSP_HOME.ldt ---------------------------------------------------------------------------------------------------------------------------## Well, now for FND Messages to download a single message FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct \ XX_ICX_POR_LIFECYCLE_PAY_TIP.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME='ICX' MESSAGE_NAME=XX_ICX_POR_LIFECYCLE_PAY_TIP ## Or you may as well download all the messages within an application FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct \ XX_ALL_GMS_MESSAGES_00.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME='XXGMS' ## now to upload using FNDLOAD FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XX_ICX_POR_LIFECYCLE_PAY_TIP.ldt ---------------------------------------------------------------------------------------------------------------------------## Now it's the turn of Lookup values. Again, its not a rocket science FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD aflvmlu.lct XX_TRX_BATCH_STATUS.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME ='XXGMS' LOOKUP_TYPE="XX_TRX_BATCH_STATUS" ## Note that ## XX_TRX_BATCH_STATUS is the name of FND Lookup Type in this example ## This will download all the lookup codes within the defined lookup ## To upload FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD aflvmlu.lct XX_TRX_BATCH_STATUS.ldt ---------------------------------------------------------------------------------------------------------------------------## You can also move the User definitions from FND_USER FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct ./XX_FND_USER_PASSI.ldt FND_USER USER_NAME='ANILPASSI' #Do not worry about your password being extracted, it will be encrypted as below in ldt file #BEGIN FND_USER "ANILPASSI" # OWNER = "PASSIA" # LAST_UPDATE_DATE = "2005/10/19" # ENCRYPTED_USER_PASSWORD = "ZGE45A8A9BE5CF4339596C625B99CAEDF136C34FEA244DC7A" # SESSION_NUMBER = "0" To upload the FND_USER using FNDLOAD command use FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct ./XX_FND_USER_PASSI.ldt Notes for using FNDLOAD against FND_USER:1. After uploading using FNDLOAD, user will be promoted to change their password again during their next signon attempt. 2. All the responsibilities will be extracted by FNDLOAD alongwith User Definition in FND_USER 3. In the Target Environment , make sure that you have done FNDLOAD for new responsibilities prior to running FNDLOAD on users.

---------------------------------------------------------------------------------------------------------------------------## Now lets have a look at the profile option using oracle's FNDLOAD

43

FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct POR_ENABLE_REQ_HEADER_CUST.ldt PROFILE PROFILE_NAME="POR_ENABLE_REQ_HEADER_CUST" APPLICATION_SHORT_NAME="ICX" ## Note that ## POR_ENABLE_REQ_HEADER_CUST is the short name of profile option ## We aren't passing the user profile option name in this case. Validate using ... ########----->select application_id, PROFILE_OPTION_NAME || '==>' || profile_option_id || '==>' || ########----->USER_PROFILE_OPTION_NAME ########----->from FND_PROFILE_OPTIONS_VL ########----->where PROFILE_OPTION_NAME like '%' || upper('&profile_option_name') || '%' ########----->order by PROFILE_OPTION_NAME ########----->/ ## Now to upload FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct POR_ENABLE_REQ_HEADER_CUST.ldt ---------------------------------------------------------------------------------------------------------------------------## Now for the request sets that contain the stages and links for underlying concurrent programs

## For this you will be firstly required to download the request set definition. ## Next you will be required to download the Sets Linkage definition ## Well, lets be clear here, the above sequence is more important while uploading FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XX_GL_MY_INTERFACE_SET.ldt REQ_SET REQUEST_SET_NAME="FNDRSSUB4610101_Will_look_like_this" FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XX_GL_MY_INTERFACE_SET_LINK.ldt REQ_SET_LINKS REQUEST_SET_NAME="FNDRSSUB4610101_Will_look_like_this" ## Note that FNDRSSUB4610101 can be found by doing an examine on the ########----->select request_set_name from fnd_request_sets_vl ########----->where user_request_set_name = 'User visible name for the request set here' ## Now for uploading the request set, execute the below commands FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct XX_GL_MY_INTERFACE_SET.ldt FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct XX_GL_MY_INTERFACE_SET_LINK.ldt ---------------------------------------------------------------------------------------------------------------------------## Now for the responsibility

FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct XX_PERSON_RESPY.ldt FND_RESPONSIBILITY RESP_KEY="XX_PERSON_RESPY" ## note that XX_PERSON_RESPY is the responsibility key ## Now to upload FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct XX_PERSON_RESPY.ldt ---------------------------------------------------------------------------------------------------------------------------## OK, now for the forms personalizations

## For the forms personalizations, I have given three examples as below. FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_PERWSHRG.ldt FND_FORM_CUSTOM_RULES function_name="PERWSHRG-404" FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_HZ_ARXCUDCI_STD.ldt FND_FORM_CUSTOM_RULES function_name="HZ_ARXCUDCI_STD" FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct 44

XX_AP_APXVDMVD.ldt FND_FORM_CUSTOM_RULES function_name="AP_APXVDMVD" ## Note that the function name above is the function short name as seen in the Function Definition Screen ## Now to upload the forms personalizations that are defined against these forms functions.... FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_PERWSHRG.ldt FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_HZ_ARXCUDCI_STD.ldt FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_AP_APXVDMVD.ldt ---------------------------------------------------------------------------------------------------------------------------Notes : 1. Give special attention when downloading Menus or Responsibilities.

In case your client has several developers modifying Responsibilities and Menus, then be ultra carefull. Not being carefull will mean that untested Forms and Functions will become available in your clients Production environment besides your tested forms, functions and menus.
2. Be very careful when downloading flexfields that reference value sets with independent values for GL

Segment Codes. By doing so, you will download and extract all the test data in GL Codes that might not be applicable for production.
3. There are several variations possible for FNDLOAD, for example you can restrict the download and uploads

to specific segments within Descriptive Flex Fields. Please amend the above examples as desired for applying appropriate filterations.
4. The list of examples by no mean cover all possible FNDLOAD entities. 5. FNDLOAD is very reliable and stable, if used properly. This happens to by one of my favourite Oracle

utilities.
4. Last but not the least, please test your FNDLOAD properly, so as to ensure that you do not get any

unexpected data. In past I have noticed undesired results when the Lookup gets modified manually directly on production, and then the FNDLOAD is run for similar changes. If possible, try to follow a good practice of modifying FNDLOADable data only by FNDLOAD on production environment.
5. As the name suggests, FNDLOAD is useful for FND Related objects. However in any implementation, you

will be required to migrate the Setups in Financials and Oracle HRMS from one environment to another. For this you can use iSetup. "Oracle iSetup". Some of the things that can be migrated using Oracle iSetup are GL Set of Books, HR Organization Structures, HRMS Employees, Profile Options Setup, Suppliers, Customers, Tax Codes & Tax Rates, Financials Setup, Accounting Calendars, Chart of Accounts, GL Currencies.
Restart or Bounce Apache in Oracle Apps 11i

I find this script very handy for bouncing the Apache, specially when working on Self Service Applications.
Please find the two commands that I use for bouncing the Apache $COMMON_TOP/admin/scripts/$TWO_TASK*/adapcctl.sh stop $COMMON_TOP/admin/scripts/$TWO_TASK*/adapcctl.sh start

45

Of course this needs to be done in Middle Tier of Oracle Applications. In case you have modified any java or class file in OAF ( Oracle Applications Framework ), then Apache bounce becomes mandatory for those changes to take effect. In case you modify and load the XML Document in Oracle Framework, then it is noticed, for those XML changes to take effect, complete bounce of Middle Tier is required in Oracle Apps. If your client is still stuck with AK Developer, then Apache bounce will be required after akload has been executed Playing with CUSTOM.pll

Please find some commands for CUSTOM.pll To convert from CUSTOM.pll to CUSTOM.pld f60gen module_type=LIBRARY module=CUSTOM script=YES userid=apps/apps To convert back from CUSTOM.pld to CUSTOM.pll ( after having edited the text pld file ) f60gen module_type=LIBRARY module=CUSTOM parse=YES userid=apps/apps To convert from CUSTOM.pll to CUSTOM.plx f60gen module_type=LIBRARY module=CUSTOM userid=apps/apps
Read Only Schema in Oracle APPS 11i In this article I have discussed how to create and maintain a read only schema for APPS in Oracle eBusiness Suite. Whilst in the past I have known clients to implement this using synonyms. However the approach discussed below is designed without the need of having to create a single synonym in APPS_QUERYschema. Step 1 Create the read-only schema, in this case lets call it APPS_QUERY. Step 2. Surely, the schema created in above Step 1 will be given read only grants to objects in apps. There will be cases where the grant command might fail. To monitor such failures create a table as below conn xx_g4g/&2 ; --For APPS_QUERY. This table will capture the exceptions during Grants PROMPT create table XX_GRANTS_FAIL_APPS_QUERY create table XX_GRANTS_FAIL_APPS_QUERY ( object_name VARCHAR2(100) ,sqlerrm varchar2(2000) ,creation_date DATE ); grant all on XX_GRANTS_FAIL_APPS_QUERY to apps with grant option; grant select on XX_GRANTS_FAIL_APPS_QUERY to apps_query ; Step 3 In this step we grant select on all the existing views and synonyms in apps schema to apps_query. conn apps/&1 ; PROMPT This can take upto 15-30 minutes PROMPT Granting SELECT on All synonyms and views to apps_query DECLARE --One off script to execute grants to apps_query v_error VARCHAR2(2000);

46

BEGIN FOR p_rec IN (SELECT * FROM all_objects WHERE owner = 'APPS' AND object_type IN ('SYNONYM', 'VIEW') AND object_name NOT LIKE '%_S') LOOP BEGIN EXECUTE IMMEDIATE 'grant select on ' || p_rec.object_name || ' to apps_query'; EXCEPTION WHEN OTHERS THEN v_error := substr(SQLERRM, 1, 2000); INSERT INTO bes.XX_GRANTS_FAIL_apps_query (object_name ,SQLERRM ,creation_date ) VALUES (p_rec.object_name ,v_error ,sysdate ); END; END LOOP; COMMIT; END; / Step 4 Write a after logon trigger on apps_query schema. The main purpose of this trigger is to alter the session to apps schema, such that the CurrentSchema will be set to apps for the session(whilst retaining apps_query restrictions).In doing so your logon will retain the permissions of apps_query schema(read_only). Howerver it will be able to reference the apps objects with exactly the same name as does a direct connection to apps schema. conn apps/&1 ; PROMPT CREATE OR REPLACE TRIGGER xx_apps_query_logon_trg CREATE OR REPLACE TRIGGER xx_apps_query_logon_trg --16Jun2006 By Anil Passi --Trigger to toggle schema to apps, but yet retaining apps_query resitrictions --Also sets the org_id AFTER logon ON apps_query.SCHEMA DECLARE BEGIN EXECUTE IMMEDIATE 'declare begin ' || 'dbms_application_info.set_client_info ( 101 ); end;'; EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA =APPS'; END; / Step 5 Create a Trigger on the apps schema to issue select only grants for all new views and synonyms. Please note that I am excluding grants for sequences. SELECT grants for views and synonyms will be provided to apps_query as and when such objects are created in APPS. Please note that, all the APPS objects (views and synonyms) that existed in APPS schema prior to the implementation of this design, would have been granted

47

read-only access to apps_query in Step 2. conn apps/&1 ; PROMPT CREATE OR REPLACE TRIGGER xx_grant_apps_query CREATE OR REPLACE TRIGGER xx_grant_apps_query --16Jun2006 By Anil Passi -AFTER CREATE ON APPS.SCHEMA DECLARE l_str VARCHAR2(255); l_job NUMBER; BEGIN IF (ora_dict_obj_type IN ('SYNONYM', 'VIEW')) AND (ora_dict_obj_name NOT LIKE '%_S') THEN l_str := 'execute immediate "grant select on ' || ora_dict_obj_name || ' to apps_query";'; dbms_job.submit(l_job, REPLACE(l_str, '"', '''')); END IF; END; / Some notes for this design Note1 You need to ensure that the schema created in Step 1 has very limited permissions. Most importantly it must not be given grant for EXECUTE/CREATE ANY PROCEDURE. You will need to agree with your DBAs upfront for the permissions, Note 2 Only views and synonyms will be granted access. Objects in your xx_g4g(bespoke) schema should have their synonyms in apps already in place. Note 3 If your site has multi org enabled, you will then have to set the org I'd after loggiong on to apps query schema. In case you have only one single ORG_ID, then would have been set as in Step 4 above. Note 4 ALTER SESSION SET CURRENT_SCHEMA =APPS This facilitates users to run their queries as if they were connected to apps schema. However, their previliges will be restricted to those of apps_query Note 5 It is assumed that ALTER SESSION privilege will exist for APPS_QUERY schema. Create Oracle FND_USER with System Administrator If you have the Apps Password, its quite easy to create a FND_USER for yourself by using the API. I find this script very useful when development environment gets cloned from Production(that is when i do not have FND_USER in Production. Please note that:1. You will be allocated System Administrator by this script. Hence you can assign whatever responsibilities that you desire latter, after logging in. 2. The password will be set to oracle 3. You need apps password to run this script. Alternately you need execute permission on fnd_user_pkg from the user where this script will be run. If using some other user, please use apps.fnd_user_pkg.createuser 4. You need to do a COMMIT after this script has run. I have not included the commit within this script. 5. When running this script, you will be prompted to enter a user name. --------Beging of script--------------

48

DECLARE --By: Anil Passi --When Jun-2001 v_session_id INTEGER := userenv('sessionid'); v_user_name VARCHAR2(30) := upper('&Enter_User_Name'); BEGIN --Note, can be executed only when you have apps password. -- Call the procedure to Creaet FND User fnd_user_pkg.createuser(x_user_name => v_user_name ,x_owner => '' ,x_unencrypted_password => 'oracle' ,x_session_number => v_session_id ,x_start_date => SYSDATE - 10 ,x_end_date => SYSDATE + 100 ,x_last_logon_date => SYSDATE - 10 ,x_description => 'appstechnical.blogspot.com' ,x_password_date => SYSDATE - 10 ,x_password_accesses_left => 10000 ,x_password_lifespan_accesses => 10000 ,x_password_lifespan_days => 10000 ,x_employee_id => 30 /*Change this id by running below SQL*/ /* SELECT person_id ,full_name FROM per_all_people_f WHERE upper(full_name) LIKE '%' || upper('<ampersand>full_name') || '%' GROUP BY person_id ,full_name */ ,x_email_address => 'appstechnical.blogspot@gmail.com' ,x_fax => '' ,x_customer_id => '' ,x_supplier_id => ''); fnd_user_pkg.addresp(username => v_user_name ,resp_app => 'SYSADMIN' ,resp_key => 'SYSTEM_ADMINISTRATOR' ,security_group => 'STANDARD' ,description => 'Auto Assignment' ,start_date => SYSDATE - 10 ,end_date => SYSDATE + 1000); END; / A New Custom Form in Oracle Apps In this training article (for the readers of http://getappstraining.blogspot.com ), we will learn the steps needed to develop a custom Oracle Apps form from the very scratch. In the previous chapter we learnt "how to customize an existing oracle delivered form" Question: Why bother teaching this when Oracle fusion is destined to replace oracle forms by OA Framework? Answer: Well firstly I am yet to hear an official word from Oracle in this regard, but I agree it is highly likely that fusion will se demise of Oracle Forms. However more importantly Oracle will support current tech stack indefinitely, I.e Release 12 will be supported for foreseen time as per Apps Unlimited statement. Hence, many of the clients will keep using this technology for decades. Yes, I won't bother my kid learning Oracle form though.

49

Question : Ok, what are the steps for building a screen from scratch? Answer: Below steps in brief A) Open up TEMPLATE.fmb, and save this as XXHELLOAPPS.fmb B) Create a new window, by right clicking on Window/new Name this window as XXHELLOAPPS,and assign it SubClass Type WINDOW from picklist. C) Create a new canvas and name it XXHELLOAPPS , ensuring its Sublcass Type is Content D) Make the windows property reference canvas XXHELLOAPPS and vice versa make the canvas reference windows XXHELLOAPPS. E) Now create a block named XXHELLOAPPS . Lets keep this a control block for simplicity. F) go to form level property, and set first navigation block to XXHELLOAPPS. G) Add a label and a field named Hello_World to this block. H) Generate the form on PC using Control-T keystrokes. This will ensure that nothing critical has been missed out. I) FTP the form file to $XXPO_TOP/forms/US Surely, this XX will be replaced by the naming convention at your client/company. J) cd to $XXPO_TOP/forms/US And f60gen on XXHELLOAPPS.fmb This will create a file executable as XXHELLOAPPS.fmx K) Go to Application Developer responsibility Menu /applicaton/form Register the form L) Register the Forms Function Have you read he article form functions[http://getappstraining.blogspot.com/2006/10/oracle-formsfunctions-menus-and-their.html] yet? This forms function must be registered against application "XX Purchasing". M) Now add a menu item so that this forms function becomes available to specific responsibility. Thats it, you will be able to open up this form from the responsibility. Now some important notes:1. If you have a table based block, and if that block has some description type fields, then try not to fetch them from post query trigger. Instead, develop a view in apps schema and assign that view as base tale to this block. This has a benefit that users will be able to query on the description field if need be. Indeed you will need to do dml on the actual table yourself by overriding on-insert, on-update, on-delete and on-lock triggers. 2. For each block in the screen, create a form level package spec and package body. Your triggers in the block/block fields will make calls to that package. 3. Try not to do to much pl/sql within the form. Always do such database intensive operations in a database level package. 4. Try not using global variables, unless really needed. Give preference to the creation of form package variables. 5. In a multi record block, always add a field for Current Record Indicator. Please let me know if anything is unclear. Feel free to ask your questions Forms Customization Steps in Oracle Applications This article is for the readers of http://getappstraining.blogspot.com ,listing the steps required to customize a form in Oracle Applications. Lets do some Questions and Answers:Question: Is it a common practice to modify forms in Oracle Apps? Answer: Yes and No. Yes because you often will be called upon to modify the forms, but no because most often you should modify the screen without actually modifying the underlying forms executable . Question: How can I modify screen without modifying the underlying executable ? Answer: There are two ways, listed in the order of preferences:1. Forms Personalizations 2. CUSTOM.pll

50

Question: How does forms personalization work? Answer: Oracle forms has triggers that we trap to write our business logic. Oracle has a standard practice of calling a generic piece of code from each trigger(at form level). In this generic piece of code Oracle checks in personalizations tables to see if anything extra needs to be done for the events being executed. For details of example, see the article for forms personalizations Question: Fine then, but why is CUSTOM.pLL needed when we already have forms personalization? Answer: Well just like any technology, forms personalization has its limitations. Limitation example 1 of forms personalizations --------------------------------------------------For example you wish to prompt a message to user DO YOU WISH TO CREATE THIS PERSON AS SUPPLIER OR CUSTOMER OR EMPLOYEE. Lets say this message will prompt three options, create customer , create supplier or create vendor. Depending upon what user selects, you wish to navigate to one of relevant screens from the current TCA screen. For this, you have no choice but to use CUSTOM.pll Limitation example 2 of forms personalizations --------------------------------------------------For example you wish to change the record group of a LOV, via changing its query, in a screen. This can be done by CUSTOM.pll, but not by forms personalization. Question: What about CUSTOM.pll, what can't be done via custom.pll ?? Hence calling for forms customization. Answer: For example, you need to add a complete new section to the screen at a very specific location, this must be done via forms customization. Question : Ok, what are the steps for customization of such screen. Answer: Below steps in brief A) Identify the form in Oracle Apps that needs to be customized. B) Go to the specific directory on one of the mid-tiers to get that forms executable. Say from $AU_TOP/forms/US/POENTRY.fmb. C) FTP that form and all its dependable form objects & pll files to your PC. D) Open the form, ensuring that you do not receive any errors pertaining to missing library or missing form object. E) Perform a save-as to rename this form on your pc, using your company's naming conventions. F) Make the desired modifications to the form. G) Generate the form on PC using Control-T keystrokes. This will ensure that nothing critical has been missed out. Surely you will need to connect to apps schema before generating the form. H) FTP the form file to $XXPO_TOP/forms/US Surely, this XX will be replaced by the naming convention at your client/company. I) cd to $XXPO_TOP/forms/US And f60gen on XXPOENTRY.fmb This will create a file executable as XXPOENTRY.fmx J) Go to Application Developer responsibility Menu /applicaton/form Register the form K) Register the Forms Function Have you read the article form functions ? This forms function must be registered against application "XX Purchasing". L) Now add a menu item so that this forms function becomes available to specific responsibility. Question: Well, a question about (A), how to identify the form executable? Answer: There are two ways. Method1 Open the form to be customized in Oracle Apps from respective Responsibility/Menu Next select menu /Help/About Oracle Application. Here, scroll down within the subwindow and search for fmx. This is the executable that oracle application runs when specific form is invoked.

51

Method2 Query the responsibility definition which has the form attached to this. Note down the Menu which is attached to Responsibility. Go to the menu definition screen and find the form function attached to this menu. From this form function find the form attached to this function. Question: Regarding (I), what is the command for f60gen Answer: FORMS60_PATH=$FORMS60_PATH:$AU_TOP/forms/US export FORMS60_PATH cd $XXPO_TOP/forms/US f60gen module=XXPOENTRY.fmb userid=apps/apps module_type=form batch=no compile_all=special Customization of Reports in Oracle Apps Oracle Reports will become a thing of past in Fusion, however it will still demand resources for the next 5yrs or so. Hence I decided to write this article to fulfill my commitment towards http://getappstraining.blogspot.com We learnt in Forms Customization article that customized executables must be registered with Custom Application. This rule applies to Oracle Reports too in Oracle Applications. Important note: Just like Oracle Forms, there is no place for D2K Reports in Fusion. This will be replaced by XML publisher. I will explain that transition in a latter article very soon. Question: I have been asked to customize Invoice Print program which happens to be an Oracle Report. What will be the steps, that I must follow. Answer : Follow the steps below. 1. You will be told the name of the existing report that must be customized. Note down the exact name and query that name in Concurrent Program screen. Click on Copy Program button selecting checkbox option Copy Parameters. This will help you copy the current program definition to custom version of the program. Also note down the name of the executable as it appears in concurrent program definition screen. 2. In same responsibility i.e. Application Developer, navigate to screen concurrent executable and query on the field labeled "Executable Short Name". Note down the application within which it is registered. If the application is Oracle Receivables, then you must go to the database server and get hold the file named RAXINV.rdf in $AR_TOP/reports/US. 3. Copy that file to your custom AR Top directory. Basically that is the directory where custom reports for AR will be deployed.. cd $XXAR_TOP/reports/us cp $AR_TOP/reports/us/RAXINV.rdf $XXAR_TOP/reports/us Effectively you have now done the following:1. Made the custom version of report registered with XXAR application. If you worked for say company named EA, then this might have been $EAAR_TOP/reports/US 2. When you run that report, Oracle concurrent manager will search for that report in $XXAR_TOP/reports/US The report will be found there, and executed. Note: We havent made any changes as yet. Also, you need to include the new concurrent program name in the relevant request group. Now you can ftp that report to your pc, make modifications for necessary customizations, and then ftp that piece of rdf back to the server. Run it again, to see it working. Some important tips:1. Avoid writing SQL in format trigger, although in rare cases it becomes necessary to do so.

52

2. Learn from Oracle's Report, by reverse engineering them. 3. Do not write a formula column for something which can be achieved by amending the query in data group itself. 4. Do not hardcode things like Currency Formatting. Have a look at Oracle's Amount fields, and use the same user exit. 5. srw2.message can be used for minor debugging, as those messages will appear in the log file of the concurrent program. 6. You can set the trace checkbox against the concurrent program definition, to generate SQL Trace. This trace will not produce bind variable values though. 7. Join between two queries in data group will always be outerjoined, by default. 8. Avoid filters on Data Group queries. Try to implement that logic within the query itself. Migration program in Apps. Migrate Customers This article explains the steps to write programs for data migration in Oracle Apps. Question : Why this article? Answer : Because in every Oracle ERP implementation you have some level of data migration activity. I will try to explain the steps, followed by a real life example of data migration. Question : How to do data migration? Answer : A. Prepare the source data B. Design your staging tables and write code C. Test Test Test.... Question : What is involved in the preparation stage of data migration in oracle apps? Answer: For the Preparation stage, following must be done. 1. Understand the structure of the data being imported and also its business purpose. 2. Fully understand where the data will end up residing into Oracle Apps. 3 Find out if open interfaces or APIs exist in Oracle Apps to facilitate loading the required data. 4. Ensure that lookup codes or setup in Oracle apps support the values that are coming from source system. 5. Think about how the errors will be reported and managed. 6. Also think about how the transactions that fail migration will be re-tried. You may decide to knock of a simple screen if high volume of transactions needs user intervention for cleansing. Question: And how about the development stage during migration? Answer: Do the following 1. Design the stages in which data will flow. Traditionally, your legacy/source data will be loaded into some temporary(staging) tables in a raw(as is) fomat/strucutre . Next you will translate the data into the physical structure that is similar to structure of Oracle Apps table/API. And then you will call the API or populate the Open Interface tables. 2. For doing the above, you will first write one-off scripts to create those staging tables and load data into them using SQL*Loader or some other methodology. If your source system is Oracle too, then I suggest you create a db link to pull the data into your staging tables. All the steps pertaining the transformation can be done via a pl/sql concurrent Program(unless you are using tools like Warehouse builder) 3. Run the concurrent program that you have would written for transformation of data. This will either populate your Open Interface Tables or it will perform migration if APIs are being used. (Again all this can be done via tools too, but here I am talking about a small migration activity, hence ignore the tool talk) 4. Ensure that errors are logged into some error logging table. If the data errors in Oracle's open interface tables, then you could have a database view that does a union on your error table and also oracle's error logging table. Question: How about testing? Answer: You will figure out the following at this stage, from the records that error 1. Missing mapping codes 2. Missing setups in oracle apps. Testing will most likely be repetitive, until you are able to have a migration run which leaves behind the

53

records that are very low in volume or non-existent. Question : If I get a comma delimited file, how will I load that into tables? Answer : You can use a Sql*Loader, or a java program with a csv parser or a file based table approach. Question : In oracle apps during migration, do we usually receive xml data file? Answer : Keep in mind that you usually migrate data from mainframe or standalone systems which now stand outdated. Such systems usually produce comma delimited or tab delimited file. Question : Ok, once the data from source system has been loaded using sql*loader, what next? Answer: The data model of the source data may or may not comply with the data model in oracle apps. Hence you need a transformation step in most cases. This is explained below with an example of TCA API to migrate customers/parties. Question : Should I not ask the legacy system people to transform data as per our requirements? Answer : No, don't bother doing so, for below reasons :A. Techies of legacy system will not be happy that their system is now being made redundant. Hence don't expect much value addition from them. B. There is a possibility that in an attempt to transform data to Oracle's data structure, they might induce faults/bugs. If the transformation bugs are encountered at your end in apps, you can fix them yourself. However if legacy team does transformation for you, then you become dependent on them for bug fixes. Eventually tired of waiting on them, you might end up doing transformation yourself anyway. C. If your design for transformation changes, you should not be dependent upon the legacy system...just fix it yourself at your own end in apps. Question : If we end up using interface api's in apps for data migration, then where lies the difference between migration and interfaces? Answer : Migration is a one-off activity, even though it uses the same sets of tables/API's as interfaces do. Question : Enough explanation, now give me an example. Answer : Lets assume you get a task to migrate customers from legacy system into TCA (or call it AR Receivables for simplicity). Your file from source is:lcust.dat 1000,GE, GE Capital,1000-1 1001,Cisco,Cisco Routers,1001-1 1002,Barclays,Barclays Investments,1001-1 1003,Barclays,Barclays Mortgages,1001-2 The format of data is CustomerId,Cust parent name,customer operating company name, operating company id Step 1. FTP this file to your database server and run sql*loader to load the file into a table named xx_legacy_cust, this table will have four columns, one column for each file in source. Step 2. Transform this data... For this we create two tables... XX_TRNSFRM_PARTY --parent_cust_Id --parent_cust_name XX_TRNSFRM _CUST_ACCOUNT --parent_cust_Id --operating_cust_Id --operating_cust_name Now, you can write a pl/sql program to split data from table xx_legacy_cust into the two tables listed above. Step 3. Now write the pl/sql program to migrate this data into Oracle.

54

Create or replace procedure xx_migrate_parties(errbuff out varchar2,retcode out varchar2) is Begin FOR p_party_rec in (select * from XX_TRNSFRM_PARTY ) LOOP --call api to create party Hz_Party_Site_V2pub.create_party(); For p_party_rec in (select * from XX_TRNSFRM _CUST_ACCOUNT where parent_cust_Id = p_party_rec.parent_cust-id) loop --now create a customer account hz_cust_account_v2pub.create_cust_account(..parameters l_return_status, l_msg_count, l_msg_data ); IF l_msg_count > 1 THEN FOR i IN 1 .. l_msg_count LOOP Fnd_File.put_line (Fnd_File.LOG, i || '. ' || SUBSTR (Fnd_Msg_Pub.get (p_encoded Fnd_Api.g_false ), 1, 255 ) ); END LOOP; END IF; END LOOP ; END LOOP ; END ; Now some notes:1. No two data migrations are exactly the same, hence I have given a pseudo code, and not th actual code. 2. In some cases the quality of the source data can be so bad that you may need a third party to cleanse the data before you run migration. 3. The API's used for data migration and for developing open interfaces are the same. FNDLOAD for Oracle Web ADI This article is dedicated for usage of FNDLOAD for Web ADI Question : Does this article cover FNDLOAD in general? Answer : This article is dedicated to the usage of FNDLOAD for Web ADI. If you wish to fndload entities other than Web ADI, then kindly visit link Fndload for common utilities. Question: Why does one need to use FNDLOAD FOR WEB ADI? Answer : In any implementation that uses Web ADI, the setup for formatting letters and docments can be overwhelming. More importantly, once configured on a development environment you would not like to repeat the tedious setup on test, crp or other environment. Using FNDLOAD you can migrate 99% of your setup. Question : What are the man steps when using FNDLOAD for Web ADI? Answer : First step Identify the pieces that must be moved across using fndload. These can be:Integrators Layouts Mappings Contents This article covers the above listed components one by one. Second step Download the above web adi attributes into various ldt files. Basically we will create one ldt file for each of the above four web adi entities.

=>

55

Third step Upload those ldt files into the new environment. For this we will run the fndload in upload mode. Question: How do I execute Step 1, given that FNDLOAD requires the internal names of these entities, these internal names are not visible from the Web ADI screens? Answer: In this example,I will demonstrate using scripts how to recognize the web adi components Names for fndload. SQL will be provided to identify the internal names. Question : Please demo how to FNDLOAD Integrators in Web ADI Answer : To identify the integrator codes, run the below SQL. SELECT integrator_code, application_id FROM bne_integrators_vl vl WHERE user_name IN ('XX Request for further references', 'XX Sorry Interview did not work') ; This will return two internal codes, both in application PER (Application ID 800). Lets say the two internal codes are HR_101_INTG & HR_41_INTG. Now download these as below:FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bneint.lct XX_HR_101_INTG.ldt BNE_INTEGRATORS INTEGRATOR_ASN="PER" INTEGRATOR_CODE="HR_101_INTG" FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bneint.lct XX_HR_41_INTG.ldt BNE_INTEGRATORS INTEGRATOR_ASN="PER" INTEGRATOR_CODE="HR_41_INTG" In order to upload these FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bneint.lct XX_HR_101_INTG.ldt FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bneint.lct XX_HR_41_INTG.ldt Question : Please demo how to FNDLOAD Layouts in Web ADI Answer : To identify the layout codes codes, run the below SQL. =====Find the Layouts from layout names===== SELECT LAYOUT_CODE FROM bne_layouts_vl vl WHERE user_name IN ('Offer Letter for Job', 'Denial of Job') ============== Above SQL can return values say XX_C_O_F_T & XX_CODE To download these layouts FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bnelay.lct XX_C_O_F_T.ldt BNE_LAYOUTS LAYOUT_ASN="PER" LAYOUT_CODE="XX_C_O_F_T" FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bnelay.lct XX_CODE.ldt BNE_LAYOUTS LAYOUT_ASN="PER" LAYOUT_CODE="XX_CODE" Now in order to upload these into new environment, use below commands FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bnelay.lct XX_C_O_F_T.ldt FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bnelay.lct XX_CODE.ldt Question : Please demo how to FNDLOAD mappings in Web ADI Answer : To identify the mapping codes, run the below SQL. =====Find the MAPPING CODES from integrator names== SELECT mapping_code, integrator_code FROM bne_mappings_vl

56

WHERE integrator_code IN (SELECT integrator_code FROM bne_integrators_vl vl WHERE application_id = 800 AND user_name IN ('XX HR Reference letter', 'XX HR Sorry Cant offer')) ORDER BY last_update_date DESC; Lets say this SQL returns HR_101_MAP & HR_86_MAP --Now do the download FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bnemap.lct XX_HR_101_MAP.ldt BNE_MAPPINGS MAPPING_ASN="PER" MAPPING_CODE="HR_101_MAP" FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bnemap.lct XX_HR_86_MAP.ldt BNE_MAPPINGS MAPPING_ASN="PER" MAPPING_CODE="HR_86_MAP" To upload these files into a new environment, ftp the ldt files and run below commands on the new environment FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bnemap.lct XX_HR_101_MAP.ldt FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bnemap.lct XX_HR_86_MAP.ldt Question : Is FNDLOAD of Web ADI contents similar to above? Answer : Its slightly different, as to recognize the contents I had to use the date range to pick all the content codes configured in Web ADI during the past 90 days. ===================== SELECT CONTENT_CODE FROM bne_content_cols_vl WHERE last_update_date > SYSDATE - 90 group by CONTENT_CODE ; ===================== CONTENT_CODE -------------HR_101_CNT HR_41_CNT For each content code returned by SQL above, we will now do FNDLOAD as below FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bnecont.lct XX_HR_101_CNT.ldt BNE_CONTENTS CONTENT_ASN="PER" CONTENT_CODE="HR_101_CNT" FNDLOAD apps/$APPS_PASSWORD 0 Y DOWNLOAD $BNE_TOP/admin/import/bnecont.lct XX_HR_41_CNT.ldt BNE_CONTENTS CONTENT_ASN="PER" CONTENT_CODE="HR_41_CNT" Obviously to upload Web ADI contents, use the below commands FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bnecont.lct XX_HR_101_CNT.ldt FNDLOAD apps/$APPS_PASSWORD 0 Y UPLOAD $BNE_TOP/admin/import/bnecont.lct XX_HR_41_CNT.ldt API to Update FND_USER and Add Responsibility

This article explains how you can reset the passwords and add responsibilities in APPS using scripts. This was tried and tested on 11.5.10 environment. My client: Hey Anil, we need a script to do the following:A. Update fnd_user records for some 1000 users, to reset their passwords? B: To assign all these 1000 users with a new responsibility, which happens to be a new HRMS Self Service responsibility. C. We must not reset passwords of the employees which are active on that test environment. 57

Myself: Why do we need this done? My Client: Well, we need to load test the system by simulating 1000 concurrent self service HR users...

That's the end of our talk. Now let me give you some background. Self Service HRMS kicks off a workflow each time a user logs onto system to either view or update their personal information. The reason for this approach is that SSHR uses workflow to manage the state of its transaction.
Question: Why does Oracle Self Service HR use workflow to manage its state? Answer: Because SSHR was developed before OAF was invented by Oracle. Using OA Framework, it is

possible to manage the state of a web based applications via something known as AM(Application Module).
Question : Are you saying that Self Service HR in Oracle does not use OA Framework Answer: Not saying that. In fact Oracle has re-written most of its SSHR to use the OAF, but for some

reasons(which I believe are legacy), the underlying workflow has been retained. I am not saying that this is bad design, but yet this begs to be load tested before goLive.
Question: Why is my client so concerned about load testing self service HR? Answer: Workflows have their overheads, but beyond that SSHR uses some staging tables to capture before and

after state of the personal information, while the user is updating the same. This alongwith workflow overhead may hit the system hard, hence the need for load test.
Question: OK, how do you go about reseting 1000 passwords. Answer: Well, we not only have to reset passwords of fnd_user, but also need to assign each of those users a

Self Service HR responsibility. This is how we do it:Scripts steps:Loop for latest employee records in fnd_user, excluding the recently logged in UAT users. ...inside the loop call fnd_user_pkg.updateuser ....again inside the loop call fnd_user_resp_groups_api.insert_assignment (to assign new SSHR Responsibility) ----within the loop, handle exception in case the user already has that responsibility
Question: How do you write that code? Answer: Here you go....

After the script has completed, you can spool the data from temp table .... NOTE: DO NOT RUN THIS ON PRODUCTION DECLARE duplicate_responsibility EXCEPTION; PRAGMA EXCEPTION_INIT(duplicate_responsibility ,-20001); i INTEGER := 0; no_action_required EXCEPTION; CURSOR c_get IS SELECT * FROM fnd_responsibility_vl WHERE responsibility_name = 'XX HR Employee Self Service'; p_get c_get%ROWTYPE; BEGIN OPEN c_get; FETCH c_get 58

INTO p_get; CLOSE c_get; DELETE xxschema.fu_4_which_pwd_reset; FOR p_rec IN (SELECT user_name, user_id FROM fnd_user WHERE user_name NOT IN (SELECT fu.user_name FROM fnd_user fu, fnd_logins fl WHERE fl.start_time > SYSDATE - 40 AND fu.user_id = fl.user_id GROUP BY fu.user_name, fu.user_id ) AND user_name NOT LIKE '00%' AND end_date IS NULL AND employee_id > 0 ORDER BY user_id DESC) LOOP i := i + 1; --First 1000 users only IF i = 1001 THEN RAISE no_action_required; END IF; fnd_user_pkg.updateuser(x_user_name => p_rec.user_name ,x_owner => 'SEED' ,x_unencrypted_password => 'abcd0123' ,x_password_date => SYSDATE + 500); BEGIN fnd_user_resp_groups_api.insert_assignment(user_id => p_rec.user_id ,responsibility_id => p_get.responsibility_id ,responsibility_application_id => p_get.application_id ,security_group_id => 0 ,start_date => SYSDATE - 1 ,end_date => NULL ,description => 'Load testing SSHR on Test environment'); EXCEPTION WHEN duplicate_responsibility THEN fnd_user_resp_groups_api.update_assignment(user_id => p_rec.user_id ,responsibility_id => p_get.responsibility_id ,responsibility_application_id => p_get.application_id ,security_group_id => 0 ,start_date => SYSDATE - 1 ,end_date => NULL ,description => 'Access Reinstated via Load testing SSHR on Test environment'); END; INSERT INTO xxschema.fu_4_which_pwd_reset (user_id ,user_name) VALUES (p_rec.user_id ,p_rec.user_name); END LOOP; COMMIT; 59

EXCEPTION WHEN OTHERS THEN COMMIT; END;


Forms Personalization in Oracle HRMS For quite some time I was thinking about publishing an article about forms personalization in Oracle HRMS. The Metalink note on Forms Personalization is helpful, but what it lacks is a pictorial approach to implementing Forms Personalizations. I am a visual animal, so I like to explain in that manner too. My first article in the series of Forms Personalization is in response to a question raised in Oracle Forum under Oracle Human Resources (HRMS ). As per the Oracle forum request, If the Person Type is Employee, their clients wants Person Title field to become Mandatory ( lets assume it is the title field for now). When the Person Type field changes to a value that is anything but Employee, the person title field should then toggle back to become optional. Please note that when Person type Employee is selected, value in field PERSON.D_PTU_USER_PERSON_TYPE is assigned a value of Employee Now the requirement is that for Employee field PERSON.D_TITLE must be made mandatory. There are two possible ways the Person Type can change. Either by picking a dropdown list of Action (e.g. Create Employee) or by directly picking up a value from LOV on field Person Type for Action. Whenever the person type changes, WHEN-NEW-ITEM-INSTANCE is fired for one for the below fields(depending upon how its changed). Hence forms personalization must check conditions for below three fields PERWSHRG.PERSON.PTU_ACTION_TYPE PERWSHRG.PERSON.D_PTU_USER_PERSON_TYPE PERWSHRG.PERSON.SHOW_NUMBER The demo below contains conditional check on WHEN-NEW-ITEM-INSTANCE of PERSON.PTU_ACTION_TYPE When implementing this, you will have to replicate the steps in the demo for WNII on both PERWSHRG.PERSON.D_PTU_USER_PERSON_TYPE & PERWSHRG.PERSON.SHOW_NUMBER I have tested the steps below myself, and they appear to work. OK, here we go..... STEP 1 Create Personalization as below( to make Title field mandatory) Sequence: 50 Description: Make Person Title Mandatory when Person Type is Employee. Trigger Event: WHEN-NEW-ITEM-INSTANCE Trigger Object: PERSON.PTU_ACTION_TYPE Condition: ${item.person.d_ptu_user_person_type.value} = 'Employee

60

Check if Person Type is Employee in When New Item Instance Action Sequence: 10 Action Type: Property Action Object Type: Item Action Target Object: PERSON.D_TITLE Action Property Name: REQUIRED Action Value: TRUE

Make Title mandatory when Person Type is Employee STEP 2 Create another Personalization as below ( to make Title field Optional) Sequence: 51 Description: Make Person Title Mandatory when Person Type is Employee. Trigger Event: WHEN-NEW-ITEM-INSTANCE Trigger Object: PERSON.PTU_ACTION_TYPE Condition: NVL(${item.person.d_ptu_user_person_type.value},'xxyyzz') != 'Employee'

61

Check if Person Type is anything other than Employee in When New Item Instance Action Sequence: 10 Action Type: Property Action Object Type: Item Action Target Object: PERSON.D_TITLE Action Property Name: REQUIRED Action Value: FALSE

Make Title option when Person Type is not Employee

62

Forms personalisation In this article, I would like to explain different possibilities of Forms Personalizations. Surely before explaining what can be done, first we will touch base upon what exactly it is. Why was forms personalization introduced by Oracle in 11.5.10? 1. CUSTOM.pll is a programmatic methodology for extending Oracle Forms, even for trivial tasks. 2. Multiple developers working on same CUSTOM.pll could cause version related headaches Does Forms Personalization replace CUSTOM.pll? Not really, however it does provide an alternative to most common activities for which earlier one would use CUSTOM.pll Forms personalization is driven by the same set of events as that for CUSTOM.pll. Keep in mind that Oracle Forms Libraries first invoke the Forms Personalization, and then the CUSTOM.pll too for the same set of events. How do I enable Forms Personalizations? Enable the personalizations using the Help/Diagnostics menu.

What are the various components of Forms Personalizations? Different components of Oracle Forms Personalizations are listed below. You begin with recognizing which Triggers/Events that you wish to trap and under what conditions. The condition can be entered using the syntax as defined in the picture below.

63

64

También podría gustarte