Wednesday 29 June 2011

R12 Tables and View changes

Tuesday 28 June 2011

To submit concurrent program from BackEnd.

PROCEDURE call_concurrent
/*=======================================================================
OBJECT NAME: CALL_CONCURRENT
OBJECT TYPE: Public Procedure
DESCRIPTION: This procedure calls the standard import program 'Receiving Transactions Interface' to load the Receipts
PARAMETERS:
<<Name>> << Type >> <<Data Type>> <<Description>>
=====================================================================*/
IS
l_request_id NUMBER;
l_errbuf VARCHAR2 (3000);
l_phase VARCHAR2 (20);
l_status VARCHAR2 (20);
l_dev_phase VARCHAR2 (20);
l_dev_status VARCHAR2 (20);
l_message VARCHAR2 (2000);
l_flag BOOLEAN;
BEGIN
g_object_name := 'om';
g_procedure_name := 'CALL_CONCURRENT';
g_package_name := 'jk_package';
DBMS_OUTPUT.put_line ('IN call_concurrent');

BEGIN
fnd_global.apps_initialize (fnd_global.user_id,
fnd_global.resp_id,
fnd_global.resp_appl_id
);
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;

--fnd_global.apps_initialize (8038, 50175, 700);
l_request_id :=
fnd_request.submit_request ('om', 'rvctp', NULL,
--'Transaction processing module for Integrated Receiving',
NULL,
--TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI'),
FALSE, 'BATCH', 0);
COMMIT;
DBMS_OUTPUT.put_line ('l_request_id IS ' || l_request_id);

IF l_request_id = 0
THEN
g_progress := '6002';
l_errbuf := fnd_message.get;
g_log :=
' Unexpected error occurred In Call concurrent Procedure ->'
|| SQLERRM
|| ' '
|| l_errbuf;
DBMS_OUTPUT.put_line (g_log);
g_error_message := g_log;
error_log_write;
ELSE
g_progress := '6004';
COMMIT;
l_flag :=
fnd_concurrent.wait_for_request (l_request_id,
30,
86400,
l_phase,
l_status,
l_dev_phase,
l_dev_status,
l_message
);
COMMIT;
END IF;
END call_concurrent;

Monday 27 June 2011

Query to Find the Request Group,Responsibility name by concurrent program

SELECT fcpt.user_concurrent_program_name, frg.request_group_name,
fcp.concurrent_program_name, frt.responsibility_name
FROM fnd_request_group_units frgu,
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt,
fnd_request_groups frg,
fnd_executables fe,
fnd_responsibility fr,
fnd_responsibility_tl frt
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 fcp.concurrent_program_id = fcpt.concurrent_program_id
AND fcpt.user_concurrent_program_name LIKE :Concurrent_program_name
AND frg.request_group_id = fr.request_group_id
AND fr.responsibility_id = frt.responsibility_id