Monthly Archives: July 2017

DFF dynamically vary using a Reference Field

Overview of Requirement

I had a requirement to enable a field in DFF to capture a field called POS Machine. The Field should automatically read from the table value and should be enabled dynamically without user response.

Step 1 : Find the DFF

To check what is the DFF find it by table information. Our data will sit in AR_CASH_RECEIPTS_ALL.

So take the same and query in DFF screen

Navigation

Application Developer => Flexfield => Descriptive => Register

Query the same with AR_CASH_RECEIPTS_ALL and get the Title that is Receipt Information. This is the exact DFF that we are looking for.

select * from AR_RECEIPT_METHODS

In this the we are taking a RECEIPT_METHOD_ID which is linked to AR_CASH_RECEIPTS_ALL table.

Step : 2 Enter the Reference Field in DFF Register.

Navigation

Application Developer => Flexfield => Descriptive => Register

Query the Receipt Information in DFF and click on Reference Fields to enter the RECEIPT_METHOD_ID

Step : 3 Enter Reference Field Values

Now go to the DFF screen and enter RGW_FOLDER.RECEIPT_METHOD_ID as with this we will be choosing the value and enter the valid value in the Context Field Values.

So whenever the DFF looks for the value mentioned it will automatically set the DFF in the page.

Step : 4 Testing

Go to Receivables Manager => Receipts => Receipts

Now our requirement is fulfilled as seen in the above screenshot.

Note: We have changed the reference value from RECEIPT_METHOD_ID to RGW_FOLDER.RECEIPT_METHOD_ID as because we were facing the error while reversing the receipt.

 

 

 

 

Descriptive Flex-fields DFF in Oracle Apps

Descriptive flex-fields lets you add additional fields to the form in order to track additional information needed by the business that would not be captured by the standard form. Descriptive flex-fields can be context sensitive, where the information your application stores depends on other values your users enter in other parts of the form.

A descriptive flex-field appears on a form as a single–character, unnamed field enclosed in Square Brackets [ ]. Each field or segment in a descriptive flex-field has a prompt and can have a set of valid values.

Descriptive Flex-field Concepts:

Descriptive flex-fields have two different types of segments, global and context–sensitive.

A global segment is a segment that always appears in the descriptive flex-field pop–up window.

A context–sensitive segment is a segment that may or may not appear depending upon what other information is present in your form.

A descriptive flex-field can get context information from either a field somewhere on the form, or from a special field (a context field) inside the descriptive flex-field pop–up window. If the descriptive flex-field derives the context information from a form field (either displayed or hidden from users), that field is called a reference field for the descriptive flex-field.

For Example , Had Taken the Purchase order form and enabled the DFF Field.

Go to Purchasing —>Purchase order–> Purchase Order

       

To enable DFF Go to

Switch Responsibility to Application Developer.

Define Value Set:

Switch Responsibility to Application Developer–>Flexfield—>Descriptive–>Sets.

Value sets are defined to identify the valid values that are permissible for each segment of the Chart of Accounts.

Then Define the Descriptive FlexField Segments.

Go to Application developer-flexfield–>Descriptive–> Segments

Query with the Application as’ Purchasing’ and Title as ‘PO Headers’

Before Entering you have Uncheck the Freeze Flexfield Definition. Then check the Required context fields.

Then click on the Segments. Enter the Segments which will reflect in the Purchase Order DFF Field

Save it . Then Check the Freeze Descriptive Definition and compile it.

The DFF can be disable by Unfreeze the DFF segments first and Uncheck the Enabled check box of Descriptive Flexfield Segments .After Disabling the DFF Segments Check the Freeze Flexfield Definition and Compile the segment.

Then go to View–> Request–>find. Will see the Concurrent Program” Flexfield View Generator” running. After the Completion of the concurrent Program we can view the DFF in the purchase order form.

Switch resp to Purchasing–>purchase order—> Purchase Order

Oracle BI Publisher for Word Desktop Uninstallation Steps

