Wednesday, July 08, 2015

Steps to set-up the Multi-Org

1.Login as sysadmin responsibility

2.Define required responsibilities
Navigation:security->responsibility->define

3.Define user and assign responsibilities to the user.
Navigation:Security->user->define.

4.Login as GL Responsibility

5.Define accounting flexfield
Navigation:setup->financials->flexfield->key->segments

6.Give values for your segments
Navigation:setup->financials->flexfield->key->values.

7.Define Currency
Navigation:setup->Currencies->define

8.Define Calender.
Navigation:Setup->financials->calender->Type/Accounting

9.Create SOB
Navigation:Setup->financials->book->define

10.Login as HRMS responsibility.

11.Define a location
Navigation:Work Structure->Location

12.Define a Business Group
Navigation:Works Structure->organization->description

13.Set the following Profile Options to all your responsibilities
HR:security
HR:bisiness group
HR:User Type
GL:Set of books name

14.Login As Inventory responsibility

15.Create legal entity
N:Setup->organizations->organizations

16.Create Operating unit
Navigation:Setup->organizations->organizations

17.Set Profile option
Mo:Operating unit for all responsibilities which is worked at operating unit level.

18.Create Work day calender

19.Create inventory Organization.
Navigation:Setup->organizations->organizations

20.Login as sysadmin and run replicate seed data program.

Workflow Background Proces - Concurrent Program

Workflow Background Process is a concurrent program for processing
  • deferred activities
  • timed out activities
  • stuck processes
The background engine executes all activities that satisfy the given arguments at the time that the background engine is invoked. Any activities that are newly deferred or timed out or processes that become stuck after the current background engine starts are processed by the next background engine that is invoked.

Workflow Background Process is run with the help of Workflow Background Engine which is PL/SQL Procedure which runs this concurrent program with specified parameters.

Parameters:

Item Type : Specify an item type to restrict this engine to activities associated with that item type. If you do not specify an item type, the engine processes any activity regardless of its item type.

Minimum Threshold : Specify the minimum cost that an activity must have for this background engine to execute it, in hundredths of a second.

Maximum Threshold : Specify the maximum cost that an activity can have for this background engine to execute it, in hundredths of a second. By using Minimum Threshold and Maximum Threshold you can create multiple background engines to handle very specific types of activities. The default values for these arguments are null so that the background engine runs activities regardless of cost.

Process Deferred : Specify whether this background engine checks for deferred activities. Setting this parameter to Yes allows the engine to check for deferred activities.
Process Timeout – Specify whether this background engine checks for activities that have timed out. Setting this parameter to Yes allows the engine to check for timed out activities.

Process Stuck : Specify whether this background engine checks for stuck processes. Setting this parameter to Yes allows the engine to check for stuck processes.
 Note: Make sure you have a least one background engine that can check for timed out activities, one that can process deferred activities, and one that can handle stuck processes. At a minimum, you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes.

Navigation : System Administrator --> Requests > Run

CONCSUB in Oracle Apps

  • CONCSUB is used to submit a concurrent program to the concurrent manager from the operating system level without having to log on to Oracle Applications.
  • The Executable for CONSCUB is located at $FND_TOP/bin/CONCSUB.
The CONCSUB functionality categorized into
  1. Submitting Concurrent Requests
  2. Controlling Concurrent Managers
Submitting Concurrent Requests:
  • We can use the CONCSUB to execute both seeded and custom programs in Oracle Applications.
  • In case of custom programs they must first be registered in Oracle Applications before you can execute them with CONCSUB.
The following can be used in Oracle Applications to run the active users report from the command line without logging in the  applications:

CONCSUB APPS/APPS SYSADMIN "System Administrator" SYSADMIN WAIT=N CONCURRENT FND FNDSCURS PROGRAM_NAME="Active Users"
  • The log and out file for this program is also created at the location defined by your $APPLCSF/$APPLLOG and $APPLCSF/$APPLOUT respectively.
  • The WAIT=Y/N is used to specify weather to wait for the first concurrent request to be completed before the second is submitted or not.
