gatp

29
Global Available To Promise (GATP) Please forward comments and questions to [email protected]. Thanks! Before implementing GATP, please see Oracle APS Implementation and Users Guide Release 11i , part number A81009-02. GATP Decentralized In a decentralized environment, additional setup and process management is required. The graph below depicts the setup for GATP in a decentralized environment. Data collections are required in a decentralized configuration. mrp_ap_apps_instances, at the source instance, and msc_apps_instances, at the destination instance, are used to store instance setup and instance specific information. Mrp_ap_apps_instances contains source instance information including the database link name that points to the destination server if implemented as decentralized. Msc_apps_instances contains the destination instance specific information as well as the database link that points to each individual source, if implemented in a decentralized mode. Mrp_ap_apps_instances and msc_apps_instances are used in both centralized and decentralized configurations. In a decentralized configuration, the source table MRP_AP_APPS_INSTANCES must contain only one row. Execute the following table to verify this. select instance_id from mrp_ap_apps_instances; This query should return one row as the source can only point to one destination instance. If ASCP is not being used, use the OM data collection concurrent program. If ASCP is being used, use the ASCP data collection program. If only single level GATP is implemented, the OM data collection is sufficient since there isn't a need to collect BOM and routing data.

Upload: sanjiv-kumar

Post on 28-Oct-2014

131 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: GATP

Global Available To Promise (GATP)

Please forward comments and questions to [email protected]. Thanks!

Before implementing GATP, please see Oracle APS Implementation and Users Guide Release11i, part number A81009-02.

GATP DecentralizedIn a decentralized environment, additional setup and process management is required. Thegraph below depicts the setup for GATP in a decentralized environment. Data collections arerequired in a decentralized configuration. mrp_ap_apps_instances, at the source instance, andmsc_apps_instances, at the destination instance, are used to store instance setup and instancespecific information. Mrp_ap_apps_instances contains source instance information including thedatabase link name that points to the destination server if implemented as decentralized.Msc_apps_instances contains the destination instance specific information as well as thedatabase link that points to each individual source, if implemented in a decentralized mode.Mrp_ap_apps_instances and msc_apps_instances are used in both centralized anddecentralized configurations.

In a decentralized configuration, the source table MRP_AP_APPS_INSTANCES must containonly one row. Execute the following table to verify this.

select instance_idfrom mrp_ap_apps_instances;

This query should return one row as the source can only point to one destination instance.

If ASCP is not being used, use the OM data collection concurrentprogram. If ASCP is being used, use the ASCP data collectionprogram. If only single level GATP is implemented, the OM datacollection is sufficient since there isn't a need to collect BOM androuting data.

Page 2: GATP

2

Decentralized Application Setup11i , 11.0.3, 11.0.2 and 10.7 16.1 are valid sources for an 11i GATP destination. Perform thefollowing setup at each source instance to implement GATP in a decentralized environment. Setthe following profile options accordingly.• INV: External ATP should be set to GLOBAL. This profile value option is created by the

GATP Patch as indicated in the GATP Implementation Guide. This profile option is notneeded in 11i.

• INV: Capable to Promise should be set to either Enable PL/SQL based ATP withoutplanning output or Enable PL/SQL based ATP with planning output. This should be set atthe source and destination instances.

• MRP:ATP Database Link should be set to the database link name that points to thedestination server. This profile option does not need to be set on the destination instance.

MRP Tables- SKUs- O/H- S/R7.3.4/8.0/8.1

MSC Tablescontainingstatement ofsupply.8.1.6

Data CollectionsUsing Database LinksSource: mrp_ap_apps_instances.a2m_dblinkDestination:msc_apps_instances.m2a_dblink

Data is collected.

Reservations are pushed back.

Decentralized Environment

Source Destination

Verify the database link:select instance_code,

substr(a2m_dblink,1,35), ß This points from the source to the destinationsubstr(m2a_dblink,1,35) ß This points from the destination to the source

from msc_apps_instances;

Verify the database link at the source:select instance_code,

substr(a2m_dblink,1,35), ß This points from the source to the destinationsubstr(m2a_dblink,1,35) ß This points from the destination to the source

from mrp_ap_apps_instances;

Page 3: GATP

3

GATP Centralized11i source to 11i destination is the only combination allowed in a centralized GATPimplementation. The graph below depicts the setup for GATP in a centralized environment.Data collections are required in a centralized configuration. If ASCP is not being used, use theOM data collection concurrent program. If ASCP is being used, use the ASCP data collectionprogram. If only single level GATP is implemented, the OM data collection is sufficient sincethere isn't a need to collect BOM and routing data. Mrp_ap_apps_instances contains sourceinstance information not including the database link name that points to the destination serversince both transaction source data and the GATP destination are contained within one Oracleinstance. Msc_apps_instances contains the destination instance specific information notincluding the database. Mrp_ap_apps_instances and msc_apps_instances are used in bothcentralized and decentralized configurations.

In a centralized configuration, the source table MRP_AP_APPS_INSTANCES must containonly one row as the source can only point to one destination instance. Execute the followingtable to verify this.

select instance_idfrom mrp_ap_apps_instances;

Verify the database link at the destination:select instance_code,

substr(a2m_dblink,1,35), ß This points from the source to the destinationsubstr(m2a_dblink,1,35) ß This points from the destination to the source