Uninstall Template Builder
1. Uninstall the Template Builder from the Control Panel->Add or remove programs.
2. Go to C:\Program Files\Oracle and make sure the BI Publisher directory is gone. Delete it if it is still there.
3. Check Add-Ins in Word and make sure the 3 BI Publisher Desktop .dot files do not appear. Delete them if they do. These files are from Template Builder 10g.
TBCrosstab.dot
TemplateBuilder.dot
WordAnalyzer.dot
The files will usually be here. C:\Documents and Settings\<user name><Application Data\Microsoft\Word\STARTUP
4. Open Windows Explorer and go to “C:\WINDOWS\assembly”.
5. Check if there are assemblies which start with “TB” If present, remove them all.
6. Open MS Word and check that that the BIP tool bar cannot be seen.
If one sees the menu, please move Normal.dot to another directory and try again.
Ref: https://blogs.oracle.com/xmlpublisher/entry/template_builder_woes_1

 

User Hooks in Oracle Apps for comments validation

I had a requirement to Validate the comments for certain leave types. So I first try to do the same in BG_ABSENCE_DURATION Fast formula. However I was facing some problem that is

  • Not able to capture comments or Absence Attendance Id in fast formula
  • While clicking on next only the record will get created and comments will be passed still it was complex to write logic in FF

So I went with User Hooks.

In simple words user hooks is functionality provided in Oracle HRMS for validating or extending our custom functionality based on business rules.

What we can do with user hooks is : Validate EIT, SIT, Absence and manipulate and maintain the data for Oracle to our tables

Attention: You should not manually edit the API source code files supplied by Oracle If you do modify these codes, Oracle Applications will be unable to support the product, and upgrades may not be possible. Oracle Applications only supports direct calls to the published APIs. Direct calls to any other server-side package procedures or functions that are written as part of the Oracle HRMS Applications suite are not supported.

Note: All Oracle HRMS forms does not use HRMS APIs, User hook can be implemented for only those forms which perform functions through API. The HR_API_HOOKS table holds all available API hooks for APIs in HR_API_MODULES table.

Implementation Steps For User Hooks

Four steps are required to implement API User Hooks:

Step 1 – Identifying the correct User Hook API

SELECT ahk.api_hook_id,
ahk.api_module_id,
ahk.hook_package,
ahk.hook_procedure
FROM hr_api_hooks ahk, hr_api_modules ahm
WHERE ahm.module_name like ‘%_PERSON_ABSENCE%’
AND ahm.api_module_type = ‘BP’
AND ahk.api_hook_type = ‘AP’
AND ahk.api_module_id = ahm.api_module_id

It will show all Person Absence relevant APIs.We need to select the correct API that matched with our requirement. For Example for above mentioned requirement, we shall select CREATE_PERSON_ABSENCE_A API. We shall note its API_HOOK_ID (3840) and API_MODULE_ID (1731) as API_HOOK_ID will be used at the time of registration of user hook mentioned in Step 3 ahead and API_MODULE_ID will be needed in running the processor in Step 4.

Step 2. Create PL/SQL procedure to execute your logic.

