DBA Data[Home] [Help]

APPS.CTO_DEACTIVATE_CONFIG_PK dependencies on FND_API

Line 463: if l_return_status = FND_API.G_FALSE then

459: --
460: -- If it returns FALSE, then, you have not setup your parameters correctly.
461: --
462:
463: if l_return_status = FND_API.G_FALSE then
464: fnd_file.put_line(fnd_file.log, 'Action: 1. Set the BOM parameters for the organization.');
465: fnd_file.put_line(fnd_file.log, ' 2. Set the Inactive Status code in the BOM parameters.');
466: errbuf := 'completed with warning';
467: retcode := 1; --exits with warning

Line 492: IF x_return_status = FND_API.G_FALSE THEN

488: -- If it returns FALSE, then, you are running the process from a child orgn when
489: -- the attribute control for item status is set to Master Level.
490: --
491:
492: IF x_return_status = FND_API.G_FALSE THEN
493: fnd_file.put_line(fnd_file.log, 'Attribute control for Item Status is set to Master Level.');
494: fnd_file.put_line(fnd_file.log, 'Please run this concurrent program from the master organization.');
495: retcode := 1; -- exits with warning
496: return;

Line 840: x_attr_flag := FND_API.G_FALSE;

836: end if;
837:
838: -- new fix ends here
839:
840: x_attr_flag := FND_API.G_FALSE;
841:
842: loop_counter := 0;
843:
844: << beginloop>>

Line 877: x_attr_flag = FND_API.G_TRUE )

873: --
874: If ( gAttrControl = 1 ) OR ( p_Org_Id = gMasterOrgn ) then
875:
876: if (l_prev_item_id = l_selected_inv_item_id and
877: x_attr_flag = FND_API.G_TRUE )
878: then
879: WriteToLog( 'Skipped processing since this item in another orgn failed validation.', 3);
880: l_result_message := 'Skipped processing since this item in another orgn failed validation';
881: WriteToLog( 'Registering Result for un-deactivated items..',3);

Line 896: x_attr_flag := FND_API.G_FALSE; -- Reset the flag for next item

892:
893: --continue with next record..
894: goto beginloop;
895: else
896: x_attr_flag := FND_API.G_FALSE; -- Reset the flag for next item
897: failed_flag(l_selected_inv_item_id) := FND_API.G_FALSE; -- no errors for the selected item yet.
898: end if;
899: end if;
900:

Line 897: failed_flag(l_selected_inv_item_id) := FND_API.G_FALSE; -- no errors for the selected item yet.

893: --continue with next record..
894: goto beginloop;
895: else
896: x_attr_flag := FND_API.G_FALSE; -- Reset the flag for next item
897: failed_flag(l_selected_inv_item_id) := FND_API.G_FALSE; -- no errors for the selected item yet.
898: end if;
899: end if;
900:
901:

Line 902: l_next_step_flag := FND_API.G_FALSE;

898: end if;
899: end if;
900:
901:
902: l_next_step_flag := FND_API.G_FALSE;
903:
904: --
905: --checks if the item is already inactive or has pending inactive status
906: --

Line 907: if l_next_step_flag = FND_API.G_FALSE then

