Category Archives: Technical

Queries to get path of Concurrent Request Log, Output, Manager Log and FNDOPP log

Below are the queries to get path of Concurrent Request Log, Output, Manager Log and FNDOPP log

a) Concurrent Request Log:
select logfile_name from fnd_concurrent_requests where request_id = <request_id>;

b) Concurrent Output file:
select outfile_name from fnd_concurrent_requests where request_id = <request_id>;

c) Concurrent Manager Worker Log:
select logfile_name from fnd_concurrent_processes where concurrent_process_id=(select controlling_manager
from fnd_concurrent_requests where request_id=<request_id>);

d) FNDOPP log file

SELECT fcpp.concurrent_request_id req_id, fcp.node_name, fcp.logfile_name
FROM fnd_conc_pp_actions fcpp, fnd_concurrent_processes fcp
WHERE fcpp.processor_id = fcp.concurrent_process_id
AND fcpp.action_type = 6
AND fcpp.concurrent_request_id =<request_id>;

Advertisements

Sales order got stuck in Workflow as Deferred

We got a Issue that the Sales order was stuck in Deferred status. We get this Issue sometimes as shown in the below screenshot.

What we used to do is we will submit a Concurrent Program called Workflow Background Process with below parameters

Process Deferred  = Yes

Process Timeout = Yes

Process Stuck = Yes.

But After running the process still we were having the Same Problem.

So we just checked the Workflow manager as below

Workflow Administrator Web Applications –> Oracle Applications Manager –> Workflow Manager and I was able to see all was up.

So I raised a SR with Oracle and they started to Analyze and then we came to know that

To Close the order header as soon as the line is closed one needs to customize workflow . This will affect only new orders that uses this newly modified Flow. For the existing orders, one needs to wait till the end of the month – the month in which the Sales Order was created. Please note that this happens only for the month the Sales order is created.
Use Workflow Builder to change the Node Attribute of Wait Mode to a value of
Relative Time and then set Relative Time to a constant.

Below is the note

How to Change the Wait Mode in WorkFlow to Process Order Headers with Closed Lines to Close Before the End of the Month ( Doc ID 145011.1 )

So below are the steps that has been provided by Oracle

Please perform the following steps in test instance:

1. Connect to the database using the Work flow Builder.
2. Go to OM order header work flow.
3. In work flow builder , this needs to be done from to enable the customization,
Help — About Oracle Work flow Builder, Check to allow customization.
4. Open Work-flow Process – Order Flow – Generic, Close – Order
5. Copy ‘Order Flow – Generic’ and ‘Close – Order’ and rename them, for example, ‘XX Order Flow – Generic’ and ‘XX Close – Order’, respectively.
6. Right click activity ‘Wait’ (labeled WAIT-1) that is just before activity ‘Close – Wait For Line’ in process ‘XX Close – Order’. In the Properties, choose Node Attributes tab and place cursor on the “Day of the month” and remove the Value that is currently set as “Last”.
7. Change the following appropriate values as below

Changing the Relative Time parameter of activity WAIT-1 to calculated time as mentioned below
Wait Mode = “Relative Time”
Day of Month = none
Click apply button
Save the work flow activity

Relative time can be calculated by following method
To Close immediately – 0
After one hour- 1/24 – 0.0416
After two hour – 2/24 – 0.0833
One day – 1
Two day – 2

Please note that setting Relative Time to 0 will cause an order that is booked with no lines at the time of booking to close almost immediately. This is usually not desired.

8. Replace the process ‘Close Order’ in ‘XX Order Flow – Generic’ with ‘XX Close – Order’ .
9. Save the Workflow process
10. Navigate to Setup -> Transaction Type
Query the Order Type ‘XX Standard’.
Attach the new process to the transaction type ‘XX Standard’.
Order Workflow = ‘XX Order Flow – Generic’
Retest the issue as below:

1. Create an order and one line for any item for transaction type XX Standard. Book the order.
2. Go to line information
3. Cancel the line
5. Re query the order
5. Check whether the line is canceled
6. Run the “Workflow Background Process” concurrent program with the following parameters.
Parameters –> Item type — OM Order Line,
Process deferred – Yes
Time out – No
7. Check whether the request ends successfully.
8. Run the “Workflow Background Process” concurrent program with the following parameters.
Parameters –> Item type — OM Order Header
Process deferred – Yes
Process Time out – No
9. Check whether the request ends successfully.
10. Query the order.

Now the line will be closed as per the calculated time set at relative time values.

Thank you.

 

 

 

Download IRecruitment Resumes in Server and in client(TOAD)

We had a requirement from user that to download and process all the resume.

So When checked with the Doc ID 1578603.1 it tells that we can Download Resume as there is no Inbuild Tool but we can write Queries If Any. The uploaded resumes can be found in table IRC_DOCUMENTS via the column CHARACTER_DOC which is of type CLOB.