CREATE OR REPLACE PACKAGE APPS.XXHW_ABS_USERHOOK_PKG
AS
PROCEDURE XXHW_CREATE_ABS_VAL_P
(P_EFFECTIVE_DATE in DATE
,P_PERSON_ID in NUMBER
,P_BUSINESS_GROUP_ID in NUMBER
,P_ABSENCE_ATTENDANCE_TYPE_ID in NUMBER
,P_ABS_ATTENDANCE_REASON_ID in NUMBER
,P_COMMENTS in LONG
,P_DATE_NOTIFICATION in DATE
,P_DATE_PROJECTED_START in DATE
,P_TIME_PROJECTED_START in VARCHAR2
,P_DATE_PROJECTED_END in DATE
,P_TIME_PROJECTED_END in VARCHAR2
,P_DATE_START in DATE
,P_TIME_START in VARCHAR2
,P_DATE_END in DATE
,P_TIME_END in VARCHAR2
,P_ABSENCE_DAYS in NUMBER
,P_ABSENCE_HOURS in NUMBER
,P_AUTHORISING_PERSON_ID in NUMBER
,P_REPLACEMENT_PERSON_ID in NUMBER
,P_ATTRIBUTE_CATEGORY in VARCHAR2
,P_ATTRIBUTE1 in VARCHAR2
,P_ATTRIBUTE2 in VARCHAR2
,P_ATTRIBUTE3 in VARCHAR2
,P_ATTRIBUTE4 in VARCHAR2
,P_ATTRIBUTE5 in VARCHAR2
,P_ATTRIBUTE6 in VARCHAR2
,P_ATTRIBUTE7 in VARCHAR2
,P_ATTRIBUTE8 in VARCHAR2
,P_ATTRIBUTE9 in VARCHAR2
,P_ATTRIBUTE10 in VARCHAR2
,P_ATTRIBUTE11 in VARCHAR2
,P_ATTRIBUTE12 in VARCHAR2
,P_ATTRIBUTE13 in VARCHAR2
,P_ATTRIBUTE14 in VARCHAR2
,P_ATTRIBUTE15 in VARCHAR2
,P_ATTRIBUTE16 in VARCHAR2
,P_ATTRIBUTE17 in VARCHAR2
,P_ATTRIBUTE18 in VARCHAR2
,P_ATTRIBUTE19 in VARCHAR2
,P_ATTRIBUTE20 in VARCHAR2
,P_OCCURRENCE in NUMBER
,P_PERIOD_OF_INCAPACITY_ID in NUMBER
,P_SSP1_ISSUED in VARCHAR2
,P_MATERNITY_ID in NUMBER
,P_SICKNESS_START_DATE in DATE
,P_SICKNESS_END_DATE in DATE
,P_PREGNANCY_RELATED_ILLNESS in VARCHAR2
,P_REASON_FOR_NOTIFICATION_DELA in VARCHAR2
,P_ACCEPT_LATE_NOTIFICATION_FLA in VARCHAR2
,P_LINKED_ABSENCE_ID in NUMBER
,P_BATCH_ID in NUMBER
,P_CREATE_ELEMENT_ENTRY in BOOLEAN
,P_ABS_INFORMATION_CATEGORY in VARCHAR2
,P_ABS_INFORMATION1 in VARCHAR2
,P_ABS_INFORMATION2 in VARCHAR2
,P_ABS_INFORMATION3 in VARCHAR2
,P_ABS_INFORMATION4 in VARCHAR2
,P_ABS_INFORMATION5 in VARCHAR2
,P_ABS_INFORMATION6 in VARCHAR2
,P_ABS_INFORMATION7 in VARCHAR2
,P_ABS_INFORMATION8 in VARCHAR2
,P_ABS_INFORMATION9 in VARCHAR2
,P_ABS_INFORMATION10 in VARCHAR2
,P_ABS_INFORMATION11 in VARCHAR2
,P_ABS_INFORMATION12 in VARCHAR2
,P_ABS_INFORMATION13 in VARCHAR2
,P_ABS_INFORMATION14 in VARCHAR2
,P_ABS_INFORMATION15 in VARCHAR2
,P_ABS_INFORMATION16 in VARCHAR2
,P_ABS_INFORMATION17 in VARCHAR2
,P_ABS_INFORMATION18 in VARCHAR2
,P_ABS_INFORMATION19 in VARCHAR2
,P_ABS_INFORMATION20 in VARCHAR2
,P_ABS_INFORMATION21 in VARCHAR2
,P_ABS_INFORMATION22 in VARCHAR2
,P_ABS_INFORMATION23 in VARCHAR2
,P_ABS_INFORMATION24 in VARCHAR2
,P_ABS_INFORMATION25 in VARCHAR2
,P_ABS_INFORMATION26 in VARCHAR2
,P_ABS_INFORMATION27 in VARCHAR2
,P_ABS_INFORMATION28 in VARCHAR2
,P_ABS_INFORMATION29 in VARCHAR2
,P_ABS_INFORMATION30 in VARCHAR2
,P_ABSENCE_ATTENDANCE_ID in NUMBER
,P_OBJECT_VERSION_NUMBER in NUMBER
);
END XXHW_ABS_USERHOOK_PKG;

 

