Sunday, 19 April 2015

Application designer FAQ-40

Application designer FAQ-40



1. What is a collapsible grid? How to make a normal grid as a collapsible grid?                          

Ans)   Collapsible grid can be minimized or maximized with in a page.
In grid properties - Use tab check “Collapsible Data Area” (same for Scroll Area and Group box)
If applicable, add People Code to expand or collapse the group box/grid/scroll area, based on data in the Transactions and/or configuration data. This saves the user from having to open the collapsible section manually each time, which creates an additional transmission to the server in order to redisplay the page with the section expanded.

This is required when we want to display or hide the fields in group box on page organized in different groups using hyperlink or button.
For this we can use DataAreaCollapsed property and functionality can be achieved by setting this property to true or false.
One thing to remember is that you must set the group box as Collapsible Data Area on the page field properties for the group box in PeopleSoft Application Designer before you could this property.

To collapse (Hide):
&TEST1.DataAreaCollapsed = True;

to expand (show):
&TEST1.DataAreaCollapsed = False;

Here &TEST1 can be either a collapsible grid or group box or scroll area.


2. Scenario: If a component having a 2 pages, when we are trying to add a new page to the same component, is that page can visible in a portal or not? If not why?   

 Ans) By simple adding a one or more pages to the existing component(Pre Registered) and trying to view the currently added page through three tire then this page will not be visible in a portal.
To view the current pages in the portal, Make following setting in permission & roles tab                         Navigation:  People Tools - Security - Permissions & roles - permissio Lists    Begin with: HCCPFGALLP
In ‘Pages ‘tab edit component to the respective menu component.

 
Now Save the component And you will be able to view the added page in the portal.

3. Define a tabbed grid?        
                                                                                                                  
 Ans) A Grid with Tab separator is known as Tabbed grid.       Navigation:  Insert a Tab separator.

4. Application development steps?     
     
 Ans)   1. Design application.    
             2. Create fields.     
             3. Create record definitions.   
             4. Build SQL tables.      
             5. Create pages.      
             6. Create components.    
             7. Register components.          
             8. Test the application.

5. Explain Translate about the translate values?

Ans) - This field consists of acceptable values a field can hold (for example an employee can select present or absent or not available status in status field. He cannot specify any other status. In such situations we can use translate field.)
- This restricts the user to enter only the acceptable values while inserting data into PeopleSoft tables.
Conditions for creating translate fields
· Field type must be character.
· The length of Field must be between 1 and 4.
· PeopleSoft has suggested to use maximum of 40 translate values for better performance.
· If no. of translate values> 40, then we use prompt table.
 Translate values are store in ‘PSXLATITEM’ TRANSLATE VALUE TABLE.

6. Difference between translate values and prompt values?

Ans)  Translate values are values we give/define at field level that is its value
is defined in field properties. E.g. for a field like Gender we can use translate
values MALE & FEMALE.   These values are stored in XLATTABLE.

Prompt table values are record level values..that is we can define a field of a
record as prompt table by giving the prompt table name and field in its record
field properties...So all the values of that field will be displayed as a drop
down list in the page. This is stored in PSRECFIELD.

7. What is the difference between prompt table edit prompt tables with no edit?

Ans) With Prompt table edit user can select values from the prompt table list box only, but can’t enter any other value other than prompt table value. Whereas prompt table ‘no edit’ user can select values from the list as well as can enter his own value.

8.  How to find out one PeopleSoft object used in different object places?

Ans) Right click on selected object - Find Definition Reference.

9. Record types are available in PeopleSoft?

Ans) There are 7 record types       1. SQL Table      (xxx_tbl)                     2. SQL View      (xxx_vw)        
3. Dynamic View   (xxx_dvw)       4. Derived/Work Record (xxx_wrk)       5. Sub Record    (xxx_sbr)        
6. Query View   (xxx_qvw)           7. Temporary Tables. (xxx_tm or  temp)        


10. What are the differences between sql view, query view and dynamic view?

Ans)  SQL View :  It refer one or more fields from different tables, this give a filtered view of  information store in a tables, Whenever you need to need to modify a record check if any views are dependent on this table.
Query View:  Using Query view we don’t need to write a query, we can generate query automatically by dragging and dropping fields.
Dynamic View: Dynamic View can’t be built. A record definition that can be used like a view in pages and people code but it is not store in database. 

