Tuesday 28 June 2016

AP tables?



AP_INVOICES_ALL
AP_INVOICE_DISTRIBUTIONS_ALL
AP_AE_HEADERS_ALL
AP_AE_LINES_ALL
AP_HOLDS_ALL
AP_PAYMENT_SCHEDULES_ALL
AP_CHECKS_ALL
AP_INVOICE_PAYMENTS_ALL
AP_PAYMENT_DISTRIBUTIONS
AP_INVOICE_PREPAYS
AP_INV_SELECTION_CRITERIA_ALL
IBY_PAYMENTS_ALL
IBY_PAY_SERVICE_REQUESTS
IBY_EXTERNAL_PAYEES_ALL
IBY_EXT_PARTY_PMT_MTHDS

How a MO is diff from Sub inventory transfer?



MO generally are the request of movement of items in one organization. It may be of from 3 sources, MO requisition, Replenish MO, Pick Wave MO. MO can be MO Issue which will issue the item from the location and MO transfer which ll transfer the item to another location.

The difference between move order transfer and sub inventory transfer is In move orders, you can have an approval so you are not simply "taking" material from a sub inventory that is under someone else's control.

Also, move orders create allocations. So you can place hold on the material with the intention of picking it up a little later. In sub inventory transfer, there is no reservation / allocation. So until you actually pick up the material and perform the transaction, someone else can claim the material.

What is Move Orders



Move orders are requests for the movement of material within a single organization. They allow movement of material within a warehouse or facility for purposes like replenishment, material storage relocations, and quality handling. You can generate move orders either manually or automatically.
Move orders are restricted to transactions within an organization. If you are transferring material between organizations you must use the internal requisition process.

There are three types of move orders in Oracle:

Move Order Requisition
A move order requisition is a manually generated request for a move order. It is available for sub-inventory transfers and account transfers. Once a requisition has been approved, it becomes a move order. These requests can optionally go through a workflow-based approval process before they become move orders ready to be sourced and transacted.

Replenishment Move Order
You can automatically create pre-approved move orders using the following planning and replenishment functions. These processes generate move orders if the material is sourced from another inventory location within the organization.
Min-Max Planning:  When a minimum quantity for a specific item is reached in inventory, you can use a move order to replenish the supply. 
Replenishment Counting: If a system that uses replenishment counting triggers an item for replenishment, you can use move orders to replenish the supply. 
Kanban Replenishment: When a Kanban card signals the need to release an item into a sub-inventory, you can generate a move order to handle the release.

Pick Wave Move Orders
Pick wave move orders are pre-approved requests for subinventory transfers to bring material from a source location in the warehouse to a staging subinventory. These move orders are generated automatically by the Oracle Shipping Execution pick release process.

For all move orders, the final result is one of the two supported transactions:
1.      Subinventory Transfer or
2.      Account Issue.

Move Order Process Flow:
Create a move order for required material
Approve the move order lines
Allocate the move order
Print a pick slip
Transact move order lines

Note:
·         Replenishment and Pick Wave move orders are pre-approved.
·         The Move Order Pick Slip report generates pick slips for move order requisitions and replenishment move orders. To generate a pick slip for pick wave move orders, you need to submit the Oracle Shipping Execution Pick Slip report.

Wednesday 22 June 2016

How to compile CUSTOM.pll in R12 and 11i?


R12:
frmcmp_batch module=CUSTOM.pll userid=apps/<pwd> output_file=CUSTOM.plx module_type=LIBRARY batch=yes compile_all=special

11i:

f60gen module = CUSTOM.pll userid = apps / (appspwd) module_type = LIBRARY batch = NO compile_all = special output_file = $ AU_TOP / resource / CUSTOM.plx

Friday 17 June 2016

What is an item category and category set?





A category is a logical classification of items that have similar characteristics. A category set is a distinct grouping scheme and consists of multiple categories. An item can belong to any number of category sets. We can assign item to one category within each category set.

Category: MTL_CATEGORIES_B
Category Set: MTL_CATEGORY_SETS_B

API to create and update category:
INV_ITEM_CATEGORY_PUB.CREATE_CATEGORY
INV_ITEM_CATEGORY_PUB.UPDATE_CATEGORY

API to assign category to an Item:
INV_ITEM_CATEGORY_PUB.CREATE_CATEGORY_ASSIGNMENT
INV_ITEM_CATEGORY_PUB.UPDATE_CATEGORY_ASSIGNMENT

Script for INV_RESERVATION_PUB.TRANSFER_RESERVATION

CREATE OR REPLACE PROCEDURE APPS.CLC_MTL_RESERVATIONS_PRG (
   errbuf    OUT VARCHAR2,
   retcode   OUT NUMBER,
  p_org_code         VARCHAR2
)
AS
l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
l_msg_count NUMBER;
l_msg_data VARCHAR2 (4000);
l_rsv_id NUMBER;
l_dummy_sn inv_reservation_global.serial_number_tbl_type;
l_status VARCHAR2 (1);
l_quantity_reserved NUMBER;
l_cnt number :=0;
l_err number :=0;
v_err_msg varchar2(4000);

