Uploaded by Andrews Raj

Oracle Advanced Pricing Tables

advertisement
Oracle Advanced Pricing Tables:

















































QP_LIST_HEADERS_TL
QP_LIST_HEADER_PHASES
QP_LIST_LINES
QP_LIST_LINES_EBS_LOG
QP_LIST_LINES_TEMP
QP_PARAMETERS_B
QP_PARAMETERS_TL
QP_PARAMETER_VALUES
QP_PATTERNS
QP_PATTERN_PHASES
QP_PB_INPUT_HEADERS_B
QP_PB_INPUT_HEADERS_TL
QP_PB_INPUT_LINES
QP_PRC_CONTEXTS_B
QP_PRC_CONTEXTS_TL
QP_PREQ_LINES_TMP_T
QP_PREQ_LINE_ATTRS_TMP_T
QP_PREQ_QUAL_TMP_T
QP_PRICE_BOOK_ATTRIBUTES
QP_PRICE_BOOK_BREAK_LINES
QP_PRICE_BOOK_HEADERS_ALL_B
QP_PRICE_BOOK_HEADERS_TL
QP_PRICE_BOOK_LINES
QP_PRICE_BOOK_LINE_DETAILS
QP_PRICE_BOOK_MESSAGES
QP_PRICE_FORMULAS_B
QP_PRICE_FORMULAS_TL
QP_PRICE_FORMULA_LINES
QP_PRICE_REQ_SOURCES
QP_PRICING_ATTRIBUTES
QP_PRICING_ATT_EBS_LOG
QP_PRICING_PHASES
QP_PTE_REQUEST_TYPES_B
QP_PTE_REQUEST_TYPES_TL
QP_PTE_SEGMENTS
QP_PTE_SOURCE_SYSTEMS
QP_QUALIFIERS
QP_QUALIFIERS_EBS_LOG
QP_QUALIFIERS_FWK_DUMMY
QP_QUALIFIER_RULES
QP_RLTD_MODIFIERS
QP_RLTD_MOD_EBS_LOG
QP_SEGMENTS_B
QP_SEGMENTS_TL
QP_SOURCESYSTEM_FNAREA_MAP
QP_UI_QUERIES_TL
QP_UI_QUERY_COLUMNS
QP_UPGRADE_ERRORS
QP_UPG_LINES_DISTRIBUTION
Views in Price Protection Module
ORACLE APPS COMMUNITY > Tutorial > Order Management > Oracle Advanced Pricing > Technical Design
Views in Oracle Price Protection Module
DPP_CUSTOMER_CLAIMS_ALL_DFV
DPP_INV_DET_ADJ_ALL_DFV
DPP_INVENTORY_DETAILS_ALL_DFV
DPP_LOOKUPS
DPP_TRANSACTION_HEADER_DFV
DPP_TRANSACTION_LINES_DFV
DPP_TXN_DASHBOARD_V
DPP_WEBADI_V
DPP_XLA_CLAIM_HEADERS_V
DPP_XLA_CLAIM_LINES_V
DPP_XLA_CP_V
DPP_XLA_INV_CU_V
DPP_XLA_INV_HEADERS_V
DPP_XLA_INV_LINES_V
Tables
QP_LIST_HEADERS_B QP_LIST_HEADERS_B stores the header information
for all lists. List types can be, for example, Price Lists, Discount Lists or Promotions.
QP_LIST_LINES
QP_LIST_LINES stores all list lines for lists in QP_LIST_HEADERS_B. This table
stores all types of list lines; price list lines, all types of modifiers including price
modifier list lines used to derive factors. The different types of list lines are based
on
Lookup
Type,
'LIST_LINE_TYPE_CODE'.
QP_PRICING_ATTRIBUTES
QP_PRICING_ATTRIBUTES stores product information and pricing attributes.
The PRODUCT_ATTRIBUTE and PRODUCT_ATTRIBUTE_VALUE columns
identify the product or level in the item hierarchy, i.e item context at which the price
or
modifier
is
set.
The
PRICING_ATTRIBUTE_CONTEXT,
PRICING_ATTRIBUTE and PRICING_ATTR_VALUE_FROM columns store the
pricing attributes which further define what is being priced. If the
PRICING_ATTRIBUTE_CONTEXT is VOLUME the pricing attributes column
stores
the
break
unit
attribute,
e.g.
item
quantity
and
both
the
PRICING_ATTR_VALUE_FROM and PRICING_ATTR_VALUE_TO columns
can be populated. The Product information is repeated for all pricing attributes. A
record is always created for the VOLUME context which may or may not have an
attribute
defined.
Relationship
QP_LIST_HEADERS_B <---LIST_HEADER_ID
QP_LIST_LINES
--->
QP_LIST_LINES
<---LIST_HEADER_ID,LIST_LINE_ID
--->
QP_PRICING_ATTRIBUTES
QP_PRICING_ATTRIBUTES
<---PRODUCT_ATTR_VALUE
TO_CHAR(MSI.INVENTORY_ITEM_ID)--->
mtl_system_items_b
Useful Queries

SELECT * FROM QP_LIST_HEADERS_B WHERE list_header_id IN (
SELECT list_header_id FROM QP_LIST_HEADERS_TL WHERE name = 'Corporate');--Price List Name

SELECT line.*
FROM QP_LIST_LINES line,QP_LIST_HEADERS_B header
WHERE line.LIST_HEADER_ID = header.LIST_HEADER_ID
AND line.list_header_id IN (SELECT list_header_id
FROM QP_LIST_HEADERS_TL WHERE name = 'Corporate'); --Price List Name
<>

SELECT * FROM QP_LIST_HEADERS_B SP, QP_LIST_LINES SPLL ,QP_PRICING_ATTRIBUTES QPA
WHERE SPLL.LIST_HEADER_ID= SPL.LIST_HEADER_ID
AND
QPA.LIST_HEADER_ID= SPL.LIST_HEADER_ID
AND
SPLL.LIST_LINE_ID= QPA.LIST_LINE_ID AND QPA.LIST_HEADER_ID IN (
SELECT list_header_id FROM QP_LIST_HEADERS_TL WHERE name = 'Corporate');