On Toad We can See below as Save to File Option by which we can download and give the same name as FILE_NAME Column to the Document.

 

Now we are going to download the same on server in bulk and Implementing for many records below is the script.

Steps to download in Server

Step: 1

CREATE DIRECTORY datadump AS ‘E:\datadump\test’;

Create a Directory with Server path by SYS user in database. As the above command is for windows server. In case your Environment is Linux use the correct path accordingly.

Step: 2

grant read, write on directory DATADUMP to apps

Grant Read, Write access to the Directory

Step: 3 Verify

select directory_path from all_directories where directory_name = ‘DATADUMP’;

SELECT * FROM all_tab_privs WHERE table_name = ‘DATADUMP’;

Check whether the directory has been created correctly  and access has been given correctly.

Step: 4 Query to retrive the records.

SELECT PPF.FULL_NAME AS PERSON_NAME,
PPF.EMAIL_ADDRESS,
PPF.DATE_OF_BIRTH,
PAV.NAME AS VACANCY_NAME,
DOC.DOCUMENT_ID,
DOC.BINARY_DOC,
DOC.FILE_NAME
FROM PER_ALL_PEOPLE_F PPF,
PER_ALL_ASSIGNMENTS_F PAF,
PER_ALL_VACANCIES PAV,
IRC_ASSIGNMENT_STATUSES IAS,
PER_ASSIGNMENT_STATUS_TYPES_V AST,
IRC_DOCUMENTS DOC,
IRC_NOTIFICATION_PREFERENCES INP
WHERE sysdate BETWEEN PPF.EFFECTIVE_START_DATE
AND PPF.EFFECTIVE_END_DATE
AND PPF.PERSON_ID = PAF.PERSON_ID
AND PAF.VACANCY_ID = PAV.VACANCY_ID
AND PAF.ASSIGNMENT_ID = IAS.ASSIGNMENT_ID
AND pav.name = p_vac_name
AND ias.ASSIGNMENT_STATUS_TYPE_ID = ‘4’ –Active Application
AND irc_utilities_pkg.GET_RECRUITMENT_PERSON_ID (PPF.PERSON_ID) =
INP.person_id(+)
AND INP.PERSON_ID = DOC.PERSON_ID(+)
AND IAS.ASSIGNMENT_STATUS_TYPE_ID = AST.ASSIGNMENT_STATUS_TYPE_ID(+)
AND doc.TYPE(+) LIKE ‘%RESUME’
AND doc.end_date(+) IS NULL;

Step: 5 Execute the Below Script

DECLARE
l_file UTL_FILE.FILE_TYPE;
l_buffer RAW (32767);
l_amount BINARY_INTEGER := 32767;
l_pos number := 1;
l_blob BLOB;
l_blobname VARCHAR2 (50);
l_blob_len number;
ctrl number;
— p_vac_name varchar2(100):=’IRC110′;

cursor c_irc_doc(p_vac_name in varchar) is SELECT PPF.FULL_NAME AS PERSON_NAME,
PPF.EMAIL_ADDRESS,
PPF.DATE_OF_BIRTH,
PAV.NAME AS VACANCY_NAME,
DOC.DOCUMENT_ID,
DOC.BINARY_DOC,
DOC.FILE_NAME
FROM PER_ALL_PEOPLE_F PPF,
PER_ALL_ASSIGNMENTS_F PAF,
PER_ALL_VACANCIES PAV,
IRC_ASSIGNMENT_STATUSES IAS,
PER_ASSIGNMENT_STATUS_TYPES_V AST,
IRC_DOCUMENTS DOC,
IRC_NOTIFICATION_PREFERENCES INP
WHERE sysdate BETWEEN PPF.EFFECTIVE_START_DATE
AND PPF.EFFECTIVE_END_DATE
AND PPF.PERSON_ID = PAF.PERSON_ID
AND PAF.VACANCY_ID = PAV.VACANCY_ID
AND PAF.ASSIGNMENT_ID = IAS.ASSIGNMENT_ID
AND pav.name = p_vac_name
AND ias.ASSIGNMENT_STATUS_TYPE_ID = ‘4’ –Active Application
AND irc_utilities_pkg.GET_RECRUITMENT_PERSON_ID (PPF.PERSON_ID) =
INP.person_id(+)
AND INP.PERSON_ID = DOC.PERSON_ID(+)
AND IAS.ASSIGNMENT_STATUS_TYPE_ID = AST.ASSIGNMENT_STATUS_TYPE_ID(+)
AND doc.TYPE(+) LIKE ‘%RESUME’
AND doc.end_date(+) IS NULL;

BEGIN

FOR i in c_irc_doc loop(‘IRC110’)–Position Name for taking the Resume