from msc_apps_instances;

Verify the database link at the source:select instance_code,

substr(a2m_dblink,1,35), ß This points from the source to the destinationsubstr(m2a_dblink,1,35) ß This points from the destination to the source

from mrp_ap_apps_instances;

Page 4: GATP

4

Centralized Application SetupPerform the following setup to implement GATP in a centralized environment:• INV: External ATP should be set to None.• INV: Capable to Promise should be set to either Enable PL/SQL based ATP without

planning output or Enable PL/SQL based ATP with planning output. There is moreinformation.

• MRP:ATP Database Link should be null since another Oracle instance is not involved in adecentralized configuration.

MRP Tables- SKUs- O/H- S/R7.3.4/8.0/8.1

MSC Tablescontainingstatement ofsupply.8.1.6

Data CollectionsUsing Database LinksSource: mrp_ap_apps_instances.a2m_dblinkDestination:msc_apps_instances.m2a_dblink

Data is collected.

Reservations are pushed back.

Centralized Environment, same server, same Oracle instance

Page 5: GATP

5

In the graph below, collections are taken from two manufacturing organizations. The statementsof supply from both organizations is stored in the APS instance. Additionally, the same twosource instances are order management centers in the, promising or demanding against thecombined statement of supply.

10.7 / 11 / 11.5Source MRP Data

10.7 / 11 / 11.5Source MRP Data

Collect DataComplete orIncremental RefreshUsing OM or APS Data Collection

Source Instance 1

Source Instance 2

Order ManagementGATP Request

Order ManagementGATP Request

commit_point_strenght = 1

commit_point_strenght = 1

MSCSupply/Demand tablesODS or PDS

APS or Destination Instance

commit_point_strenght = 0

If you are implementing Global Available to Promise is a decentralized environment, considersetting the COMMIT_POINT_STRENGTH. By setting this value higher on the OLTPinstance, compared to the APS server, the OLTP instance will control the distributedtransactions.

All transactions must wait their turn in a queue. Precedence is given to those distributedtransactions possessing a greater commit point.

A servers’s commit point strength is set by the initialization parameterCOMMIT_POINT_STRENGTH within the init_<sid>.ora parameter file. The range of valuesis any integer from 0 to 255. A setting of zero is the lowest priority for commit_point_strength.For example, to set the commit point strength of a database to 200, include the following line inthat database’s parameter file:

COMMIT_POINT_STRENGTH=200

Page 6: GATP

6

Source of GATP InformationGATP information is derived from:• ODS or Operational Data Store. These rows have a plan_id = -1• PDS or Planning Data Store. These rows have a plan_id > -1A data store is a set of tables used to store data. The ODS is the destination of collected data.If several Oracle instances are collected for GATP promising, all instance data will be stored inthe ODS. The PDS is the destination of ASCP plan data. After a plan has completedsuccessfully, the data will be inserted into the PDS. Implementing shared plan partitions has nodirect affect on GATP processing aside from possible performance implications. To learn moreabout shared plan partitions, please reference the ASCP User’s Guide part number A81009-01.

Collecting ATP Supply• The Advanced Planning and Scheduling (APS) Planning Data Pull (PDP) and Order

Management (OM) ATP Data Collection are 2 different report-sets with the sameConcurrent Programs included in both sets. The PDP is used to collect data for the ASCPplanning engine and GATP. The Planning Data Pull can be executed from within APSinstead of collecting data from within OM.

• The Order Management implementation of data collection, as of 11.5.3, does not allow forthe collection of BOMS or Routings. This makes the calculation of supply chain GATPimpossible. GATP will assume infinite supply.

INV: Capable to PromiseINV: Capable to Promise determines which data store will be used for ATP check. This profileoption can have the following settings:

1 - Enable Product Family ATP and CTP, this is not used in 11i2 - Enable Product Family ATP, this is not used in 11i3 - Enable ATP, this is not used in 11i4 - Enable PL/SQL based ATP with Planning Output *5 - Enable PL/SQL based ATP without Planning Output *

* new setting for 11i

Global Available to Promise With Planning Output4 - Enable PL/SQL based ATP with Planning Output. With this profile option set to #4 youcan utilize supply chain GATP and multi-level ATP. ATP rules are used when GATPdetermines the infinite time fence. There must be at least one valid ASCP plan with the ATPbox checked. NAV>Manufacturing Plan, Production Plan or Distribution Plan/Names. In

Page 7: GATP

7

11.5.3 there is a choice between these three different plan types. These will be combined intoone plan type in the future. The names form contains a checkbox for ATP. Considerunchecking the inventory atp flag of the other plans that may contain the item.

The PDS rows in the following tables are used. The rows in each of these tables has a plan_id> -1:MSC_SUPPLIESMSC_DEMANDSMSC_RESOURCE_REQUIREMENTSMSC_NET_RESOURCE_AVAILMSC_INTERORG_SHIP_METHODSMSC_SUPPLIER_CAPACITIESMSC_SUPPLIER_FLEX_FENCES

If the GATP process is not returning correct values according to the plan output, determinewhich plan OM is promising against. This query will select the plan_id, plan name also knownas compile designator, the source instance id and the organization id.

