Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to Join Transfer order, POZ Supplier and POR Requisition table?

Tejas PVJan 7 2025

Hi ,

I am trying to fetch all the open transfer orders present for a particular supplier in oracle fusion.

I am trying to mainly join : inv_transfer_order_headers , inv_transfer_order_lines , por_requisition_headers_all, por_requisition_lines_all , POZ_SUPPLIERS_V tables.

But still I am not able to get the proper data as required and I feel that there is a problem in the joins.

Below is my code:

SELECT

itol.requested_quantity as Quantity
itoh.header_number AS Oracle_TO,
prla.DELIVER_TO_LOCATION_ID ,
prla.DESTINATION_ORGANIZATION_ID,
prla.DESTINATION_TYPE_CODE,
pozs.vendor_name as supplier_name,
pha.po_header_id,
pla.po_line_id,
esib.item_number AS item,
PRLA.REQUESTER_ID

FROM
inv_transfer_order_headers itoh
,inv_transfer_order_lines itol
,por_requisition_headers_all prha
,por_requisition_lines_all prla
,po_headers_all pha
,POZ_SUPPLIERS_V pozs
,PO_DISTRIBUTIONS_ALL pda
,POR_REQ_DISTRIBUTIONS_ALL prda
,egp_system_items_vl esib
, inv_org_parameters iop

WHERE 1=1
AND itoh.header_id = itol.header_id
AND itol.inventory_item_id = esib.inventory_item_id
AND iop.organization_id = esib.organization_id
AND itol.REQUISITION_ID = prha.REQUISITION_HEADER_ID
AND PRHA.REQUISITION_HEADER_ID = PRLA.REQUISITION_HEADER_ID
AND PRLA.REQUISITION_LINE_ID = PRDA.REQUISITION_LINE_ID
AND PRDA.DISTRIBUTION_ID = PDA.REQ_DISTRIBUTION_ID
AND PDA.PO_HEADER_ID = pha.PO_HEADER_ID
AND pha.PO_HEADER_ID = pla.PO_HEADER_ID
AND pha.vendor_id = pozs.vendor_id
--AND prha.attribute3 = 'USED'
AND itol.status_lookup='OPEN'

Comments

Hi.,

May i know which version of database you are using, Is it 19C, if 19C DB then, you are importing into the CDB or Any of PDB Database?

Based on your export command you have issued., I have given 2 scenario to perform as shown below.

expdp user/pass schemas=ctm920 directory=BACKUP_DIRDC logfile=backup.log filesize=1G

If you are using import on Container Database (CDB)

- Check the OS Directory is created & you have linked this OS Directory to DB directory.
Ex: $ mkdir -p /u01/dumpfile/
- Place dumpfile into /u01/dumpfile location.
- SQL> create or replace directory dumpfile as '/u01/dumpfile/';
- SQL> grant read, write on directory dumpfile to [import user];

impdp user/pass dumpfile=expdat.dmp logfile=imp_log.log directory=BACKUP_DIRDC TABLE_EXISTS_ACTION=REPLACE

If you are using import on Pluggable Database (PDB)

- Check the OS Directory is created & you have linked this OS Directory to DB directory.
Ex: $ mkdir -p /u01/dumpfile/
- Place dumpfile into /u01/dumpfile location.
- SQL> create or replace directory dumpfile as '/u01/dumpfile/';
- SQL> grant read, write on directory dumpfile to [import user];

impdp user/pass@(PDB NAME) dumpfile=expdat.dmp logfile=imp_log.log directory=BACKUP_DIRDC TABLE_EXISTS_ACTION=REPLACE

Keep us update.

Warm Regards,
Mir Sayeed Hassan
Oracle ACE Pro
Oracle Certified OCP | OCI

Solomon Yakobson 5 days ago

impdp parameter TABLE_EXISTS_ACTION=REPLACE applies to tables only. Errors you are getting indicate FUNCTION:"ctm920 "."CURRTIME", PROCEDURE:"ctm920 "."PURGE_CMR_RUNINF_1" and FUNCTION:"ctm920 "."DDIFF" already exist in target database. You need to decide do you want to keep there existing objects and for that you need to add EXCLUDE parameters to import or import them and for that you need to drop these objects before import.

SY.

1 - 2

Post Details

Added on Jan 7 2025
0 comments
155 views