l_blob_len := DBMS_LOB.getlength(i.binary_doc);
l_file := UTL_FILE.fopen(‘APPS_DATA_FILE_DIR’,i.file_name,’WB’, 32767);
— Read chunks of the BLOB and write them to the file created in directory until complete.
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.read(i.binary_doc, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw(l_file, l_buffer, TRUE);
l_pos := l_pos + l_amount;
END LOOP; — This will end the While loop when condition met.
l_blob_len :=0;
l_pos :=1;
— Close the file.
UTL_FILE.fclose(l_file);
end loop; — This will end the FOR loop when all BLOB files in the table have been downloaded.
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(‘Exception’||SQLERRM||SQLCODE);
— Close the file if something goes wrong.
IF UTL_FILE.is_open(l_file) THEN
UTL_FILE.fclose(l_file);
END IF;
–RAISE;
END;
/

 

Steps to download in TOAD

Execute the Query in the Step : 4

Now click on Binary Doc Column and right click Single Column Export

 

Now give the path and Column of the Value to be renamed for File

 

Then Export will be downloaded.

Now the Resumes will be downloaded in the mentioned path.

TOAD 12 is faster for Exporting Blob than in Server.

If you have an older version of Toad, it’s called “Export BLOBs (long,raw)” instead.

Happy resume Exporting….

Executing a LDT file in Windows Environment

Once when we try to migrate LDT files mostly we have scripts only in Linux. As our server is in windows I just gave the below command.

The command is same as the linux except on navigating to any of the TOP we put $ in Linux as $FND_TOP here we use %FND_TOP%.

However in windows we have to do the sourcing. Refer to this Link for sourcing in windows.

%FND_TOP%/bin/FNDLOAD apps/test 0 Y UPLOAD %FND_TOP%/patch/115/import/afcpprog.lct ARRCTANLZAZ.ldt CUSTOM_MODE=FORCE UPLOAD_MODE=REPLACE

Altering the Table with data for Number Precision(Decimal) in Oracle apps

In the below example my table is XX_TANK_CONTRACT_LINE and now my requirement is to insert and show the numbers with precistion (Decimal).

I tried to insert into table with decimal but when saving it was rounded and saved. After searching I came to know that the database column value is of number type with holdable of 30 chars(NUMBER(30)

So now I have to change the same in the table.

Now my data has values and does not allow me to change. So I tried to create a backup table with the same data

CREATE TABLE
XX_TANK_CONTRACT_LINE_BKUP AS SELECT * FROM XX_TANK_CONTRACT_LINE;

Now I have deleted the existing data.

DELETE XX_TANK_CONTRACT_LINE

Now I have changed the Data column with Precision.

ALTER TABLE XX_TANK_CONTRACT_LINE MODIFY CONT_PRICE NUMBER(30, 2);

Once done I have reInserted the values to the same.

INSERT INTO XX_TANK_CONTRACT_LINE SELECT * FROM XX_TANK_CONTRACT_LINE_BKUP

From now Im able to insert and update the data with Precision.

SELECT * FROM XX_TANK_CONTRACT_LINE ORDER BY 1 DESC;

 

 

Submitting and Monitoring Concurrent Program from Oracle apps Self Service (SSHR-OAF) pages

I here take example of Payslip where users requirement wants to hide the link in the concurrent program which tells the User ID of the Program. However there are many scenarios and situations that we need a Menu of Function for a Report or Concurrent Program.

I have made Function using a Existing Oracle apps Report and the report short name is XXPAY_SLIP_USER.

Define Function:

Navigation: System Administrator -> Application -> Function

Properties: SSWA jsp function

Web HTML Call:

To submit any concurrent program:

OA.jsp?akRegionApplicationId=0&akRegionCode=FNDCPPROGRAMPAGE&scheduleRegion=Hide&notifyRegion=Hide&printRegion=Hide

To Submit Particular Concurrent Program

OA.jsp?akRegionCode=FNDCPPROGRAMPAGE&akRegionApplicationId=0&programApplName=PAY&programName=XXPAY_SLIP_USER&programRegion=Hide&scheduleRegion=Hide&notifyRegion=Hide&printRegion=Hide&reviewRegion=Hide

Here XXPAY_SLIP_USER is the Concurrent program Short Name. The Parameters of this Concurrent program will be generated automatically

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

 

XML publisher Reports in Oracle apps – Unable to find the published output for this request

I got the above error and I was checking the report and RTF template both was fine but still I was not able to figure out what went wrong and then checked the Concurrent everything seeemed to be fine. But still I was not able to figure out.

Then while submitting the report I noticed the Layout was not captured. So I checked the name of deployed concurrent short name and Data Definition name and both are correct. Then I checked the style required and then the layout was captured. I compared with the working reports style checked was not there. However this actually Issue raised due to change of Text report to XML report.