11. What is flexibility of sub record?

Ans) Using sub record we can group similar and commonly used fields into one group. Sub record is used for re usability by including in to main record.sub record can’t be built individually.

12. What are the mutually exclusive keys in the record field properties?

Ans) Key, Duplicate Order Key and Alternate Search Key.

13. Explain auditing in PS?

Ans)  Auditing table are specially designed on a particular table and used to keep track of information by whom, when and which fields are updated, deleted or inserted in a record. The following 7 steps used to define a Record level Auditing
  
1. Choose the Record

not all records in PeopleSoft need auditing. When there is such a business requirement, choose the record(s) that needs to be audited.
 

2. Create the Audit Record

The Audit record is essentially a copy of the record being audited. The easiest way to create a copy of your record is to do a Save As. Name the new record under standard record naming convention prefixed with AUDIT_


3. Remove the unwanted

An Audit record doesn’t need keys, so remove them. The same rule goes with Related Language Records, Query security records and peoplecode. Also, remove all other fields that you are not interested in.

4. Add Audit Fields

Insert the below fields (also known as audit fields) at the top of the new record in the below order  AUDIT_OPRID (Captures the User who performed an action)
AUDIT_STAMP (Captures the date and time when the action was performed)
AUDIT_ACTN (Captures the type of action performed)
AUDIT_RECNAME (Captures the name of the audited record definition. This field is used only when the same audit record is used for auditing multiple records)
  Audit Fields
On the Record Field Properties for AUDIT_STAMP, we need to check the Auto-Update check-box. This is essential to correctly populate the date-time stamp.
   Auto Update property
AUDIT_ACTN can take up any of the below values based on the type of the action performed.
A – Row inserted
D – Row deleted.
C – Row changed (updated), but no key fields changed.
K – Row changed (updated), and at least one key field changed.
N – Row changed (updated), and at least one key field changed.
In case of C and K the system writes old values to the audit table. While for N, the new values are written into the audit table.

5. Build the audit record

Your Audit record must be a Database record and you should be able to access it using Query.

6. Link them up

Open the Base Record that is to be audited. Open its properties. On the Use tab, under the Record Audit, specify the name of the audit record that we just created as the Record Name. Choose Audit Options based on your requirement.
  Audit Record Mapping
 Add – An Audit table row is inserted when a row is inserted in the base record
Delete – An Audit table row is inserted when a row is deleted from the base record
Change – Audit table row(s) is inserted when a row changes in the base record
Selective – Audit table row(s) is inserted when common field (present in both base record and audit record) changes


7. Test the Auditing

Based on the Audit option that you have chosen, perform some transaction that can trigger the audit. Now query the audit record and check for new rows. Try to infer the meaning of each row that got added.


14. What is record auditing and field auditing?

Ans) As PeopleSoft maintains critical enterprise data, having an audit trail on critical data
Field level auditing tracks changes to one, two or three fields (more than 3 we go for record level audit) on a PeopleSoft record and stores the results in the delivered PSAUDIT table.  Field level auditing only applies to data updated through PeopleSoft and not directly through the database. To enable field level auditing, simply update the record-field properties of the relevant fields on the PeopleSoft record.

15. Explain DCF and RDCF?

Ans) Display Control Field is to control the display of Related  display field .Related Display field always references a row that is not being updated from the current page(Display only field))The value in the Related Display Control Field is  based on the value selected in Display Control Field . Display Control Field and Related Display Control Field both must be in same level.

16. What are the actions are available in the PS Component?

Ans) Add, Update/Display, Update/Display All, Correction.

17. How to bypass the search page?

Ans) A search record should not have any search key

18. What are the new menu types are available in PS ?

Ans) Standard and Popup menu

19. What are the types available in menu item properties?
Ans) Component, Peoplecode, Separator.

20. Related Language records?

Ans)PeopleSoft is capable of maintaining application data in multiple languages within the same database. This feature is driven by special records called Related Language Records that store language sensitive information in all required languages other than the base language of the system
The prerequisites are
1) name the related language record as _LANG
2) should have LANGUAGE_CD field as key field along with all the key field from base record and all language sensitive fields from base record.