Select a.compile_designator,a.plan_id,b.organization_id,b.organization_code,b.sr_instance_id

from msc_plans a, msc_plan_organizations bwhere a.compile_designator = '&your_plan_name'and b.plan_id = a.plan_id;

This query will select the source inventory_item_id which is needed for the last query.

select sr_inventory_item_id,substr(item_name, 1, 30)

from msc_system_itemswhere item_name = ‘&your_item_name’and sr_instance_id = ‘&sr_instance_id’;

This query will select all of the plans where the item exists. If this query returns multiple plansthere is more than one plan for an item/org/instance/demand class combination. Gatp will pickthe plan with lowest plan_id to perform GATP. If the demand class is not required, simplypress return through the demand class prompt. If the demand class is supplied, the query mayreturn more than one row. In this case however, the plan_id should be the same for the rowsreturned unless there are multiple plans available.

Page 8: GATP

8

select plan_idfrom msc_atp_plan_snwhere sr_instance_id = ‘&sr_instance_id’and organization_id = ‘&organization_id’and sr_inventory_item_id = ‘&inventory_item_id’and demand_class = ‘&Your_demand_class’;

Several plans can be checked for atp. As the Advanced Supply Chain Planner,NAV>Manufacturing Plan, Production Plan or Distribution Plan/Names. In 11.5.3 there is achoice between these three different plan types. These will be combined into one plan type inthe future. The names form contains a checkbox for ATP. Consider unchecking the inventoryatp flag of the other plans that may contain the item.

Global Available to Promise Without Planning Output5 - Enable PL/SQL based ATP without Planning Output. With this profile option set to 5,supply chain GATP or multi-level ATP is not possible.

The rows in MSC_SUPPLIES, MSC_DEMANDS and MSC_SALES_ORDERS from theODS are used. The rows in each of these tables has a plan_id = -1. Essentially, with theprofile option set to 5, you have the same ATP functionality present in previous releases ofOracle Applications. The only difference being that the collected data represents supply fromone or more organizations or instances. This is not the same as in previous versions of OracleApplications. In previous versions of Oracle applications, the user was limited to supplycontained within one instance.

ATP rules are used, if defined, for the item.

Additional GATP Profile OptionsMRP: Complete Supply Chain ATP – In a future release, this profile option will control thevisibility of the warehouses within the instance sourcing rule. Currently in 11.5.4, GATP returnsthe ATP information for the warehouse ranked as number 1 if the quantity requested cannot bemet within any warehouse defined in a sourcing rule for requested item.MRP: ATP Assignment Set – This is used for Order Entry or Order Management at thesource instance. If the GATP request is launched from the source in a decentralizedenvironment, the assignment set indicated here will drive the GATP request.MRP: ATP Database Link – OM will use this database link to access GATP information atthe destination pointed to be this database link. If the source transaction data is collected intothe destination GATP database objects contained within the same Oracle instance, the processis operating under centralized mode. This profile option is not set in a centralized configuration.If the source transaction data is collected into the GATP database objects in a different Oracleinstance - even on the same server - the process is operating under decentralized mode. This

Page 9: GATP

9

profile must be set. Additionally, if this profile is set and the source is 10.7 or 11.0.%, theprofile option INV:Capable to Promise must be set to Global.MRP: ATP Debug Mode – If set to YES, GATP will produce a debug file at the sourceinstance. The debug file will be written to utl_file_dir. Please reference the end of thisdocument concerning the setup and extraction of the ATP debug file. If this setting is used in adecentralized environment, please set the profile option to MSC: ATP Debug Mode at thedestination instance as well since a debug file can be produced at the source and destinationinstances.MSC: ATP Assignment Set – ASCP will use this assignment set if populated. If this profileoption is not populated, GATP will use the instance specific global sourcing rule, that is assignedto an assignment set, collected from the source. If the GATP request is launched from thedestination in a decentralized environment, the assignment set indicated here will drive theGATP request.MSC: ATP Debug Mode – If set to YES, GATP will produce a debug file at the destinationinstance. The debug file will be written to utl_file_dir. Please reference the end of thisdocument concerning the setup and extraction of the ATP debug file. If this setting is used in adecentralized environment, please set the profile option to MRP: ATP Debug Mode at thesource instance as well since a debug file can be produced at the source and destinationinstances.INV: External ATP – By setting this to GLOBAL, GATP will use the setting in MRP: ATPDatabase Link to access the GATP quantities at the destination instance. This is used in 10.7and 11 only.

Sourcing Rules• Customer / Customer Site global sourcing rule takes precedence if setup and collected.

The Ship From organization, as setup in a bill of distribution or global sourcing rule andfinally the organization sourcing rule.

• Sourcing rules can originate at the source instance or the destination instance. If thesourcing rule originates at the source instance, it must be global and assigned to anassignment set at the destination instance. If the GATP server is promising for only oneinstance then the sourcing rule is by default treated as global. However, the GATP servercan be promising for more than one instance, therefore, any global assignment on the sourcebecomes an instance-specific assignment for GATP. Assign sourcing rules at the globallevel on the source and they will be used if there are not specific assignments at thecustomer/site level available.

• If pick source is used, GATP will use the sourcing rule since no source is supplied. Oncesourcing rule is involved, then GATP will use the ship method and lead time from thesourcing rule. However, if the default ship method is defined, pick source or not will notmatter when determining the default ship method. See intransit leadtimes below for moreinformation regarding default ship methods.