cursor c_resv (l_org_code number)is
select ooha.order_number,oola.header_id, oola.line_id, msi.segment1,--mr.RESERVATION_ID,mr.ORGANIZATION_ID--,wdd.RELEASED_STATUS
 mr.reservation_id                   
    , mr.requirement_date              
    , mr.organization_id               
    , mr.inventory_item_id             
    , mr.demand_source_type_id         
    , mr.demand_source_name            
    , mr.demand_source_header_id       
    , mr.demand_source_line_id         
    , mr.demand_source_delivery        
    , mr.primary_uom_code              
    , mr.primary_uom_id                
    , mr.secondary_uom_code            
    , mr.secondary_uom_id              
    , mr.reservation_uom_code          
    , mr.reservation_uom_id            
    , mr.reservation_quantity          
    , mr.primary_reservation_quantity  
    , mr.secondary_reservation_quantity
    , mr.detailed_quantity             
    , mr.secondary_detailed_quantity   
    , mr.autodetail_group_id           
    , mr.external_source_code          
    , mr.external_source_line_id       
    , mr.supply_source_type_id         
    , mr.supply_source_header_id       
    , mr.supply_source_line_id         
    , mr.supply_source_name            
    , mr.supply_source_line_detail     
    , mr.revision                      
    , mr.subinventory_code             
    , mr.subinventory_id               
    , mr.locator_id                    
    , mr.lot_number                   
    , mr.lot_number_id                 
    , mr.pick_slip_number              
    , mr.lpn_id                        
    , mr.attribute_category         
    , mr.attribute1                 
    , mr.attribute2                 
    , mr.attribute3                 
    , mr.attribute4                 
    , mr.attribute5                 
    , mr.attribute6                 
    , mr.attribute7                 
    , mr.attribute8                 
    , mr.attribute9                 
    , mr.attribute10                
    , mr.attribute11                
    , mr.attribute12                
    , mr.attribute13                
    , mr.attribute14                
    , mr.attribute15                
    , mr.ship_ready_flag               
  , mr.staged_flag                  
  , mr.crossdock_flag            
  , mr.crossdock_criteria_id   
  , mr.demand_source_line_detail   
  , mr.serial_reservation_quantity   
  , mr.supply_receipt_date       
  , mr.demand_ship_date       
  , mr.project_id               
  , mr.task_id                
  , mr.orig_supply_source_type_id 
  , mr.orig_supply_source_header_id    
  , mr.orig_supply_source_line_id      
  , mr.orig_supply_source_line_detail  
  , mr.orig_demand_source_type_id      
  , mr.orig_demand_source_header_id    
  , mr.orig_demand_source_line_id      
  , mr.orig_demand_source_line_detail  
  , mr.serial_number
from MTL_RESERVATIONS mr,
oe_order_lines_all oola,
oe_order_headers_all ooha,
mtl_system_items_b msi
--wsh_delivery_details wdd
where
ooha.header_id =oola.header_id
and ooha.org_id =oola.org_id
and oola.line_id = mr.DEMAND_SOURCE_LINE_ID
and mr.INVENTORY_ITEM_ID =msi.INVENTORY_ITEM_ID
and mr.ORGANIZATION_ID = msi.ORGANIZATION_ID
--and wdd.SOURCE_HEADER_ID = ooha.header_id
--and wdd.SOURCE_LINE_ID = oola.line_id
and mr.DEMAND_SOURCE_TYPE_ID=2
and mr.ORGANIZATION_ID =l_org_code
and mr.LOCATOR_ID is not null
and not exists (select 'A' from MTL_RESERVATIONS_TEMP mrt where mrt.RESERVATION_ID= mr.RESERVATION_ID and mrt.ORGANIZATION_ID = mr.ORGANIZATION_ID)
--and mr.RESERVATION_ID =1859071
--and mr.INVENTORY_ITEM_ID=32299
/*and (wdd.RELEASED_STATUS ='R'
or not exists (select 'A' from wsh_delivery_assignments wda, wsh_new_deliveries wnd
where wda.delivery_detail_id = wdd.delivery_detail_id
AND wda.delivery_id = wnd.delivery_id));*/
/*and wdd.RELEASED_STATUS ='R'
and  not exists (select 'A' from wsh_delivery_assignments wda, wsh_new_deliveries wnd
where wda.delivery_detail_id = wdd.delivery_detail_id
AND wda.delivery_id = wnd.delivery_id);*/
and mr.SHIP_READY_FLAG is null;

/*select oola.header_id, oola.line_id, mr.RESERVATION_ID
from MTL_RESERVATIONS mr,
oe_order_lines_all oola
where
oola.line_id = mr.DEMAND_SOURCE_LINE_ID
and mr.DEMAND_SOURCE_TYPE_ID=2
and ORGANIZATION_ID =l_org_code
--and mr.INVENTORY_ITEM_ID=32299
and not exists (select 'A' from wsh_delivery_details wdd
where  wdd.SOURCE_HEADER_ID =oola.HEADER_ID and
 wdd.SOURCE_LINE_ID=oola.line_id);*/

BEGIN

--fnd_global.apps_initialize (10688,50606,401);

   FND_FILE.PUT_LINE (FND_FILE.LOG, 'Initializing Apps');
   FND_GLOBAL.Apps_Initialize (FND_GLOBAL.USER_ID,
                               FND_GLOBAL.RESP_ID,
                               FND_GLOBAL.RESP_APPL_ID);
 --- Could be "located" by order_header_id, order_line_id, item and warehouse - in case Several reservations That Could be updated

API to CREATE, UPDATE and DELETE MTL_RESERVATIONS?



INV_RESERVATION_PUB.CREATE_RESERVATION
INV_RESERVATION_PUB.UPDATE_RESERVATION
INV_RESERVATION_PUB.DELETE_RESERVATION
INV_RESERVATION_PUB.TRANSFER_RESERVATION