21. Parent child relationship in PS?

Ans) Every child record should have key fields of parent and at least one additional key field of its own.

22. Levels in a page?      Ans) 3 levels, 0,1,2,3.

23. Explain subpage and secondary page?

Ans)  Sub-pages are a powerful means of factoring out commonly used page functionality in your application. Duplicating the same set of page fields on two or more pages, you can create a single sub-page that contains those page fields and add it to any page.
Secondary page is just another page to the user at run-time; they look and behave differently than the primary pages. You can view a secondary page from its primary page only.


24. What is the search edit record field property and what is its significance?

Ans) "SetSearchEdit () function is for limiting the user search to '=' and to 'IN' operators.
if you want to search the data of Employee ID '12345' so on the search page you have to enter the whole Employee ID '12345'. If you will think that after entering only '123' in search field will enlist all the employee IDs starting with '123', search edit set on employee ID will prevent this from happening and search will give some error.
So now your search is limited to '=' or 'IN' only as:
EMPLID = '12345'    or    EMPLID IN ('12345')
If you want to remove search edit from some field, simply use function ClearSearchEdit() on SearchInit for this. "

25. Explain Effective date and effective status?

Ans) EFFDT is to get current date and Effective status indicates which row is currently active and which rows were previously active (inactive) for configuration history.

26. Write effective dated query?

Ans) SELECT A.EMP FROM PS_EMPLOYEE A WHERE A.EFF_DT = (SELECT MAX (EFF_DT) FROM PS_EMPLOYEE B WHERE
     A.EMPL_ID = B.EMPL_ID AND A.EFFSEQ = (SELECT MAX (EFFSEQ) FROM PS_EMPLOYEE C WHERE A.EMPL_ID =
     C.EMPL_ID AND B.EMPL_ID = C.EMPL_ID AND C.EFF_STATUS = (SELECT EFF_STATUS FROM PS_EMPLOYEE
     WHERE EFF_STAUS LIKE ‘ACTIVE’)))

27. What is effective status?

Ans) Effective status indicates which row is currently active and which rows were previously active (inactive) for configuration history.

28. What is search record and add search record?

Ans) Search record: Specify the search record for this component.
    Add search record: Specify if you want a different search record specifically for add actions.

29. What are the build options available when building a record?

Ans)  Create Tables, Create Indexes, Create Views, Alter Tables, and Create Trigger.

30. Build executes options?

Ans) Build script file, Execute SQL now, Execute and build script.

31. How to copy project from file to AD?

Ans)  ToolsàCopy Projectàfrom File.
  
32. Use of compare and report in AD?

·                        The compare reports are critical tools for the Fit/Gap analysis and determining the effort to re-apply/re-develop customizations.
·                        The PeopleSoft Compare Reports provide a comparison of PeopleSoft delivered functionality (vanilla) at the new release level to a client’s copy of production.
·                        The compare process is executed to identify the object and system data differences between current production and new release levels.
·                        The purpose of the compare report is to identify which customizations, objects and system data to upgrade to the new release level.
·                        The technical team will run the compare process and involve the client/functional team in the analysis to make the appropriate business decisions.
·                        When you review the compare reports always look at the following combinations and take the appropriate action.
Source
Target
Action
Unchanged
Changed*
Keep Target
Changed
Changed*
Copy and re-apply customization
Absent
Changed*
Keep Target
All other
Copy
Generating and reviewing the compare reports valuable insight to the level of customization.

33. How to view report from AD?  

From Application designer …File>report from file>view report

34. How to define a security in ad? 

 From Application designer …go>define security

35. What is the display folder tabs? Where it is available?

 Componentproperties -internet>display folder tabs

36. How to invoke secondary pages?

Ans)  1) Through Push Button or Hyperlink. 2) DO MODEL people code function in Push button field change event

37. Occur level and occur count?

Ans)
Occur level: determine the level of the object on the page.                                      
Occur count: determine the number of rows should be display on that level.

38. What is the difference b/w scroll and grid?