CREATE OR REPLACE PACKAGE BODY APPS.XXHW_ABS_USERHOOK_PKG
IS
PROCEDURE XXHW_CREATE_ABS_VAL_P (
P_EFFECTIVE_DATE IN DATE,
P_PERSON_ID IN NUMBER,
P_BUSINESS_GROUP_ID IN NUMBER,
P_ABSENCE_ATTENDANCE_TYPE_ID IN NUMBER,
P_ABS_ATTENDANCE_REASON_ID IN NUMBER,
P_COMMENTS IN LONG,
P_DATE_NOTIFICATION IN DATE,
P_DATE_PROJECTED_START IN DATE,
P_TIME_PROJECTED_START IN VARCHAR2,
P_DATE_PROJECTED_END IN DATE,
P_TIME_PROJECTED_END IN VARCHAR2,
P_DATE_START IN DATE,
P_TIME_START IN VARCHAR2,
P_DATE_END IN DATE,
P_TIME_END IN VARCHAR2,
P_ABSENCE_DAYS IN NUMBER,
P_ABSENCE_HOURS IN NUMBER,
P_AUTHORISING_PERSON_ID IN NUMBER,
P_REPLACEMENT_PERSON_ID IN NUMBER,
P_ATTRIBUTE_CATEGORY IN VARCHAR2,
P_ATTRIBUTE1 IN VARCHAR2,
P_ATTRIBUTE2 IN VARCHAR2,
P_ATTRIBUTE3 IN VARCHAR2,
P_ATTRIBUTE4 IN VARCHAR2,
P_ATTRIBUTE5 IN VARCHAR2,
P_ATTRIBUTE6 IN VARCHAR2,
P_ATTRIBUTE7 IN VARCHAR2,
P_ATTRIBUTE8 IN VARCHAR2,
P_ATTRIBUTE9 IN VARCHAR2,
P_ATTRIBUTE10 IN VARCHAR2,
P_ATTRIBUTE11 IN VARCHAR2,
P_ATTRIBUTE12 IN VARCHAR2,
P_ATTRIBUTE13 IN VARCHAR2,
P_ATTRIBUTE14 IN VARCHAR2,
P_ATTRIBUTE15 IN VARCHAR2,
P_ATTRIBUTE16 IN VARCHAR2,
P_ATTRIBUTE17 IN VARCHAR2,
P_ATTRIBUTE18 IN VARCHAR2,
P_ATTRIBUTE19 IN VARCHAR2,
P_ATTRIBUTE20 IN VARCHAR2,
P_OCCURRENCE IN NUMBER,
P_PERIOD_OF_INCAPACITY_ID IN NUMBER,
P_SSP1_ISSUED IN VARCHAR2,
P_MATERNITY_ID IN NUMBER,
P_SICKNESS_START_DATE IN DATE,
P_SICKNESS_END_DATE IN DATE,
P_PREGNANCY_RELATED_ILLNESS IN VARCHAR2,
P_REASON_FOR_NOTIFICATION_DELA IN VARCHAR2,
P_ACCEPT_LATE_NOTIFICATION_FLA IN VARCHAR2,
P_LINKED_ABSENCE_ID IN NUMBER,
P_BATCH_ID IN NUMBER,
P_CREATE_ELEMENT_ENTRY IN BOOLEAN,
P_ABS_INFORMATION_CATEGORY IN VARCHAR2,
P_ABS_INFORMATION1 IN VARCHAR2,
P_ABS_INFORMATION2 IN VARCHAR2,
P_ABS_INFORMATION3 IN VARCHAR2,
P_ABS_INFORMATION4 IN VARCHAR2,
P_ABS_INFORMATION5 IN VARCHAR2,
P_ABS_INFORMATION6 IN VARCHAR2,
P_ABS_INFORMATION7 IN VARCHAR2,
P_ABS_INFORMATION8 IN VARCHAR2,
P_ABS_INFORMATION9 IN VARCHAR2,
P_ABS_INFORMATION10 IN VARCHAR2,
P_ABS_INFORMATION11 IN VARCHAR2,
P_ABS_INFORMATION12 IN VARCHAR2,
P_ABS_INFORMATION13 IN VARCHAR2,
P_ABS_INFORMATION14 IN VARCHAR2,
P_ABS_INFORMATION15 IN VARCHAR2,
P_ABS_INFORMATION16 IN VARCHAR2,
P_ABS_INFORMATION17 IN VARCHAR2,
P_ABS_INFORMATION18 IN VARCHAR2,
P_ABS_INFORMATION19 IN VARCHAR2,
P_ABS_INFORMATION20 IN VARCHAR2,
P_ABS_INFORMATION21 IN VARCHAR2,
P_ABS_INFORMATION22 IN VARCHAR2,
P_ABS_INFORMATION23 IN VARCHAR2,
P_ABS_INFORMATION24 IN VARCHAR2,
P_ABS_INFORMATION25 IN VARCHAR2,
P_ABS_INFORMATION26 IN VARCHAR2,
P_ABS_INFORMATION27 IN VARCHAR2,
P_ABS_INFORMATION28 IN VARCHAR2,
P_ABS_INFORMATION29 IN VARCHAR2,
P_ABS_INFORMATION30 IN VARCHAR2,
P_ABSENCE_ATTENDANCE_ID IN NUMBER,
P_OBJECT_VERSION_NUMBER IN NUMBER)
IS
L_ABSENCE_TYPE VARCHAR2 (500) := NULL;
L_ASSIGNMENT_ID NUMBER;
L_ABSENCE_START_DATE DATE
:= NVL (P_DATE_START, P_DATE_PROJECTED_START);
L_ABSENCE_END_DATE DATE := NVL (P_DATE_END, P_DATE_PROJECTED_END);
L_ABSENCE_FUTURE_ST_DATE DATE;
L_ABSENCE_FUTURE_END_DATE DATE;
LN_LENGTH NUMBER := 0;
LC_MSG VARCHAR2 (500);
BEGIN
IF P_ABSENCE_ATTENDANCE_TYPE_ID IN (4085, 4086, 4087, 4088)
THEN
LN_LENGTH := NVL (LENGTH (TO_CHAR (P_COMMENTS)), 0);

