Monday, September 20, 2010

Autoconfig in R12


Autoconfig is tool/utility to reconfigure your Oracle Application configuration files using context (XML file) and template files. 
This post covers steps to run Autoconfig in Oracle Apps R12 (steps are similar to 11i, only change is location of autoconfig script and log files)
.
A) Running Autoconfig on R12 environment Application Tier
1. Login as user owning application tierfor R12 (usually applmgr)
2. Set environment variable by executing env file $INSTALL_BASE/ apps/ apps_st/ appl/ APPL[$SID]_[$hostname].env
3. cd $ADMIN_SCRIPTS_HOME  (or $INSTALL_BASE/apps/$CONTEXT_NAME/ admin/ scripts)
4. run adautocfg.sh (Autoconfig script)
./adautocfg.sh5. Supply apps password when prompted.
.
B) Running Autoconfig on R12 environment Database Tier

1.Login as user owning database tier for R12 (usually oracle)
2. Set environment variable by executing env file $INSTALL_BASE/ db/ tech_st/ [11.1.0 or 10.2.0]/ [$SID]_[$hostname].env
3. cd $ORACLE_HOME/ appsutil/ scripts/ $CONTEXT_NAME
4. run adautocfg.sh (Autoconfig script)
./adautocfg.sh
5. Supply apps password when prompted

Things good to know about Autoconfig in R12
1.
Autoconfig logs for R12 application tier are at
$INSTALL_BASE/inst/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log ($INST_TOP/admin/log/[$MMDDhhmm])
2. Autoconfig logs for R12 Database tier are at
[$RDBMS_ORACLE_HOME]/appsutil/log/[$CONTEXT_NAME]/[$MMDDhhmm]/adconfig.log
3. R12 system is autoconfig enabled and uses context file stored in [INST_TOP]/appl/admin/[CONTEXT_NAME].xml (Application Tier)
and
[$DATABASR_ORACLE_HOME]/appsutil/[$CONTEXT_NAME].xml (Database Tier)


What is Autoconfig ? Autoconfig is tool in Apps to configure oracle Applications 11i , Application Tier as well Database Tier.
How to run Autoconfig ?
If you want to configure database tier then you have to execute autoconfig script adautocfg.sh on database tier else if you want to configure on application tier (Middle Tier ) then you have to execute one on middle tier .
Here is the script location
For Database tier its $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME
For Application Tier its $OAD_TOP/admin/scripts/$CONTEXT_NAME
adautocfg.sh calls adconfig.sh from $AD_TOP/bin which inturn calls adconfig.pl from $AD_TOP/bin
Don’t forget to take backup before executing autoconfig.
What source of information for Autoconfig to update configuration files ?
If you are wondering where is configuration information stored about your apps 11i instance based on which it updates your Instance then this file is xml file also called as Context file and its in $APPL_TOP/admin for Application Tier or $ORACLE_HOME/appsutil in Database Tier
I am going to unwrap this xml / context file which is most important file . If you get a chance open this file & go through it so wait for my next post on Context File Contents with explanation & how to put your customization so that Autoconfig can’t overwrite them ..

SQL Queries for checking Profile Option Values


SQL Queries for checking Profile Option Values

The following queries are useful to get the profile option values of a profile option at site, application, responsibility and user level
1) Obtain Profile Option values for Profile Option name like ‘%Ledger%’ and  Responsibility name like ‘%General%Ledger%’
SELECT
substr(pro1.user_profile_option_name,1,35) Profile,
decode(pov.level_id,
10001,'Site',
10002,'Application',
10003,'Resp',
10004,'User') Option_Level,
decode(pov.level_id,
10001,'Site',
10002,appl.application_short_name,
10003,resp.responsibility_name,
10004,u.user_name) Level_Value,
nvl(pov.profile_option_value,'Is Null') Profile_option_Value
FROM 
fnd_profile_option_values pov,
fnd_responsibility_tl resp,
fnd_application appl,
fnd_user u,
fnd_profile_options pro,
fnd_profile_options_tl pro1
WHERE
pro1.user_profile_option_name like ('%Ledger%')
and  pro.profile_option_name = pro1.profile_option_name
and  pro.profile_option_id = pov.profile_option_id
and  resp.responsibility_name like '%General%Ledger%' /* comment this line  if you need to check profiles for all responsibilities */
and  pov.level_value = resp.responsibility_id (+)
and  pov.level_value = appl.application_id (+)
and  pov.level_value = u.user_id (+)
order by 1,2;