• ODS GATP uses sourcing rules to determine if the item can be manufactured in otherorganizations. Sourcing type equal to buy is not effective. PDS GATP uses buy sourcingfor the shipping organizations to generate planned orders.

Page 10: GATP

10

Global ATP Profile Options Affecting Sourcing RulesMRP: ATP Assignment Set is a source profile option that is used by Order Management tocalculate ATP. If the GATP request is launched from the source, the assignment set indicatedhere will drive the GATP request.MSC: ATP Assignment Set instructs ASCP to use this specific assignment set whencalculating GATP information. If the GATP request is launched from the destination, theassignment set indicated here will drive the GATP request.

In the following example, data is collected from three instances. Each instance has a globalsourcing rule that is contained within instance specific assignment sets at the source. At thedestination instance, the assignment set is entered into the specific instance setup row, as theAdvanced Supply Chain Administrator, NAV>Setup/Instances. When collections areexecuted, each instance will have a specific assignment set. GATP will use the assignment setspecific to the instance. Each instance specific assignment set will encompass all organizationsfor that instance.

Global sourcing rules assigned to an assignment set at the source. GATP will use theassignment set specific to the instance for GATP processing.

Source Instance TwoGlobal Sourcing RuleASSIGNMENT_SET_2

Source Instance OneGlobal Sourcing RuleASSIGNMENT_SET_1

Source Instance ThreeGlobal Sourcing RuleASSIGNMENT_SET_3

Collect data into ODS

GATP will use the instance specific set:Instance One: ASSIGNMENT_SET_1Instance Two: ASSIGNMENT_SET_2Instance Three: ASSIGNMENT_SET_3

Page 11: GATP

11

In the next example, there is a non global sourcing rule assigned to an assignment set at thesource. No assignment set identified at the destination profile option MSC: ATP AssignmentSet. GATP will not have access to a valid assignment set. This will prevent accurate GATPresults if the end item is not in stock in a particular warehouse. The user will not have visibilityto additional warehouse supply. In this example, if the user does not specify the source, theuser will receive 'No Sources'.

Source Instance OneGlobal Sourcing RuleASSIGNMENT_SET_1

Collect data into ODS

GATP will not have anASSIGNMENT_SET for thisinstance.

Page 12: GATP

12

This particular setup is NOT recommended. Global sourcing rules assigned to an assignmentset at the source. Assignment set created at the destination and the assignment set namepopulated in profile option MSC:ATP Assignment Set. The assignment set created at thedestination instance covers all instances collected.

Source Instance TwoGlobal Sourcing RuleASSIGNMENT_SET_2

Source Instance OneGlobal Sourcing RuleASSIGNMENT_SET_1

Source Instance ThreeGlobal Sourcing RuleASSIGNMENT_SET_3

Collect data into ODS

GATP will NOT use theALL_INSTANCE ASSIGNMENTSET defined at the destination.

Page 13: GATP

13

The following example assumes that the user is performing the GATP at the source instance:

Source Instance TwoGlobal Sourcing RuleASSIGNMENT_SET_2

Source Instance OneGlobal Sourcing RuleASSIGNMENT_SET_1

Collect data into ODSMSC: ATP Assignment Set = null

At the destination instance, the user creates a sourcing rule that includes limited organizations from both collected instances. The sourcing rule is assigned to an assignment set called Limited_Instance_Org_Set.

Execute ASCP Memory Based Planner (MBP) with specific assignment set calledLimited_Instance_Org_Set. This is designated when setting up the plan name.

ASCP data is inserted into the PDS. The plan output inconfigured according to the Limited_Instance_Org_Set

Page 14: GATP

14

If the user executes the GATP check without referencing the source organization, GATPdefaults to the assignment set defined in MSC: ATP Assignment Set since eachitem/organization combination can be part of a different plan. This is done for the top level only,after that the plan assignment set is used. If the GATP process originates at the source instance,in decentralized mode, the assignment set indicated by the setting in the profile optionMRP:ATP Assignment Set will be used for the top level only.

When performing GATP, fill in the source organization, then the plan assignment set will beused. If the are no sources for the item/organization combination, the user will receive the ‘nosources’ error message. This logic is only used at the top level of the assembly, below the toplevel the plan assignment set is used for GATP.

ATP rules are used when performing GATP with planning output to arrive at the infinite supplytime fence. See Leadtimes for additional details.

MRPGATPB.pls

The GATP program MRPGATPB.PLS represents demand and supply items. This isthe main program for GATP as of 11.5.3• Reads from the previously collected item supply and item demand records that are found on

the APS server. Both centralized and decentralized.• Utilizes the multi-threaded capabilities of the Oracle database to process concurrent ATP

request efficiently. Allowing for transactions between the source instance and destinationinstance.

• Ensures secure allocation of supply to demand

MRPGATB performs operations on the following database objects:• msc_system_items• msc_supplies• msc_sales_orders• msc_demands• mrp_atp_details_temp• mrp_atp_schedules_temp

Page 15: GATP

15

GATP ProcessAs a GATP request is made, an entry is inserted into mrp_atp_schedule_temp, detailsconcerning the GATP check are stored in mrp_atp_details_temp. The foreign key, associatedwith mrp_atp_schedule_temp, consists of session_id and order_line_id . Each ATP requestreceives a new session_id derived from mrp_atp_schedule_temp_s sequence. Multiple ATPrequests within a single order or order line will receive a unique session_id. After the ATPcheck is complete, the ATP information is written to mrp_atp_details_temp. Both of thesetemp entries should be deleted when the user session is terminated. If the ATP check wassuccessful, the details are recorded in msc_sales_orders. Please purgemrp_atp_schedule_temp, mrp_atp_details_temp periodically as ATP requests may beabandoned leaving orphaned rows in these tables.

mrp_atp_schedule_temp

mrp_atp_details_temprecord_type = 2

msc_sales_ordersPDS based GATP

msc_suppliesODS /PDS based GATP

msc_demandsODS/PDS based GATP

Page 16: GATP

16

Tables used in GATP include:

MRP_ATP_SCHEDULE_TEMP: Holds GATP results from an active GATP reservation.MRP_ATP_DETAILS_TEMP: Contains GATP details associated to an active GATPreservation results for Supply/Demand. Horizontal GATP and sourcing.MRP_ATP_DETAILS_TEMP: Contains GATP data for the user session.MTL_PARAMETERS: Holds the default ATP_RULE_ID.MRP_ATP_SCHEDULE_TEMP: Embodies ATP rows that are going to be checked for ATP.MRP_ATP_SUPPLY_DEMAND is populated during the execution of the Advanced SupplyChain Planning engine and is used by the Planner’s Workbench.BOM_RESOURCE_FLEX_FENCES: stores the time phased capacity tolerance for resourcesand lines. This is used in planning and ATP for the support of flex fence tolerance and support.BOM_DEPARTMENT_RESOURCES contains resources that may be available to CTP. Thectp_flag indicates if a resource is active for CTP.MSC_Available_to_Promise is used when accessing the Horizontal Plan within the Planner’sWorkbench. This table is populated during the execution of the Advanced Supply ChainPlanning engine.

Page 17: GATP

17

GATP Data FlowData flows into views used by GATP in the following manner:

Source Tables:mrp_*so_*

msc_suppliesmsc_demandsmsc_resource_requirementsmsc_net_resource_availmsc_interorg_ship_methodsmsc_supplier_capacitiesmsc_supplier_flex_fences

Source Tables:mrp_*so_*

Source Tables:mrp_*so_*

msc_suppliesmsc_demandsmsc_sales_orders

msc_suppliesmsc_demandsmsc_sales_orders

Inv Profile = 4,PDS Data is used

Inv Profile = 5, Databaselink populated, ODS Datais used.

Inv Profile = 5, noDatabase link populated

GATP Data RequirementsIntransit Leadtime and Trading Partners or OrganizationsGATP determines intransit leadtime based upon the relationship involved in the transaction.• Organization to/from organization and organization to customer/customer site. When

verifying the default ship method for organization to organization, we will use theMSC_INTERORG_SHIP_METHODS table based upon the from_organization_id andto_organization_id columns.

• When verifying the default ship method from organization to customer / customer site, wewill use the MSC_INTERORG_SHIP_METHODS table based upon the from_location_idand to_location_id columns. If multiple locations are found, GATP uses the location withthe lowest rownum.

• If items, warehouses, organizations, sourcing rules, ATP rule, any receipts for stock arecreated, deleted or modified or if the shipment methods are modified it is necessary tosubmit the data collection program before the changes are seen in Order Management.

Page 18: GATP

18

When attempting to determine the schedule arrival date in an order line, GATPdetermines the instransit leadtime as follows:

1) Determine that the ship to and ship from are defined in MSC_TRADING_PARTNERS2) Determine intransit leadtime for trading partners based upon previously collected sourcing

rule;3) If not present, determine the default shipping method from collected source information

within in MSC_INTERORG_SHIP_METHODS. This default is required when the transitoccurs between an organization and a customer. This is setup when the customer isdefined.

The MSC_TRADING_PARTNER_SITES table contains the locations for all collectedpossible sites. For defaulting purposes, if the source and destination organizations are notdefined properly in MSC_TRADING_PARTNERS_SITES and yet defined within a defaultship method, the intransit leadtime will not be reflected in the Schedule Arrival Date. TheSchedule Ship Date and Schedule Arrival Date would be the same for the order line.

Organization to OrganizationExecute the following query to determine if the organization trading partner is defined. Thisquery is to be used when the transit occurs between organizations. To find your sr_tp_id andsr_instance_id, execute the following queries.

The first step is to locate the id that points to the collected instance code. This is the code thatwas assigned to the instance at the destination:

select instance_code,instance_id,enable_flagfrom msc_apps_instances;

The next step involves locating the source trading partner id. As of 11.5.3, there are three typesof partners; supplier, customers, instance/organizations. In our example below, we will locatethe organization_id at the source. Based upon the organization name, located the appropriateoragnization_id:

select substr(name,1,30),organization_idfrom HR_ALL_ORGANIZATION_UNITS

Page 19: GATP

19

select sr_tp_site_idfrom msc_trading_partner_siteswhere sr_tp_id = 207 ß organization_id from above queryand sr_instance_id = 2 ß instance_id from the first queryand partner_type = 3; ß 3 = instance/organization

