Wednesday, 25 April 2012

QUERY FOR FINDING REQUEST GROUP

QUERY FOR FINDING REQUEST GROUP

SELECT fa.application_short_name,
       frg.request_group_name,
       fe.execution_file_name,
       fe.executable_name
  FROM fnd_request_group_units frgu,
       fnd_concurrent_programs fcp,
       fnd_request_groups frg,
       fnd_executables fe,
       fnd_application fa
 WHERE     frgu.request_unit_id = fcp.concurrent_program_id
       AND frgu.request_group_id = frg.request_group_id
       AND fe.executable_id = fcp.executable_id
       AND FRG.application_id = fa.application_id
       AND fe.executable_name = 'XX_PC_PURCHASE';
--


Create directory in Oracle


Create directory in Oracle
       

create or replace directory foo_dir as '/tmp';

Directories must be created if external tables are used.
Created directories are shown in either dba_directories or all_directories. There is no user_directories.

Privileges

When a «directory» has been created, the read and write object privileges can be granted on it:

create directory some_dir;
grant read, write on directory some_dir to micky_mouse;

An example

The following example shows how create directory and utl_file can be used to write text into a file:

create or replace directory dir_temp as 'c:\temp';

declare
  f utl_file.file_type;
begin
  f := utl_file.fopen('DIR_TEMP', 'something.txt', 'w');
  utl_file.put_line(f, 'line one: some text');
  utl_file.put_line(f, 'line two: more text');
  utl_file.fclose(f);
end;
/

Friday, 13 April 2012

How to deleted from the interface tables after it has been loaded in import standard purchase order


How is data deleted from the interface tables after it has been loaded ?

After loading the data from the interface tables into the system successfully,  the data is not being removed (cleaned) from the interfaces.
They will have process_code = 'ACCEPT' in the interface tables.

To remove the processed data from the interface, a concurrent program is available.  The program name is : purge purchasing open interface processed data(POXPOIPR)

Run this program with paramenter purge accepted data = Yes
Then the process_code = 'ACCEPTED' records will be removed from the interface tables.


--


Purchasing Interface Errors Report(choose parameter : PO_DOCS_OPEN_INTERFACE)

What document can be viewed after running purchasing document open interface with records rejected?

Check the process_code in the po_headers_interface and po_lines_interface, if it is 'REJECTED',

select process_code from po_headers_interface;
select process_code from po_lines_interface;

please do the following:
Run the program - Purchasing Interface Errors Report
choose parameter : PO_DOCS_OPEN_INTERFACE

The report will list all the errors you have during importing. You can fix the data, then reset process_code = Null in both interface tables, rerun the Purchasing Document Open Interface.

update po_headers_interface set process_code = null
where process_code = 'REJECTED';
update po_lines_interface set process_code = null
where process_code = 'REJECTED';



--


What Actions are supported in import standard purchase order ?


What Actions are supported?

ORIGINAL - create a new document
ADD - add new lines onto an existing document
UPDATE - update existing line information for a document
REPLACE - Replace the existing document
Which interface tables are involved?

PO_HEADERS_INTERFACE
PO_LINES_INTERFACE
PO_DISTRIBUTIONS_INTERFACE(Used for Standard PO only)


--


Release 12.0, the “Import Standard Purchase Orders" concurrent program fails with the following error: ERROR ORA-01422: exact fetch returns more than requested number of rows in Package po.plsql.PO_PDOI_PVT. Procedure init_sys_parameters.0

On Release 12.0, the "Import Standard Purchase Orders" concurrent program fails with the following error:


ERROR
ORA-01422: exact fetch returns more than requested number of rows in Package po.plsql.PO_PDOI_PVT.
Procedure init_sys_parameters.0
ORA-01422: exact fetch returns more than requested number of rows in Package
po.plsql.PO_PDOI_PVT. Procedure init_startup_values.10
ORA-01422: exact fetch returns more than requested number of rows in Package po.plsql.PO_PDOI_PVT.
Procedure start_process.50
User-Defined Exception in Package po.plsql.PO_PDOI_Concurrent. Procedure POXPDOI.30

Steps To Reproduce:
1. Populate the interface table with the PO details.
2. Navigate to Requests -> Run -> Single request.
3. Select 'Import Standard Purchase Orders'.

Cause

The multi_org_category flag was not set correctly.

Verify by running the following script:

Select multi_org_category
from fnd_concurrent_programs
where concurrent_program_name='POXPOPDOI';

Ideally, the above script should return a value 'S', which indicates it is set to single org. In problematic case it returns no rows.

Solution

To implement the solution, please execute one of the following set of steps:

1. Ensure that you have taken a backup of your system before applying the recommended solution.

2. Run the following scripts in a TEST environment first:

Update fnd_concurrent_programs
set multi_org_category = 'S'
where concurrent_program_name='POXPOPDOI';

3. Commit the transaction using 'commit' command.

4. Once the scripts complete, confirm that the data is corrected.
You can use the following SQL to confirm:
Select multi_org_category from fnd_concurrent_programs where concurrent_program_name='POXPOPDOI';
-- should return a value 'S'.

5. Confirm that the data is corrected, run the "Import Standard Purchase Orders" concurrent program.

6. If you are satisfied that the issue is resolved, migrate the solution as appropriate to other environments.

 *** Alternately, this can be achieved via the application with the following steps:

1. Assign yourself the responsibility System Administration. (note it is not system administrator).

2. Navigate to responsibility System Administration - Concurrent Programs form
- Search on POXPOPDOI as short name
- Choose Update
- Move to Request tab
- Off to the right it shows - Operating Unit Mode
- Ensure this is single

Make sure it is S - using this sql -

Select multi_org_category from fnd_concurrent_programs where concurrent_program_name='POXPOPDOI';

After saving.

3. Retest the import and confirm if that has properly corrected the problem.



--


Friday, 6 April 2012

How to compile form in R12


Compile forms in R12


command:
frmcmp_batch userid=apps/apps module=XXXLPNINSPECTION.fmb output_file=XXXCLPNINSPECTION.fmx module_type=form batch=no compile_all=yes



--