903:
904: --
905: --checks if the item is already inactive or has pending inactive status
906: --
907: if l_next_step_flag = FND_API.G_FALSE then
908: l_stat_num :=40;
909: WriteToLog( 'Checking delete status ..',3);
910:
911: CHECK_DELETE_STATUS( l_selected_inv_item_id,

Line 920: IF x_return_status = FND_API.G_TRUE THEN

916:
917: --
918: --if item is already inactive
919: --
920: IF x_return_status = FND_API.G_TRUE THEN
921: WriteToLog( 'ERROR: Item already deactivated or has inactive status in pending.',3);
922: l_result_message := 'Item already deactivated or has inactive status in pending.';
923: l_next_step_flag := FND_API.G_TRUE;
924: END IF;

Line 923: l_next_step_flag := FND_API.G_TRUE;

919: --
920: IF x_return_status = FND_API.G_TRUE THEN
921: WriteToLog( 'ERROR: Item already deactivated or has inactive status in pending.',3);
922: l_result_message := 'Item already deactivated or has inactive status in pending.';
923: l_next_step_flag := FND_API.G_TRUE;
924: END IF;
925:
926: end if;
927:

Line 934: IF l_next_step_flag = FND_API.G_FALSE THEN

930: --
931: --checks for common routing
932: --
933:
934: IF l_next_step_flag = FND_API.G_FALSE THEN
935: l_stat_num :=60;
936:
937: WriteToLog( 'Checking common routing ..',3);
938: CHECK_COMMON_ROUTING( l_selected_inv_item_id,

Line 948: IF x_return_status = FND_API.G_TRUE THEN

944: --
945: --if item has common routing
946: --
947:
948: IF x_return_status = FND_API.G_TRUE THEN
949: WriteToLog('ERROR: Item has a common routing.',3);
950: l_result_message := 'Item has a common routing.';
951: l_next_step_flag := FND_API.G_TRUE;
952: END IF;

Line 951: l_next_step_flag := FND_API.G_TRUE;

947:
948: IF x_return_status = FND_API.G_TRUE THEN
949: WriteToLog('ERROR: Item has a common routing.',3);
950: l_result_message := 'Item has a common routing.';
951: l_next_step_flag := FND_API.G_TRUE;
952: END IF;
953: END IF;
954:
955:

Line 961: IF l_next_step_flag = FND_API.G_FALSE THEN

957: --
958: --checks for common bom
959: --
960:
961: IF l_next_step_flag = FND_API.G_FALSE THEN
962: l_stat_num :=70;
963: WriteToLog( 'Checking common BOM ..',3);
964: CHECK_COMMON_BOM( l_selected_inv_item_id,
965: l_org_id,

Line 973: IF x_return_status = FND_API.G_TRUE THEN

969:
970: --
971: --if item has common routing
972: --
973: IF x_return_status = FND_API.G_TRUE THEN
974: -- l_next_step_flag := 'N';
975: l_next_step_flag := FND_API.G_TRUE;
976: WriteToLog('ERROR: Item has a common BOM ',3);
977: l_result_message := 'Item has a common BOM ';

Line 975: l_next_step_flag := FND_API.G_TRUE;

971: --if item has common routing
972: --
973: IF x_return_status = FND_API.G_TRUE THEN
974: -- l_next_step_flag := 'N';
975: l_next_step_flag := FND_API.G_TRUE;
976: WriteToLog('ERROR: Item has a common BOM ',3);
977: l_result_message := 'Item has a common BOM ';
978: END IF;
979: END IF;

Line 986: IF l_next_step_flag = FND_API.G_FALSE THEN

982: --
983: --checks for onhand (bug 2214674)
984: --
985:
986: IF l_next_step_flag = FND_API.G_FALSE THEN
987: l_stat_num := 80;
988:
989: WriteToLog( 'Checking onhand ..',3);
990: CHECK_ONHAND( l_selected_inv_item_id,

Line 997: IF x_return_status = FND_API.G_TRUE THEN

993:
994: --
995: --if item has onhand
996: --
997: IF x_return_status = FND_API.G_TRUE THEN
998: WriteToLog('ERROR: Item has onhand.',3);
999: l_result_message := 'Item has onhand.';
1000: l_next_step_flag := FND_API.G_TRUE;
1001: END IF;

Line 1000: l_next_step_flag := FND_API.G_TRUE;

996: --
997: IF x_return_status = FND_API.G_TRUE THEN
998: WriteToLog('ERROR: Item has onhand.',3);
999: l_result_message := 'Item has onhand.';
1000: l_next_step_flag := FND_API.G_TRUE;
1001: END IF;
1002: END IF;
1003:
1004:

Line 1009: IF l_next_step_flag = FND_API.G_FALSE THEN

1005:
1006: --
1007: --checks for open supply
1008: --
1009: IF l_next_step_flag = FND_API.G_FALSE THEN
1010: l_stat_num := 80;
1011:
1012: WriteToLog( 'Checking open supply ..',3);
1013: CHECK_OPEN_SUPPLY( l_selected_inv_item_id,

Line 1021: IF x_return_status = FND_API.G_TRUE THEN

1017:
1018: --
1019: --if item has common supply
1020: --
1021: IF x_return_status = FND_API.G_TRUE THEN
1022: WriteToLog('ERROR: Item has open supply', 3);
1023: l_result_message := 'Item has open supply';
1024: l_next_step_flag := FND_API.G_TRUE;
1025: END IF;

Line 1024: l_next_step_flag := FND_API.G_TRUE;

1020: --
1021: IF x_return_status = FND_API.G_TRUE THEN
1022: WriteToLog('ERROR: Item has open supply', 3);
1023: l_result_message := 'Item has open supply';
1024: l_next_step_flag := FND_API.G_TRUE;
1025: END IF;
1026: END IF;
1027:
1028:

Line 1033: IF l_next_step_flag = FND_API.G_FALSE THEN

1029:
1030: --
1031: --checks for open demand
1032: --
1033: IF l_next_step_flag = FND_API.G_FALSE THEN
1034: l_stat_num :=90;
1035:
1036: WriteToLog( 'Checking open demand ..',3);
1037: CHECK_OPEN_DEMAND( l_selected_inv_item_id,

Line 1044: IF x_return_status = FND_API.G_TRUE THEN

1040:
1041: --
1042: --if item has common demand
1043: --
1044: IF x_return_status = FND_API.G_TRUE THEN
1045: l_next_step_flag := FND_API.G_TRUE;
1046: WriteToLog( 'ERROR: Item has open demand', 3);
1047: l_result_message := 'Item has open demand';
1048: END IF;

Line 1045: l_next_step_flag := FND_API.G_TRUE;

1041: --
1042: --if item has common demand
1043: --
1044: IF x_return_status = FND_API.G_TRUE THEN
1045: l_next_step_flag := FND_API.G_TRUE;
1046: WriteToLog( 'ERROR: Item has open demand', 3);
1047: l_result_message := 'Item has open demand';
1048: END IF;
1049: END IF;

Line 1056: IF l_next_step_flag = FND_API.G_FALSE THEN

1052:
1053: --
1054: --checks for material transaction
1055: --
1056: IF l_next_step_flag = FND_API.G_FALSE THEN
1057: l_stat_num :=100;
1058:
1059: WriteToLog( 'Checking material transactions ..',3);
1060: CHECK_MATERIAL_TRANSACTION( l_selected_inv_item_id,

Line 1069: IF x_return_status = FND_API.G_TRUE THEN

1065:
1066: --
1067: --if item has material transactions within given num of days after shipping
1068: --
1069: IF x_return_status = FND_API.G_TRUE THEN
1070:
1071: l_next_step_flag := FND_API.G_TRUE;
1072: WriteToLog ('ERROR: Item has material transaction within '|| p_num_of_days||
1073: ' days after shipping.', 3);

Line 1071: l_next_step_flag := FND_API.G_TRUE;

1067: --if item has material transactions within given num of days after shipping
1068: --
1069: IF x_return_status = FND_API.G_TRUE THEN
1070:
1071: l_next_step_flag := FND_API.G_TRUE;
1072: WriteToLog ('ERROR: Item has material transaction within '|| p_num_of_days||
1073: ' days after shipping.', 3);
1074: l_result_message := 'Item has material transaction within '|| p_num_of_days||
1075: ' days after shipping.';

Line 1083: IF l_next_step_flag = FND_API.G_FALSE THEN

1079: --
1080: --Begin Bugfix 7011607
1081: --checks for active parent configs
1082: --
1083: IF l_next_step_flag = FND_API.G_FALSE THEN
1084: l_stat_num :=110;
1085:
1086: WriteToLog( 'Checking active parent ..',3);
1087: CHECK_ACTIVE_PARENT_CONFIG( l_selected_inv_item_id,

Line 1095: IF x_return_status = FND_API.G_TRUE THEN

1091:
1092: --
1093: --if item has an active parent config
1094: --
1095: IF x_return_status = FND_API.G_TRUE THEN
1096:
1097: l_next_step_flag := FND_API.G_TRUE;
1098: WriteToLog ('ERROR: Item has an active parent config item.', 3);
1099: l_result_message := 'Item has an active parent config item.';

Line 1097: l_next_step_flag := FND_API.G_TRUE;

1093: --if item has an active parent config
1094: --
1095: IF x_return_status = FND_API.G_TRUE THEN
1096:
1097: l_next_step_flag := FND_API.G_TRUE;
1098: WriteToLog ('ERROR: Item has an active parent config item.', 3);
1099: l_result_message := 'Item has an active parent config item.';
1100: END IF;
1101: END IF;

Line 1109: IF l_next_step_flag = FND_API.G_FALSE THEN

1105: -- begin bugfix 3275577 : Apply Template.
1106: --
1107: -- Apply template
1108: --
1109: IF l_next_step_flag = FND_API.G_FALSE THEN
1110: l_stat_num :=115;
1111:
1112: WriteToLog( 'Applying Template ..',3);
1113: if (p_template_id is not null) then

Line 1126: if ( x_return_status <> FND_API.G_RET_STS_SUCCESS ) then

1122: , x_Error_tbl => x_err_tbl
1123: , p_Template_Id => p_template_id
1124: );
1125:
1126: if ( x_return_status <> FND_API.G_RET_STS_SUCCESS ) then
1127: WriteToLog ('INV_ITEM_GRP.Update_Item returned status '|| x_return_status ||'. Failed to apply template.');
1128: l_result_message := 'Failed to apply template.';
1129: l_next_step_flag := FND_API.G_TRUE;
1130:

Line 1129: l_next_step_flag := FND_API.G_TRUE;

1125:
1126: if ( x_return_status <> FND_API.G_RET_STS_SUCCESS ) then
1127: WriteToLog ('INV_ITEM_GRP.Update_Item returned status '|| x_return_status ||'. Failed to apply template.');
1128: l_result_message := 'Failed to apply template.';
1129: l_next_step_flag := FND_API.G_TRUE;
1130:
1131: end if;
1132: end if;
1133:

Line 1154: if l_next_step_flag = FND_API.G_TRUE then -- validation failed for the current record

1150: IF x_attr_control = 1 THEN
1151: --
1152: --Master Level
1153: --
1154: if l_next_step_flag = FND_API.G_TRUE then -- validation failed for the current record
1155:
1156: retcode := 1; -- warning
1157:
1158: --

Line 1163: failed_flag(l_selected_inv_item_id) := FND_API.G_TRUE;

1159: -- if the current record fails validation, set the failed_flag to TRUE for this item
1160: -- and put it in the un-deactivacted items..
1161: --
1162:
1163: failed_flag(l_selected_inv_item_id) := FND_API.G_TRUE;
1164: x_attr_flag := FND_API.G_TRUE;
1165:
1166:
1167: WriteToLog( 'Registering Result for un-deactivated items..',3);

Line 1164: x_attr_flag := FND_API.G_TRUE;

1160: -- and put it in the un-deactivacted items..
1161: --
1162:
1163: failed_flag(l_selected_inv_item_id) := FND_API.G_TRUE;
1164: x_attr_flag := FND_API.G_TRUE;
1165:
1166:
1167: WriteToLog( 'Registering Result for un-deactivated items..',3);
1168: REGISTER_RESULT( l_un_deactivated_items,

Line 1185: IF failed_flag(l_prev_item_id) = FND_API.G_FALSE THEN

1181: --
1182: --populate the result
1183: --
1184: l_stat_num :=120;
1185: IF failed_flag(l_prev_item_id) = FND_API.G_FALSE THEN
1186:
1187: WriteToLog( 'Registering Result for deactivated items..', 3);
1188: REGISTER_RESULT(l_deactivated_items,
1189: l_prev_item_id,

Line 1363: IF l_next_step_flag = FND_API.G_FALSE THEN

1359: --
1360: -- Organization Level
1361: --
1362:
1363: IF l_next_step_flag = FND_API.G_FALSE THEN
1364:
1365: WriteToLog( 'Registering Result for deactivated items..', 3);
1366: REGISTER_RESULT( l_deactivated_items,
1367: l_selected_inv_item_id,

Line 1396: if x_attr_flag = FND_API.G_FALSE and loop_counter > 1 then

1392: -- For orgn level control, this will not be needed since the above logic takes care.
1393: -- rkaza. bug 3927712. Do not resgister if there are no records.
1394: -- Adding loop_counter condition to ensure that.
1395: if x_attr_control = 1 then
1396: if x_attr_flag = FND_API.G_FALSE and loop_counter > 1 then
1397:
1398: WriteToLog( 'Registering Result for deactivated items..', 3);
1399: REGISTER_RESULT(l_deactivated_items,
1400: l_selected_inv_item_id,

Line 1494: x_return_status := FND_API.G_RET_STS_SUCCESS;

1490: --
1491: -- Inserting pending status and deleting matched items from bom_ato_configurations
1492: --
1493:
1494: x_return_status := FND_API.G_RET_STS_SUCCESS;
1495:
1496: IF (l_deactivated_items.count > 0) THEN --bugfix2308063
1497: WriteToLog('Calling DEACTIVATE_ITEMS to insert records into mtl_pending_status table. ', 5);
1498:

Line 1510: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then

1506: l_program_appl_id,
1507: l_program_id,
1508: x_return_status );
1509:
1510: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1511: WriteToLog ('Error: DEACTIVATE_ITEMS returned with status '|| x_return_status );
1512: retcode := 1;
1513: end if;
1514:

Line 1688: x_return_status := FND_API.G_RET_STS_SUCCESS; -- bugfix 3275577: Initialize the variable.

1684:
1685:
1686: BEGIN
1687: WriteToLog('Inside deactivate_items..' ,5);
1688: x_return_status := FND_API.G_RET_STS_SUCCESS; -- bugfix 3275577: Initialize the variable.
1689:
1690: l_index := p_table.FIRST;
1691:
1692: WriteToLog('Before loop in deactivate_items. l_index = '||l_index, 5 );--bugfix2308063

Line 1905: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR; -- bugfix 3275577

1901: WriteToLog('Exiting deactivate_items.', 5);
1902:
1903: EXCEPTION
1904: WHEN OTHERS THEN
1905: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR; -- bugfix 3275577
1906: WriteToLog('##exiting DEACTIVATE_ITEMS with error##');
1907: WriteToLog('error in DEACTIVATE_ITEMS : '||sqlerrm);
1908: RAISE;
1909: END DEACTIVATE_ITEMS;

Line 1916: Returns: true (FNDFND_API.G_TRUE), if already deactivated

1912: procedure CHECK_DELETE_STATUS
1913: this checks if the config item selected for deactivation has already been
1914: deactivated.
1915:
1916: Returns: true (FNDFND_API.G_TRUE), if already deactivated
1917: false (FND_API.G_FALSE), if not already deactivated
1918:
1919: arguments:
1920: input:

Line 1917: false (FND_API.G_FALSE), if not already deactivated

1913: this checks if the config item selected for deactivation has already been
1914: deactivated.
1915:
1916: Returns: true (FNDFND_API.G_TRUE), if already deactivated
1917: false (FND_API.G_FALSE), if not already deactivated
1918:
1919: arguments:
1920: input:
1921: p_inventory_item_id : config item being checked for deactivation

Line 1969: x_return_status := FND_API.G_TRUE;

1965: WriteToLog('l_status_code:'||l_status_code, 5 );
1966: WriteToLog('p_delete_status_code:'||p_delete_status_code, 5 );
1967:
1968: IF l_status_code = p_delete_status_code THEN
1969: x_return_status := FND_API.G_TRUE;
1970: ELSE
1971: x_return_status := FND_API.G_FALSE;
1972: END IF;
1973:

Line 1971: x_return_status := FND_API.G_FALSE;

1967:
1968: IF l_status_code = p_delete_status_code THEN
1969: x_return_status := FND_API.G_TRUE;
1970: ELSE
1971: x_return_status := FND_API.G_FALSE;
1972: END IF;
1973:
1974: WriteToLog('Exiting check_delete_status with return status '||x_return_status, 5 );
1975: EXCEPTION

Line 1990: x_return_status := FND_API.G_TRUE;

1986: WriteToLog('l_status_code1:'||l_status_code, 5 );
1987: WriteToLog('p_delete_status_code1:'||p_delete_status_code, 5 );
1988:
1989: IF l_status_code = p_delete_status_code THEN
1990: x_return_status := FND_API.G_TRUE;
1991: ELSE
1992: x_return_status := FND_API.G_FALSE;
1993: END IF;
1994:

Line 1992: x_return_status := FND_API.G_FALSE;

1988:
1989: IF l_status_code = p_delete_status_code THEN
1990: x_return_status := FND_API.G_TRUE;
1991: ELSE
1992: x_return_status := FND_API.G_FALSE;
1993: END IF;
1994:
1995: WriteToLog('Exiting check_delete_status with return status '||x_return_status, 5 );
1996: -- end bug 5527407

Line 2016: x_return_status := FND_API.G_FALSE; -- default

2012: IS
2013:
2014: BEGIN
2015:
2016: x_return_status := FND_API.G_FALSE; -- default
2017:
2018: -- Get the attribute control for item status code
2019: -- 1 = Master Level
2020: -- 2 = Organization Level

Line 2066: x_return_status := FND_API.G_TRUE;

2062: end;
2063:
2064: end if;
2065:
2066: x_return_status := FND_API.G_TRUE;
2067:
2068: END check_attribute_control;
2069:
2070:

Line 2135: If the commoned routing is active procedure returns FND_API.G_TRUE

2131: If routing is present it checks if the routing has been commoned to some other item.
2132: If the routing has been commoned to some other item, checks to see if the
2133: that item has been deactivated.If the item has not been deactivated, it means
2134: the commoned routing is active.
2135: If the commoned routing is active procedure returns FND_API.G_TRUE
2136: else it returns FND_API.G_FALSE
2137:
2138: arguments
2139: p_inventory_item_id : config_item_id

Line 2136: else it returns FND_API.G_FALSE

2132: If the routing has been commoned to some other item, checks to see if the
2133: that item has been deactivated.If the item has not been deactivated, it means
2134: the commoned routing is active.
2135: If the commoned routing is active procedure returns FND_API.G_TRUE
2136: else it returns FND_API.G_FALSE
2137:
2138: arguments
2139: p_inventory_item_id : config_item_id
2140: p_org_id : given org_id

Line 2165: x_return_status := FND_API.G_FALSE;

2161: and routing_sequence_id <> l_rout_seq_id;
2162:
2163: BEGIN
2164: WriteToLog('Entering check_common_routing..', 5);
2165: x_return_status := FND_API.G_FALSE;
2166:
2167: BEGIN
2168: SELECT routing_sequence_id INTO l_rout_seq_id
2169: FROM bom_operational_routings

Line 2198: IF l_return_status = FND_API.G_FALSE THEN

2194:
2195: WriteToLog('EXIT call to check_delete_status from check_common_routing', 5 );
2196: -- l_return_status := l_return_status;
2197:
2198: IF l_return_status = FND_API.G_FALSE THEN
2199: WriteToLog('CHECK_COMMON_ROUTING: Assembly Item Id '||l_com_asmbly_itm_id ||' is still in active status.',3);
2200: x_return_status := FND_API.G_TRUE;
2201: CLOSE common_rout;
2202: WriteToLog('Exiting check_common_routing', 5 );

Line 2200: x_return_status := FND_API.G_TRUE;

2196: -- l_return_status := l_return_status;
2197:
2198: IF l_return_status = FND_API.G_FALSE THEN
2199: WriteToLog('CHECK_COMMON_ROUTING: Assembly Item Id '||l_com_asmbly_itm_id ||' is still in active status.',3);
2200: x_return_status := FND_API.G_TRUE;
2201: CLOSE common_rout;
2202: WriteToLog('Exiting check_common_routing', 5 );
2203: RETURN;
2204: END IF;

Line 2229: If the commoned BOM is active procedure returns FND_API.G_TRUE

2225: If the BOM has been commoned to some other item, checks to see if the
2226: that item has been deactivated.If the item has not been deactivated, it means
2227: the commoned BOM is active.
2228:
2229: If the commoned BOM is active procedure returns FND_API.G_TRUE
2230: else it returns FND_API.G_FALSE
2231:
2232: arguments
2233: p_inventory_item_id : config_item_id

Line 2230: else it returns FND_API.G_FALSE

2226: that item has been deactivated.If the item has not been deactivated, it means
2227: the commoned BOM is active.
2228:
2229: If the commoned BOM is active procedure returns FND_API.G_TRUE
2230: else it returns FND_API.G_FALSE
2231:
2232: arguments
2233: p_inventory_item_id : config_item_id
2234: p_org_id : given org_id

Line 2259: x_return_status := FND_API.G_FALSE;

2255: AND bill_sequence_id <> l_bill_sequence_id;
2256:
2257: BEGIN
2258: WriteToLog('Entering check_common_bom ', 5 );
2259: x_return_status := FND_API.G_FALSE;
2260:
2261: BEGIN
2262: SELECT bill_sequence_id INTO l_bill_sequence_id
2263: FROM bom_bill_of_materials

Line 2290: x_return_status := FND_API.G_TRUE;

2286: WHERE organization_id = l_com_org_id;
2287: EXCEPTION
2288: WHEN no_data_found THEN
2289: WriteToLog('Org where BOM is commoned doesnot have bom_del_status', 3);
2290: x_return_status := FND_API.G_TRUE;
2291: CLOSE common_bom;
2292: WriteToLog('Exiting check_common_bom.', 5 );
2293: RETURN;
2294: END;

Line 2315: IF l_return_status = FND_API.G_FALSE THEN

2311: WriteToLog('finished call to check_delete_status from check_common_bom', 5 );
2312: END IF;
2313:
2314: -- l_return_status := l_return_status;
2315: IF l_return_status = FND_API.G_FALSE THEN
2316:
2317: WriteToLog('CHECK_COMMON_BOM: Assembly Item Id '||l_com_asmbly_itm_id ||' is still in active status.', 3);
2318: x_return_status := FND_API.G_TRUE;
2319: CLOSE common_bom;

Line 2318: x_return_status := FND_API.G_TRUE;

2314: -- l_return_status := l_return_status;
2315: IF l_return_status = FND_API.G_FALSE THEN
2316:
2317: WriteToLog('CHECK_COMMON_BOM: Assembly Item Id '||l_com_asmbly_itm_id ||' is still in active status.', 3);
2318: x_return_status := FND_API.G_TRUE;
2319: CLOSE common_bom;
2320: WriteToLog('Exiting check_common_bom.', 5 );
2321: RETURN;
2322:

Line 2344: If onhand qty is found it returns FND_API.G_TRUE

2340: bugfix 2214674
2341:
2342: procedure CHECK_ONHAND
2343: This procedure checks if there is any onhand qty available
2344: If onhand qty is found it returns FND_API.G_TRUE
2345:
2346: arguments
2347: p_inventory_item_id :config item id
2348: p_org_id : given org id

Line 2349: x_return_status : FND_API.G_TRUE

2345:
2346: arguments
2347: p_inventory_item_id :config item id
2348: p_org_id : given org id
2349: x_return_status : FND_API.G_TRUE
2350:
2351: **********************************************************************************/
2352: PROCEDURE CHECK_ONHAND(
2353: p_inventory_item_id IN NUMBER,

Line 2361: x_return_status := FND_API.G_FALSE;

2357: IS
2358: xdummy number;
2359: BEGIN
2360: WriteToLog ('In check_onhand..',5);
2361: x_return_status := FND_API.G_FALSE;
2362:
2363: select transaction_quantity into xdummy
2364: from mtl_onhand_quantities
2365: where inventory_item_id = p_inventory_item_id

Line 2376: x_return_status := FND_API.G_TRUE;

2372: when no_data_found then
2373: null; -- no onhand. ok to proceed.
2374:
2375: when too_many_rows then
2376: x_return_status := FND_API.G_TRUE;
2377: WriteToLog ('Onhand Quantity of '||xdummy ||' exists for this item in this organization.', 3);
2378:
2379: when others then
2380: x_return_status := FND_API.G_TRUE;

Line 2380: x_return_status := FND_API.G_TRUE;

2376: x_return_status := FND_API.G_TRUE;
2377: WriteToLog ('Onhand Quantity of '||xdummy ||' exists for this item in this organization.', 3);
2378:
2379: when others then
2380: x_return_status := FND_API.G_TRUE;
2381: WriteToLog ('Others exception in check_onhand :'||sqlerrm);
2382:
2383: END;
2384:

Line 2394: If open supply is found it returns FND_API.G_TRUE

2390: a) reservations
2391: b) discrete jobs
2392: c) flow jobs
2393: d) repetitive jobs
2394: If open supply is found it returns FND_API.G_TRUE
2395:
2396: arguments
2397: p_inventory_item_id :config item id
2398: p_org_id : given org id

Line 2399: x_return_status : FND_API.G_TRUE

2395:
2396: arguments
2397: p_inventory_item_id :config item id
2398: p_org_id : given org id
2399: x_return_status : FND_API.G_TRUE
2400:
2401: **********************************************************************************/
2402: PROCEDURE CHECK_OPEN_SUPPLY(
2403: p_inventory_item_id IN NUMBER,

Line 2450: x_return_status := FND_API.G_FALSE;

2446:
2447: BEGIN
2448: WriteToLog('Entering check_open_supply..', 5 );
2449:
2450: x_return_status := FND_API.G_FALSE;
2451: --if not able to satisfy any of below criteria then open supply does not exist
2452:
2453: -- to check for open reservations
2454: OPEN c_reserv;

Line 2461: x_return_status := FND_API.G_TRUE;

2457: FETCH c_reserv INTO l_reserved_quantity;
2458:
2459: EXIT WHEN c_reserv%NOTFOUND;
2460: IF l_reserved_quantity > 0 THEN
2461: x_return_status := FND_API.G_TRUE;
2462: CLOSE c_reserv;
2463: WriteToLog('Exiting check_open_supply : reservation present.' , 3);
2464: RETURN;
2465: END IF;

Line 2481: x_return_status := FND_API.G_TRUE;

2477: WriteToLog('in discrete job loop', 5);
2478:
2479: EXIT WHEN c_dis_job%NOTFOUND;
2480: IF l_status_type <> 12 THEN --checking if work order is open (12 implies closed)
2481: x_return_status := FND_API.G_TRUE;
2482: CLOSE c_dis_job;
2483: WriteToLog('Exiting check_open_supply :discrete job present. ' , 3);
2484: RETURN;
2485: END IF;

Line 2498: x_return_status := FND_API.G_TRUE;

2494: FETCH c_flow_schedules INTO l_status;
2495: EXIT WHEN c_flow_schedules%NOTFOUND;
2496:
2497: IF l_status <> 2 THEN --checking if flow is open (2 implies closed)
2498: x_return_status := FND_API.G_TRUE;
2499: CLOSE c_flow_schedules;
2500: WriteToLog('Exiting check_open_supply :flow schedule present. ', 3 );
2501: RETURN;
2502: END IF;

Line 2512: x_return_status := FND_API.G_TRUE;

2508: -- to check if repetitive items exist
2509: OPEN c_repetitive_items;
2510:
2511: IF c_repetitive_items%FOUND THEN
2512: x_return_status := FND_API.G_TRUE;
2513: CLOSE c_repetitive_items;
2514: WriteToLog('Exiting check_open_supply :repetitive schedule present.' , 3);
2515: RETURN;
2516: END IF;

Line 2533: RETURNS FND_API.G_TRUE if there is any open supply present

2529:
2530: /****************************************************************************************
2531: procedure CHECK_OPEN_DEMAND
2532: This checks if there is any open demand (open sales order) for a config item.
2533: RETURNS FND_API.G_TRUE if there is any open supply present
2534:
2535: arguments
2536: p_inventory_item_id : config item id
2537: p_org_id : given org id

Line 2611: x_return_status := FND_API.G_FALSE;

2607:
2608:
2609: BEGIN
2610: WriteToLog('Entering check_open_demand..', 5 );
2611: x_return_status := FND_API.G_FALSE;
2612:
2613: --check if line is open for config item in bom_cto_src_orgs
2614: OPEN c_bcso;
2615:

Line 2618: x_return_status := FND_API.G_TRUE;

2614: OPEN c_bcso;
2615:
2616: FETCH c_bcso INTO l_open_flag;
2617: IF c_bcso%FOUND THEN
2618: x_return_status := FND_API.G_TRUE;
2619: CLOSE c_bcso ;
2620: WriteToLog('Exiting check_open_demand' , 5 );
2621: RETURN;
2622: END IF;

Line 2631: x_return_status := FND_API.G_TRUE;

2627: OPEN c_ato_item;
2628:
2629: FETCH c_ato_item INTO l_open_flag;
2630: IF c_ato_item%FOUND THEN
2631: x_return_status := FND_API.G_TRUE;
2632: CLOSE c_ato_item;
2633: WriteToLog('Exiting check_open_demand.' ,5);
2634: RETURN;
2635: END IF;

Line 2680: x_return_status := FND_API.G_TRUE;

2676: WriteToLog('Entering check_material_transaction.. ', 5 );
2677:
2678: FETCH c_material_transaction INTO l_transaction_date;
2679: IF c_material_transaction%FOUND THEN
2680: x_return_status := FND_API.G_TRUE;
2681: CLOSE c_material_transaction;
2682: WriteToLog('Exiting check_material_transaction.', 5 );
2683: RETURN;
2684: END IF;

Line 2688: x_return_status := FND_API.G_FALSE;

2684: END IF;
2685:
2686: CLOSE c_material_transaction;
2687:
2688: x_return_status := FND_API.G_FALSE;
2689: WriteToLog('Exiting check_material_transaction.', 5 );
2690:
2691: EXCEPTION
2692: WHEN others THEN

Line 2704: RETURNS FND_API.G_TRUE if any active parent config is present

2700:
2701: procedure CHECK_ACTIVE_PARENT_CONFIG
2702: This procedure checks if the given config item has any parent config items which
2703: has not been deactivated.
2704: RETURNS FND_API.G_TRUE if any active parent config is present
2705:
2706: arguments
2707: p_inventory_item_id : config item id
2708: p_org_id : given org id

Line 2738: x_return_status := FND_API.G_FALSE;

2734:
2735: BEGIN
2736: WriteToLog('Entering CHECK_ACTIVE_PARENT_CONFIG for item '||p_inventory_item_id ||' in org '||p_org_id, 5 );
2737:
2738: x_return_status := FND_API.G_FALSE;
2739:
2740: SELECT bom_delete_status_code
2741: INTO l_del_status
2742: FROM bom_parameters

Line 2757: if l_return_status = FND_API.G_FALSE then

2753: p_org_id,
2754: l_del_status,
2755: l_return_status );
2756:
2757: if l_return_status = FND_API.G_FALSE then
2758: WriteToLog('Parent: '||assembly_rec.assembly_item_id||' is active. Cannot deactivate child '||p_inventory_item_id, 5 );
2759: x_return_status := FND_API.G_TRUE;
2760: exit;
2761: end if;

Line 2759: x_return_status := FND_API.G_TRUE;

2755: l_return_status );
2756:
2757: if l_return_status = FND_API.G_FALSE then
2758: WriteToLog('Parent: '||assembly_rec.assembly_item_id||' is active. Cannot deactivate child '||p_inventory_item_id, 5 );
2759: x_return_status := FND_API.G_TRUE;
2760: exit;
2761: end if;
2762:
2763: end loop;

Line 2800: x_return_status := FND_API.G_FALSE;--default return value ,bom_delete_status_code is not set

2796:
2797: l_del_status bom_parameters.bom_delete_status_code%type;
2798:
2799: BEGIN
2800: x_return_status := FND_API.G_FALSE;--default return value ,bom_delete_status_code is not set
2801:
2802: WriteToLog('Entering get_bom_delete_status_code for org '||p_org_id, 5);
2803:
2804: BEGIN

Line 2826: x_return_status := FND_API.G_TRUE;

2822: RETURN;
2823: END IF;
2824:
2825: p_delete_status_code := l_del_status;
2826: x_return_status := FND_API.G_TRUE;
2827:
2828: WriteToLog('Exiting get_bom_delete_status_code.', 5);
2829:
2830: EXCEPTION