Oracle Applications R11.03 - Checking ATP using MTL_DEMAND_INTERFACE?!

From: Eddie <edawad_at_yahoo.com>
Date: Mon, 16 Apr 2001 21:17:37 GMT
Message-ID: <RjJC6.1546$SP5.439375_at_paloalto-snr1.gtei.net>


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,

creation_date,
created_by,
error_code,
requirement_date,
line_item_uom,
line_item_quantity,
atp_rule_id,
organization_id,
inventory_item_id,
attribute14,
n_column2,
atp_group_id,
atp_calendar_organization_id)
values
(1,
sysdate,
-1,
sysdate,
-1,
NULL,
to_date(date_requested_in,'Mon-dd-yyyy'), uom_in,
quantity_in,
atp_rule_id_v,
default_shipping_org_v,
item_id_in,
'WEB',

1,
group_id_v,
default_shipping_org_v);

Step 3: Call fnd_global.apps_initialize and fnd_transaction.synchronous

x_user_id := 0;
x_resp_id := 101;
x_resp_appl_id :=1;

timeout := 240;
fnd_global.apps_initialize (
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 - 23:17:37 CEST

Original text of this message