Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Oracle Applications R11.03 - Checking ATP using MTL_DEMAND_INTERFACE?!
Hi,
My Problem:
To check the ATP (Available To Promise) of an item, we have a PL/SQL program
that populates MTL_DEMAND_INTERFACE and then calls INXATP using
FND_TRANSACTION.SYNCHRONOUS:
retval := FND_TRANSACTION.SYNCHRONOUS(
timeout,
mgr_outcome,
mgr_message,
'INV',
'INXATP',
'INXATPGROUP_ID=' || to_char (AtpGroupId) || ' MRP_STATUS=1'
In 10.7 NCA, FND_TRANSACTION.SYNCHRONOUS returns a value of 0 (zero) indicating a successful processing; mgr_outcome and mgr_message both return SUCCESS. When I select DATE_FOR_REQ_QUANTITY_OUT and QUANTITY_AVAILABLE_OUT back from MTL_DEMAND_INTERFACE, they have the right ATP result. However, when we upgraded to 11.03 (on our test instance), the same FND_TRANSACTION.SYNCHRONOUS call returns a value of 3 (Other Error); mgr_outcome and mgr_message both return no values. Also, when I select DATE_FOR_REQ_QUANTITY_OUT and QUANTITY_AVAILABLE_OUT back from MTL_DEMAND_INTERFACE, they are null as well.That's the problem, we cannot perform an ATP check using INXATP.
###Steps for checking ATP programatically###
in R11.03, I always get no result regardless of the values inserted into
MTL_DEMAND_INTERFACE:
Step 1: Get a new group_id:
select mtl_demand_interface_s.nextval
into group_id_v
from dual;
Step 2: Insert a record in MTL_DEMAND_INTERFACE Insert intoinv.mtl_demand_interface
(atp_check, last_update_date, last_updated_by,
Step 3: Call fnd_global.apps_initialize and fnd_transaction.synchronous
x_user_id := 0; x_resp_id := 101; x_resp_appl_id :=1;
x_user_id, x_resp_id, x_resp_appl_id );
retval := fnd_transaction.synchronous (
timeout,
mgr_outcome,
mgr_message,
'INV',
'INXATP',
'INXATP GROUP_ID=' || to_char (AtpGroupId) || ' MRP_STATUS=1'
);
Step 4: Select the ATP output back from mtl_demand_interface.
select to_char (earliest_atp_date,'Mon-dd-yyyy'), request_date_atp_quantity
into date_for_req_quantity_out, quantity_available_out
from mtl_demand_interface
where atp_group_id = group_id_v
and attribute14 = 'WEB';
Step 5: Delete the already ATP'ed records in mtl_demand_interface.
Delete mtl_demand_interface
where atp_group_id = group_id_v
and attribute14 = 'WEB';
###Name & Version Details:###
FND_GLOBAL: 110.6
FND_TRANSACTION:110.1
INXATP.ppc: 110.6
INVWATP: 110.1
Oracle Database: 8.1.6
Platform: Compaq Tru64 UNIX Oracle Applications Release 11.03
Questions:
Have you had this, or similar, problem before? Do you have a customized
PL/SQL procedure that checks ATP by inserting records into
MTL_DEMAND_INTERFACE table in Oracle Applications release 11.03? If yes,
what fields do you populate in the table?
Thank you for your help.
Eddie.
Received on Mon Apr 16 2001 - 16:17:37 CDT