DBA Data[Home] [Help]

APPS.PO_DRAFTS_PVT dependencies on PO_HEADERS_ALL

Line 98: -- updates the revision_num of po_headers_all_ext_b if draft_type is mod

94: --Pre-reqs: None
95: --Modifies:
96: --Locks:
97: --Function:
98: -- updates the revision_num of po_headers_all_ext_b if draft_type is mod
99: --Parameters:
100: --IN:p_draft_id IN NUMBER
101: -- p_po_header_id IN NUMBER
102: --IN OUT:

Line 127: FROM po_headers_all

123: d_position := 0;
124:
125: SELECT revision_num
126: INTO l_header_revision
127: FROM po_headers_all
128: WHERE po_header_id = p_po_header_id;
129: -- bug 13633396, l_header_revision is already incremented so no need
130: -- to increment it by 1
131:

Line 157: UPDATE po_headers_all_ext_b phaeb

153: PO_LOG.stmt(d_module,d_position,'l_is_mod_document',l_is_mod_document);
154: END IF;
155:
156: IF l_is_mod_document ='Y' THEN
157: UPDATE po_headers_all_ext_b phaeb
158: SET revision_num = l_header_revision
159: WHERE EXISTS ( SELECT 'Lock exists for the address'
160: FROM po_entity_locks poel
161: WHERE poel.entity_pk1 = phaeb.po_header_id

Line 260: l_new_approval_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE; --bug 9407474

256: l_return_status VARCHAR2(1);
257: l_rebuild_attribs BOOLEAN := TRUE; -- 4902870
258: l_type VARCHAR2(20); -- 4902870
259: l_is_mod_document VARCHAR2(1); --bug9846958
260: l_new_approval_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE; --bug 9407474
261: l_header_revision NUMBER;--concurent Mod
262: l_document_type_code VARCHAR2(500);
263: l_document_style_id NUMBER;
264: l_enabled_flag VARCHAR2(5);

Line 365: FROM po_headers_all

361:
362: IF l_is_mod_document = 'Y' THEN
363: SELECT revision_num
364: INTO l_header_revision
365: FROM po_headers_all
366: WHERE po_header_id = p_po_header_id;
367:
368: -- Increment the revision number
369: l_header_revision := l_header_revision + 1;

Line 371: UPDATE po_headers_all

367:
368: -- Increment the revision number
369: l_header_revision := l_header_revision + 1;
370:
371: UPDATE po_headers_all
372: SET revision_num = l_header_revision,
373: revised_date = SYSDATE
374: WHERE po_header_id = p_po_header_id;
375:

Line 508: FROM po_headers_all

504: -- in 'APPROVED' states.
505:
506: SELECT authorization_status
507: INTO l_new_approval_status
508: FROM po_headers_all
509: WHERE po_header_id = p_po_header_id;
510:
511: IF(l_new_approval_status = 'APPROVED') THEN
512:

Line 750: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;

746: d_api_name CONSTANT VARCHAR2(30) := 'populate_draft_info';
747: d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
748: d_position NUMBER;
749:
750: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
751: l_quote_type_lookup_code PO_HEADERS_ALL.quote_type_lookup_code%TYPE;
752:
753:
754: BEGIN

Line 751: l_quote_type_lookup_code PO_HEADERS_ALL.quote_type_lookup_code%TYPE;

747: d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
748: d_position NUMBER;
749:
750: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
751: l_quote_type_lookup_code PO_HEADERS_ALL.quote_type_lookup_code%TYPE;
752:
753:
754: BEGIN
755:

Line 765: -- exists in PO_HEADERS_ALL

761: x_draft_info.draft_id := p_draft_id;
762: x_draft_info.po_header_id := p_po_header_id;
763:
764: -- SQL What: Check whether po_header_id specified already
765: -- exists in PO_HEADERS_ALL
766: -- SQL Why: Need to see whether it is a new document being created
767: SELECT NVL(MAX(FND_API.G_FALSE), FND_API.G_TRUE)
768: INTO x_draft_info.new_document
769: FROM po_headers_all POH

Line 769: FROM po_headers_all POH

765: -- exists in PO_HEADERS_ALL
766: -- SQL Why: Need to see whether it is a new document being created
767: SELECT NVL(MAX(FND_API.G_FALSE), FND_API.G_TRUE)
768: INTO x_draft_info.new_document
769: FROM po_headers_all POH
770: WHERE POH.po_header_id = p_po_header_id;
771:
772: IF (x_draft_info.new_document = FND_API.G_TRUE) THEN
773: d_position := 10;

Line 793: FROM PO_HEADERS_ALL PHA

789: NVL(PHA.global_agreement_flag, 'N')
790: INTO l_type_lookup_code,
791: l_quote_type_lookup_code,
792: x_draft_info.ga_flag
793: FROM PO_HEADERS_ALL PHA
794: WHERE PHA.po_header_id = p_po_header_id;
795: END IF;
796:
797: -- Get the draft type

Line 1222: FROM po_headers_all

1218: SELECT lock_owner_role,
1219: lock_owner_user_id
1220: INTO x_lock_owner_role,
1221: x_lock_owner_user_id
1222: FROM po_headers_all
1223: WHERE po_header_id = p_po_header_id;
1224:
1225: IF (PO_LOG.d_proc) THEN
1226: PO_LOG.proc_end(d_module);

Line 1274: UPDATE po_headers_all

1270: END IF;
1271:
1272: --SQL What: update lock owner role and lock owner id
1273: --SQL Why: This is what this procedure is doing
1274: UPDATE po_headers_all
1275: SET lock_owner_role = p_role,
1276: lock_owner_user_id = p_role_user_id
1277: WHERE po_header_id = p_po_header_id;
1278:

Line 1342: l_authorization_status PO_HEADERS_ALL.authorization_status%TYPE;

1338: l_upload_requestor_role_id PO_DRAFTS.owner_user_id%TYPE;
1339: l_upload_job_number NUMBER;
1340: l_upload_status_display VARCHAR2(80);
1341:
1342: l_authorization_status PO_HEADERS_ALL.authorization_status%TYPE;
1343: l_supplier_auth_enabled PO_HEADERS_ALL.supplier_auth_enabled_flag%TYPE;
1344: l_cat_admin_auth_enabled PO_HEADERS_ALL.cat_admin_auth_enabled_flag%TYPE;
1345: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1346: l_current_lock_owner_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;

Line 1343: l_supplier_auth_enabled PO_HEADERS_ALL.supplier_auth_enabled_flag%TYPE;

1339: l_upload_job_number NUMBER;
1340: l_upload_status_display VARCHAR2(80);
1341:
1342: l_authorization_status PO_HEADERS_ALL.authorization_status%TYPE;
1343: l_supplier_auth_enabled PO_HEADERS_ALL.supplier_auth_enabled_flag%TYPE;
1344: l_cat_admin_auth_enabled PO_HEADERS_ALL.cat_admin_auth_enabled_flag%TYPE;
1345: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1346: l_current_lock_owner_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
1347:

Line 1344: l_cat_admin_auth_enabled PO_HEADERS_ALL.cat_admin_auth_enabled_flag%TYPE;

1340: l_upload_status_display VARCHAR2(80);
1341:
1342: l_authorization_status PO_HEADERS_ALL.authorization_status%TYPE;
1343: l_supplier_auth_enabled PO_HEADERS_ALL.supplier_auth_enabled_flag%TYPE;
1344: l_cat_admin_auth_enabled PO_HEADERS_ALL.cat_admin_auth_enabled_flag%TYPE;
1345: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1346: l_current_lock_owner_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
1347:
1348: l_updatable_state VARCHAR2(1); -- bug5532550

Line 1345: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;

1341:
1342: l_authorization_status PO_HEADERS_ALL.authorization_status%TYPE;
1343: l_supplier_auth_enabled PO_HEADERS_ALL.supplier_auth_enabled_flag%TYPE;
1344: l_cat_admin_auth_enabled PO_HEADERS_ALL.cat_admin_auth_enabled_flag%TYPE;
1345: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1346: l_current_lock_owner_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
1347:
1348: l_updatable_state VARCHAR2(1); -- bug5532550
1349: BEGIN

Line 1346: l_current_lock_owner_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;

1342: l_authorization_status PO_HEADERS_ALL.authorization_status%TYPE;
1343: l_supplier_auth_enabled PO_HEADERS_ALL.supplier_auth_enabled_flag%TYPE;
1344: l_cat_admin_auth_enabled PO_HEADERS_ALL.cat_admin_auth_enabled_flag%TYPE;
1345: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1346: l_current_lock_owner_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
1347:
1348: l_updatable_state VARCHAR2(1); -- bug5532550
1349: BEGIN
1350:

Line 1581: FROM po_headers_all

1577: d_position := 55;
1578:
1579: SELECT NVL(authorization_status, 'INCOMPLETE')
1580: INTO l_authorization_status
1581: FROM po_headers_all
1582: WHERE po_header_id = p_po_header_id;
1583:
1584: -- do not allow document update by non-buyer role if
1585: -- document is not in INCOMPLETE or APPROVED status

Line 1949: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;

1945: d_position NUMBER;
1946:
1947: l_applicable VARCHAR2(1) := FND_API.G_TRUE;
1948:
1949: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
1950: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;
1951: l_approved_date PO_HEADERS_ALL.approved_date%TYPE;
1952: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1953:

Line 1950: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;

1946:
1947: l_applicable VARCHAR2(1) := FND_API.G_TRUE;
1948:
1949: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
1950: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;
1951: l_approved_date PO_HEADERS_ALL.approved_date%TYPE;
1952: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1953:
1954: BEGIN

Line 1951: l_approved_date PO_HEADERS_ALL.approved_date%TYPE;

1947: l_applicable VARCHAR2(1) := FND_API.G_TRUE;
1948:
1949: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
1950: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;
1951: l_approved_date PO_HEADERS_ALL.approved_date%TYPE;
1952: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1953:
1954: BEGIN
1955:

Line 1952: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;

1948:
1949: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
1950: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;
1951: l_approved_date PO_HEADERS_ALL.approved_date%TYPE;
1952: l_current_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
1953:
1954: BEGIN
1955:
1956: d_position := 0;

Line 1972: FROM po_headers_all

1968: INTO l_type_lookup_code,
1969: l_ga_flag,
1970: l_approved_date,
1971: l_current_lock_owner_role
1972: FROM po_headers_all
1973: WHERE po_header_id = p_po_header_id;
1974:
1975: -- locking is applicable only for global blanket agreement
1976: -- Bypass locking for Mod enabled styles

Line 2025: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;

2021: d_position NUMBER;
2022:
2023: l_applicable VARCHAR2(1) := FND_API.G_TRUE;
2024:
2025: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
2026: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;
2027: BEGIN
2028: d_position := 0;
2029:

Line 2026: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;

2022:
2023: l_applicable VARCHAR2(1) := FND_API.G_TRUE;
2024:
2025: l_type_lookup_code PO_HEADERS_ALL.type_lookup_code%TYPE;
2026: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%TYPE;
2027: BEGIN
2028: d_position := 0;
2029:
2030: IF (PO_LOG.d_proc) THEN

Line 2041: FROM po_headers_all

2037: SELECT type_lookup_code,
2038: NVL(global_agreement_flag, 'N')
2039: INTO l_type_lookup_code,
2040: l_ga_flag
2041: FROM po_headers_all
2042: WHERE po_header_id = p_po_header_id;
2043:
2044: d_position := 10;
2045:

Line 2760: FROM po_headers_all

2756: END IF;
2757:
2758: SELECT supplier_auth_enabled_flag
2759: INTO l_supplier_auth_enabled_flag
2760: FROM po_headers_all
2761: WHERE po_header_id = p_po_header_id;
2762:
2763: return l_supplier_auth_enabled_flag;
2764:

Line 2812: UPDATE po_headers_all

2808: IF (PO_LOG.d_proc) THEN
2809: PO_LOG.proc_begin(d_module);
2810: END IF;
2811:
2812: UPDATE po_headers_all
2813: SET supplier_auth_enabled_flag
2814: = p_supplier_auth_enabled_flag
2815: WHERE po_header_id = p_po_header_id;
2816:

Line 2866: FROM po_headers_all

2862: END IF;
2863:
2864: SELECT cat_admin_auth_enabled_flag
2865: INTO l_cat_admin_auth_enable_flag
2866: FROM po_headers_all
2867: WHERE po_header_id = p_po_header_id;
2868:
2869: return l_cat_admin_auth_enable_flag;
2870:

Line 2918: UPDATE po_headers_all

2914: IF (PO_LOG.d_proc) THEN
2915: PO_LOG.proc_begin(d_module);
2916: END IF;
2917:
2918: UPDATE po_headers_all
2919: SET cat_admin_auth_enabled_flag
2920: = p_cat_admin_auth_enable_flag
2921: WHERE po_header_id = p_po_header_id;
2922:

Line 3073: l_org_id PO_HEADERS_ALL.org_id%TYPE;

3069: d_api_name CONSTANT VARCHAR2(30) := 'unlock_document_and_send_notif';
3070: d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
3071: d_position NUMBER;
3072:
3073: l_org_id PO_HEADERS_ALL.org_id%TYPE;
3074: l_segment1 PO_HEADERS_ALL.segment1%TYPE;
3075: l_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3076:
3077: BEGIN

Line 3074: l_segment1 PO_HEADERS_ALL.segment1%TYPE;

3070: d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
3071: d_position NUMBER;
3072:
3073: l_org_id PO_HEADERS_ALL.org_id%TYPE;
3074: l_segment1 PO_HEADERS_ALL.segment1%TYPE;
3075: l_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3076:
3077: BEGIN
3078:

Line 3075: l_revision_num PO_HEADERS_ALL.revision_num%TYPE;

3071: d_position NUMBER;
3072:
3073: l_org_id PO_HEADERS_ALL.org_id%TYPE;
3074: l_segment1 PO_HEADERS_ALL.segment1%TYPE;
3075: l_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3076:
3077: BEGIN
3078:
3079: d_position := 0;

Line 3092: FROM po_headers_all

3088: revision_num
3089: INTO l_org_id,
3090: l_segment1,
3091: l_revision_num
3092: FROM po_headers_all
3093: WHERE po_header_id = p_po_header_id;
3094:
3095: unlock_document_and_send_notif
3096: ( p_commit => p_commit,

Line 3162: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;

3158: l_agreement_info FND_NEW_MESSAGES.message_text%type := NULL;
3159: l_doc_style_name PO_DOC_STYLE_LINES_TL.display_name%type := NULL;
3160: l_ou_name HR_OPERATING_UNITS.name%type := NULL;
3161:
3162: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
3163: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
3164:
3165: l_agent_id PO_HEADERS_ALL.agent_id%TYPE;
3166: BEGIN

Line 3163: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;

3159: l_doc_style_name PO_DOC_STYLE_LINES_TL.display_name%type := NULL;
3160: l_ou_name HR_OPERATING_UNITS.name%type := NULL;
3161:
3162: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
3163: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
3164:
3165: l_agent_id PO_HEADERS_ALL.agent_id%TYPE;
3166: BEGIN
3167:

Line 3165: l_agent_id PO_HEADERS_ALL.agent_id%TYPE;

3161:
3162: l_lock_owner_role PO_HEADERS_ALL.lock_owner_role%TYPE;
3163: l_lock_owner_user_id PO_HEADERS_ALL.lock_owner_user_id%TYPE;
3164:
3165: l_agent_id PO_HEADERS_ALL.agent_id%TYPE;
3166: BEGIN
3167:
3168: IF (PO_LOG.d_proc) THEN
3169: PO_LOG.proc_begin(d_module,'p_commit',p_commit);

Line 3249: FROM po_headers_all

3245: -- bug5249393
3246: -- The notification from is always the buyer
3247: SELECT agent_id
3248: INTO l_agent_id
3249: FROM po_headers_all
3250: WHERE po_header_id = p_po_header_id;
3251:
3252: -- bug5090429
3253: -- Changed the signature of the API

Line 3323: FROM po_headers_all POH

3319: PO_GLOBAL.g_role_CAT_ADMIN)) THEN
3320:
3321: SELECT 1
3322: INTO l_dummy
3323: FROM po_headers_all POH
3324: WHERE POH.po_header_id = p_po_header_id
3325: AND NVL(cancel_flag, 'N') = 'N'
3326: AND NVL(closed_code, 'OPEN') NOT IN ('CLOSED', 'FINALLY CLOSED')
3327: AND NVL(frozen_flag, 'N') <> 'Y'

