DBA Data[Home] [Help]

APPS.PO_CONTERMS_UTL_GRP dependencies on PO_HEADERS_ALL

Line 591: -- PO_headers_all if p_lock_flag parameter is set to Y

587: -- rollback to release the lock
588: --Modifies:
589: -- None.
590: --Locks:
591: -- PO_headers_all if p_lock_flag parameter is set to Y
592: --Function:
593: -- This procedure is called by Contracts team to determine whether
594: -- the Purchase Order against which terms will be saved is in updatable
595: -- status or not. This API will compare the passed in status and version to

Line 614: -- tells whether po_headers_all be locked for the record

610: -- : Employee id
611: -- Note that the above parameters should always be concatenated in the same order with no extra spaces around
612: -- Status and revision are always expected to be there. For Employee Id pass 'Null' if status is not 'IN PROCESS'
613: --p_lock_flag
614: -- tells whether po_headers_all be locked for the record
615: --OUT:
616: --x_update_allowed
617: -- Returns Y or N depending PO is in updatable status or not
618: --x_msg_count

Line 662: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;

658: x_msg_count OUT NOCOPY NUMBER
659: ) IS
660: l_api_name CONSTANT VARCHAR(30) := 'IS_PO_UPDATE_ALLOWED';
661: l_api_version CONSTANT NUMBER := 1.0;
662: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
663: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
664: l_po_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
665: l_po_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
666:

Line 663: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;

659: ) IS
660: l_api_name CONSTANT VARCHAR(30) := 'IS_PO_UPDATE_ALLOWED';
661: l_api_version CONSTANT NUMBER := 1.0;
662: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
663: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
664: l_po_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
665: l_po_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
666:
667: l_emp_id NUMBER;

Line 664: l_po_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;

660: l_api_name CONSTANT VARCHAR(30) := 'IS_PO_UPDATE_ALLOWED';
661: l_api_version CONSTANT NUMBER := 1.0;
662: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
663: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
664: l_po_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
665: l_po_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
666:
667: l_emp_id NUMBER;
668: l_emp VARCHAR2(100);

Line 665: l_po_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;

661: l_api_version CONSTANT NUMBER := 1.0;
662: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
663: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
664: l_po_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
665: l_po_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
666:
667: l_emp_id NUMBER;
668: l_emp VARCHAR2(100);
669: l_doc_type_code PO_DOCUMENT_TYPES_ALL_B.DOCUMENT_SUBTYPE%TYPE;

Line 794: FROM po_headers_all

790: SELECT nvl(authorization_status,'INCOMPLETE'), revision_num, type_lookup_code
791: ,DECODE(type_lookup_code,'STANDARD','PO','BLANKET','PA','CONTRACT','PA',null)
792: INTO l_po_status,l_po_revision, l_doc_type_code
793: ,l_document_type
794: FROM po_headers_all
795: WHERE po_header_id = p_header_id;
796:
797: EXCEPTION
798: WHEN NO_DATA_FOUND then

Line 1059: -- rollback to release the lock on Po_headers_all unless p_commit is set to Y

1055: --Pre-reqs:
1056: -- 1.DONOT Use this API from wherever Functional Security Check is needed. This API
1057: -- Assumes that the org context is already set
1058: -- 2.when this API is called, the calling API is expected to commit or
1059: -- rollback to release the lock on Po_headers_all unless p_commit is set to Y
1060: --Modifies:
1061: -- PO_headers_ALL. The following Columns will be modified
1062: -- CONTERMS_EXIST_FLAG
1063: -- CONTERMS_ARTICLES_UPD_DATE

Line 1061: -- PO_headers_ALL. The following Columns will be modified

1057: -- Assumes that the org context is already set
1058: -- 2.when this API is called, the calling API is expected to commit or
1059: -- rollback to release the lock on Po_headers_all unless p_commit is set to Y
1060: --Modifies:
1061: -- PO_headers_ALL. The following Columns will be modified
1062: -- CONTERMS_EXIST_FLAG
1063: -- CONTERMS_ARTICLES_UPD_DATE
1064: -- CONTERMS_DELIV_UPD_DATE
1065: --Locks:

Line 1066: -- PO_headers_all

1062: -- CONTERMS_EXIST_FLAG
1063: -- CONTERMS_ARTICLES_UPD_DATE
1064: -- CONTERMS_DELIV_UPD_DATE
1065: --Locks:
1066: -- PO_headers_all
1067: --Function:
1068: -- This API will be called by Contracts when user attaches or deletes a template
1069: -- from a purchasing document. This API will first check if Po is in updatable status. If yes
1070: -- It will update the conterms fields in po_headers_all based on the action taken in contracts

Line 1070: -- It will update the conterms fields in po_headers_all based on the action taken in contracts

