infor.com
concierge
infor u
developer portal
Home
Groups
VISUAL - Enterprise Customer Community
extended query for WO traveller
Legacy Contributor
Does anyone know how I could modify this extended query to also get the Primary location ID from the parts table or if it even possible. I know there is the parts location field in the report but this gives all locations. I just want the primary location.
Select work_order.orig_stage_revision_ID, Part.Engineering_mstr, Part.Stage_ID, Part.Revision_Id from work_order, Part where work_order.base_ID = :WO_Base_ID and work_order.lot_ID = :WO_lot_ID and work_order.split_ID = :WO_split_ID and work_order.sub_ID = '0' and Part.ID = :WO-Part_ID
This gets me the info when the Part ID is the work order header part ID. I would also like to get the Primary location from the part table when the part ID is a requirement part ID. (If this is possible??)
Thanks
Joel
Find more posts tagged with
Comments
Legacy Contributor
Hi,
You can just add "Part.PRIMARY_WHS_ID, Part.PRIMARY_LOC_ID" to the select statement.
Resulting query:
Select work_order.orig_stage_revision_ID, Part.Engineering_mstr, Part.Stage_ID, Part.Revision_Id, PART.PRIMARY_WHS_ID, PART.PRIMARY_LOC_ID
from work_order, Part
where work_order.base_ID = :WO_Base_ID
and work_order.lot_ID = :WO_lot_ID
and work_order.split_ID = :WO_split_ID
and work_order.sub_ID = '0'
and Part.ID = :WO-Part_ID
-Alex
Legacy Contributor
That does not work. I need the requirement part primary location ID not the work order part primary location ID.
Thanks
Joel
Legacy Contributor
Query:
SELECT PART.PRIMARY_WHS_ID, PART.PRIMARY_LOC_ID
FROM PART WHERE PART.ID=:RQ_PART_ID
if still can't work, you can add table WORK_ORDER and REQUIREMENT in Query.
Daniel Guan
[Updated on 12/9/2010 12:22 AM]
Legacy Contributor
Try this:
'SELECT P.PRIMARY_LOC_ID, O.COMPLETED_QTY, O.STATUS, WO1.STATUS, WO2.PART_ID, P.REVISION_ID FROM PART P, OPERATION O, WORK_ORDER WO1, WORK_ORDER WO2 WHERE P.ID = :WO_PART_ID AND O.WORKORDER_TYPE = :WO_TYPE AND O.WORKORDER_BASE_ID = :WO_BASE_ID AND O.WORKORDER_LOT_ID = :WO_LOT_ID AND O.WORKORDER_SPLIT_ID = :WO_SPLIT_ID AND O.WORKORDER_SUB_ID = :WO_SUB_ID AND O.SEQUENCE_NO = :OP_SEQUENCE_NO AND WO1.TYPE = :WO_TYPE AND WO1.BASE_ID = :WO_BASE_ID AND WO1.LOT_ID = :WO_LOT_ID AND WO1.SPLIT_ID = :WO_SPLIT_ID AND WO1.SUB_ID = :WO_SUB_ID AND WO2.TYPE = :WO_TYPE AND WO2.BASE_ID = :WO_BASE_ID AND WO2.LOT_ID = :WO_LOT_ID AND WO2.SPLIT_ID = :WO_SPLIT_ID AND WO2.SUB_ID = '0' INTO :PRIMARY_LOC, :COMP_QTY, :OP_STATUS, :WO_STATUS, :WO_MAIN, :P_REV_ID'
Important Links
Community Hubs
Discussion Forums
Groups
Community News
Popular Tags
ION Connect
ION Workflow
ION API Gateway
Syteline Development
CPQ Discussion Ask a Colleague
Infor Data Fabric
Infor Document Management (IDM)
LN Development
API Usage
FAQs, How-To, and Best Practices