Line 3498: l_orig_revision_num PO_HEADERS_ALL.revision_num%TYPE;

3494: d_api_name CONSTANT VARCHAR2(30) := 'set_new_revision';
3495: d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
3496: d_position NUMBER;
3497:
3498: l_orig_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3499: l_rev_check_level_tbl rev_check_level_tbl_type;
3500: l_index NUMBER := 0;
3501: l_new_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3502: l_return_status VARCHAR2(1);

Line 3501: l_new_revision_num PO_HEADERS_ALL.revision_num%TYPE;

3497:
3498: l_orig_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3499: l_rev_check_level_tbl rev_check_level_tbl_type;
3500: l_index NUMBER := 0;
3501: l_new_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3502: l_return_status VARCHAR2(1);
3503: l_message VARCHAR2(2000);
3504: l_new_ame_appr_id_req VARCHAR2(1) := 'N';
3505: l_ame_transaction_type PO_HEADERS_ALL.ame_transaction_type%TYPE;

Line 3505: l_ame_transaction_type PO_HEADERS_ALL.ame_transaction_type%TYPE;

3501: l_new_revision_num PO_HEADERS_ALL.revision_num%TYPE;
3502: l_return_status VARCHAR2(1);
3503: l_message VARCHAR2(2000);
3504: l_new_ame_appr_id_req VARCHAR2(1) := 'N';
3505: l_ame_transaction_type PO_HEADERS_ALL.ame_transaction_type%TYPE;
3506:
3507: BEGIN
3508: d_position := 0;
3509: IF (PO_LOG.d_proc) THEN

