Filtering the table with given Values using VLOOKUP

In Excel I had a requirement to compare and to restrict the values and to bring the table. I cannot use filter as there are many values. With help of my collegue I got the know how to restrict it.

So Here in Sheet2 I have values.

In sheet1 I have table with additional Columns to be populated

So I just write a formula to get 1 column then I will write next to get another and same goes for all columns

I use VLOOKUP to restrict the values(Sheet2) from the table(Sheet1)

I now open a new Sheet and put the below formula

For 1st column

=VLOOKUP(Values!A:A,Lookup!A:G,1,FALSE)

For 2nd

=VLOOKUP(Values!A:A,Lookup!A:G,2,FALSE)Staff Information

So only change in 3rd Paramter so it fetches the column exaclty.

I have attached excel for reference

Staff Information

Advertisements

Jumping Employee Number Sequence in Oracle apps

Now we observe we have wrongly created a employee(005736) and we delete and purge the data.

 

Now we have to maintain the correct sequence so what we do is

Go to Work Structures -> Organization -> Description

Query the organization and go to Additional Organization Information and change the employee Number generation to Manual

 

Now change the sequence by  creating the person as in the below screenshot

So update the sequence as below

update PER_NUMBER_GENERATION_CONTROLS

set next_value = 5735   –Current Sequence Number

where type = ‘EMP’ — Assuming you are updating the employee number generation to automatic.

and business_group_id = “Your BG ID”;

Now we have to change the next sequence to 005736

After updating the script Now we have to run a concurrent Program

After running the program test it by creating a Employee

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>;

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;

 

 

Pull Back/Cancel/Resubmit Leave Request in Adrenalin

We use a tool called adrenalin. I have wrongly applied for the leave. But I don’t know how to check the leaves applied and to Cancel or Resubmit or Pullback it.

After checking with our HR I came to know and I have shared the same.

  • To Find the submitted Request

Enter “Forms raised by me” in  Adrenalin search path to know the status of your forms raised so far.

  • To Pull Back the Request

Enter “Pullback Transaction” in  Adrenalin search path to revoke or cancel or pullback the transaction and this case it is leave.

Once done successfully. You can apply for the leave again.

Thank you.

 

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

Transaction visible in GL Interface table but not Imported in Journal

I faced a problem that the transaction was in GL Interface table which is visible but not imported.

select * from gl_interface where trunc(ACCOUNTING_DATE) = :gl_date;

However I tried to import and then I tried to see whether there is any error while Importing

General Ledger Super User –> Journal –> Import –> Correct.

But still I was not able to find the transaction.

Then I just check the log of the Concurrent which tells to check Group ID. So I took group Id from below Query and then I submitted.

select group_id from gl_interface where trunc(ACCOUNTING_DATE) = :gl_date;

Hurrah Now the Journal got Imported.