If the above query returns a row, the check for a default shipping method can proceed if theorganization ship to and ship from are not defined in your sourcing rules.

• If the source organization is populated during the GATP check, GATP will pickup theintransit leadtime from the sourcing rule.

• It is advised that one default ship method with intransit leadtime be defined in theMSC_INTERORG_SHIP_METHOD table between organizations. If the sourcing rulesdo not contain the relationship between ship from / ship to organizations the default intransitleadtime will be used during scheduling activities.

• If ‘pick source’ is entered for the source during the GATP check, the sourcing rule will beused to determine the intransit lead time and shipment method. In this case, if a shipmentmethod is not present in the sourcing rule, a valid shipment method is required in theMSC_INTERORG_SHIP_METHOD table. If the default ship method is not present inMSC_INTERORG_SHIP_METHOD, GATP will not be able to calculate the correct shipmethod and delivery leadtime.

Having determined that the organizations are in MSC_TRADING_PARTNER_SITES,continue the investigation into the default shipping method between the organizations.First, select the data that will be used to locate the default ship method currently being used foryour organizations. At the destination, issue the following query:

select instance_code,instance_id,enable_flagfrom msc_apps_instances;

The next step involves locating the organization id(s) that are involved in the shipmenttransaction. At the source:

select substr(name,1,30),organization_idfrom HR_ALL_ORGANIZATION_UNITS

Page 20: GATP

20

Query 1

Select intransit_time, ship_methodfrom msc_interorg_ship_methodswhere plan_id = -1 ß this represents the ODSand from_organization_id = ‘&from_org_id’and sr_instance_id = ‘&from_instance_id’and to_organization_id = ‘&to_org_id’and sr_instance_id2 = ‘&to_instance_id’and default_flag = 1;

Query 2

select intransit_time, ship_methodfrom msc_interorg_ship_methodswhere plan_id = -1and from_organization_id = ‘&from_org_id’and sr_instance_id = ‘&from_instance_id’and to_organization_id = ‘&to_org_id’and sr_instance_id2 = ‘&to_instance_id’;

If query 1 returns no data and query 2 returns data, it means that the default ship method is notspecified. Please turn the default flag on for the ship method, collect the source data andattempt the process again.

Organization to CustomerIf the transit occurs between organization and customer, the intransit leadtime will be chosenfrom the collected sourcing rules. If the specific organization to customer transit is not defined inthe sourcing rules, the default ship method will be used. At least one default ship method withintransit leadtime should be defined in the MSC_INTERORG_SHIP_METHOD table betweenorganization and customer. Sourcing rules would not be used in this case.

To verify the association required to access the default shipping method, execute the followingqueries.

The first query will extract the correct instance_id. The second query will extract the partner_idbased upon the location_id and organization combination. If the combination of the customerand ship from organization is located in MSC_LOCATION_ASSOCIATIONS, the defaultship method can be chosen from MSC_INTERORG_SHIP_METHODS. If there is not adefault ship method for the customer and ship from location, the GATP will receive the

Page 21: GATP

21

messages ‘No sources found’. Query 3 will select the location_id required for query 4. Query4 will return the default ship methods setup between the organization and customer / customersite.

Query 1select instance_code,instance_id,enable_flagfrom msc_apps_instances;

Query 2select substr(name,1,30),organization_idfrom HR_ALL_ORGANIZATION_UNITS;

Query 3select location_idfrom msc_location_associationswhere sr_instance_id = '&Source_instance'and partner_id = (select tp_id

from msc_tp_id_lidwhere exists(select customer_idfrom ra_customerswhere customer_name = '&Your_customer_name'and customer_id = msc_tp_id_lid.sr_tp_idand status = 'A')and partner_type = 2and sr_instance_id = '&&source_instance');

Query 4select from_location_id,

sr_instance_id,to_location_id,sr_instance_id2,substr(ship_method,1,10)

from msc_interorg_ship_methodswhere to_location_id = '&location_id'and from_location_id = '&Your_shipping_organization';

Page 22: GATP

22

Is the Item GATP Eligible?Item Atp_rules are used if the GATP is against the ODS. If the GATP is against the PDS, theplan options are used, however the GATP rule is used as well to determine the infinite timefence.

For an item to participate in GATP, the following two columns in MTL_SYSTEMS_ITEMS, atthe source, must be populated:ATP Flag - ATP_FLAGATP Components Flag - ATP_COMPONENTS_FLAG is used for the PDS only. The profileoption INV: Capable to Promise must be set to 4, GATP With Planning Output. This flag isdefaulted to NO when GATP is implemented without planning output as multi-level GATP isnot applicable.

If, during supply chain GATP, it is determined that a level of the bill of materials does not haveatp_components_flag set to yes, the ATP check will not proceed further down that leg of thebill. To verify the eligibility of collected data to participate in GATP, execute the followingqueries.

This query will return the instance id:

select instance_code,instance_id,enable_flag

from msc_apps_instances;

This query, to be executed at the source, will return your organization id:

select substr(name,1,30),organization_id

from HR_ALL_ORGANIZATION_UNITS

This query will return the plan_id:

Select a.compile_designator,a.plan_id,b.organization_id,b.organization_code,b.sr_instance_id