Line 3519: FROM po_headers_all PH

3515: END IF;
3516:
3517: SELECT PH.revision_num
3518: INTO l_orig_revision_num
3519: FROM po_headers_all PH
3520: WHERE PH.po_header_id = p_draft_info.po_header_id;
3521:
3522: d_position := 10;
3523: -- determine which level(s) do we need to check for revision change

Line 3595: FROM po_headers_all poh,

3591: SELECT 'Y',
3592: podsh.ame_transaction_type
3593: INTO l_new_ame_appr_id_req,
3594: l_ame_transaction_type
3595: FROM po_headers_all poh,
3596: po_doc_style_headers podsh
3597: WHERE poh.style_id = podsh.style_id
3598: AND NVL(podsh.change_process_type,'CHANGE_ORDER') <> 'MODIFICATION'
3599: AND podsh.ame_transaction_type IS NOT NULL

Line 3606: UPDATE po_headers_all

3602: WHEN NO_DATA_FOUND THEN
3603: l_new_ame_appr_id_req := 'N';
3604: END;
3605:
3606: UPDATE po_headers_all
3607: SET revision_num = l_new_revision_num,
3608: revised_date = SYSDATE,
3609: ame_approval_id = DECODE(l_new_ame_appr_id_req,
3610: 'Y', po_ame_approvals_s.NEXTVAL,

Line 3942: po_headers_all poh

3938: INTO l_mod_flag
3939: FROM dual
3940: WHERE EXISTS(SELECT 'mod enabled po'
3941: FROM po_doc_style_headers pdsh ,
3942: po_headers_all poh
3943: WHERE pdsh.style_id=poh.style_id
3944: AND poh.po_header_id=p_po_header_id
3945: AND pdsh.change_process_type='MODIFICATION');
3946:

Line 3988: po_headers_all poh

3984: INTO l_open_mod_exist_flag
3985: FROM dual
3986: WHERE EXISTS (SELECT 'Open Mod Exists'
3987: FROM po_drafts pod,
3988: po_headers_all poh
3989: WHERE pod.document_id = poh.po_header_id
3990: AND poh.style_id = p_style_id
3991: AND pod.draft_type= 'MOD'
3992: AND pod.status IN ('DRAFT','REJECTED','IN PROCESS',

Line 4011: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all,

4007: --Pre-reqs: None
4008: --Modifies:
4009: -- po_entity_locks
4010: --Locks:
4011: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all,
4012: -- po_headers_all_ext_b,po_lines_all_ext_b,po_line_locations_all_ext_b,
4013: -- po_distributions_all_ext_b, tl tables
4014: --Function:
4015: -- This procedure generates the change data for the passed entities PKs,

Line 4012: -- po_headers_all_ext_b,po_lines_all_ext_b,po_line_locations_all_ext_b,

4008: --Modifies:
4009: -- po_entity_locks
4010: --Locks:
4011: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all,
4012: -- po_headers_all_ext_b,po_lines_all_ext_b,po_line_locations_all_ext_b,
4013: -- po_distributions_all_ext_b, tl tables
4014: --Function:
4015: -- This procedure generates the change data for the passed entities PKs,
4016: -- creates entries in po_entity_locks table corresponding to the modified

Line 4114: FROM po_headers_all pha, po_headers_draft_all phd

4110:
4111: -- chk for uda enabled
4112: SELECT pha.TYPE_LOOKUP_CODE, pha.STYLE_ID,phd.po_header_id
4113: INTO l_document_type_code, l_document_style_id, l_po_header_id
4114: FROM po_headers_all pha, po_headers_draft_all phd
4115: WHERE pha.PO_HEADER_ID = phd.PO_HEADER_ID
4116: AND phd.draft_id=p_draft_id ;
4117:
4118: d_position := 20;

Line 4169: -- po_headers_all, po_ga_org_assignments, po_notification_controls

4165: --Pre-reqs: None
4166: --Modifies:
4167: -- po_entity_locks
4168: --Locks:
4169: -- po_headers_all, po_ga_org_assignments, po_notification_controls
4170: --Function:
4171: -- This procedure generates the change data for the passed entities PKs,
4172: -- creates entries in po_entity_locks table corresponding to the modified
4173: -- attributes, and locks the required rows in transaction tables.

Line 4277: FROM po_headers_all poh,

4273: NVL(poh.umbrella_program_id ,G_NULL_NUM),
4274: NVL(poh.clm_contract_finance_code, G_NULL_CHAR),
4275: NVL(poh.clm_payment_instr_code, G_NULL_CHAR)
4276: ) p_lock_attrs
4277: FROM po_headers_all poh,
4278: po_session_gt pogt
4279: WHERE poh.po_header_id = pogt.char1 -- po_header_id
4280: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4281: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY

Line 5601: -- po_headers_all_ext_b, header multi-row, po_headers_all_ext_tl, addresses

5597: --Pre-reqs: None
5598: --Modifies:
5599: -- po_entity_locks
5600: --Locks:
5601: -- po_headers_all_ext_b, header multi-row, po_headers_all_ext_tl, addresses
5602: --Function:
5603: -- This procedure generates the change data for the passed entities PKs,
5604: -- creates entries in po_entity_locks table corresponding to the modified
5605: -- attributes, and locks the required rows in transaction tables.

Line 5629: -- Identify Header level locks required because of change in po_headers_all_ext_b

5625: PO_LOG.proc_begin(d_module);
5626: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
5627: END IF;
5628:
5629: -- Identify Header level locks required because of change in po_headers_all_ext_b
5630: INSERT INTO po_session_gt(
5631: key,
5632: index_char1, -- records identifier
5633: index_char2, -- entity_name

Line 5742: FROM po_headers_all_ext_b phb,

5738: NVL(phb.d_ext_attr9 ,G_NULL_DATE),
5739: NVL(phb.d_ext_attr10 ,G_NULL_DATE)
5740: ) p_lock_attrs,
5741: phb.attr_group_id
5742: FROM po_headers_all_ext_b phb,
5743: po_session_gt pogt,
5744: ego_fnd_dsc_flx_ctx_ext ag
5745: WHERE phb.po_header_id = pogt.char1 -- po_header_id
5746: AND phb.draft_id = G_DRAFT_ID_MINUS_1

Line 5847: FROM po_headers_all_ext_b phbd,

5843: nvl(phbd.d_ext_attr9 ,g_null_date),
5844: NVL(phbd.d_ext_attr10 ,G_NULL_DATE)
5845: ) p_lock_attrs,
5846: phbd.attr_group_id
5847: FROM po_headers_all_ext_b phbd,
5848: po_session_gt pogt,
5849: ego_fnd_dsc_flx_ctx_ext ag
5850: WHERE phbd.draft_id = p_draft_id
5851: AND phbd.po_header_id = pogt.char1 -- po_header_id

Line 5873: -- for such attribute groups are not created in po_headers_all_ext_b.

5869: WHERE draft_id = p_draft_id;
5870:
5871: -- When a UDA attribute group does not have any attribute which has default
5872: -- value and user also does not enter any attribute value, then records
5873: -- for such attribute groups are not created in po_headers_all_ext_b.
5874: -- Now if user modifies such attribute groups in Mod, then a new record is
5875: -- created with the draft_id. We need to identify such records and lock the
5876: -- header as P lock.
5877: INSERT INTO po_session_gt(

Line 5898: FROM po_headers_all_ext_b draft,

5894: AND phda.po_header_id = pogt.char1 -- po_header_id
5895: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5896: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY
5897: AND EXISTS (SELECT draft.attr_group_id
5898: FROM po_headers_all_ext_b draft,
5899: po_uda_ag_template_usages uda_usg,
5900: ego_fnd_dsc_flx_ctx_ext ag
5901: WHERE draft.po_header_id = l_po_header_id
5902: AND draft.draft_id = p_draft_id

Line 5910: FROM po_headers_all_ext_b base,

5906: AND draft.attr_group_id = ag.attr_group_id
5907: AND ag.multi_row = 'N'
5908: MINUS
5909: SELECT base.attr_group_id
5910: FROM po_headers_all_ext_b base,
5911: po_uda_ag_template_usages uda_usg,
5912: ego_fnd_dsc_flx_ctx_ext ag
5913: WHERE base.po_header_id = l_po_header_id
5914: AND base.draft_id = -1

Line 5929: -- attribute groups in po_headers_all_ext_b.

5925: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
5926: END IF;
5927:
5928: -- Identify Header level locks required because of change in multi-row
5929: -- attribute groups in po_headers_all_ext_b.
5930: -- Ignore the addresses.
5931: INSERT INTO po_session_gt(
5932: key,
5933: index_char1, -- records identifier

Line 6042: FROM po_headers_all_ext_b pohextb,

6038: d_ext_attr7,
6039: d_ext_attr8,
6040: d_ext_attr9,
6041: d_ext_attr10
6042: FROM po_headers_all_ext_b pohextb,
6043: ego_fnd_dsc_flx_ctx_ext ag
6044: WHERE pohextb.po_header_id = pohd.po_header_id
6045: AND pohextb.draft_id = p_draft_id
6046: AND pohextb.attr_group_id = ag.attr_group_id

Line 6141: FROM po_headers_all_ext_b pohextb,

6137: d_ext_attr7,
6138: d_ext_attr8,
6139: d_ext_attr9,
6140: d_ext_attr10
6141: FROM po_headers_all_ext_b pohextb,
6142: ego_fnd_dsc_flx_ctx_ext ag
6143: WHERE pohextb.po_header_id = pohd.po_header_id
6144: AND pohextb.draft_id = G_DRAFT_ID_MINUS_1
6145: AND pohextb.attr_group_id = ag.attr_group_id

Line 6241: FROM po_headers_all_ext_b pohextb,

6237: d_ext_attr7,
6238: d_ext_attr8,
6239: d_ext_attr9,
6240: d_ext_attr10
6241: FROM po_headers_all_ext_b pohextb,
6242: ego_fnd_dsc_flx_ctx_ext ag
6243: WHERE pohextb.po_header_id = pohd.po_header_id
6244: AND pohextb.draft_id = G_DRAFT_ID_MINUS_1
6245: AND pohextb.attr_group_id = ag.attr_group_id

Line 6340: FROM po_headers_all_ext_b pohextb,

6336: d_ext_attr7,
6337: d_ext_attr8,
6338: d_ext_attr9,
6339: d_ext_attr10
6340: FROM po_headers_all_ext_b pohextb,
6341: ego_fnd_dsc_flx_ctx_ext ag
6342: WHERE pohextb.po_header_id = pohd.po_header_id
6343: AND pohextb.draft_id = p_draft_id
6344: AND pohextb.attr_group_id = ag.attr_group_id

Line 6355: -- Identify Header level locks required because of change in po_headers_all_ext_tl

6351: PO_LOG.stmt_all_session_gt(d_module, d_position, G_LOCKS_REQUIRED_ID);
6352: PO_LOG.stmt(d_module,d_position ,'number of rows Updated ',SQL%ROWCOUNT);
6353: END IF;
6354:
6355: -- Identify Header level locks required because of change in po_headers_all_ext_tl
6356: INSERT INTO po_session_gt(
6357: key,
6358: index_char1, -- records identifier
6359: index_char2, -- entity_name

Line 6419: FROM po_headers_all_ext_tl put,

6415: NVL(put.tl_ext_attr40 ,G_NULL_CHAR)
6416: ) p_lock_attrs,
6417: put.attr_group_id,
6418: put.language
6419: FROM po_headers_all_ext_tl put,
6420: po_session_gt pogt
6421: where put.po_header_id = pogt.char1 -- po_header_id
6422: AND put.draft_id =G_DRAFT_ID_MINUS_1
6423: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 6472: FROM po_headers_all_ext_tl putd,

6468: NVL(putd.tl_ext_attr40 ,G_NULL_CHAR)
6469: ) p_lock_attrs,
6470: putd.attr_group_id,
6471: putd.language
6472: FROM po_headers_all_ext_tl putd,
6473: po_session_gt pogt
6474: WHERE putd.draft_id = p_draft_id
6475: AND putd.po_header_id = pogt.char1 -- po_header_id
6476: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 6604: FROM po_headers_all_ext_b phb,

6600: NVL(phb.d_ext_attr10 ,G_NULL_DATE)
6601: ) P_LOCK_ATTRS,
6602: phb.attr_group_id,
6603: phb.c_ext_attr39
6604: FROM po_headers_all_ext_b phb,
6605: po_session_gt pogt
6606: WHERE phb.po_header_id = pogt.char1 -- po_header_id
6607: AND phb.draft_id = G_DRAFT_ID_MINUS_1
6608: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 6708: FROM po_headers_all_ext_b phbd,

6704: NVL(phbd.d_ext_attr10 ,G_NULL_DATE)
6705: ) p_lock_attrs,
6706: phbd.attr_group_id,
6707: phbd.c_ext_attr39
6708: FROM po_headers_all_ext_b phbd,
6709: po_session_gt pogt
6710: WHERE phbd.draft_id = p_draft_id
6711: AND phbd.po_header_id = pogt.char1 -- po_header_id
6712: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 7960: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all

7956: --Pre-reqs:
7957: -- po_entity_locks is populated
7958: --Modifies: None
7959: --Locks:
7960: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all
7961: --Function:
7962: -- This procedure locks the required rows in transaction tables, and checks if
7963: -- the requested locks are compatible with existing locks.
7964: --Parameters:

Line 8013: FROM po_headers_all poh

8009: -- Lock header row
8010: SELECT poh.po_header_id
8011: BULK COLLECT
8012: INTO l_entity_id_tbl
8013: FROM po_headers_all poh
8014: WHERE EXISTS (SELECT 'lock exists'
8015: FROM po_entity_locks poel
8016: WHERE poel.entity_name = G_LOCK_HEADER_ENTITY
8017: AND poel.lock_by_draft_id = p_draft_id

Line 8230: from po_headers_all

8226: d_position := 10;
8227:
8228: select type_lookup_code, style_id
8229: into l_document_type_code, l_document_style_id
8230: from po_headers_all
8231: where po_header_id = p_po_header_id;
8232:
8233: po_clm_clo_util.check_po_uda_enabled
8234: (

Line 8868: -- po_headers_all_ext_b --> cleans up extra records for FORMS attribute

8864: -- Bug 13006217
8865: --Function:
8866: --This procedure deletes extra uda from ext tables
8867: -- po_lines_all_ext_b --> cleans up extra records for PRICING attribute
8868: -- po_headers_all_ext_b --> cleans up extra records for FORMS attribute
8869: -- po_lines_all_ext_tl --> cleans up extra records for PRICING attribute
8870: -- po_headers_all_ext_tl --> cleans up extra records for FORMS attribute
8871: --Parameters:
8872: --IN:

Line 8870: -- po_headers_all_ext_tl --> cleans up extra records for FORMS attribute

8866: --This procedure deletes extra uda from ext tables
8867: -- po_lines_all_ext_b --> cleans up extra records for PRICING attribute
8868: -- po_headers_all_ext_b --> cleans up extra records for FORMS attribute
8869: -- po_lines_all_ext_tl --> cleans up extra records for PRICING attribute
8870: -- po_headers_all_ext_tl --> cleans up extra records for FORMS attribute
8871: --Parameters:
8872: --IN:
8873: --p_draft_id:
8874: -- draft id of the PO/Modification

Line 8953: --Delete extra FORMS attribute record from po_headers_all_ext_b

8949: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8950: END IF;
8951:
8952: d_position := 20;
8953: --Delete extra FORMS attribute record from po_headers_all_ext_b
8954: DELETE FROM po_headers_all_ext_b phe
8955: where phe.po_header_id = p_po_header_id
8956: AND Nvl(phe.draft_id,-1) = p_draft_id
8957:

Line 8954: DELETE FROM po_headers_all_ext_b phe

8950: END IF;
8951:
8952: d_position := 20;
8953: --Delete extra FORMS attribute record from po_headers_all_ext_b
8954: DELETE FROM po_headers_all_ext_b phe
8955: where phe.po_header_id = p_po_header_id
8956: AND Nvl(phe.draft_id,-1) = p_draft_id
8957:
8958: AND EXISTS ( SELECT 1

Line 8968: PO_LOG.stmt(d_module,d_position ,'Deleted extra forms uda records from po_headers_all_ext_b');

8964: AND Nvl(ptu.attribute1, '*') <> Nvl(phm.clm_standard_form, '*')
8965: AND phe.attr_group_id = ptu.attribute_group_id
8966: );
8967: IF (PO_LOG.d_stmt) THEN
8968: PO_LOG.stmt(d_module,d_position ,'Deleted extra forms uda records from po_headers_all_ext_b');
8969: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8970: END IF;
8971:
8972: d_position := 30;

Line 8973: --Delete extra FORMS attribute record from po_headers_all_ext_tl

8969: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8970: END IF;
8971:
8972: d_position := 30;
8973: --Delete extra FORMS attribute record from po_headers_all_ext_tl
8974: DELETE FROM po_headers_all_ext_tl phe
8975: where phe.po_header_id = p_po_header_id
8976: AND Nvl(phe.draft_id,-1) = p_draft_id
8977:

Line 8974: DELETE FROM po_headers_all_ext_tl phe

8970: END IF;
8971:
8972: d_position := 30;
8973: --Delete extra FORMS attribute record from po_headers_all_ext_tl
8974: DELETE FROM po_headers_all_ext_tl phe
8975: where phe.po_header_id = p_po_header_id
8976: AND Nvl(phe.draft_id,-1) = p_draft_id
8977:
8978: AND EXISTS ( SELECT 1

Line 8988: PO_LOG.stmt(d_module,d_position ,'Deleted extra forms uda records from po_headers_all_ext_tl');

8984: AND Nvl(ptu.attribute1, '*') <> Nvl(phm.clm_standard_form, '*')
8985: AND phe.attr_group_id = ptu.attribute_group_id
8986: );
8987: IF (PO_LOG.d_stmt) THEN
8988: PO_LOG.stmt(d_module,d_position ,'Deleted extra forms uda records from po_headers_all_ext_tl');
8989: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8990: END IF;
8991:
8992: d_position := 40;

Line 9366: po_headers_all poh

9362: INTO l_par_exist_flag
9363: FROM dual
9364: WHERE EXISTS (SELECT 'PAR Exists'
9365: FROM po_drafts pod,
9366: po_headers_all poh
9367: WHERE pod.document_id = poh.po_header_id
9368: AND poh.style_id = p_style_id
9369: AND pod.draft_type= 'PAR');
9370: