Knowledge on Oracle
This blog is to share knowledge on Oracle Apps and GRC Controls (Advanced Controls). And this is to spread the knowledge of features of Oracle GRC, EBS and do not reflect the position of my employer.
Thursday, 10 January 2019
Converting Binary Files to Readable text format files in R12
Converting Oracle EBS R12 RDF to REX
Command:
rwconverter.sh stype=rdffile source=ARXINVAD.rdf dtype=rexfile dest=ARXINVAD.rex batch=yes
Benefits:
You don’t need to install Reports designer to read RDF code. You can grep the rex file to check code or you can also open the rex file in any text editor to read the code.
Converting Oracle EBS R12 FMB to TXT
Command:
frmcmp_batch module=APXINWKB.fmb userid=apps/apps Script=YES Forms_Doc=YES module_type=FORM
Benefits:
You don’t need to install Forms designer to read FMB code. You can grep the txt file to check code or you can also open the txt file in any text editor to read the code. Another advantage is you don’t need to copy all the plls to your desktop to open the fmb.
Converting Oracle EBS R12 PLL to PLD
Command:
frmcmp_batch module=ARXRWAPP.pll userid=apps/apps Script=YES module_type=LIBRARY Output_File=ARXRWAPP.pld
Benefits:
You don’t need to install Forms designer to read PLL code.You can grep the pld file to check code or you can also open the txt file in any text editor to read the code. Another advantage is you don’t need to copy all the plls to your desktop to open the pll.
Command:
rwconverter.sh stype=rdffile source=ARXINVAD.rdf dtype=rexfile dest=ARXINVAD.rex batch=yes
Benefits:
You don’t need to install Reports designer to read RDF code. You can grep the rex file to check code or you can also open the rex file in any text editor to read the code.
Converting Oracle EBS R12 FMB to TXT
Command:
frmcmp_batch module=APXINWKB.fmb userid=apps/apps Script=YES Forms_Doc=YES module_type=FORM
Benefits:
You don’t need to install Forms designer to read FMB code. You can grep the txt file to check code or you can also open the txt file in any text editor to read the code. Another advantage is you don’t need to copy all the plls to your desktop to open the fmb.
Converting Oracle EBS R12 PLL to PLD
Command:
frmcmp_batch module=ARXRWAPP.pll userid=apps/apps Script=YES module_type=LIBRARY Output_File=ARXRWAPP.pld
Benefits:
You don’t need to install Forms designer to read PLL code.You can grep the pld file to check code or you can also open the txt file in any text editor to read the code. Another advantage is you don’t need to copy all the plls to your desktop to open the pll.
Finding the Current Form Function name in Oracle EBS 11i/R12
Global Variable FND_CUSTOM_FUNCTION_NAME stores the Current Function Name of the forms session.
Go to Help --> Examine -->
Block => GLOBAL
Field => FND_CUSTOM_FUNCTION_NAME
Grep for a keyword across directories in unix EBS 11i/R12
command:
find . -exec grep "KEYWORD" {} /dev/null \;
Benifit:
Instead of searching for a reference in each and every directory this command will help you find a file with a given reference across the directories.
find . -exec grep "KEYWORD" {} /dev/null \;
Benifit:
Instead of searching for a reference in each and every directory this command will help you find a file with a given reference across the directories.
Oracle R12 - API to update PO Requisition: Requestor / Preparer / Approver
Following PL/SQL Block can be used to Update Purchase Requisition
DECLARE
l_progress VARCHAR2(4);
l_msg_data VARCHAR2(2000);
l_msg_count NUMBER;
l_return_status VARCHAR2(1);
l_update_person VARCHAR2(200);
l_old_personid NUMBER;
l_new_personid NUMBER;
l_document_type VARCHAR2(200);
l_document_no_from VARCHAR2(200);
l_document_no_to VARCHAR2(200);
l_date_from VARCHAR2(200);
l_date_to VARCHAR2(200);
l_commit_interval NUMBER;
x_date_from DATE;
x_date_to DATE;
BEGIN
--Set your OU of Respective Requisition
mo_global.set_policy_context('S', 204);
l_update_person :='REQUESTOR'; -- You can also Pass 'PREPARER' or 'APPROVER' or 'ALL'
l_old_personid :=1234; -- Pass Old Person Id
l_new_personid := 4576; -- Pass New Person Id
l_document_type := 'ALL'; -- You can Document Type of Requisition
l_document_no_from := '12345'; -- You can pass Requisition Number
l_document_no_to := '12345'; --If you want to update Range, you can Requistion Number To as Different
l_commit_interval := 100;
x_date_from := to_date(NULL);
x_date_to := to_date(NULL);
PO_Mass_Update_Req_GRP.Update_Persons
(p_update_person => l_update_person,
p_old_personid => l_old_personid,
p_new_personid => l_new_personid,
p_document_type => l_document_type,
p_document_no_from => l_document_no_from,
p_document_no_to => l_document_no_to,
p_date_from => x_date_from,
p_date_to => x_date_to,
p_commit_interval => l_commit_interval,
p_msg_data => l_msg_data,
p_msg_count => l_msg_count,
p_return_status => l_return_status);
dbms_output.put_line('l_msg_count '||l_msg_count);
dbms_output.put_line('l_return_status '||l_return_status);
IF nvl(l_msg_count,0) > 0 THEN
FOR i IN 1..l_msg_count LOOP
l_msg_data := FND_MSG_PUB.get
( p_msg_index => i,
p_encoded => 'F');
dbms_output.put_line('l_msg_data '||l_msg_data);
END LOOP;
END IF;
COMMIT;
END;
DECLARE
l_progress VARCHAR2(4);
l_msg_data VARCHAR2(2000);
l_msg_count NUMBER;
l_return_status VARCHAR2(1);
l_update_person VARCHAR2(200);
l_old_personid NUMBER;
l_new_personid NUMBER;
l_document_type VARCHAR2(200);
l_document_no_from VARCHAR2(200);
l_document_no_to VARCHAR2(200);
l_date_from VARCHAR2(200);
l_date_to VARCHAR2(200);
l_commit_interval NUMBER;
x_date_from DATE;
x_date_to DATE;
BEGIN
--Set your OU of Respective Requisition
mo_global.set_policy_context('S', 204);
l_update_person :='REQUESTOR'; -- You can also Pass 'PREPARER' or 'APPROVER' or 'ALL'
l_old_personid :=1234; -- Pass Old Person Id
l_new_personid := 4576; -- Pass New Person Id
l_document_type := 'ALL'; -- You can Document Type of Requisition
l_document_no_from := '12345'; -- You can pass Requisition Number
l_document_no_to := '12345'; --If you want to update Range, you can Requistion Number To as Different
l_commit_interval := 100;
x_date_from := to_date(NULL);
x_date_to := to_date(NULL);
PO_Mass_Update_Req_GRP.Update_Persons
(p_update_person => l_update_person,
p_old_personid => l_old_personid,
p_new_personid => l_new_personid,
p_document_type => l_document_type,
p_document_no_from => l_document_no_from,
p_document_no_to => l_document_no_to,
p_date_from => x_date_from,
p_date_to => x_date_to,
p_commit_interval => l_commit_interval,
p_msg_data => l_msg_data,
p_msg_count => l_msg_count,
p_return_status => l_return_status);
dbms_output.put_line('l_msg_count '||l_msg_count);
dbms_output.put_line('l_return_status '||l_return_status);
IF nvl(l_msg_count,0) > 0 THEN
FOR i IN 1..l_msg_count LOOP
l_msg_data := FND_MSG_PUB.get
( p_msg_index => i,
p_encoded => 'F');
dbms_output.put_line('l_msg_data '||l_msg_data);
END LOOP;
END IF;
COMMIT;
END;
Oracle R12 OM or EBiz Tax: API to recalculate Tax at Order Level
You can re-calculate tax for any given sales order by using following PL/SQL Block.
This API works same as ‘Actions->Calculate Tax’ from Sales Order Form(OEXOEORD).
DECLARE
l_header_id NUMBER;
l_return_status VARCHAR2(10);
BEGIN
l_header_id := 12345;--pass order headers header id
---fnd_global.org_context (Initialize the org)
OM_TAX_UTIL.calculate_tax(p_header_id => l_header_id
,x_return_status => l_return_status);
IF (l_return_status = 'S') THEN
commit;
ELSE
Dbms_output.put_line(‘Failed in Re-Calculating Tax’);
Rollback;
END IF;
END;
Wednesday, 5 August 2015
Oracle Apps - FND Commands
Oracle FNDLOAD download/Upload Script
Lookups
FNDLOAD apps/<apps_password> O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct <XX_FILENAME>.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="<XX_APP_NAME>" LOOKUP_TYPE="<XX_LOOKUP_TYPE>"
FNDLOAD apps/<apps_password> O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct <XX_FILENAME>.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Concurrent Program
FNDLOAD apps/<apps_password> O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct <XX_FILENAME>.ldt PROGRAM APPLICATION_SHORT_NAME="<XX_APP_NAME>" CONCURRENT_PROGRAM_NAME="<XX_CONC_SHORT_NAME>"
FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Profile
FNDLOAD apps/<apps_password> O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct <XX_FILENAME>.ldt PROFILE PROFILE_NAME="<XX_PROFILE_NAME>" APPLICATION_SHORT_NAME="<XX_APP_NAME>"
FND_TOP/bin/FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Request Set
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct <XX_FILENAME>.ldt REQ_SET REQUEST_SET_NAME="<XX_REQUEST_SET_NAME>"
FNDLOAD apps/<apps_password> O Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct <XX_FILENAME>.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
FND Message
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct <XX_FILENAME>.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME="<XX_APP_NAME>" MESSAGE_NAME="<XX_MESSAGE_NAME>"
FNDLOAD apps/<apps_password> O Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct <XX_FILENAME>.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Form Function
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct <XX_FILENAME>.ldt FUNCTION FUNCTION_NAME="<XX_FORM_FUNCTION_NAME>"
FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Value Set
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct <XX_FILENAME>.ldt VALUE_SET FLEX_VALUE_SET_NAME="<XX_VALUE_SET_NAME>"
FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Data Definition and RTF Template
FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct <XX_FILENAME>.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME='"<XX_APP_NAME>" DATA_SOURCE_CODE="<DD_SHORT_NAME>" TMPL_APP_SHORT_NAME="<TEMPLATE_APPLICATION_SHORT_NAME>" TEMPLATE_CODE="<TEMPLATE_SHORT_NAME>"
FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct <XX_FILENAME>.ldt
Lookups
FNDLOAD apps/<apps_password> O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct <XX_FILENAME>.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="<XX_APP_NAME>" LOOKUP_TYPE="<XX_LOOKUP_TYPE>"
FNDLOAD apps/<apps_password> O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct <XX_FILENAME>.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Concurrent Program
FNDLOAD apps/<apps_password> O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct <XX_FILENAME>.ldt PROGRAM APPLICATION_SHORT_NAME="<XX_APP_NAME>" CONCURRENT_PROGRAM_NAME="<XX_CONC_SHORT_NAME>"
FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Profile
FNDLOAD apps/<apps_password> O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct <XX_FILENAME>.ldt PROFILE PROFILE_NAME="<XX_PROFILE_NAME>" APPLICATION_SHORT_NAME="<XX_APP_NAME>"
FND_TOP/bin/FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Request Set
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct <XX_FILENAME>.ldt REQ_SET REQUEST_SET_NAME="<XX_REQUEST_SET_NAME>"
FNDLOAD apps/<apps_password> O Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct <XX_FILENAME>.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
FND Message
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct <XX_FILENAME>.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME="<XX_APP_NAME>" MESSAGE_NAME="<XX_MESSAGE_NAME>"
FNDLOAD apps/<apps_password> O Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct <XX_FILENAME>.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Form Function
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct <XX_FILENAME>.ldt FUNCTION FUNCTION_NAME="<XX_FORM_FUNCTION_NAME>"
FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Value Set
FNDLOAD apps/<apps_password> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct <XX_FILENAME>.ldt VALUE_SET FLEX_VALUE_SET_NAME="<XX_VALUE_SET_NAME>"
FNDLOAD apps/<apps_password> 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct <XX_FILENAME>.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Data Definition and RTF Template
FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct <XX_FILENAME>.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME='"<XX_APP_NAME>" DATA_SOURCE_CODE="<DD_SHORT_NAME>" TMPL_APP_SHORT_NAME="<TEMPLATE_APPLICATION_SHORT_NAME>" TEMPLATE_CODE="<TEMPLATE_SHORT_NAME>"
FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct <XX_FILENAME>.ldt
Subscribe to:
Comments (Atom)