IF LN_LENGTH <= 1
THEN
LC_MSG := ‘Comments are Mandatory’;
HR_UTILITY.SET_MESSAGE (800, LC_MSG);
HR_UTILITY.RAISE_ERROR;
END IF;
ELSE
NULL;
END IF;
END XXHW_CREATE_ABS_VAL_P;
END XXHW_ABS_USERHOOK_PKG;

3. Register your procedure with one or more specific user hooks.

We shall use the API_HOOK_ID identified in Step 1 in the parameter p_api_hook_id. Through this API, custom logic will be registered against user hook.

DECLARE
L_API_HOOK_ID NUMBER := 3840;
L_API_HOOK_CALL_ID NUMBER;
L_OBJECT_VERSION_NUMBER NUMBER;
L_SEQUENCE NUMBER;
BEGIN
SELECT HR_API_HOOKS_S.NEXTVAL INTO L_SEQUENCE FROM DUAL;

HR_API_HOOK_CALL_API.CREATE_API_HOOK_CALL (
P_VALIDATE => FALSE,
P_EFFECTIVE_DATE => SYSDATE – 10,
P_API_HOOK_ID => L_API_HOOK_ID,
P_API_HOOK_CALL_TYPE => ‘PP’,
P_SEQUENCE => L_SEQUENCE,
P_ENABLED_FLAG => ‘Y’,
P_CALL_PACKAGE => ‘XXHW_ABS_USERHOOK_PKG’, –CUSTOM PACKAGE
P_CALL_PROCEDURE => ‘XXHW_CREATE_ABS_VAL_P’, — CUSTOM PROCEDURE
P_API_HOOK_CALL_ID => L_API_HOOK_CALL_ID,
P_OBJECT_VERSION_NUMBER => L_OBJECT_VERSION_NUMBER);
DBMS_OUTPUT.PUT_LINE (‘L_API_HOOK_CALL_ID ‘ || L_API_HOOK_CALL_ID);
END;

 