SELECT qpa.* FROM QP_LIST_HEADERS_B SPL,QP_LIST_LINES SPLL,
QP_PRICING_ATTRIBUTES QPA
MTL_SYSTEM_ITEMS_B MSI
WHERE MSI.ORGANIZATION_ID
= 244
AND
MSI.INVENTORY_ITEM_ID= 434257
AND
SPL.LIST_HEADER_ID= 164075
AND
SPLL.LIST_HEADER_ID= SPL.LIST_HEADER_ID
AND
QPA.LIST_HEADER_ID = SPL.LIST_HEADER_ID
AND
SPLL.LIST_LINE_ID = QPA.LIST_LINE_ID
AND
QPA.PRODUCT_ATTRIBUTE_CONTEXT = 'ITEM'
AND
QPA.PRODUCT_ATTRIBUTE = 'PRICING_ATTRIBUTE1'
AND
QPA.PRODUCT_ATTR_VALUE = TO_CHAR(MSI.INVENTORY_ITEM_ID)
AND
QPA.PRODUCT_UOM_CODE
AND
QPA.PRICING_ATTRIBUTE_CONTEXT IS NULL
AND
QPA.EXCLUDER_FLAG
AND
QPA.PRICING_PHASE_ID =1;
= MSI.PRIMARY_UOM_CODE
= 'N'
Oracle Pricing Table list
QP_LIST_HEADERS_B
QP_LIST_HEADERS_B stores the header information for all lists. List types can be, for example,
Price Lists, Discount Lists or Promotions.
QP_LIST_LINES
QP_LIST_LINES stores all list lines for lists in QP_LIST_HEADERS_B. This table stores all
types of list lines; price list lines, all types of modifiers including price modifier list lines used to
derive factors. The different types of list lines are based on Lookup Type,
'LIST_LINE_TYPE_CODE'.
QP_PRICING_ATTRIBUTES
QP_PRICING_ATTRIBUTES stores product information and pricing attributes. The
PRODUCT_ATTRIBUTE and PRODUCT_ATTRIBUTE_VALUE columns identify the product or
level in the item hierarchy, i.e item context at which the price or modifier is set. The
PRICING_ATTRIBUTE_CONTEXT, PRICING_ATTRIBUTE and
PRICING_ATTR_VALUE_FROM columns store the pricing attributes which further define what is
being priced. If the PRICING_ATTRIBUTE_CONTEXT is VOLUME the pricing attributes column
stores the break unit attribute, e.g. item quantity and both the PRICING_ATTR_VALUE_FROM
and PRICING_ATTR_VALUE_TO columns can be populated. The Product information is
repeated for all pricing attributes. A record is always created for the VOLUME context which may
or may not have an attribute defined.
Tables
Qp_interface_list_header
qp_interface_list_lines
qp_interface_qualifiers
qp_interface_pricing_attribs
qp_interface_errors
qp_list_headers_b
qp_list_headers_tl
qp_list_lines
qp_qualifiers
qp_pricing_attributes
qp_rltd_modifiers
Relationship
QP_LIST_HEADERS_B <---LIST_HEADER_ID ---> QP_LIST_LINES
QP_LIST_LINES <---LIST_HEADER_ID,LIST_LINE_ID ---> QP_PRICING_ATTRIBUTES
QP_PRICING_ATTRIBUTES <---PRODUCT_ATTR_VALUE <>
TO_CHAR(MSI.INVENTORY_ITEM_ID)---> mtl_system_items_b
Useful Queries
/* Formatted on 7/18/2014 11:02:10 AM (QP5 v5.115.810.9015) */
SELECT *
FROM qp_list_headers_b
WHERE list_header_id IN (SELECT list_header_id
FROM qp_list_headers_tl
WHERE name = 'Corporate');
--Price List Name
/* Formatted on 7/18/2014 11:02:04 AM (QP5 v5.115.810.9015) */
SELECT line.*
FROM qp_list_lines line, qp_list_headers_b header
WHERE line.list_header_id = header.list_header_id
AND line.list_header_id IN (SELECT list_header_id
FROM qp_list_headers_tl
WHERE name = 'Corporate'); --Price List Name
/* Formatted on 7/18/2014 11:01:59 AM (QP5 v5.115.810.9015) */
SELECT *
FROM qp_list_headers_b spl, qp_list_lines spll, qp_pricing_attributes qpa
WHERE
spll.list_header_id = spl.list_header_id
AND qpa.list_header_id = spl.list_header_id
AND spll.list_line_id = qpa.list_line_id
AND qpa.list_header_id IN (SELECT list_header_id
FROM qp_list_headers_tl
WHERE name = 'Corporate');--Price List Name
/* Formatted on 7/18/2014 11:01:53 AM (QP5 v5.115.810.9015) */
SELECT qpa.*
FROM qp_list_headers_b spl,
qp_list_lines spll,
qp_pricing_attributes qpa,
mtl_system_items_b msi
WHERE
msi.organization_id = 244
AND msi.inventory_item_id = 434257
AND spl.list_header_id = 164075
AND spll.list_header_id = spl.list_header_id
AND qpa.list_header_id = spl.list_header_id
AND spll.list_line_id = qpa.list_line_id
AND qpa.product_attribute_context = 'ITEM'
AND qpa.product_attribute = 'PRICING_ATTRIBUTE1'
AND qpa.product_attr_value = TO_CHAR (msi.inventory_item_id)
AND qpa.product_uom_code = msi.primary_uom_code
AND qpa.pricing_attribute_context IS NULL
AND qpa.excluder_flag = 'N'
AND qpa.pricing_phase_id = 1;
/* Formatted on 7/18/2014 11:01:45 AM (QP5 v5.115.810.9015) */
SELECT *
FROM qp_list_headers_b
WHERE list_header_id IN (SELECT list_header_id
FROM qp_list_headers_tl
WHERE name = 'Corporate');
--Price List Name
/* Formatted on 7/18/2014 11:01:35 AM (QP5 v5.115.810.9015) */
SELECT line.*
FROM qp_list_lines line, qp_list_headers_b header
WHERE line.list_header_id = header.list_header_id
AND line.list_header_id IN (SELECT list_header_id
FROM qp_list_headers_tl
WHERE name = 'Corporate'); --Price List Name
/* Formatted on 7/18/2014 11:01:29 AM (QP5 v5.115.810.9015) */
SELECT *
FROM qp_list_headers_b spl, qp_list_lines spll, qp_pricing_attributes qpa
WHERE
spll.list_header_id = spl.list_header_id
AND qpa.list_header_id = spl.list_header_id
AND spll.list_line_id = qpa.list_line_id
AND qpa.list_header_id IN (SELECT list_header_id
FROM qp_list_headers_tl
WHERE name = 'Corporate');
--Price List Name
/* Formatted on 7/18/2014 11:01:23 AM (QP5 v5.115.810.9015) */
SELECT qpa.*
FROM qp_list_headers_b spl,
qp_list_lines spll,
qp_pricing_attributes qpa,
mtl_system_items_b msi
WHERE
msi.organization_id = 244
AND msi.inventory_item_id = 434257
AND spl.list_header_id = 164075
AND spll.list_header_id = spl.list_header_id
AND qpa.list_header_id = spl.list_header_id
AND spll.list_line_id = qpa.list_line_id
AND qpa.product_attribute_context = 'ITEM'
AND qpa.product_attribute = 'PRICING_ATTRIBUTE1'
AND qpa.product_attr_value = TO_CHAR (msi.inventory_item_id)
AND qpa.product_uom_code = msi.primary_uom_code
AND qpa.pricing_attribute_context IS NULL
AND qpa.excluder_flag = 'N'
AND qpa.pricing_phase_id = 1;
EAM Work Order Along With PO Details Query
Some users have a requirement to have the data for WO and PO together.
1. WO Information.
2. WO Operation
3. Project
4. Resource
5. GL Account
6. Asset
7. PTW Information
8. PO - If the WO is having PO.
/* Formatted on 11/18/2016 12:33:21 PM (QP5 v5.114.809.3010) */
SELECT a.ORGANIZATION_ID,
a.WIP_ENTITY_ID,
b.OPERATION_SEQ_NUM,
b.DESCRIPTION OP_DESC,
b.FIRST_UNIT_START_DATE OP_SCHEDULE_START_DATE,
b.LAST_UNIT_COMPLETION_DATE OP_SCHEDULE_END_DATE,
(b.LAST_UNIT_COMPLETION_DATE - b.FIRST_UNIT_START_DATE) * 24
WO_OP_Duration,
f.ACTUAL_START_DATE OP_ACTUAL_START_DATE,
f.ACTUAL_END_DATE OP_ACTUAL_END_DATE,
(a.SCHEDULED_COMPLETION_DATE - a.SCHEDULED_START_DATE) * 24
WO_Duration,
a.PROJECT_ID,
a.TASK_ID,
a.PM_SCHEDULE_ID,
a.STATUS_TYPE WO_STATUS_ID,
h.USER_DEFINED_STATUS_ID WO_USER_DEFINED_STATUS_ID,
a.CLASS_CODE WIP_Account,
a.MATERIAL_ACCOUNT MATERIAL_ACCOUNT_ID,
a.NOTIFICATION_REQUIRED Scaffolding_Required_Flag,
a.TAGOUT_REQUIRED Insulation_Required_Flag,
b.ATTRIBUTE2 Permit_Number,
b.ATTRIBUTE3 Permit_Type,
b.ATTRIBUTE4 PTW_Status,
b.ATTRIBUTE6 PTW_DATE,
c.RESOURCE_ID,
c.USAGE_RATE_OR_AMOUNT Quantity_Required,
g.EMPLOYEE_NUMBER,
g.FULL_NAME EMPLOYEE_NAME,
PO.PR_NUMBER,
PO.PR_LINE,
PO.PR_REQUEST_DATE,
PO.REQUESTER_NUMNER,
PO.REQUESTER_NAME,
PO.PR_STATUS,
PO.PO_NUMBER,
PO.PO_LINE,
PO.RELEASE_NUM,
PO.PO_CREATION_DATE,
PO.PO_STATUS,
PO.ITEM_ID,
PO.QUANTITY_REQUESTED,
PO.UNIT_PRICE,
PO.QUANTITY_ONHAND,
PO.QUANTITY_RECEIVED,
PO.DELIVERY_TO,
PO.DELIVERY_DATE,
PO.TOTAL_COST,
a.CREATION_DATE WO_CREATION_DATE,
b.CREATED_BY OP_CREATED_BY,
b.CREATION_DATE OP_CREATION_DATE,
b.DEPARTMENT_ID OP_DEPARTMENT_ID,
a.OWNING_DEPARTMENT WO_OWNING_DEPARTMENT,
cii.INSTANCE_ID ASSET_ID,
wr.WORK_REQUEST_ID WORK_REQUEST_ID,
PO.PO_RELEASE_STATUS
FROM WIP_DISCRETE_JOBS a,
WIP_OPERATIONS b,
WIP_OPERATION_RESOURCES c,
WIP_OP_RESOURCE_INSTANCES d,
BOM_RESOURCE_EMPLOYEES e,
CSI_ITEM_INSTANCES CII,
WIP_EAM_WORK_REQUESTS WR,
(SELECT person_id, full_name, EMPLOYEE_NUMBER
FROM PER_ALL_PEOPLE_F
WHERE TRUNC (SYSDATE) BETWEEN EFFECTIVE_START_DATE
AND EFFECTIVE_END_DATE) g,
eam_work_order_details h,
(SELECT ACTUAL_START_DATE,
ACTUAL_END_DATE,
WIP_ENTITY_ID,
OPERATION_SEQ_NUM,
LAST_UPDATE_DATE,
TRANSACTION_TYPE,
CREATION_DATE
FROM EAM_OP_COMPLETION_TXNS
WHERE (TRANSACTION_ID, WIP_ENTITY_ID, OPERATION_SEQ_NUM) IN
( SELECT MAX (TRANSACTION_ID) MAX_TRANSACTION,
WIP_ENTITY_ID,
OPERATION_SEQ_NUM
FROM EAM_OP_COMPLETION_TXNS
WHERE EAM_OP_COMPLETION_TXNS.TRANSACTION_TYPE =
1
GROUP BY WIP_ENTITY_ID, OPERATION_SEQ_NUM)) f,
(SELECT porl.wip_entity_id,
porl.wip_operation_seq_num OPERATION_SEQ_NUM,
porh.segment1 PR_NUMBER,
porl.line_num PR_LINE,
porh.creation_date PR_Request_date,
g.EMPLOYEE_NUMBER Requester_Numner,
g.FULL_NAME Requester_NAME,
porh.authorization_status PR_STATUS,
poh.segment1 PO_NUMBER,
pol.line_num PO_LINE,
por.RELEASE_NUM,
por.authorization_status PO_RELEASE_STATUS,
-(SELECT RELEASE_NUM
-FROM po_releases_all
-WHERE po_release_id = poll.po_release_id)
-release_num,
poh.CREATION_DATE PO_CREATION_DATE,
poh.authorization_status PO_STATUS,
pol.item_id,
NVL (pol.quantity, poll.quantity) Quantity_requested,
pol.unit_price,
(SELECT SUM (mohq.TRANSACTION_QUANTITY)
FROM MTL_ONHAND_QUANTITIES mohq
WHERE pol.item_id = mohq.inventory_item_id
AND poll.SHIP_TO_ORGANIZATION_ID =
mohq.ORGANIZATION_ID)
QUANTITY_ONHAND,
poll.QUANTITY_RECEIVED,
--poll.SHIP_TO_LOCATION_ID,
(SELECT DESCRIPTION
FROM hr_locations
WHERE LOCATION_ID = poll.SHIP_TO_LOCATION_ID)
Delivery_To,
rsh.creation_date Delivery_Date,
(NVL (pol.unit_price, 0) * NVL (poll.QUANTITY_RECEIVED, 0))
TOTAL_COST
FROM po_requisition_headers_all porh,
PO_REQUISITION_LINES_ALL porl,
po_req_distributions_all pord,
po_distributions_all pod,
po_lines_all pol,
po_headers_all poh,
po_line_locations_all poll,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh,
po_releases_all por,
(SELECT person_id, full_name, EMPLOYEE_NUMBER
FROM PER_ALL_PEOPLE_F
WHERE TRUNC (SYSDATE) BETWEEN EFFECTIVE_START_DATE
AND EFFECTIVE_END_DATE) g
WHERE porh.requisition_header_id = porl.requisition_header_id(+)
AND porl.requisition_line_id = pord.requisition_line_id(+)
AND pord.distribution_id = pod.req_distribution_id(+)
AND pod.po_header_id = pol.po_header_id(+)
AND pod.po_line_id = pol.po_line_id(+)
AND pol.po_header_id = poh.po_header_id(+)
AND pod.po_header_id = poll.po_header_id(+)
AND pod.po_line_id = poll.po_line_id(+)
AND pod.line_location_id = poll.line_location_id(+)
AND pod.po_header_id = rsl.po_header_id(+)
AND pod.po_line_id = rsl.po_line_id(+)
AND pod.line_location_id = rsl.po_line_location_id(+)
AND rsl.shipment_header_id = rsh.shipment_header_id(+)
AND porl.to_person_id = g.person_id(+)
AND poll.po_release_id = por.po_release_id(+)
AND porl.wip_entity_id IS NOT NULL
UNION ALL
SELECT a.WIP_ENTITY_ID,
a.OPERATION_SEQ_NUM,
c.REQUEST_NUMBER PR_MO_NUMBER,
b.line_number LINE_NUMBER,
c.CREATION_DATE REQUEST_DATE,
-- c.CREATED_BY,
g.EMPLOYEE_NUMBER,
g.FULL_NAME EMPLOYEE_NAME,
(SELECT MEANING
FROM FND_LOOKUP_VALUES_VL
WHERE LOOKUP_TYPE = 'MTL_TXN_REQUEST_STATUS'
AND LOOKUP_CODE = c.HEADER_STATUS)
STATUS,
NULL PO_NUMBER,
NULL PO_LINE,
NULL RELEASE_NUM,
NULL PO_RELEASE_STATUS,
NULL PO_CREATION_DATE,
NULL PO_STATUS,
b.inventory_item_id ITEM_ID,
b.quantity QUANTITY_REQUESTED,
d.ITEM_COST UNIT_PRICE,
(SELECT SUM (mohq.TRANSACTION_QUANTITY)
FROM MTL_ONHAND_QUANTITIES mohq
WHERE b.INVENTORY_ITEM_ID = mohq.inventory_item_id
AND b.ORGANIZATION_ID = mohq.ORGANIZATION_ID)
QUANTITY_ONHAND,
b.QUANTITY_DELIVERED QUANTITY_RECEIVED,
NULL DELIVERY_TO,
NULL DELIVERY_DATE,
NVL ( (b.quantity * d.ITEM_COST), 0) TOTAL_COST
FROM WIP_REQUIREMENT_OPERATIONS a,
mtl_txn_request_lines b,
mtl_txn_request_headers c,
cst_item_costs d,
(SELECT person_id, full_name, EMPLOYEE_NUMBER
FROM PER_ALL_PEOPLE_F
WHERE TRUNC (SYSDATE) BETWEEN EFFECTIVE_START_DATE
AND EFFECTIVE_END_DATE) g
WHERE
a.WIP_ENTITY_ID = b.TXN_SOURCE_ID(+)
AND a.inventory_item_id = b.inventory_item_id(+)
AND a.operation_seq_num = b.TXN_SOURCE_LINE_ID(+)
AND b.header_id = c.header_id
AND b.INVENTORY_ITEM_ID = d.INVENTORY_ITEM_ID(+)
AND b.ORGANIZATION_ID = d.ORGANIZATION_ID(+)
AND c.CREATED_BY = g.person_id(+)) PO
WHERE
a.WIP_ENTITY_ID = b.WIP_ENTITY_ID(+)
AND b.WIP_ENTITY_ID = c.WIP_ENTITY_ID(+)
AND b.OPERATION_SEQ_NUM = c.OPERATION_SEQ_NUM(+)
AND c.WIP_ENTITY_ID = d.WIP_ENTITY_ID(+)
AND c.OPERATION_SEQ_NUM = d.OPERATION_SEQ_NUM(+)
AND c.RESOURCE_SEQ_NUM = d.RESOURCE_SEQ_NUM(+)
AND d.instance_id = e.instance_id(+)
AND c.WIP_ENTITY_ID = f.WIP_ENTITY_ID(+)
AND c.OPERATION_SEQ_NUM = f.OPERATION_SEQ_NUM(+)
AND a.WIP_ENTITY_ID = h.WIP_ENTITY_ID(+)
AND e.PERSON_ID = g.PERSON_ID(+)
AND b.WIP_ENTITY_ID = po.WIP_ENTITY_ID(+)
AND b.OPERATION_SEQ_NUM = po.OPERATION_SEQ_NUM(+)
AND a.MAINTENANCE_OBJECT_ID = cii.INSTANCE_ID(+)
AND a.WIP_ENTITY_ID = wr.wip_entity_id(+)
-- AND b.DEPARTMENT_ID=63234
--AND a.WIP_ENTITY_ID=63234
Oracle Projects
API to update and assign Project Roles in an Oracle Project
Oracle has provided a seeded package called PA_PROJECT_PARTIES_PUB to create,
update or delete a project party (or Key member) in an oracle project. From front end, the
navigation is Project Billing Super User (or related responsibility) > Projects > Find Projects
> Open > Options > Key Members. The records in the form are displayed through a view
(PA_PROJECT_PLAYERS) and the base table is PA_PROJECT_PARTIES.
PA_PROJECT_PARTIES_PUB.UPDATE_PROJECT_PARTY:
/* Formatted on 3/27/2017 2:43:17 PM (QP5 v5.114.809.3010) */
DECLARE
l_project_id
PA_PROJECT_PARTIES.PROJECT_ID%TYPE := NULL;
l_project_role
VARCHAR2 (240) := NULL;
l_resource_name
PER_ALL_PEOPLE_F.FULL_NAME%TYPE := NULL;
l_start_date_active DATE := NULL;
l_end_date_active
DATE := NULL;
l_project_role_id
pa_project_role_types.PROJECT_ROLE_ID%TYPE := NULL;
l_project_role_type pa_project_role_types.PROJECT_ROLE_TYPE%TYPE := NULL;
l_resource_source_id PA_PROJECT_PARTIES.RESOURCE_SOURCE_ID%TYPE :=
NULL;
l_project_party_id PA_PROJECT_PARTIES.PROJECT_PARTY_ID%TYPE := NULL;
l_object_id
PA_PROJECT_PARTIES.OBJECT_ID%TYPE := NULL;
l_resource_id
PA_PROJECT_PARTIES.RESOURCE_ID%TYPE := NULL;
l_record_version_number pa_project_parties.record_version_number%TYPE
:= NULL ;
l_project_end_date DATE;
l_return_status
VARCHAR2 (20) := NULL;
l_assignment_id
NUMBER := NULL;
l_wf_type
VARCHAR2 (240) := NULL;
l_wf_item_type
VARCHAR2 (240) := NULL;
l_wf_process
VARCHAR2 (240) := NULL;
l_msg_count
NUMBER := NULL;
l_msg_data
VARCHAR2 (240) := NULL;
BEGIN
---Input Parameters---l_project_id := '7033';
l_project_role := 'Project Manager';
l_resource_name := 'Koch, Dibyajyoti';
l_start_date_active := '24-NOV-2011';
l_end_date_active := '24-NOV-2012';
SELECT PROJECT_ROLE_ID, PROJECT_ROLE_TYPE
INTO l_project_role_id, l_project_role_type
FROM PA_PROJECT_ROLE_TYPES
WHERE UPPER (MEANING) = UPPER (l_project_role);
SELECT DISTINCT PERSON_ID
INTO l_resource_source_id
FROM PER_ALL_PEOPLE_F
WHERE UPPER (FULL_NAME) = UPPER (l_resource_name);
SELECT PROJECT_PARTY_ID,
OBJECT_ID,
RESOURCE_ID,
RECORD_VERSION_NUMBER
INTO l_project_party_id,
l_object_id,
l_resource_id,
l_record_version_number
FROM PA_PROJECT_PARTIES
WHERE
PROJECT_ID = l_project_id
AND PROJECT_ROLE_ID = l_project_role_id
AND RESOURCE_SOURCE_ID = l_resource_source_id;
l_project_end_date :=
pa_project_dates_utils.get_project_finish_date (l_project_id);
PA_PROJECT_PARTIES_PUB.UPDATE_PROJECT_PARTY (
P_API_VERSION
=> 1.0,
P_INIT_MSG_LIST
=> FND_API.G_TRUE,
P_COMMIT
=> FND_API.G_FALSE,
P_VALIDATE_ONLY
=> FND_API.G_FALSE,
P_VALIDATION_LEVEL
=> FND_API.G_VALID_LEVEL_FULL,
P_DEBUG_MODE
=> 'N',
P_OBJECT_ID
=> l_object_id,
P_OBJECT_TYPE
=> 'PA_PROJECTS',
P_PROJECT_ROLE_ID
=> l_project_role_id,
P_PROJECT_ROLE_TYPE
=> l_project_role_type,
P_RESOURCE_TYPE_ID
=> 101,
--EMPLOYEE
P_RESOURCE_SOURCE_ID
=> l_resource_source_id,
P_RESOURCE_NAME
=> l_resource_name,
P_RESOURCE_ID
=> l_resource_id,
P_START_DATE_ACTIVE
=> l_start_date_active,
P_SCHEDULED_FLAG
=> 'N',
P_RECORD_VERSION_NUMBER
=> l_record_version_number,
P_CALLING_MODULE
=> FND_API.G_MISS_CHAR,
P_PROJECT_ID
=> l_project_id,
P_PROJECT_END_DATE
=> l_project_end_date,
P_PROJECT_PARTY_ID
=> l_project_party_id,
P_ASSIGNMENT_ID
=> NULL,
P_ASSIGN_RECORD_VERSION_NUMBER => l_record_version_number + 1,
P_MGR_VALIDATION_TYPE
=> 'FORM',
P_END_DATE_ACTIVE
=> l_end_date_active,
X_ASSIGNMENT_ID
=> l_assignment_id,
X_WF_TYPE
=> l_wf_type,
X_WF_ITEM_TYPE
=> l_wf_item_type,
X_WF_PROCESS
=> l_wf_process,
X_RETURN_STATUS
=> l_return_status,
X_MSG_COUNT
x_msg_data
=> l_msg_count,
=> l_msg_data
);
COMMIT;
DBMS_OUTPUT.PUT_LINE ('Status:' || l_return_status);
DBMS_OUTPUT.PUT_LINE ('Message:' || l_msg_data);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('Try Again!!');
END;
PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY:
/* Formatted on 3/27/2017 2:44:48 PM (QP5 v5.114.809.3010) */
DECLARE
l_project_id
PA_PROJECT_PARTIES.PROJECT_ID%TYPE := NULL;
l_project_role
VARCHAR2 (240) := NULL;
l_resource_name
PER_ALL_PEOPLE_F.FULL_NAME%TYPE := NULL;
l_start_date_active DATE := NULL;
l_end_date_active
DATE := NULL;
l_project_role_id
pa_project_role_types.PROJECT_ROLE_ID%TYPE := NULL;
l_project_role_type pa_project_role_types.PROJECT_ROLE_TYPE%TYPE := NULL;
l_resource_source_id PA_PROJECT_PARTIES.RESOURCE_SOURCE_ID%TYPE :=
NULL;
l_project_party_id PA_PROJECT_PARTIES.PROJECT_PARTY_ID%TYPE := NULL;
l_object_id
PA_PROJECT_PARTIES.OBJECT_ID%TYPE := NULL;
l_resource_id
PA_PROJECT_PARTIES.RESOURCE_ID%TYPE := NULL;
l_record_version_number pa_project_parties.record_version_number%TYPE
:= NULL ;
l_project_end_date DATE;
l_return_status
VARCHAR2 (20) := NULL;
l_assignment_id
NUMBER := NULL;
l_wf_type
VARCHAR2 (240) := NULL;
l_wf_item_type
VARCHAR2 (240) := NULL;
l_wf_process
VARCHAR2 (240) := NULL;
l_msg_count
NUMBER := NULL;
l_msg_data
VARCHAR2 (240) := NULL;
BEGIN
---Input Parameters---l_project_id := '7033';
l_project_role := 'Project Accountant';
l_resource_name := 'Koch, Dibyajyoti';
l_start_date_active := '24-NOV-2011';
l_end_date_active := '24-NOV-2012';
SELECT PROJECT_ROLE_ID, PROJECT_ROLE_TYPE
INTO l_project_role_id, l_project_role_type
FROM PA_PROJECT_ROLE_TYPES
WHERE UPPER (MEANING) = UPPER (l_project_role);
SELECT DISTINCT PERSON_ID
INTO l_resource_source_id
FROM PER_ALL_PEOPLE_F
WHERE UPPER (FULL_NAME) = UPPER (l_resource_name);
l_project_end_date :=
pa_project_dates_utils.get_project_finish_date (l_project_id);
PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY (
P_API_VERSION
=> 1.0,
P_INIT_MSG_LIST
=> FND_API.G_TRUE,
P_COMMIT
=> FND_API.G_FALSE,
P_VALIDATE_ONLY
=> FND_API.G_FALSE,
P_VALIDATION_LEVEL
=> FND_API.G_VALID_LEVEL_FULL,
P_DEBUG_MODE
=> 'N',
P_OBJECT_ID
=> l_project_id,
P_OBJECT_TYPE
=> 'PA_PROJECTS',
P_PROJECT_ROLE_ID
=> l_project_role_id,
P_PROJECT_ROLE_TYPE => l_project_role_type,
P_RESOURCE_TYPE_ID
=> 101,
--EMPLOYEE
P_RESOURCE_SOURCE_ID => l_resource_source_id,
P_RESOURCE_NAME
=> l_resource_name,
P_START_DATE_ACTIVE => l_start_date_active,
P_SCHEDULED_FLAG
=> 'N',
P_CALLING_MODULE
=> NULL,
P_PROJECT_ID
=> l_project_id,
P_PROJECT_END_DATE
=> l_project_end_date,
P_MGR_VALIDATION_TYPE => 'FORM',
P_END_DATE_ACTIVE
=> l_end_date_active,
X_PROJECT_PARTY_ID
=> l_project_party_id,
X_RESOURCE_ID
=> l_resource_id,
X_ASSIGNMENT_ID
=> l_assignment_id,
X_WF_TYPE
=> l_wf_type,
X_WF_ITEM_TYPE
=> l_wf_item_type,
X_WF_PROCESS
=> l_wf_process,
X_RETURN_STATUS
=> l_return_status,
X_MSG_COUNT
=> l_msg_count,
X_MSG_DATA
=> l_msg_data
);
COMMIT;
DBMS_OUTPUT.PUT_LINE ('Status:' || l_return_status);
DBMS_OUTPUT.PUT_LINE ('Message:' || l_msg_data);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('Try Again!!');
END;
Project & Change Order Approval Action History in oracle projcts query
/* Formatted on 3/27/2017 2:42:17 PM (QP5 v5.114.809.3010) */
SELECT ROWNUM,
ACTION_DATE,
ACTION,
from_user,
from_role,
to_user,
to_role,
Details,
SEQUENCE,
NOTIFICATION_ID,
ACTION_TYPE
FROM ( SELECT ACTION_DATE,
ACTION,
from_user,
from_role,
to_user,
to_role,
Details,
SEQUENCE,
NOTIFICATION_ID,
ACTION_TYPE
FROM (SELECT c.comment_date DATE1,
TO_CHAR (c.comment_date,
'DD-MON-RRRR HH24:MI:SS')
action_date,
c.action action,
c.from_user from_user,
c.from_role from_role,
c.to_user to_user,
c.to_role to_role,
c.user_comment Details,
C.SEQUENCE SEQUENCE,
C.NOTIFICATION_ID NOTIFICATION_ID,
C.ACTION_TYPE ACTION_TYPE
FROM WF_NOTIFICATIONS WFN,
pa_wf_processes pa,
wf_item_activity_statuses wfitems,
wf_comments c
WHERE
wfitems.notification_id = wfn.GROUP_ID
AND wfitems.NOTIFICATION_ID = C.NOTIFICATION_ID
AND pa.item_type = wfitems.item_type
AND pa.item_key = wfitems.item_key
AND pa.entity_key1 = :p_project_id
AND pa.item_type IN ('PAPROWF', 'PAWFCISC')
UNION ALL
SELECT c.comment_date DATE1,
TO_CHAR (c.comment_date,
'DD-MON-RRRR HH24:MI:SS')
action_date,
c.action action,
c.from_user from_user,
c.from_role from_role,
c.to_user to_user,
c.to_role to_role,
c.user_comment Details,
C.SEQUENCE SEQUENCE,
C.NOTIFICATION_ID NOTIFICATION_ID,
C.ACTION_TYPE ACTION_TYPE
FROM WF_NOTIFICATIONS WFN,
pa_wf_processes pa,
WF_ITEM_ACTIVITY_STATUSES_H wfitems,
wf_comments c
WHERE
wfitems.notification_id = wfn.GROUP_ID
AND wfitems.NOTIFICATION_ID = C.NOTIFICATION_ID
AND pa.item_type = wfitems.item_type
AND pa.item_key = wfitems.item_key
AND pa.entity_key1 = :p_project_id
AND pa.item_type IN ('PAPROWF', 'PAWFCISC'))
ORDER BY DATE1 DESC, notification_id, sequence);
Financial Plan CI Impact in oracle projects query
/* Formatted on 3/27/2017 2:41:06 PM (QP5 v5.114.809.3010) */
SELECT pbv.ci_id,
NVL (pe.name, p.name) task_name,
rlm.alias planning_resource_name,
(NVL (rac.total_projfunc_burdened_cost, 0) + NVL (NULL, 0))
total_cost,
DECODE (pfpt.plan_class_code,
'FORECAST', TO_NUMBER (NULL),
rac.total_txn_raw_cost)
AS raw_cost_txn_cur,
ROUND (
DECODE (pra.rate_based_flag,
'Y', rac.txn_raw_cost_rate_override,
TO_NUMBER (NULL)),
5
)
AS raw_cost_rate_override,
DECODE (pfpt.plan_class_code,
'FORECAST', TO_NUMBER (NULL),
rac.total_projfunc_raw_cost)
AS raw_cost_proj_func_cur,
ROUND (
DECODE (pra.rate_based_flag,
'Y', rac.txn_average_burden_cost_rate,
TO_NUMBER (NULL)),
5
)
AS avg_burd_cost_rate,
ROUND (
DECODE (pra.rate_based_flag,
'Y', rac.txn_burden_cost_rate_override,
TO_NUMBER (NULL)),
5
)
AS burd_cost_rate_override,
DECODE (pfpt.plan_class_code,
'FORECAST', TO_NUMBER (NULL),
rac.total_projfunc_burdened_cost)
AS burd_cost_proj_func_cur,
DECODE (pfpt.plan_class_code,
'FORECAST', TO_NUMBER (NULL),
rac.total_txn_burdened_cost)
AS burd_cost_txn_cur,
NVL (pe.element_number, p.segment1)
|| '('
|| NVL (pe.name, p.name)
|| ')'
task_name_num,
NVL (ppe.element_version_id, 0) element_version_id
FROM pa_resource_assignments pra,
pa_proj_elements pe,
pa_resource_list_members rlm,
pa_resource_asgn_curr rac,
pa_budget_versions pbv,
pa_fin_plan_types_b pfpt,
pa_proj_fp_options po,
pa_proj_element_versions ppe,
pa_control_items ci,
pa_projects_all p
WHERE
pra.resource_assignment_id = rac.resource_assignment_id
AND pra.resource_list_member_id = rlm.resource_list_member_id
AND p.project_id = :p_project_id
AND pra.project_id = p.project_id
AND pbv.budget_version_id = rac.budget_version_id
AND pbv.budget_version_id = pra.budget_version_id
AND pbv.project_id = pra.project_id
AND pbv.ci_id = ci.ci_id
AND pbv.ci_id = :p_change_order_id
AND pbv.fin_plan_type_id = pfpt.fin_plan_type_id
AND pbv.budget_version_id = po.fin_plan_version_id
AND po.fin_plan_option_level_code = 'PLAN_VERSION'
AND po.fin_plan_version_id = pbv.budget_version_id
AND pra.task_id = pe.proj_element_id(+)
AND ppe.parent_structure_version_id(+) =
pa_project_structure_utils.get_fin_struc_ver_id (
pe.project_id
)
AND pe.proj_element_id = ppe.proj_element_id(+)
AND ( rac.total_quantity IS NOT NULL
OR rac.txn_burden_cost_rate_override IS NOT NULL
OR rac.total_txn_burdened_cost IS NOT NULL
OR rac.txn_bill_rate_override IS NOT NULL
OR rac.total_txn_revenue IS NOT NULL
OR rac.txn_raw_cost_rate_override IS NOT NULL
OR rac.total_txn_raw_cost IS NOT NULL);
Oracle projects Budget Planning Element Information query
/* Formatted on 3/27/2017 2:39:29 PM (QP5 v5.114.809.3010) */
SELECT NVL (pe.name, p.name) AS task_name,
rlm.alias AS planning_resource,
ra.TOTAL_PLAN_RAW_COST
FROM pa_budget_versions bv,
pa_fin_plan_types_b pt,
pa_proj_fp_options po,
pa_resource_assignments ra,
pa_resource_list_members rlm,
pa_projects_all p,
pa_proj_elements pe,
pa_proj_element_versions pev
WHERE bv.budget_version_id =
(SELECT budget_version_id
FROM pa_budget_versions
WHERE project_id = :p_project_id
AND fin_plan_type_id =
(SELECT fin_plan_type_id
FROM pa_fin_plan_types_vl
WHERE migrated_frm_bdgt_typ_code = 'AC'
AND UPPER (NAME) =
UPPER ('Approved Cost Budget'))
AND budget_status_code = 'B'
AND current_flag = 'Y')
AND bv.project_id = p.project_id
AND bv.fin_plan_type_id = pt.fin_plan_type_id
AND bv.budget_version_id = po.fin_plan_version_id
AND po.fin_plan_option_level_code = 'PLAN_VERSION'
AND po.fin_plan_version_id = bv.budget_version_id
AND bv.budget_version_id = ra.budget_version_id
AND ra.resource_list_member_id = rlm.resource_list_member_id
AND ra.task_id = pev.proj_element_id(+)
AND pev.parent_structure_version_id(+) =
pa_planning_element_utils.get_fin_struct_id (
ra.project_id,
ra.budget_version_id
)
AND pev.proj_element_id = pe.proj_element_id(+);
Approved Cost Budget Version Detail in oracle projects
/* Formatted on 3/27/2017 2:37:59 PM (QP5 v5.114.809.3010) */
SELECT po.project_id,
bv.version_name,
pt.name AS plan_type_name,
bv.description,
po.fin_plan_preference_code,
bv.budget_version_id,
bv.record_version_number,
bv.budget_status_code,
bv.raw_cost Row_Cost_Total
FROM pa_proj_fp_options po,
pa_fin_plan_types_vl pt,
pa_budget_versions bv
WHERE bv.project_id = :p_project_id
AND bv.budget_version_id =
(SELECT budget_version_id
FROM pa_budget_versions
WHERE project_id = :p_project_id
AND fin_plan_type_id =
(SELECT fin_plan_type_id
FROM pa_fin_plan_types_vl
WHERE migrated_frm_bdgt_typ_code = 'AC'
AND UPPER (NAME) =
UPPER ('Approved Cost Budget'))
AND budget_status_code = 'B'
AND CURRENT_FLAG = 'Y')
AND bv.budget_version_id = po.fin_plan_version_id
AND bv.ci_id IS NULL
AND po.fin_plan_option_level_code = 'PLAN_VERSION'
AND po.fin_plan_type_id = pt.fin_plan_type_id
AND pt.fin_plan_type_id =
(SELECT fin_plan_type_id
FROM pa_fin_plan_types_vl
WHERE migrated_frm_bdgt_typ_code = 'AC'
AND UPPER (name) = UPPER ('Approved Cost Budget'));
Project Parties (Project Key Members) query in R12
/* Formatted on 3/27/2017 2:37:02 PM (QP5 v5.114.809.3010) */
SELECT *
FROM (SELECT DISTINCT
PPP.PROJECT_ID project_id,
DECODE (PA.ASSIGNMENT_ID,
NULL, PPRT.MEANING,
PA.ASSIGNMENT_NAME)
project_role_meaning,
PPP.RESOURCE_SOURCE_ID resource_source_id,
PE.FULL_NAME resource_source_name,
PPP.PROJECT_ROLE_ID project_role_id,
PPRT.PROJECT_ROLE_TYPE project_role_type,
PPP.START_DATE_ACTIVE start_date_active,
ppp.end_date_active end_date_active,
pa_project_parties_utils.active_party (
ppp.start_date_active,
ppp.end_date_active
)
active,
'EMPLOYEE' party_type
FROM PA_PROJECT_PARTIES PPP,
PA_PROJECTS_ALL PPA,
PA_PROJECT_ROLE_TYPES PPRT,
PER_ALL_PEOPLE_F PE,
PA_PROJECT_ASSIGNMENTS PA,
fnd_user u,
(SELECT pj.name job_name,
haou.organization_id org_id,
haou.name org_name,
paf.person_id,
paf.assignment_type
FROM per_all_assignments_f paf,
per_jobs pj,
hr_all_organization_units haou
WHERE TRUNC (SYSDATE) BETWEEN TRUNC(paf.effective_start_date)
AND TRUNC(paf.effective_end_date)
AND paf.primary_flag = 'Y'
AND paf.organization_id = haou.organization_id
AND NVL (paf.job_id, -99) = pj.job_id(+)) prd
WHERE
PPP.RESOURCE_TYPE_ID = 101
AND PPP.PROJECT_ID = PPA.PROJECT_ID
AND PPP.PROJECT_ROLE_ID = PPRT.PROJECT_ROLE_ID
AND PPP.RESOURCE_SOURCE_ID = PE.PERSON_ID
AND PE.EFFECTIVE_START_DATE =
(SELECT MIN (PAPF.EFFECTIVE_START_DATE)
FROM PER_ALL_PEOPLE_F PAPF
WHERE PAPF.PERSON_ID = PE.PERSON_ID
AND PAPF.EFFECTIVE_END_DATE >=
TRUNC (SYSDATE))
AND PE.EFFECTIVE_END_DATE >= TRUNC (SYSDATE)
AND PPP.PROJECT_PARTY_ID = PA.PROJECT_PARTY_ID(+)
AND NVL (prd.assignment_type, '-99') IN
('C',
DECODE (
DECODE (
PE.CURRENT_EMPLOYEE_FLAG,
'Y',
'Y',
DECODE (PE.CURRENT_NPW_FLAG,
'Y', 'Y',
'N')
),
'Y',
'E',
'B'
),
'E',
'-99')
AND ppp.resource_source_id = prd.person_id(+)
AND u.employee_id(+) = ppp.resource_source_id
AND ppp.object_type = 'PA_PROJECTS'
AND ppp.object_id = ppa.project_id
UNION ALL
SELECT DISTINCT
ppp.project_id,
pprt.meaning,
ppp.resource_source_id,
hzp.party_name,
ppp.project_role_id,
pprt.project_role_type,
ppp.start_date_active,
ppp.end_date_active,
pa_project_parties_utils.active_party (
ppp.start_date_active,
ppp.end_date_active
),
'PERSON'
FROM pa_project_parties ppp,
pa_projects_all ppa,
pa_project_role_types pprt,
hz_parties hzp,
hz_parties hzo,
hz_relationships hzr,
hz_contact_points hzcp,
fnd_user u
WHERE
ppp.resource_type_id = 112
AND ppp.project_id = ppa.project_id
AND ppp.project_role_id = pprt.project_role_id
AND ppp.resource_source_id = hzp.party_id
AND hzp.party_type = 'PERSON'
AND hzo.party_type = 'ORGANIZATION'
AND hzr.relationship_code IN ('EMPLOYEE_OF', 'CONTACT_OF')
AND hzr.status = 'A'
AND hzr.subject_id = hzp.party_id
AND hzr.object_id = hzo.party_id
AND hzr.object_table_name = 'HZ_PARTIES'
AND hzr.directional_flag = 'F'
AND hzcp.owner_table_name(+) = 'HZ_PARTIES'
AND hzcp.owner_table_id(+) = hzp.party_id
AND hzcp.contact_point_type(+) = 'PHONE'
AND hzcp.phone_line_type(+) = 'GEN'
AND hzcp.primary_flag(+) = 'Y'
AND u.person_party_id(+) = ppp.resource_source_id
AND ppp.object_type = 'PA_PROJECTS'
AND ppp.object_id = ppa.project_id
UNION ALL
SELECT DISTINCT
ppp.project_id,
pprt.meaning,
ppp.resource_source_id,
hzo.party_name,
ppp.project_role_id,
pprt.project_role_type,
ppp.start_date_active,
ppp.end_date_active,
pa_project_parties_utils.active_party (
ppp.start_date_active,
ppp.end_date_active
),
'ORGANIZATION'
FROM pa_project_parties ppp,
pa_projects_all ppa,
pa_project_role_types_vl pprt,
hz_parties hzo,
hz_contact_points hzcp
WHERE
ppp.resource_type_id = 112
AND ppp.project_id = ppa.project_id
AND ppp.project_role_id = pprt.project_role_id
AND ppp.resource_source_id = hzo.party_id
AND hzo.party_type = 'ORGANIZATION'
AND hzcp.owner_table_name(+) = 'HZ_PARTIES'
AND hzcp.owner_table_id(+) = hzo.party_id
AND hzcp.contact_point_type(+) = 'PHONE'
AND hzcp.phone_line_type(+) = 'GEN'
AND hzcp.primary_flag(+) = 'Y'
AND ppp.object_type = 'PA_PROJECTS'
AND ppp.object_id = ppa.project_id
UNION ALL
SELECT ppc.project_id,
'Customer Person' meaning,
NULL,
ppc.customer_name,
NULL,
NULL,
NULL,
NULL,
DECODE (ppc.customer_status,
'A',
'Y',
'I',
'N'),
'ORGANIZATION' party_type
FROM pa_project_customers_v ppc,
hz_parties hzo,
hz_contact_points hzcp
WHERE
hzcp.owner_table_name(+) = 'HZ_PARTIES'
AND hzcp.owner_table_id(+) = hzo.party_id
AND hzcp.contact_point_type(+) = 'PHONE'
AND hzcp.phone_line_type(+) = 'GEN'
AND hzcp.primary_flag(+) = 'Y'
AND ppc.party_type = 'PERSON'
AND ppc.party_id = hzo.party_id)
WHERE (project_id = :p_project_id AND party_type <> 'ORGANIZATION'
AND TRUNC (SYSDATE) BETWEEN start_date_active
AND NVL (end_date_active, TRUNC (SYSDATE)));
Project Basic Info qurey in R12
/* Formatted on 3/27/2017 2:35:45 PM (QP5 v5.114.809.3010) */
SELECT proj.carrying_out_organization_name project_organization,
proj.segment1 project_number,
proj.name Project_Short_Name,
proj.city,
proj.region,
proj.long_name project_long_name,
proj.start_date transaction_start_date,
proj.target_finish_date Target_Finish_Date,
proj.project_type,
proj.project_type_class_code,
proj.completion_date,
proj.public_sector_flag,
proj.project_status_name,
proj.project_status_code,
proj.wf_status_code,
proj.country_name,
proj.country_code,
proj.record_version_number,
proj.target_start_date,
proj.scheduled_start_date,
proj.scheduled_finish_date,
proj.actual_start_date,
proj.actual_finish_date,
opr.name operating_unit
FROM pa_projects_prm_v proj, hr_all_organization_units_vl opr
WHERE proj.org_id = opr.organization_id
AND proj.project_id = :p_project_id;
Query to find Project Manager Info of an Oracle Project
/* Formatted on 3/27/2017 2:34:34 PM (QP5 v5.114.809.3010) */
SELECT PE.FULL_NAME, PE.EMAIL_ADDRESS
FROM PA_PROJECT_PARTIES PPP,
PA_PROJECTS_ALL PPA,
PA_PROJECT_ROLE_TYPES PPRT,
PER_ALL_PEOPLE_F PE,
PA_PROJECT_ASSIGNMENTS PA,
FND_USER U,
(SELECT PJ.NAME JOB_NAME,
HAOU.ORGANIZATION_ID ORG_ID,
HAOU.NAME ORG_NAME,
PAF.PERSON_ID,
PAF.ASSIGNMENT_TYPE
FROM PER_ALL_ASSIGNMENTS_F PAF,
PER_JOBS PJ,
HR_ALL_ORGANIZATION_UNITS HAOU
WHERE TRUNC (SYSDATE) BETWEEN TRUNC
(PAF.EFFECTIVE_START_DATE)
AND TRUNC (PAF.EFFECTIVE_END_DATE)
AND PAF.PRIMARY_FLAG = 'Y'
AND PAF.ORGANIZATION_ID = HAOU.ORGANIZATION_ID
AND NVL (PAF.JOB_ID, -99) = PJ.JOB_ID(+)) PRD
WHERE
PPA.PROJECT_ID = :P_PROJECT_ID
AND DECODE (PA.ASSIGNMENT_ID,
NULL, PPRT.MEANING,
PA.ASSIGNMENT_NAME) = 'Project Manager'
AND PPP.PROJECT_ID = PPA.PROJECT_ID
AND PPP.PROJECT_ROLE_ID = PPRT.PROJECT_ROLE_ID
AND PPP.RESOURCE_SOURCE_ID = PE.PERSON_ID
AND TRUNC (SYSDATE) BETWEEN TRUNC (PPP.START_DATE_ACTIVE)
AND NVL (TRUNC (PPP.END_DATE_ACTIVE),
SYSDATE)
AND PE.EFFECTIVE_START_DATE =
(SELECT MIN (PAPF.EFFECTIVE_START_DATE)
FROM PER_ALL_PEOPLE_F PAPF
WHERE PAPF.PERSON_ID = PE.PERSON_ID
AND PAPF.EFFECTIVE_END_DATE >= TRUNC (SYSDATE))
AND PE.EFFECTIVE_END_DATE >= TRUNC (SYSDATE)
AND PPP.PROJECT_PARTY_ID = PA.PROJECT_PARTY_ID(+)
AND NVL (PRD.ASSIGNMENT_TYPE, '-99') IN
('C',
DECODE (
DECODE (PE.CURRENT_EMPLOYEE_FLAG,
'Y', 'Y',
DECODE (PE.CURRENT_NPW_FLAG, 'Y', 'Y', 'N')),
'Y',
'E',
'B'
),
'E',
'-99')
AND PPP.RESOURCE_SOURCE_ID = PRD.PERSON_ID(+)
AND U.EMPLOYEE_ID(+) = PPP.RESOURCE_SOURCE_ID
AND PPP.OBJECT_TYPE = 'PA_PROJECTS'
AND ppp.object_id = ppa.project_id;
API to add Classification to an Oracle Project
/* Formatted on 3/27/2017 2:33:29 PM (QP5 v5.114.809.3010) */
DECLARE
l_project_id
pa_projects_all.project_id%TYPE := NULL;
l_class_category pa_project_classes.class_category%TYPE := NULL;
l_class_code
pa_project_classes.class_code%TYPE := NULL;
l_return_status VARCHAR2 (20);
l_msg_count
NUMBER;
l_msg_data
VARCHAR2 (240);
BEGIN
L_PROJECT_ID := &P_PROJECT_ID;
L_CLASS_CATEGORY := &P_CLASS_CATEGORY;
l_class_code := &p_class_code;
pa_projects_maint_pub.create_classifications (
p_api_version
=> 1.0,
p_init_msg_list
=> fnd_api.g_true,
p_commit
=> fnd_api.g_false,
p_validate_only
=> fnd_api.g_false,
p_validation_level => fnd_api.g_valid_level_full,
p_calling_module
=> 'SELF_SERVICE',
p_debug_mode
=> 'N',
p_max_msg_count
=> fnd_api.g_miss_num,
p_object_id
=> l_project_id,
p_object_type
=> 'PA_PROJECTS',
p_class_category
=> l_class_category,
p_class_code
=> l_class_code,
p_code_percentage
=> fnd_api.g_miss_num,
p_attribute_category => fnd_api.g_miss_char,
p_attribute1
=> fnd_api.g_miss_char,
p_attribute2
=> fnd_api.g_miss_char,
p_attribute3
=> fnd_api.g_miss_char,
p_attribute4
=> fnd_api.g_miss_char,
p_attribute5
=> fnd_api.g_miss_char,
p_attribute6
=> fnd_api.g_miss_char,
p_attribute7
=> fnd_api.g_miss_char,
p_attribute8
=> fnd_api.g_miss_char,
p_attribute9
=> fnd_api.g_miss_char,
p_attribute10
=> fnd_api.g_miss_char,
p_attribute11
=> fnd_api.g_miss_char,
p_attribute12
=> fnd_api.g_miss_char,
p_attribute13
=> fnd_api.g_miss_char,
p_attribute14
=> fnd_api.g_miss_char,
p_attribute15
=> fnd_api.g_miss_char,
x_return_status
=> l_return_status,
x_msg_count
=> l_msg_count,
x_msg_data
=> l_msg_data
);
COMMIT;
DBMS_OUTPUT.put_line ('Status:' || l_return_status);
DBMS_OUTPUT.put_line ('Message:' || l_msg_data);
END;
API to Update Task Information in Oracle Projects
/* Formatted on 3/27/2017 2:32:15 PM (QP5 v5.114.809.3010) */
DECLARE
l_return_status
VARCHAR (10);
l_msg_count
VARCHAR (240);
l_MSG_DATA
VARCHAR (240);
l_rowid
VARCHAR2 (240);
task_record
PA_TASKS%ROWTYPE;
task_struc_record
PA_PROJ_ELEMENTS%ROWTYPE;
l_last_updated_by
NUMBER := FND_GLOBAL.USER_ID;
l_last_update_date
DATE;
l_last_update_login
NUMBER := FND_GLOBAL.LOGIN_ID;
pt_task_name
PA_TASKS.TASK_NAME%TYPE;
l_task_name
PA_PROJ_ELEMENTS.NAME%TYPE;
l_task_name1
PA_PROJ_ELEMENTS.NAME%TYPE;
l_project_id
PA_PROJECTS_ALL.PROJECT_ID%TYPE;
l_task_id
PA_TASKS.TASK_ID%TYPE;
l_task_manager_person_id PA_TASKS.TASK_MANAGER_PERSON_ID%TYPE;
l_output
VARCHAR2 (2000);
l_msg_dummy
VARCHAR2 (2000);
n
NUMBER := 0;
BEGIN
l_project_id := 590;
l_task_id := 3355;
l_task_manager_person_id := 136263;
--Koch, Dibyajyoti
BEGIN
SELECT *
INTO task_record
FROM pa_tasks
WHERE project_id = l_project_id AND task_id = l_task_id;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
BEGIN
SELECT *
INTO task_struc_record
FROM pa_proj_elements
WHERE PROJECT_ID = l_project_id AND PROJ_ELEMENT_ID = l_task_id;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
BEGIN
SELECT ROWID
INTO l_rowid
FROM pa_tasks
WHERE project_id = l_project_id AND task_id = l_task_id;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
BEGIN
SELECT SYSDATE INTO l_last_update_date FROM DUAL;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
BEGIN
SELECT task_name
INTO pt_task_name
FROM pa_tasks
WHERE task_id = l_task_id;
SELECT name
INTO l_task_name
FROM pa_proj_elements
WHERE proj_element_id = l_task_id;
IF pt_task_name = l_task_name
THEN
l_task_name1 := l_task_name;
ELSE
l_task_name1 := pt_task_name;
END IF;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
PA_TASKS_PKG.UPDATE_ROW (
X_ROWID
=> l_rowid,
X_TASK_ID
=> task_record.task_id,
X_PROJECT_ID
=> task_record.project_id,
X_TASK_NUMBER
=> task_record.task_number,
X_LAST_UPDATE_DATE
=> l_last_update_date, --Updated Value
X_LAST_UPDATED_BY
=> l_last_updated_by, --Updated Value
X_LAST_UPDATE_LOGIN
=> l_last_update_login, --Updated Value
X_Task_Name
=> task_record.task_name,
X_Long_Task_Name
=> task_record.long_task_name,
X_TOP_TASK_ID
=> task_record.top_task_id,
X_WBS_LEVEL
=> task_record.wbs_level,
X_READY_TO_BILL_FLAG
=> task_record.ready_to_bill_flag,
X_READY_TO_DISTRIBUTE_FLAG
=> task_record.ready_to_distribute_flag,
X_PARENT_TASK_ID
=> task_record.parent_task_id,
X_DESCRIPTION
=> task_record.description,
X_CARRYING_OUT_ORGANIZATION_ID =>
task_record.carrying_out_organization_id,
X_SERVICE_TYPE_CODE
=> task_record.service_type_code,
X_TASK_MANAGER_PERSON_ID
=> l_task_manager_person_id, --Updated
Value
X_CHARGEABLE_FLAG
=> task_record.chargeable_flag,
X_BILLABLE_FLAG
=> task_record.billable_flag,
X_LIMIT_TO_TXN_CONTROLS_FLAG => task_record.limit_to_txn_controls_flag,
X_START_DATE
=> task_record.start_date,
X_COMPLETION_DATE
=> task_record.completion_date,
X_ADDRESS_ID
=> task_record.address_id,
X_LABOR_BILL_RATE_ORG_ID
=> task_record.labor_bill_rate_org_id,
X_LABOR_STD_BILL_RATE_SCHDL
=> task_record.labor_std_bill_rate_schdl,
X_LABOR_SCHEDULE_FIXED_DATE
=> task_record.labor_schedule_fixed_date,
X_LABOR_SCHEDULE_DISCOUNT
=> task_record.labor_schedule_discount,
X_NON_LABOR_BILL_RATE_ORG_ID => task_record.non_labor_bill_rate_org_id,
X_NL_STD_BILL_RATE_SCHDL
=> task_record.non_labor_std_bill_rate_schdl,
X_NL_SCHEDULE_FIXED_DATE
=> task_record.non_labor_schedule_fixed_date,
X_NON_LABOR_SCHEDULE_DISCOUNT =>
task_record.non_labor_schedule_discount,
X_LABOR_COST_MULTIPLIER_NAME => task_record.labor_cost_multiplier_name,
X_ATTRIBUTE_CATEGORY
=> task_record.attribute_category,
X_ATTRIBUTE1
=> task_record.attribute1,
X_ATTRIBUTE2
=> task_record.attribute2,
X_ATTRIBUTE3
=> task_record.attribute3,
X_ATTRIBUTE4
=> task_record.attribute4,
X_ATTRIBUTE5
=> task_record.attribute5,
X_ATTRIBUTE6
=> task_record.attribute6,
X_ATTRIBUTE7
=> task_record.attribute7,
X_ATTRIBUTE8
=> task_record.attribute8,
X_ATTRIBUTE9
=> task_record.attribute9,
X_ATTRIBUTE10
=> task_record.attribute10,
X_COST_IND_RATE_SCH_ID
=> task_record.cost_ind_rate_sch_id,
X_REV_IND_RATE_SCH_ID
=> task_record.rev_ind_rate_sch_id,
X_INV_IND_RATE_SCH_ID
=> task_record.inv_ind_rate_sch_id,
X_COST_IND_SCH_FIXED_DATE
=> task_record.cost_ind_sch_fixed_date,
X_REV_IND_SCH_FIXED_DATE
=> task_record.rev_ind_sch_fixed_date,
X_INV_IND_SCH_FIXED_DATE
=> task_record.inv_ind_sch_fixed_date,
X_LABOR_SCH_TYPE
=> task_record.labor_sch_type,
X_NON_LABOR_SCH_TYPE
=> task_record.non_labor_sch_type,
X_ALLOW_CROSS_CHARGE_FLAG
=> task_record.allow_cross_charge_flag,
X_PROJECT_RATE_DATE
=> task_record.project_rate_date,
X_PROJECT_RATE_TYPE
=> task_record.project_rate_type,
X_CC_PROCESS_LABOR_FLAG
=> task_record.cc_process_labor_flag,
X_LABOR_TP_SCHEDULE_ID
=> task_record.labor_tp_schedule_id,
X_LABOR_TP_FIXED_DATE
=> task_record.labor_tp_fixed_date,
X_CC_PROCESS_NL_FLAG
=> task_record.cc_process_nl_flag,
X_NL_TP_SCHEDULE_ID
=> task_record.nl_tp_schedule_id,
X_NL_TP_FIXED_DATE
=> task_record.nl_tp_fixed_date,
X_RECEIVE_PROJECT_INVOICE_FLAG => task_record.receive_project_invoice_flag,
X_WORK_TYPE_ID
=> task_record.work_type_id,
X_JOB_BILL_RATE_SCHEDULE_ID
=> task_record.job_bill_rate_schedule_id,
X_emp_bill_rate_schedule_id
=> task_record.emp_bill_rate_schedule_id,
X_taskfunc_cost_rate_type
=> task_record.taskfunc_cost_rate_type,
X_taskfunc_cost_rate_date
=> task_record.taskfunc_cost_rate_date,
X_non_lab_std_bill_rt_sch_id => task_record.non_lab_std_bill_rt_sch_id,
X_labor_disc_reason_code
=> task_record.labor_disc_reason_code,
X_non_labor_disc_reason_code => task_record.non_labor_disc_reason_code,
x_retirement_cost_flag
=> task_record.retirement_cost_flag,
x_cint_eligible_flag
=> task_record.cint_eligible_flag,
X_CINT_STOP_DATE
=> task_record.cint_stop_date,
X_GEN_ETC_SRC_CODE
=> task_record.gen_etc_source_code
);
PA_PROJ_TASK_STRUC_PUB.UPDATE_TASK_STRUCTURE2 (
p_calling_module
=> 'FORMS',
p_task_id
=> task_record.task_id,
p_task_number
=> task_record.task_number,
p_task_name
=> l_task_name1,
P_TASK_DESCRIPTION
=> TASK_RECORD.DESCRIPTION,
p_task_manager_id
=> l_task_manager_person_id, --Updated Value
p_carrying_out_organization_id => task_record.carrying_out_organization_id,
p_pm_product_code
=> task_record.pm_product_code,
p_pm_task_reference
=> task_record.pm_task_reference,
p_location_id
=> task_struc_record.location_id,
p_ref_task_id
=> NULL,
p_project_id
=> task_struc_record.project_id,
x_msg_count
=> l_msg_count,
x_msg_data
=> l_msg_data,
x_return_status
=> l_return_status
);
COMMIT;
IF l_return_status <> 'S'
THEN
FOR n IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (n,
fnd_api.g_false,
l_msg_data,
l_msg_dummy);
l_output := (TO_CHAR (n) || ': ' || l_msg_data);
DBMS_OUTPUT.put_line (
'Error: API Error while updating the Task: ' || l_output
);
COMMIT;
END LOOP;
ELSE
DBMS_OUTPUT.put_line ('Sucessfully Update the task');
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('Other Error in Project: ' || SQLERRM);
END;
PLSQL Scripts
http://appselangovan.blogspot.com/search/label/Advanced%20PL%2FSQL
Intercompany Setups in Oracle Apps
Inter-company Transactions are the transactions between two legal entities
related to same Organization. Following are the setups need to be defined for
Inter-company Transactions.
Selling Operating Unit: Vision Japan
Shipping Operating Unit: Vision Operations
Step 1: Define Transaction Type
Responsibility: Receivables Manager, Vision Operations
Navigation: Setup → Transactions → Transaction Type
Define New transaction type as shown below.
Step 2: Assign Document Sequence to new Transaction Type (Defined in
Step1)
Responsibility: General Ledger Manager, Vision Operations
Navigation: Setup : Financials → Sequences → Document → Assign
Assign a document sequence to the transaction type 'Intercompany' as shown
below.
Step 3: Define Intercompany Transaction Flow and Intercompany Relations
Responsibility: Inventory Manager, Vision operations
Navigation: Setup → Organizations → Intercompany Transaction Flows
Define Intercompany Transaction flow and Intercompany Relations as shown
below.
Mandatory Setups to Check:
1. Make Sure there are no security rules defined when shipping the item from
other Operating unit and Auto Accounting rules are defined(for Selling OU) to
default the balancing segment values with Table Name as Standard Lines(Which
will get the values from Standard line item or Inventory Item used)
Path for Security Rules:
Responsibility: General Ledger Responsibility
Navigation: Setup → Financials → Flexfields → Validation → Security → Define
Path for Auto Accounting:
Responsibility: Receivables Responsibility
Navigation: Setup → Transactions → Auto Accounting
2. Make Sure Shipping parameters are defined for both Shipping and Selling
operating units.
Responsibility: Order Management Responsibility
Navigation: Shipping → Setup → Shipping Parameters
3. Make Sure that the COGS account is assigned to the Transaction Type used
for SO in Selling Organization.
Responsibility: Order Management Responsibility
Navigation: Setup-> Transaction Type
4. Make sure that a value is assigned for System parameter 'Inventory Item For
Freight'
Responsibility: Order Management Responsibility
Navigation: Setup → System Parameters → Values
Intercompany Transaction Process:
1. Create and Book Sales Order:
Responsibility: Vision Japan Order Management Responsibility
Navigation: Orders, Returns → Sales Orders
Create a Sales Order with Vision Operations Shipping Warehouse and book the
order as shown below.
2. Release the Order and Ship the Item
Responsibility: Vision Operations Order Management Responsibility
Navigation: Shipping → Release Sales Orders → Release Sales Orders
Release and ship the order. Then notice the transaction status as 'Shipped' or
'Interfaced' on Shipping Transactions form as shown below.
Navigation: Shipping → Transactions
3. Run Workflow Background process
Responsibility: Vision Japan Inventory Responsibility
Navigation: Workflow Background Engine
Run Workflow Background Process.
4. Run Auto Invoice Master Program to create Customer Invoice
Responsibility: Vision Japan Receivables Responsibility
Navigation: View → Requests → Auto Invoice Master Program
The invoice created is shown below.
Navigation: Transactions → Transactions
5. Create Intercompany AR Invoice
Responsibility: Vision Operations Inventory Responsibility
Navigation: Reports → Intercompany Invoicing
Run the Program 'Create Intercompany AR Invoices' to create Intercompany AR
invoice.
6. Import Intercompany AR invoice
Responsibility: Vision Operations Receivables Responsibility
Run Auto Invoice Master Program with parameter Source as 'Intercompany'. The
Intercompany invoice created is shown below.
Navigation: Transactions → Transactions
7. Create Intercompany AP Invoice
Responsibility: Vision Japan Inventory Responsibility
Navigation: Reports → Intercompany Invoicing
Run the Program 'Create Intercompany AP Invoices' to create Intercompany AP
invoice.
8. Import Intercompany AP invoice
Responsibility: Vision Japan Payables Responsibility
Run Payables Open Interface Program with parameter Source as 'Intercompany'.
The Intercompany AP invoice created is shown below.
Navigation: Invoices → Inquiry → Invoices
Possible Errors while making Intercompany Transactions:
1. Please correct the revenue account assignment
2. INCIAP - Create Intercompany AP Invoices Terminated By Signal 11 Error
3. Can not retrieve payment term from bill-to site information
4. Returned warning from extra function
Solution: Check Mandatory Setups Section.
Posted by Elangovan Ragavan இளங் க ோவன் ரோ வன் at 09:15 3 comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AIGS
FRIDAY, 10 MAY 2013
Advanced Global Intercompany System (AGIS) Functional Setup – Part 1
OVERVIEW .....
Part one on setup offers a broad view on how AGIS is Setup in R12
The setups are divided into four parts
1. Environmental setups
2. General Ledger (GL) setups
3. Receivable (AR) setups
4. Payables(AP) setups
5. Advanced Global Intercompany System (AGIS)
Part two on transaction processing discusses the setups those are required for processing
the transaction in AGIS
Transaction Processing in AGIS
The summaries of steps those are used for AGIS transaction processing are As follows.
1. Initiation of a transaction by an intercompany organization
2. Completion of accounting from the initiator side
3. Completion of accounting from recipient side
4. Approval of the transaction by the recipient
If the invoicing is opted for, in transaction type setups then,
1. Processing of Invoice from Receivables
(For the initiator subsidiary side)
2. Processing of invoice in Payables
(For the Recipient subsidiary side)
Part three discusses the reports in AGIS and reconciliation features in AGIS
1. Standard reports Available in AGIS
2. econciliation features in AGIS
The setup steps are explained in the subsequent sections, from start to finish
The details of the examples used in this document is as follows,
-Initiator Subsidiary-‘Blink AGIS INV ORG’. This organization is a part of BCR Singapore
Legal Entity. This Legal Entity uses 001 balancing segment value. The user that is having
access to initiator subsidiary is called BCR_S
-Recipient Subsidiary–‘Blink AGIS INVJ ORG’. This organization is a part of BCR Japan
Legal Entity. This Legal Entity uses 002 balancing segment values. The user having access
to initiator subsidiary is called BCR_J
PART ONE- AGIS SETUP
Welcome to the Advanced Global Intercompany System (AGIS) setup
Description of the setup that is used in this viewlet is as follows
One ledger called Blink ledger.
Two legal entities under that ledger called BCR Singapore legal entity and BCR Japan legal
entity. Two operating units Blink AGIS Singapore OU, Blink AGIS Japan OU respectively.
*Note: Setting up of receivable setup is mandatory, for using invoicing functionality. And for
setting up of receivables mandatory that inventory Organization are created as well.
The transactions in this example are assumed to be happening from BCR Singapore to BCR
Japan. For theses two create
Two employees: BCR Singapore and BCR Japan
Two Users : BCR_S and BCR_J
Create receivables and GL Responsibilities.
As the first step we should define employees in HRMS. These employees are used later on
in the AGIS security setups.
Navigation: HRMS, Progress Admin S&L>>People>>Enter and Maintain
Define an employee ‘BCR, Singapore’ .This person will be attached to the user initiating the
transaction in AGIS. In our example transaction gets initiated by BCR Singapore
Similarly create another employee (Recipient) BCR Japan and Save your new creations.
Create a users like BCR_S & BCR_J. Note the Person attached to this User is (BCR,
Singapore) he is now the contact Person
Next step is to define Custom responsibilities like GL Super User, AP Super User, AP Super
User, HRMS Management, OM, & AGIS Super user Resposibilities and attach it to our
users.
Our next setup in AGIS set id to define a business group
Login to HRMS Responsibility and create Business group called Blink AGIS, Which you will
later require to attach with the operating Units.
Navigation:
HRMS Management>>HRMS Manager>>Work Structures>>Organization>>Description
Click on Other button at line Level and set the Business Group settings:
Next step is to set some of the system profile options.
Navigation: System Administrator>>Profile>>System
Profile options where set for
1. HR: Business Group,
2. HR: Security,
3. MO: operating Unit,
4. MO: security profile,
5. MO: Default Operating Unit Profile,
6. GL Ledger name
One might already know, If MO: Security profile is defined the MO: Operating unit profile
becomes redundant.
Advanced Global Intercompany Setup – Part 2
In this part we will see about GL ,AR, AP, setups
Now our next step is to create Legal entities namely BCR Singapore legal entity and BCR
Japan legal entity of which one will be Our Initiator and other will be Recipient for our
Intercompany transactions.
In BCR General Ledger Super User Responsibility
*Note: When you create our business group HRMS security profile gets automatically
created with the same name of our Business Group.
Navigation: Setup>>Financials>>Accounting Setup Manager>>Accounting Setup
Click on Legal Entity tab in Accounting Setup Manager page to create new legal entity. Fill in
all the mandatory columns like Territory, Legal Entity Name, Organization name, RCB
Number and Legal Address. The screen shot below shows the sample of legal entity
creation. Values such as Place of Registration, Inspection date, Primary Activity, Secondary
Activity, Type of Company, and Fiscal year end are optional fields.
Similarly Create BCR Japan Legal Entity. And query the names in Legal entity form for
confirming the creation of legal entities.
Our next step in the process is to create a valid ledger. Here I have a valid ledger called
Blink Ledger highlighted on the screen shot below. Now attach the legal entities we have
created in the previous step to this valid ledger.
In the screen shot below you can see the legal entities attached to the Ledger. Then define
the operating unit by clicking the Operating unit update icon as shown below.
Create Operating units Namely ‘Blink AGIS Singapore OU’ and ’Blink AGIS Japan OU’.
While creating attach the business group we created in the initial steps. (Blink AGIS)
Query the operating Units as show below for confirming the creation. Here you can see your
operating units, Short code, Business group to which they are attached and the
corresponding legal entities they are assigned to
So far what is covered is assignment of Legal entities and Operating units to Ledger.
Next step would be to define Inter-company Balancing Rules. Options to define intercompany rules would be visible, If and only if the inter company option is enabled.
Clink on Update icon to define Intercompany balancing rule
Under Intercompany company accounts link, there is a link called ‘Define Relationships’
where one can create relationship between various legal entities. This is the place where GL
is noticed of ‘from where’ and’ to where’ the transactions are going to flow.In case, define the
relationships for the BCR Singapore Legal Entity to BCR Japan Legal entity. As of now
reverse way transactions is not happening so only one way relationship (Singapore LE to
Japan LE) would suffice.
Define the relationship here. There are two parties in a relationship. First one is the
Transacting Entity and the second is Trading Partner Entity.
Note: The relationship can be defined individual / multiple Balancing segment values of the
transacting and trading entity.
Now we have just finished the required setups in GL for AGIS. Before entering AR setup the
prerequisite is to have a Inventory organization.
Below screen shots will tell you the creation of INV organization:
Complete the Accounting Information, Receiving Information, Inventory Information to
complete the INV. Organization creation.
Now set the following system profile option at this responsibility level
Profile options where set for
1. HR: Business Group,
2. HR: Security,
3. MO: operating Unit,
4. MO: security profile,
5. MO: Default Operating Unit Profile,
6. GL Ledger name
*Note: When you create our business group HRMS security profile gets automatically
created with the same name of our Business Group.
Now we will move on to Payables setups.
In AP Define Financial Options,Payable Option, and System profile Option.setting up of
Financial & payables options are more are less similar to 11i. We will see obout AGIS
Advanced Global Intercompany Setup – Part 3
Login to Intercompany Super user responsibility assigned to our user. The First step is
defining organizations. These are the organizations which will be used by AGIS
Navigation: Intercompany Super user>>Setup>> Organization
Define Organization as shown below.
Similarly create organization for Japan legal entity also. And Query the same in
organization form for confirming your creation. Note that in the above Screen while
creating organization select ‘Yes’ for enabled column. This flag indicates that this
organization is enabled for intercompany transactions. Without this processing of
transactions in those organizations, through AGIS is not possible
Next Step is to security definition. Security is defined as, which user/person will have
access to which and how many intercompany organizations
Navigation: Intercompany Super User>>Setup>>security
Query the Person name and the Respective organization on which the person should
be given access. And enable “Yes” for the options as shown below
In the same way shown above give access for BCR_S to Singapore Org. and BCR_J to
Japan Org.
Next set is to define Transaction types in AGIS.
Your transaction type will decide whether invoicing is required for the transaction and
manual approval is required.
Our next step inthe process is to define AGIS system options
Next we will define invoicing options
Under invoicing option Define Receivable Assignment and Customer/Supplier
association as shown in the below screen shots
Example setup of one of the operating unit is shown in figure.
Note that Receivables Transaction Type and Receivables Memo lines can be linked
only id Receivable setups are complete.If those setups are not complete then trhe
LOV will not appear.The values like “Intercompany” , “Global Intercompany”
respectively are seeded values in Receivables. These have been specifically seeded
in Receivables for AGIS
In the above step definition of Customer/ Supplier Association is done.There are two
tabs in the setup.
1.Customer/Supplier association tab to define the Association
2.Trading partner tab to reviewthe earlier Created association.
The second step in the creation of customer supplier association is selection of
customer and entering a “Bill To Site” for the customer
Note that both are mandatory.
With this we have completed AGIS setup required for processing AGIS transactions
We will discuss on AGIS Transaction process in the next part.
Advanced Global Intercompany(AGIS) Setup – Part 4
AGIS – Transaction Processing
Now we are ready with the setups for processing AGIS transaction. Login using Initiator
Account . In our example BCR_S (Singapore is the initiator) and select Outbound transaction
This is the first form for data entry. notice the Transaction type, Initiator fields entered at the
top of the screen.
In the second half, Receipient Details are entered.
The next screen is to complete accounting from the initiator side. Click on Add line button
and enter The second effect of transaction from initiator side.
Once the transaction entry is complete click On Submit button.
After submition you can see the status of the transaction appears as “Submitted” which is
Shown below
Now Login as Recipient. in our example BCR_J (Japan is Our Recipient)
and click on Inbound transaction as shown below
Query for the same batch number. And you will find the Status of the trasaction appears as
“Received” for the Recipient.
Click on update icon for entering Recipient side accounting information.
http://appselangovan.blogspot.com/search/label/AIGS
OPM TRANSACTION FLOW
https://fdocuments.in/document/opm-transaction-flow.html
OPM
TRANSACTION FLOW:


-
-

-
-
8D
OPM TRANSACTION FLOW: Check whether the organization has the Process Manufacturing Enabled
Flag checked or not. Navigation : Inventory -> Setup -> Organization -> Parameters
Check the status of the flag as per below querySELECT process_enabled_flag FROM
MTL_PARAMETERS WHERE ORGANIZATION_CODE='SDM'; Now create an end product item and
the items which form the main item. Here in my case the main item is Choclate_FG_Test and the
components which form this are Choclate_Syrup_Test and Choclate_Water_Test and assing it to the SDM
organization as below:Navigation : Inventory -> Items -> Master Items1. Item finished Good
2. Item Component 1:
3. Item Component 2
Ensure that we have the following flags as Y :1. .PROCESS_COSTING_ENABLED_FLAG2.
PROCESS_QUALITY_ENABLED_FLAG3. PROCESS_EXECUTION_ENABLED_FLAG4.
RECIPE_ENABLED_FLAG from mtl_system_items_b
Below is the outline of the OPM
transaction:BatchProductRecipeFormulaRoutingOperationsActivitiesResources
Creating a resource for the creation of CHOCLATE_FG_TESTNavigation : OPM Supply Chain Planner > Setup -> Generic Resource
SELECT * FROM CR_RSRC_MST_B WHERE RESOURCES='CHOCLATE_MIX_TES';SELECT *
FROM CR_RSRC_MST_TL WHERE RESOURCES='CHOCLATE_MIX_TES' AND
LANGUAGE='US';SELECT * FROM CM_CMPT_MST_B WHERE COST_CMPNTCLS_ID=17 ;-MACHINE Create an operation which consist of list of activity and each activity must be assigned to a
resource which is created in the previous step Navigation : Process Engineer -> Process Routing
SELECT * FROM GMD_OPERATIONS_B WHERE oprn_no LIKE 'CHOCLATE_OP_TEST ';select *
from gmd_operation_activities where oprn_id=201;
Change the status to Approved for General Use by clicking on Actions -> Change status
Create a routing with the operation created in the previous step and change the status to Approved for
General Use:Navigation: Process Engineer -> Process Routings
SELECT * FROM GMD_ROUTINGS_B WHERE ROUTING_NO LIKE 'CHOCLATE%';SELECT *
FROM FM_ROUT_DTL WHERE ROUTING_ID=181; Check if the organization is defined as
Plant/Laboratory
Creation of FormulaNavigation : Formulator -> Formulas
SELECT * FROM FM_FORM_MST_B WHERE FORMULA_NO LIKE 'CHOCLATE%';-CHOCLATE_FOR_TESTSELECT * FROM GMD.FM_MATL_DTL WHERE FORMULA_ID=262;
Create Recipe and validity rulesNavigation: Formulator -> Recipes
SELECT * FROM GMD_RECIPES_B WHERE RECIPE_NO='CHOCLATE_RECIPE_TEST';select *
From gmd_recipe_validity_rules where recipe_id=181; Creating a batch:Check whether the batch number
is set to automaticNavigation : Production Supervisor -> Setup -> Paramters
Now create a batch from Production supervisor responsibility:
Now go to batch details and search for the batch number and click on Actions Release. The status would
be changed from New to WIP
Click on Transact Material, then click on ingredients and there should be WIP Issue and then click on
transactRequery to check the actual qty is 10
Then click on the product and choose the transaction type and the subinventory and click on transact
Now check whether the inventory is incremented with the Target Quantity of the product
8D
-

What Operations and Supply Chain Managers Do
What is Operations Management?
design, operation,
and improvement of productive systems
What is Operations?
a function or system that transforms inputs into
outputs of greater value
What is a Transformation Process?
a series of activities along a
value chain extending from supplier to customer
activities that do not add value are superfluous and should be eliminated
Transformation Process
Physical : as in manufacturing operations
Locational: as in transportation or warehouse operations
Exchange : as in retail operations
Physiological: as in health care
Psychological : as in entertainment
Informational: as in communication
Operations as a Transformation Process
Download