Ans)
Scroll area shows one row of data at a time whereas the grid shows multiple rows at a time.
There can be a scroll or a grid inside a scroll but there cannot be a grid inside a grid.

 39. How many types of Displays are there in the tool bar?
Ans)  
1. Field Display - It shows the field attributes (fieldname, Type, Len, Format, H, and Short name, Long name).
2. Use Display - It shows key related characteristics and default values for the fields (Field name, type, direction indicates, search key, list, system indicates, audit, H, default values)
3. Edit Display - It shows the auditing options available for the fields (field name, type required, edit, prompt table, reasonable date, and people code)
4. People code display - It shows the different events and the user can choose required event to write people code.          

40. Explain about include history and correct history?                                                                                                                        
Ans) Correct History: Able to view and correct the past and current information based on the EFFDT.                               Include History: Able to view the past information based on the EFFDT but can’t correct the past information.




Effective Dated Query


Effective Dated Query:


SELECT * FROM PS_JOB J
WHERE J.EMPLID =  0052
      AND J.EFFDT = (SELECT MAX(J1.EFFDT)
                   FROM PS_JOB J1
                         WHERE J1.EMPLID = J.EMPLID

                               AND J1.EMPL_RCD = J.EMPL_RCD

                               AND J1.EFFDT <= SYSDATE)

     AND J.EFFSEQ = (SELECT MAX(J2.EFFSEQ)

                      FROM PS_JOB J2
 
                          WHERE J2.EMPLID = J.EMPLID

                               AND J2.EMPL_RCD = J.EMPL_RCD

                               AND J2.EFFDT = J.EFFDT) 
   

SQL Server 2



DML:-

----Data  Manipulation Language.
----These commands are used to work on data in tables.
  

They Can be Remembered as SUDI.

S-Select
U-Update
D-Delete
I- Insert

SELECT:-

Ex:- 

SELECT * FROM PS_AAPENG_TBL ORDER BY ANAME
SELECT EMPLID,SALARY FROM PS_DEMO_TBL

UPDATE:-

Ex:-

UPDATE PS_J_DEMO SET EMPLID='E002' WHERE EMPLID='E001'

DELETE:-

Ex:-

DELETE FROM PS_DEMO_TBL
DELETE FROM PS_AAPENG_TBL WHERE ASALARY='20000'

INSERT:-

Ex:-

INSERT INTO PS_J_DEMO  VALUES('E001','XXX','12/07/2014',15000)


INSERT INTO PS_J_DEMO (EMPLID,NAME,DOJ,SALARY) VALUES('E001','XXX','12/07/2014',15000)


Sunday, 12 April 2015

Temporary Tables Info


Temporary Tables Info

Temporary tables are used exclusively with Application Engine programs and are intended to provide parallel processing. The Application Engine programs may be executed online via CallAppEngine or invoked through the Process Scheduler.

Parallel or concurrent processing allows multiple instances of an Application Engine program to execute against the same tables while drastically reducing the risk for table contention.

Batch process performance can be improved by splitting the data to be processed into groups and simultaneously running multiple instances of the program to deal with different groups of data. For example, students could be processed by last name by splitting the group into multiple groups alphabetically. 

If you have a program that uses a temporary table and it is invoked multiple times, that single temporary table could be used concurrently in multiple executions of the code.

This could create unpredictable results since the different instances of the code would be issuing Deletes, Inserts, and/or Updates unsynchronized with each other.

You could solve this problem by creating multiple temporary tables as a pool of tables. Each invocation of your program would have to allocate an unused temporary table, mark it as “in use” and release it back to the pool when you are through with it. 

By using the Temporary Table record type definition, you are able to define a record and the PS Build process will build multiple uniquely named copies of your Temporary Table as a pool. 

Additionally, PS does Temporary Table management for your Application Engine programs. You can code your program with supplied meta‐SQL (%Table) so each execution of your Application Engine program will be given access to its own copy of the Temporary Table for its exclusive use. When the program ends, the table will be returned to the pool of Temporary Tables.

 Temporary Table Pools 

Online Pool

1.Defined in PeopleTools Options by PS Admins. Our current setting is five (5).

2.Used by Application Engine programs invoked by CallAppEngine.

Batch Pool 

1.Defined in Application Engine program properties. Properties that must be set include:

2.Assign Temporary Tables to the Application Engine program (Temp Table tab) 

3.Set the Instance Count (Temp Table tab). The number entered here will dedicate the number of instances requested for the AE program. 

4.Set the Runtime option (Temp Table tab). 
This is the action the AE program will take if batch/dedicated tables cannot be allocated at run time.   

Continue – the base table will be used instead (using Process Instance)

Abort – program execution terminates.

Set the Batch Only checkbox (Advanced tab). If the program will only be run in batch mode and not executed from the CallAppEngine() PeopleCode function, you should use this checkbox. Any dedicated temporary tables used for Batch Only programs do not have online instances created. 

Important Notes 

1.Instance Count and the Batch Only checkbox should be set prior to building the record definition.

2.If the temporary table was originally built with online instances (Batch Only checkbox is not checked) and then changed to “batch only”, online tables must be dropped manually.

Program Meta‐SQL 
A critical step in implementing parallel processing is to make sure that you’ve included all of the appropriate meta‐SQL within the PeopleCode that your Application Engine program executes. 
To reference a temp table (Online or Batch), you need to use:
%Table(record) 
You can reference any table with %Table, but only those records defined as Temporary Tables get replaced by Application Engine with a numbered instance of a Temporary Table from the Temporary Table pool.
For batch/dedicated Temporary Tables, when Application Engine resolves any %Table, it checks an internal array to see if a Temporary Table instance has already been chosen for the current record. If so, then Application Engine substitutes the chosen table name. If there are no more batch/dedicated instances available, then Application Engine uses the base table instance by default (if the Runtime option Continue has been chosen). Regardless of whether %Table is in PeopleCode SQL or in an Application Engine SQL Action, the program uses the same physical SQL table.

For synchronous calls to Application Engine, an available instance number will be selected at random according to internal rules. Synchronous refers to using the CallAppEngine PeopleCode function; all other methods that you use to invoke Application Engine programs are asynchronous which means the page is not “frozen” while the program runs to completion.

 Populate your Temporary Table Process Instance with the Process Instance 

All temporary tables should be keyed by Process Instance as a general rule. Also, if you have opted to use the “Continue” runtime option when batch/dedicated tables can’t be assigned, Process Instance is required as a key field. The current Process Instance is automatically put into the State record, but when you Insert rows into your Temporary Tables you must supply that Process Instance. 
%ProcessInstance or %Bind(PROCESS_INSTANCE) 
This meta‐SQL returns the numeric (unquoted) Process Instance. The %PROCESSINSTANCE meta‐SQL is more efficient and faster than using the %Bind(PROCESS_INSTANCE).

Note: The Process Instance value is always zero for programs initiated with CallAppEngine. This is because the program called with CallAppEngine runs “in process”, that is, it runs within the same unit of work as the component with which it is associated.

Clear Temporary Tables (%TruncateTable) 

You do not need to delete data from a Temporary Table manually. The Temporary Tables are truncated automatically at the end of processing. If the shared base table hasbeen allocated because no batch/dedicated instances were available, then Application Engine performs a delete of rows by Process Instance instead of performing a truncate. In such a case, the PROCESS_INSTANCE is required as a high‐level key.

You can perform additional deletes of Temporary Table results during the run, but you will need to include your own SQL Action that does a %TruncateTable. 

Implementing Parallel Processing 

There is no simple switch or checkbox that enables you to turn parallel processing on and off. To implement parallel processing, you need to complete a set of tasks in the order that they appear in the following list.

1. Define your Temporary Tables by defining and saving your Temporary Table records
as type “Temporary Table”.

2. Set the Temporary Table Online pool. This will set the basic Temporary Table
Online pool based on the PeopleTools Options specifications. (Note: This is done one
time by the PS Admin group).

3. Assign Temporary Tables to your Application Engine program in its Program
Properties, setting the appropriate number of Instance Counts and Runtime option.

4. Build/Rebuild your Temporary Table record. This will build the necessary Batch
temporary tables into that record’s Temporary Table pool for use at execution time.

5. Code %Table meta‐SQL as references to Temporary Tables in your Application Engine
program, so that Application Engine can resolve table references to the assigned
Temporary Table instance dynamically at runtime.