from msc_plans a, msc_plan_organizations bwhere a.compile_designator = '&your_plan_name'and b.plan_id = a.plan_id;

Page 23: GATP

23

This query will select the source inventory_item_id which is needed for the last query.

select sr_inventory_item_id,substr(item_name, 1, 30)

from msc_system_itemswhere item_name = ‘&your_item_name’and sr_instance_id = ‘&sr_instance_id’;

This query will return the atp setup for the item:

select atp_flag, atp_components_flagfrom msc_system_itemswhere plan_id = ‘&plan_id’ ß This plan_id would be –1 for ODSand organization_id = ‘&organization_id’and sr_instance_id = ‘&instance_id’and sr_inventory_item_id = ‘source_inventory_item_id’

Both flags should return 'Y' to participate in Mutilevel GATP. If not, please correct the itemsetup at the source, rerun collection and rern the plan.

Is the atp_flag = ‘Y’ and the atp_components_flag = 'N', then GATP will verify material onlyfor the item in single level GATP mode.

Leadtime for GATPIt is important to determine the leadtime that will be used to arrive at the latest produceable timefence for calculating GATP supply. After the infinite time fence, GATP assumes infinite supply.There are four choices for leadtime: cumulative total leadtime; cumulative manufacturing leadtime; total leadtime; user defined time fence. The infinite supply time fence is defined as part ofthe atp rule and the atp rule is assigned at the item/org level or the organization level. Theleadtime is derived as follows: item/organization setting; organization default setting; plan cutoff date. The infinite time fence setting for the item is used if ATP rule is not set.

What is the ATP rule for the item?First, run the following SQL to extract details needed to determine which lead time is being usedfor the ATP check:

Page 24: GATP

24

Select instance_idfrom msc_apps_instanceswhere instance_code = ‘&your_three_letter_code’;This is the three letter code that was used to setup the instance for collection.

select sr_inventory_item_id,organization_id,from msc_system_itemswhere item_name = '&your_item_name';

The following query is not needed if you are promising available supply against the ODS. If theprofile option, INV:Capable to Promise is set to GATP Without Planning Output, skip thisquery and enter –1 for the next query when prompted for the plan_id.

select plan_idfrom msc_planswhere compile_designator = '&your_compile_designator'

Now, select the information that we are looking for:

select atp_flag,atp_components_flag,atp_rule_id,item_name,preprocessing_lead_time,full_lead_time,postprocessing_lead_time

from msc_system_itemswhere plan_id = ‘&plan_id’and sr_instance_id = '&instance_id_from_query_above'and organization_id = '&organization_id'and sr_inventory_item_id = '&your_inventory_item_id’

In the query above, we selected the atp_rule_id. This is populated at the source item entryform. If the atp_rule_id for the item is not empty, execute the following query:

select infinite_supply_fence_codefrom msc_atp_ruleswhere rule_id = '&atp_rule_id_from_above'and sr_instance_id = '&instance_id_from_query_above';

Page 25: GATP

25

infinite_supply_fence_code values:1 - cumulative_total_lead_time2 - cum_manufacturing_lead_time3 - preprocessing_lead_time + full_lead_time + postprocessing_lead_time,4 - infinite_supply_time_fence

This should return a non zero value, zero indicates sysdate or today. If the result is zero, GATPconcludes that the item has infinite supply. Verify the item leadtime setup as indicated by theresults of the above query.

If the ATP_RULE_ID, for the item empty, retrieve the DEFAULT_ATP_RULE_ID from theorganization that has been collected:

select default_atp_rule_idfrom msc_trading_partnerswhere sr_tp_id = ‘&organization_id’and sr_instance_id = ‘&instance_id’and partner_type = 3;

The query below determines the lead times used for the instance.

select infinate_supply_fence_codefrom msc_atp_ruleswhere sr_instance_id = ‘&instance_id’

GATP Diagnostics1. Is the ATP snapshot valid? select object_name,object_Type,status from user_objects where object_name = 'MSC_ATP_PLAN_SN'

OBJECT_NAME OBJECT_TYPE STATUS ---------------------------- ---------------------- ----------- MSC_ATP_PLAN_SN TABLE VALID MSC_ATP_PLAN_SN UNDEFINED INVALID

alter snapshot MSC_ATP_PLAN_SN compile;

2. While trying to do perform a query on the ATP inquiry screen, you receive the followingerror message "signature of package apps.order_sch_wb has been changed. The form does notallow to do an inquiry.

Page 26: GATP

26

FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exceptionORA-04062ORA-04062 signature of packageapps.order_sch_wb has been changed.

Recompile the package body. ALTER PACKAGE ORDER_SCH_WB compile body

Run the following script: select object_type, status from all_objects where object_name = '%ORDER_SCH_WB%'

The object should now be valid.

3. When attempting a GATP action, the message ‘ATP not available’ is displayed. Thismessage appears when a data collection is executing for the instance. When performing acomplete refresh with or without sales orders, GATP is not available. This is not the case whenperforming an incremental refresh. Perform the following query to determine the status of yourinstance:

select instance_code,so_tbl_status

from msc_apps_instances;