After this step, you shall be able to see the reference of your custom package/ procedure in table HR_API_HOOK_CALLS. You can check it by using following query

SELECT *
FROM HR_API_HOOK_CALLS
WHERE api_hook_id = 3840;

4. Run the pre-processor program

Run pre-processor script hrahkone.sql with module name as parameter (PER_TOP/admin/sql/hrahkone.sql).It compile API hook. After running this your APIhook Package should have custom procedure call.

or

DECLARE
L_API_MODULE_ID NUMBER := 1731;
BEGIN
HR_API_USER_HOOKS_UTILITY.CREATE_HOOKS_ONE_MODULE (L_API_MODULE_ID);
DBMS_OUTPUT.PUT_LINE (‘Success’);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE (‘Exception : ‘ || SQLERRM);
END;

Alternately you can use the following API to run the pre-processor

At this level, your user hook is implemented and should work as per your requriement.
If you change your custom package body, you dont need to run the pre-processor again but if you change the procedure signature, you will need to run the pre-processory again,

 

Delete custom code from APIuser Hook

Get Hook Call ID and Object Version_number

SELECT api_hook_call_id,object_version_number
FROM HR_API_HOOK_CALLS
WHERE call_package = ‘LSG_USERHOOK_PKG’
AND call_procedure = UPPER(‘LSG_CREATE_ABS_VAL_P’)

DECLARE
L_API_MODULE_ID NUMBER := 1731;
BEGIN
HR_API_USER_HOOKS_UTILITY.CREATE_HOOKS_ONE_MODULE (L_API_MODULE_ID);
DBMS_OUTPUT.PUT_LINE (‘Success’);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE (‘Exception : ‘ || SQLERRM);
END;

Note : In case if you are facing any error cross check the same parameters are there in the seeded package.

Source learned from

Thank You.

Customizing your Outlook

I had a outlook but I was not able to manage mails properly. After some time of searching I have learnt some ways to organize.

1. Using conversation.

By Using this you can group the same subject where the message will be inline grouped with the Folder. As shown in the below image the only thing you have to do is to check the Show as Conversation box.

2. Grouping and sorting Messages.

On the View tab, in the Current View group, click View Settings.

Now you can Group by or Sort by according to your wish

3. Changing the Fonts

 

  • On the File tab, choose Options > Mail.

    The Outlook File tab

    Note: If you have Outlook 2007, choose the Tools menu, then choose Options > Mail Format.

  • Under Compose messages, choose Stationery and Fonts.
  • On the Personal Stationery tab, under New mail messages or Replying or forwarding messages, choose Font.
  • In the Font box, choose the font, style, size, and color that you want to use. You can see a preview of your changes as you make them.
  • Choose OK three times to return to Outlook.

 

 

 

 

 

Skype for Business Issue in DNS KB2566790

Recently I faced problem with Skype for Business where I was not able to login. After searching I got to know to change the settings and to change the correct date and Time

Problem was with date and Time in my computer. So I have changed it.

Change Setting in Skype.

  1. Go to Tools-Options.
  2. Go to Advanced Connection Settings.
  3. In here check “Manual Configuration”.
  4. For Internal server name enter “sipdir.online.lync.com:443”.
  5. For External server name enter “sipdir.online.lync.com:443”.
  6. Click on OK and proceed to log in.

Once this was done now I am able to login to skype.