Various printing parameters with the COCNCSUB to directly print the output of your concurrent request:

PRINTER=
NUMBER_OF_COPIES=
PRINT_STYLE=
LANGUAGE=
Also you could specify the start date and completion options along with CONCSUB by using the following parameters
START=
REPEAT_DAYS=
REPEAT_END=

Controlling Concurrent Managers:

We can shutdown concurrent managers using CONSCUB.

shutdown Command:

CONCSUB apps/apps_password SYSADMIN ‘System Administrator’ SYSADMIN WAIT=N CONCURRENT FND SHUTDOWN

Sometimes the shutdown of the concurrent managers via the CONCSUB utility using the SHUTDOWN clause hangs and you may want to terminate your concurrent managers, in such a case you can use the ABORT clause with CONCSUB to do a force shutdown of your concurrent managers.

Abort Command:

CONCSUB apps/apps SYSADMIN ‘System Administrator’ SYSADMIN WAIT=N CONCURRENT FND ABORT

In this case a concurrent request to terminate the concurrent managers is fired with a -75 priority. In case of the shutdown  the priority is 0 and default priority is of a concurrent request 50, by assigning a -75 priority the CONCSUB ensures abort is executed before shutdown.
If the SYSADMN user or the System Administrator responsibility is inactive, then the shutdown would fail.
To start the concurrent managers the CONCSUB is not used. We can use the startmgr executable is used.


CONSCUB Command:


CONCSUB / \
\
\
\
[WAIT=N|Y|] \
CONCURRENT \
\
\
[PROGRAM_NAME=] \
[ORG_ID=<#>] - R12 onwards only
[REPEAT_TIME=time>] \
[REPEAT_INTERVAL= ] \
[REPEAT_INTERVAL_UNIT=< resubmission unit>] \
[REPEAT_INTERVAL_TYPE=< resubmission type>] \
[REPEAT_END=date and time>] \
[START=<date>] \
[IMPLICIT=< type of concurrent request> \
[ ... ]

Description for above parameters

Example for CONSCUB:

$ CONCSUB APPS/APPS \
SYSADMIN \
System Administrator \
SYSADMIN \
WAIT=N \
CONCURRENT \
FND \
FNDFMRTC \
PROGRAM_NAME=Register Custom Tables Weekly \
REPEAT_INTERVAL=7 \
REPEAT_INTERVAL_UNIT=DAYS \
REPEAT_INTERVAL_TYPE=START \
START='"08“JUN96 23:55:00€"'
CGL
APPLSYS
ALL
CGL

Sales Order Shipment Status:


B: Backordered- Line failed to be allocated in Inventory
C: Shipped -Line has been shipped
D: Cancelled -Line is Cancelled
N: Not Ready for Release -Line is not ready to be released
R: Ready to Release: Line is ready to be released
S: Released to Warehouse: Line has been released to Inventory for processing
X: Not Applicable- Line is not applicable for Pick Release
Y: Staged- Line has been picked and staged by Inventory 

B : Backordered : when we try to pick release a Sales Order but On-hand is not available for the order line , in such scenarios the order line is back ordered and the released status  = 'B'

C: Shipped :Once the Order line is shipped the associated delivery details Released Status is changed to 'C' .OM interface and Inventory interface have processed and the trip is closed.

D: Cancelled : When the Order line is cancelled the released status = 'D'

N: Not Ready for Release -Line is not ready to be released . this can happen when the information is available in wsh_delivery_details but order line has not reached the Awaiting Shipping status , might be due to some workflow customization's

R: Ready to Release: The Order line has been booked and the line is ready to be pick released . Line status is Awaiting Shipping under such scenarios

S: Released to Warehouse : Depending on the Pick release process in the business it moght be that Pick release is performed with Auto Pick confirm Set to No.
In such scenarios when we do pick release the Move Order will be created
Move Order allocation is done , but since Auto Pick Confirm is set to No the Mover Order will not be transacted.
The Delivery Detail will be in state : Pick Wave

X: Not Applicable- Line is not applicable for Pick Release , for the non-shippable item lines eg : Warranty orders
Y: Staged- Line has been picked and staged by Inventory .In this Case the line has been pick released. the Move Order Creation,Allocation and transaction is completed . Goods have be transferred from the Source Sub-invenotry to Staging area of the warehouse and the line is ready to be shipped.

How to get Version of Programs, Files, and Objects

How to get Version of Programs, Files, and Objects, askhareesh blog for Oracle Apps
Oracle Applications:
To obtain version of form from any applications form, navigate to the form. Then in the Menu tool bar .
Help --> About Oracle Applications
Or
select release_name from fnd_product_groups;

Database Objects:
select text from user_source where name='&package_name' and text like '%$Header%';

Views:
select VIEW_NAME, TEXT 
from 
USER_VIEWS 
where VIEW_NAME = '&VIEW_NAME';

Oracle Workflow:
$FND_TOP/sql/wfver.sql
OR
select TEXT from WF_RESOURCES where NAME='WF_VERSION';

Unix:
uname -a

Windows:
Start => Parameters => Control Panel => System

Java:
java -version 

Sqlplus :
start --> Run --> cmd
sqlplus 

TnsPing:
start --> Run --> cmd
TNSPING 

D2k version:
ORACLE_HOME\Orainst\nt.rgs 

File versions:
On Unix: strings -a "File name" | grep Header
On Windows : find "Header" File_name

Order to Cash Cycle Complete Query

SELECT OOH.ORDER_NUMBER,
       OOH.FLOW_STATUS_CODE HEADERSTATUS,
       OOH.ORDERED_DATE ORDER_DATE,
       OTT.NAME ORDER_TYPE,
       HP.PARTY_NUMBER CUSTOMER_NUMBER,
       HP.PARTY_NAME CUSTOMER_NAME,
       QLHT.NAME PRICELIST_NAME,
       RSA.NAME SALESREP_NAME,
       HCSU1.LOCATION CUST_SHIPTO_LOC,
       HL1.ADDRESS1 SHIPTO_ADDRESS,
       HL1.CITY SHIPTO_CITY,
       HL1.POSTAL_CODE SHIPTO_POSTAL_CODE,
       HCSU2.LOCATION CUST_BILLTO_LOC,
       HL2.ADDRESS1 BILLTO_ADDRESS,
       HL2.CITY BILLTO_CITY,
       HL2.POSTAL_CODE BILLTO_POSTAL_CODE,
       OOL.ORDERED_ITEM,
       OOL.ORDERED_QUANTITY,
       OOL.ORDER_QUANTITY_UOM UOM,
       OOL.UNIT_SELLING_PRICE UNIT_PRICE,
       OOL.FLOW_STATUS_CODE LINESTATUS,
       WDD.RELEASED_STATUS RELEASED_STATUS,
       WDA.DELIVERY_ID DELIVERYID,
       WND.DELIVERY_TYPE DELIVERYTYPE,
       RCTA.TRX_NUMBER INVOICENO,
       RCTA.TRX_DATE INVOICEDATE,
       RCTLA.LINE_TYPE,
       ARAA.AMOUNT_APPLIED INVOICE_AMOUNT,
       ACRA.RECEIPT_NUMBER RECEIPTNO,
       ACRA.RECEIPT_DATE RECEIPTDATE,
       ACRA.AMOUNT RECEIPTAMOUNT,
       ACRA.TYPE RECEIPTTYPE,
       APSA.AMOUNT_APPLIED PAYMENTAMOUNT,
       HCAA.ACCOUNT_NUMBER ACCTNO,
       HCAA.ACCOUNT_NAME ACCTNAME
  FROM OE_ORDER_HEADERS_ALL OOH,
       OE_ORDER_LINES_ALL OOL,
       OE_TRANSACTION_TYPES_TL OTT,
       HZ_PARTIES HP,
       QP_LIST_HEADERS_TL QLHT,
       RA_SALESREPS_ALL RSA,
       HZ_PARTY_SITES HPS,
       HZ_CUST_ACCT_SITES_ALL HCAS1,
       HZ_CUST_SITE_USES_ALL HCSU1,
       HZ_LOCATIONS HL1,
       HZ_CUST_ACCT_SITES_ALL HCAS2,
       HZ_CUST_SITE_USES_ALL HCSU2,
       HZ_LOCATIONS HL2,
       MTL_SYSTEM_ITEMS_B MSIB,
       WSH_DELIVERY_DETAILS WDD,
       WSH_DELIVERY_ASSIGNMENTS WDA,
       WSH_NEW_DELIVERIES WND,
       RA_CUSTOMER_TRX_ALL RCTA,
       RA_CUSTOMER_TRX_LINES_ALL RCTLA,
       AR_RECEIVABLE_APPLICATIONS_ALL ARAA,
       AR_CASH_RECEIPTS_ALL ACRA,
       AR_PAYMENT_SCHEDULES_ALL APSA,
       HZ_CUST_ACCOUNTS_ALL HCAA
 WHERE     OOH.ORG_ID = 204
       AND OOH.ORDER_NUMBER = 15025
       AND OOH.HEADER_ID = OOL.HEADER_ID
       AND OOH.ORDER_TYPE_ID = OTT.TRANSACTION_TYPE_ID
       AND OOH.SOLD_TO_ORG_ID = HP.PARTY_ID
       AND OOH.PRICE_LIST_ID = QLHT.LIST_HEADER_ID
       AND OOH.SALESREP_ID = RSA.SALESREP_ID
       --AND      HP.PARTY_ID=HPS.PARTY_IDAND      HPS.PARTY_SITE_ID=HCAS1.PARTY_SITE_ID
       AND HCAS1.CUST_ACCT_SITE_ID = HCSU1.CUST_ACCT_SITE_ID
       AND OOH.SHIP_TO_ORG_ID = HCSU1.SITE_USE_ID
       AND HPS.LOCATION_ID = HL1.LOCATION_ID
       AND HPS.PARTY_SITE_ID = HCAS2.PARTY_SITE_ID
       AND HCAS2.CUST_ACCT_SITE_ID = HCSU2.CUST_ACCT_SITE_ID
       AND OOH.SHIP_TO_ORG_ID = HCSU2.SITE_USE_ID
       AND HPS.LOCATION_ID = HL2.LOCATION_ID
       AND OOL.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
       AND OOL.ORG_ID = MSIB.ORGANIZATION_ID
       AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID
       --AND      WDD.SOURCE_LINE_ID=OOL.LINE_ID
       AND WDD.DELIVERY_DETAIL_ID = WDA.DELIVERY_DETAIL_ID
       AND WDA.DELIVERY_ID = WND.DELIVERY_ID
       AND RCTA.CUSTOMER_TRX_ID = RCTLA.CUSTOMER_TRX_ID
       AND RCTA.INTERFACE_HEADER_ATTRIBUTE1 = TO_CHAR (OOH.ORDER_NUMBER)
       AND RCTLA.INTERFACE_LINE_ATTRIBUTE6 = TO_CHAR (OOL.LINE_ID)
       AND ARAA.APPLIED_CUSTOMER_TRX_ID = RCTA.CUSTOMER_TRX_ID
       AND ARAA.CASH_RECEIPT_ID = ACRA.CASH_RECEIPT_ID
       AND ARAA.APPLIED_PAYMENT_SCHEDULE_ID = APSA.PAYMENT_SCHEDULE_ID
       AND ACRA.PAY_FROM_CUSTOMER = HCAA.CUST_ACCOUNT_ID