DBA Data[Home] [Help]

APPS.OKC_CREATE_PO_FROM_K_PVT dependencies on OKC_K_REL_OBJS

Line 1378: -- Insert record into OKC_K_REL_OBJS to record the link between the

1374:
1375:
1376:
1377: -- here create the relationship from the po to the contract
1378: -- Insert record into OKC_K_REL_OBJS to record the link between the
1379: -- Contract header and PO header. Currently, this is a direct insert.
1380:
1381: INSERT INTO OKC_K_REL_OBJS
1382: ( id,

Line 1381: INSERT INTO OKC_K_REL_OBJS

1377: -- here create the relationship from the po to the contract
1378: -- Insert record into OKC_K_REL_OBJS to record the link between the
1379: -- Contract header and PO header. Currently, this is a direct insert.
1380:
1381: INSERT INTO OKC_K_REL_OBJS
1382: ( id,
1383: cle_id,
1384: chr_id,
1385: rty_code,

Line 1414: my_debug('1080: Inserted rows into OKC_K_REL_OBJS for Header: ' || sql%ROWCOUNT , 4);

1410: ,g_last_update_login -- last_update_login
1411: );
1412:
1413:
1414: my_debug('1080: Inserted rows into OKC_K_REL_OBJS for Header: ' || sql%ROWCOUNT , 4);
1415:
1416: -- cleanup
1417:
1418: -- p_po_header_rec := l_po_null_rec; -- uncomment this line when create relationship from po to contract above is done

Line 1600: -- Insert record into OKC_K_REL_OBJS to record the link between the

1596: );
1597:
1598:
1599: -- Here create the relationship from the po line to the contract line
1600: -- Insert record into OKC_K_REL_OBJS to record the link between the
1601: -- Contract header and PO header. Currently, this is a direct insert.
1602: -- Need to modify this call to pass the entire table once
1603: -- the related objects API has a bulk insert API without validations
1604:

Line 1613: INSERT INTO OKC_K_REL_OBJS

1609: -- this program with the correct po_line_id (after the PO has been
1610: -- created)
1611:
1612: FORALL i IN p_po_lines_tab.first..p_po_lines_tab.last
1613: INSERT INTO OKC_K_REL_OBJS
1614: ( id,
1615: cle_id,
1616: chr_id,
1617: rty_code,

Line 2083: DELETE okc_k_rel_objs rel

2079: -- from related objects if no PO header was created
2080:
2081: my_debug('1960: Attempting delete of hanging header related objects', 4);
2082:
2083: DELETE okc_k_rel_objs rel
2084: WHERE rel.chr_id = p_chr_id -- for the current contract
2085: AND rel.cle_id IS NULL -- related obj pertains to header
2086: AND rel.rty_code = g_crj_rty_code -- for PO creation
2087: AND rel.jtot_object1_code = g_crj_chr_jtot_object_code -- correct jtot object

Line 2121: DELETE FROM okc_k_rel_objs

2117: -- Clean up all lines since the header was not interfaced
2118:
2119: my_debug('2020: Deleting related object lines', 4);
2120:
2121: DELETE FROM okc_k_rel_objs
2122: WHERE chr_id = p_chr_id;
2123:
2124: my_debug('2040: Deleted related object lines, count = ' || SQL%ROWCOUNT, 4);
2125:

Line 2142: FROM okc_k_rel_objs rel

2138: INTO l_po_number
2139: FROM po_headers_all po
2140: WHERE po.po_header_id =
2141: ( SELECT object1_id1
2142: FROM okc_k_rel_objs rel
2143: WHERE rel.chr_id = p_chr_id -- for the current contract
2144: AND rel.cle_id IS NULL -- related obj pertains to header
2145: AND rel.rty_code = g_crj_rty_code -- for PO creation
2146: AND rel.jtot_object1_code = g_crj_chr_jtot_object_code

Line 2171: DELETE okc_k_rel_objs rel

2167: -- Remove the relationship between the contract lines and
2168: -- corresponding PO lines from related objects if they were not
2169: -- created. This can happen if there is some error during PDOI
2170:
2171: DELETE okc_k_rel_objs rel
2172: WHERE rel.chr_id = p_chr_id -- for the current contract
2173: AND rel.cle_id IS NOT NULL -- for line records
2174: AND rel.rty_code = g_crj_rty_code -- for K-PO records
2175: AND rel.jtot_object1_code = g_crj_cle_jtot_object_code -- correct jtot object

Line 2213: UPDATE okc_k_rel_objs rel

2209: -- fixed in PDOI
2210:
2211: my_debug('2110: Updating related objects replacing line num with line id');
2212:
2213: UPDATE okc_k_rel_objs rel
2214: SET (rel.object1_id1, rel.object1_id2) =
2215: ( SELECT pol.po_line_id, '#'
2216: FROM po_lines_all pol
2217: WHERE pol.po_header_id = rel.object1_id1