1066: -- PO_headers_all
1067: --Function:
1068: -- This API will be called by Contracts when user attaches or deletes a template
1069: -- from a purchasing document. This API will first check if Po is in updatable status. If yes
1070: -- It will update the conterms fields in po_headers_all based on the action taken in contracts
1071: -- Contracts will populate parameter p_template_changed to Y when this API is called
1072: -- after a new template is attached to PO. Contracts will populate parameter p_template_changed to D when
1073: -- this API is called after template is removed.
1074:

Line 1150: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;

1146: l_update_not_allowed EXCEPTION;
1147: l_date DATE;
1148: l_conterms_exist_flag VARCHAR2(1);
1149:
1150: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
1151: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
1152: l_old_conterms_flag VARCHAR2(1); -- <11i10+ Contracts ER Migrate PO>
1153: l_start NUMBER;
1154: l_end NUMBER;

Line 1151: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;

1147: l_date DATE;
1148: l_conterms_exist_flag VARCHAR2(1);
1149:
1150: l_callout_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
1151: l_callout_revision PO_HEADERS_ALL.REVISION_NUM%TYPE;
1152: l_old_conterms_flag VARCHAR2(1); -- <11i10+ Contracts ER Migrate PO>
1153: l_start NUMBER;
1154: l_end NUMBER;
1155: BEGIN

Line 1261: FROM PO_HEADERS_ALL poh

1257: THEN
1258:
1259: SELECT poh.conterms_exist_flag
1260: INTO l_old_conterms_flag
1261: FROM PO_HEADERS_ALL poh
1262: WHERE poh.po_header_id = p_header_id;
1263:
1264: IF ((l_old_conterms_flag = 'N') AND (p_template_changed = 'Y')) OR
1265: ((l_old_conterms_flag = 'Y') AND (p_template_changed = 'D'))

Line 1323: -- SQL WHAT-Update the conterms_exist_flag and the contract terms dates in po_headers_all

1319: END IF;
1320: End if;
1321: END IF;
1322:
1323: -- SQL WHAT-Update the conterms_exist_flag and the contract terms dates in po_headers_all
1324: -- SQL WHY - Update the flag based on if contract terms template attached or removed
1325: -- SQL JOIN- None
1326: Update po_headers_all
1327: Set conterms_exist_flag = l_conterms_exist_flag,

Line 1326: Update po_headers_all

1322:
1323: -- SQL WHAT-Update the conterms_exist_flag and the contract terms dates in po_headers_all
1324: -- SQL WHY - Update the flag based on if contract terms template attached or removed
1325: -- SQL JOIN- None
1326: Update po_headers_all
1327: Set conterms_exist_flag = l_conterms_exist_flag,
1328: Conterms_articles_upd_date = l_date,
1329: Conterms_DELIV_upd_date = l_date,
1330: Last_update_date = sysdate,

Line 1339: MESSAGE =>'300:Po headers all updated for header id'||p_header_id);

1335: IF g_fnd_debug = 'Y' then
1336: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1337: FND_LOG.string(LOG_LEVEL=>FND_LOG.LEVEL_STATEMENT,
1338: MODULE =>g_module_prefix||l_api_name,
1339: MESSAGE =>'300:Po headers all updated for header id'||p_header_id);
1340: END IF;
1341: End if;
1342:
1343: ELSE -- if p_template_changed other than Y or D

Line 1509: l_type_lookup_code po_headers_all.type_lookup_code%type;

1505: x_msg_count OUT NOCOPY NUMBER
1506: ) IS
1507: l_api_name CONSTANT VARCHAR(30) := 'Attribute_value_changed';
1508: l_api_version CONSTANT NUMBER := 1.0;
1509: l_type_lookup_code po_headers_all.type_lookup_code%type;
1510: -- the length varchar40 fixed with the assumption that the length of variable code
1511: -- will not exceed this. For using %type, dependence on OKC tables. Consider for refactor
1512: l_po_attrib_tbl VARIABLE_CODE_TBL_TYPE;
1513: l_sys_var_index BINARY_INTEGER;

Line 1623: po_headers_all poh

1619: ,l_type_lookup_code
1620: ,l_po_attrib_tbl(29) --
1621:
1622: FROM
1623: po_headers_all poh
1624: ,po_headers_archive_all poha
1625: WHERE poh.po_header_id = p_doc_id
1626: AND poh.po_header_id = poha.po_header_id
1627: AND poha.latest_external_flag = 'Y';

Line 1926: l_type_lookup_code po_headers_all.type_lookup_code%type;

1922: x_msg_count OUT NOCOPY NUMBER) IS
1923:
1924: l_api_name CONSTANT VARCHAR(30) := 'Get_PO_Attribute_values';
1925: l_api_version CONSTANT NUMBER := 1.0;
1926: l_type_lookup_code po_headers_all.type_lookup_code%type;
1927: -- the length varchar40 fixed with the assumption that the length of variable code
1928: -- will not exceed this. For using %type, dependence on OKC tables. Consider for refactor
1929: l_po_attrib_tbl VARIABLE_VALUE_TBL_TYPE;
1930: l_sys_var_index BINARY_INTEGER;