2) Obtain all Profile Option values setup for a particular responsibility. Replace the responsibility name as per your requirement.
SELECT
substr(pro1.user_profile_option_name,1,35) Profile,
decode(pov.level_id,
10001,'Site',
10002,'Application',
10003,'Resp',
10004,'User') Option_Level,
decode(pov.level_id,
10001,'Site',
10002,appl.application_short_name,
10003,resp.responsibility_name,
10004,u.user_name) Level_Value,
nvl(pov.profile_option_value,'Is Null') Profile_option_Value
FROM 
fnd_profile_option_values pov,
fnd_responsibility_tl resp,
fnd_application appl,
fnd_user u,
fnd_profile_options pro,
fnd_profile_options_tl pro1
WHERE
pro.profile_option_name = pro1.profile_option_name
and  pro.profile_option_id = pov.profile_option_id
and  resp.responsibility_name like '%General%Ledger%'
and  pov.level_value = resp.responsibility_id (+)
and  pov.level_value = appl.application_id (+)
and  pov.level_value = u.user_id (+)
order by 1,2;


Calling a concurrent program from backend


CREATE OR REPLACE TRIGGER xx
   AFTER INSERT
   ON wf_routing_rules
   FOR EACH ROW
BEGIN
   concreqid := 0;
   returncode := fnd_request.set_mode (TRUE);
   concreqid := fnd_request.submit_request ('FND',
                                  'DELEGATEPROC',
                                  '',
                                  SYSDATE,
                                  FALSE,
                                  CHR (0)
                                 );


   IF concreqid = 0
   THEN
      DBMS_OUTPUT.put_line ('Problem Submitting Program DELEGATEPROC');
/* Handle Error */
   END IF;
END;

Accounting Entry for Oracle ERP


What are the journal entries in Procure to Pay Cyc...

1. Material Receipt
Receiving Accrual Dr                                                                  
AP Accrual Cr
2. On completion on inspection and accepting of goods
Inventory Dr
Receiving Accrual Cr
The Above given 2 entries are in PO module
3. On entering Invoice in AP
AP Accural Dr
Accounts Payable Cr
4. On Making payment
Accounts Payable Dr
Cash/Bank Cr


RE: What are the journal entries in Procure to Pay Cyc...

1. On Entry of PO ________ No accounting impact
2. On Materil Receipt
Receiving Accural Dr
AP Accural Cr


3. On Completion of Inspection and goods accepted
Inventory Dr
Receiving Accural Cr
The Above mentioned entries in PO Module
4. On entering invoice in AP
AP Accural Dr
Accounts Payable Cr
5. On Payment
Accounts Payable Dr'
Cash/Bank Cr

RE: What are the journal entries in Procure to Pay Cyc...

When we raise the Purchase Order entry is

Material in transit a/c Dr

To AP Accrual A/c

When we match the Invoice with PO

AP Accruals A/c Dr

To AP Liability A/c


When Payment is made

AP Liability A/c Dr

To Cash Clearing A/c

Re: What's the accounting entry when an Invoice is created in AP? Answer
# 1
Charge A/c is debited 
Liability A/c is credited
 
In case there are any taxes involved then also the relevant 
 
Tax A/c is debited 
Liability A/c is credited.


Through Matching with Purchase Order:
 
AP Accrual A/c Dr 
    To Liability A/c
 
Without Purchase order or Manually:
 Charge A/c Dr
    To Liability A/c

Re: in general ledger it is posiible for reverse entry in any another option ( not reverse tab) Answer
# 3
Journals can be reversed in the following ways:
1. Query the Journal to be reversed and reverse it.
2. Journals > Generate > Reversals
3. Run Program - Automatic Reversal, this program will pick
all eligible journals and reverses them.


                        AR Accounting entry

Re: what are the accounting entries which get effected in order to cash cycle Answer
# 1
Materal acounts
Cost of goods sold account
revenue account


Re: what are the accounting entries which get effected in order to cash cycle Answer
# 2
Accounting Entries for AR
 
Once the Order is shipped then 
 
Material account will be credit 
COGS Account will be debit.
 
 
 
 
At the time of Invoice creation
 
 
Revenue account will be credit 
receivable account will be debit.
 
At the time of receipt creation. 
 
Receivable account will be credit 
Bank payment account will be debit