The so_tbl_status of the instance_code that is being promised against must be equal to 1.If so_tbl_status is equal to 2 and data collections are executing, ATP is not available until thecompletion of data collection. If it is equal to 2 and collections are not running, the lastcollections attempt ended with error and needs to be repaired. This will require resetting thest_status flag in msc_apps_instances, investigating the log file pertaining to the previousexecution and relaunching the collection. If the data collections are not currently executing, asverified by NAV>View>Requests, reset the value of SO_TBL_STATUS. Set to 1 byexecuting the following sql:

update msc_apps_instancesset so_tbl_status = 1where instance_code = '&your_instance_code';commit;

To repair the st_status column after failed data collection, see note.146016.1.

Page 27: GATP

27

4. Multiple levels are not displayed.a) Multi level GATP is performed only when implementing GATP with planning output.b) Verify that the ATP rule has been set for the item within MSC_SYSTEM_ITEMS. Theinfinite time fence is derived from the atp rule.c) Verify that the ATP_FLAG and ATP_COMPONENTS_FLAG are set to Y inMSC_SYSTEM_ITEMS for correct plan_id. Set the ATP_COMPONENTS_FLAGto N for purchased items.d) Verify that the ATP_FLAG in MSC_BOM_COMPONENTS for the correct plan_idis activated.e) Verify that the plan has the ATP checkbox activated on the Names Form.f) For resources, ensure that the ctp_flag is set in MSC_DEPARTMENT_RESOURCES.

5. When performing supply chain ATP, the message ‘No Source Found’ appears.a) Review the global sourcing rule and assignment set for the customer/customer site.b) New customers need to be entered at the source and the data collection needs to be

submitted.

6. ATP quantity is returned as zero.a) Check the INV: Capable to Promise profile option setting.b) Check the MRP: ATP Database Link and test the link

7. If the ATP check is made on a non-working date, the GATP process checks backward for avalid workday making the demand late. In this scenario, GATP returns zero for the quantity.

8. If there is not an ATP rule set at the item or organization level, GATP cannot determine thecorrect supply/demand to perform netting. GATP will return zero.

9. Producing a GATP debug file.

a) Determine if the utl_file_dir is set correctly. This must be performed at the source anddestination instances if GATP is implemented in a decentralized mode:

SELECT VALUE FROM V$PARAMETER WHERE NAME = 'utl_file_dir';

The result will resemble the following:

VALUE ----------------------------------------------------------------------- /usr/tmp/, /usr/, /temp

Page 28: GATP

28

Ensure that the directories returned from the above SQL possess the appropriate privileges.

$ cd /usr/tmp $ ls -ld drwxrwxrwx 2 root other 2425 Dec 25 22:30

Also make sure the following SQL script returns something other than '*'. While '*' is a valid setting in the utl_file_dir list, * will not function correctly for GATP purposes.

SELECT LTRIM(RTRIM(SUBSTR(value, INSTR(value,',',-1,1)+1))) FILE_DIR FROM v$parameter WHERE name= 'utl_file_dir'

FILE_DIR ----------------------------------------------------------------------- /usr/tmp

The $APPLPTMP environment variable should be set to a directory the directory returned fromthe above SQL.

b) MSC: ATP Debug Mode set to Yes at the destination instance. Site level or User level.

c) MRP: ATP Debug Mode set to Yes at the source instance if GATP is implemented in adecentralized mode. Site level or User level.

d) Responsibility --> Advanced Supply Chain Planner Navigation -->ATP-->Atp Inquiry

Enter the ATP inquiry and click on the ATP results After the ATP result is shown close the ATP result window and come back to ATP criteria screen. From this screen after the ATP Inquiry is completed. Click on Help-->Diagnostics-->Examine. This comes up with a Examine Field and Variable Values window - In the field click on the LOV and select SESSION_ID. This will return you a value in the Value field. Note the Session_id.

Page 29: GATP

29

The above performs an ATP Inquiry, it may be required that an ATP schedule activity needs to be performed. Perform all of the steps as indicated above, but instead of the ATP inquiry, perform the scheduling activity. Please see Metalink concerning the production of an OE Debug file.

e) cd to /usr/tmp (or your particular directory), locate the debug logfile created by the ATP inquiry with the following filename. session -SESSION_ID that was generated during step d. Check the source and destination instances if operating in a decentralized mode.

10. For multi level GATP check, set item attributes for each item in the bill Check ATPa) Y - for material onlyb) C - for material and capacity (resources)c) N - none

Ensure that the BOM has the ATP flag set as well. As an example, if the item needs to betransferred from M2 to M1, then the item attribute 'ATP Components' in M1 should be set to'Materials Only'. If the desire is to satisfy the atp request by building the item in M2, then thethe item's 'ATP Components' in M2 should be set to either 'Materials only', or 'Materials andResources', or 'Resources only' depending on what kind of availability check ATP is toperform. Additionally, check the atp flag at bill level and or ctp flag at department resourceslevel accordingly.

11. GATP and 10.7 or 11.0.%Please Note: I am adding more to this point, such as the sql required to find the flex field and thesetting of these switches. I will be updating this doc and resending when complete.In 11i, the value of the atp_flag and atp_components_flag are stored inMTL_SYSTEM_ITEMS at the source instance. If the source instance is 10.7 or 11.0, then thevalue is stored in a descriptive flexfield of MTL_SYSTEM_ITEMS.