Line 2312: po_headers_all poh

2308: ,l_po_attrib_tbl(87).variable_value_id --
2309: ,l_po_attrib_tbl(88).variable_value_id --
2310:
2311: FROM
2312: po_headers_all poh
2313: ,FINANCIALS_SYSTEM_PARAMS_ALL FP
2314: ,FND_CURRENCIES_VL CU
2315: ,GL_SETS_OF_BOOKS gsb
2316: ,FND_CURRENCIES_VL cuf

Line 2598: l_archived_conterms_flag PO_headers_all.conterms_exist_Flag%Type :='N';

2594: IS
2595: l_api_name CONSTANT VARCHAR2(30) := 'get_last_signed_revision';
2596: l_api_version CONSTANT NUMBER := 1.0;
2597:
2598: l_archived_conterms_flag PO_headers_all.conterms_exist_Flag%Type :='N';
2599: l_signed_revision_num NUMBER;
2600: l_signed_records VARCHAR2(1);
2601:
2602: BEGIN

Line 2729: l_document_type PO_HEADERS_ALL.type_lookup_code%TYPE;

2725: l_template_id OKC_TERMS_TEMPLATES_ALL.template_id%TYPE;
2726: l_template_name OKC_TERMS_TEMPLATES_ALL.template_name%TYPE;
2727: l_template_desc OKC_TERMS_TEMPLATES_ALL.description%TYPE;
2728: l_k_doc_type VARCHAR2(240);
2729: l_document_type PO_HEADERS_ALL.type_lookup_code%TYPE;
2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095
2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095

Line 2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095

2726: l_template_name OKC_TERMS_TEMPLATES_ALL.template_name%TYPE;
2727: l_template_desc OKC_TERMS_TEMPLATES_ALL.description%TYPE;
2728: l_k_doc_type VARCHAR2(240);
2729: l_document_type PO_HEADERS_ALL.type_lookup_code%TYPE;
2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095
2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;

Line 2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095

2727: l_template_desc OKC_TERMS_TEMPLATES_ALL.description%TYPE;
2728: l_k_doc_type VARCHAR2(240);
2729: l_document_type PO_HEADERS_ALL.type_lookup_code%TYPE;
2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095
2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;

Line 2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095

2728: l_k_doc_type VARCHAR2(240);
2729: l_document_type PO_HEADERS_ALL.type_lookup_code%TYPE;
2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095
2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;

Line 2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095

2729: l_document_type PO_HEADERS_ALL.type_lookup_code%TYPE;
2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095
2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;
2737: l_org_id PO_HEADERS_ALL.org_id%TYPE;

Line 2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;

2730: l_doc_number PO_HEADERS_ALL.segment1%TYPE; -- Bug 4096095
2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;
2737: l_org_id PO_HEADERS_ALL.org_id%TYPE;
2738: l_msg_data VARCHAR2(2000);

Line 2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;

2731: l_agent_id PO_HEADERS_ALL.agent_id%TYPE; -- Bug 4096095
2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;
2737: l_org_id PO_HEADERS_ALL.org_id%TYPE;
2738: l_msg_data VARCHAR2(2000);
2739: l_msg_count NUMBER;

Line 2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;

2732: l_vendor_id PO_HEADERS_ALL.vendor_id%TYPE; -- Bug 4096095
2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;
2737: l_org_id PO_HEADERS_ALL.org_id%TYPE;
2738: l_msg_data VARCHAR2(2000);
2739: l_msg_count NUMBER;
2740:

Line 2737: l_org_id PO_HEADERS_ALL.org_id%TYPE;

2733: l_vendor_site_id PO_HEADERS_ALL.vendor_site_id%TYPE; -- Bug 4096095
2734: l_status PO_HEADERS_ALL.authorization_status%TYPE;
2735: l_conterms_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
2736: l_revision PO_HEADERS_ALL.revision_num%TYPE;
2737: l_org_id PO_HEADERS_ALL.org_id%TYPE;
2738: l_msg_data VARCHAR2(2000);
2739: l_msg_count NUMBER;
2740:
2741: l_progress NUMBER := 0;

Line 2800: FROM po_headers_all poh

2796: l_vendor_id,
2797: l_vendor_site_id,
2798: l_agent_id,
2799: l_conterms_flag
2800: FROM po_headers_all poh
2801: WHERE poh.po_header_id = p_document_id;
2802: Exception
2803: When others then
2804: l_document_type := null;

Line 3348: l_archived_conterms_flag PO_headers_all.conterms_exist_Flag%Type :='N';

3344: ------------------------------------------------------------------------------
3345: FUNCTION get_archive_conterms_flag (p_po_header_id IN NUMBER)
3346: RETURN VARCHAR2 IS
3347:
3348: l_archived_conterms_flag PO_headers_all.conterms_exist_Flag%Type :='N';
3349:
3350: BEGIN
3351:
3352: -- SQL What: Query to check if the last archived version had conterms