27: v_st_position number(3);
28: v_end_position number(3);
29: v_w_position number(3);
30:
31: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
32: Begin
33: select INSTR(value,',',1,2),INSTR(value,',',1,3)
34: into v_st_position,v_end_position
35: from v$parameter
54: Internally it uses INV_LOG_UTIL.TRACE for writting
55: log messages to the log file.
56: */
57: PROCEDURE put_line(msg VARCHAR2) IS
58: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
59: BEGIN
60: IF (l_debug = 1) THEN
61: INV_LOG_UTIL.TRACE(msg,g_pkg_name);
62: END IF;
92: X_CREATE_CARD_FLAG IN NUMBER DEFAULT 1,
93: X_PLAN_CARD_FLAG IN NUMBER DEFAULT 2) IS
94: v_Retcode Number;
95: CONC_STATUS BOOLEAN;
96: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
97: L_CREATE_CARD_FLAG Number ;
98: L_PLAN_CARD_FLAG Number ;
99: BEGIN
100:
279: v_success Number := 1;
280: v_report_id Number := NULL;
281: v_org_code VARCHAR2(3);
282:
283: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
284: Begin
285: For KBCC in MKPSC LOOP
286: REC := TRUE;
287: card_check_and_create( KBCC.PULL_SEQUENCE_ID,
370: Rec BOOLEAN := FALSE;
371: v_success Number := 1;
372: v_report_id Number := NULL;
373:
374: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
375: Begin
376: v_report_id := x_report_id;
377: For KBCC in MKPSC
378: LOOP
469: v_org_code VARCHAR2(3);
470: v_item_name mtl_system_items_kfv.concatenated_segments%TYPE;
471: v_loc_name mtl_item_locations_kfv.concatenated_segments%TYPE;
472:
473: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
474: Begin
475:
476: if ( (X_ITEM_LO IS NULL) AND (X_ITEM_HI IS NULL) ) then
477:
479: query_range_loc( X_org_id, X_locator_lo, X_locator_hi, p_where_loc);
480: if ( p_where_loc IS NOT NULL ) then
481: d_sql_p := dbms_sql.open_cursor;
482: --Changes for Ekanban Bug 11829018
483: IF NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
484: d_sql_stmt :=
485: 'select mkps.pull_sequence_id ,mkps.organization_id ,mkps.inventory_item_id ,' ||
486: ' mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,' ||
487: ' mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,' ||
669:
670: if (( p_where_itm IS NOT NULL ) AND ( p_where_loc IS NOT NULL)) then
671: d_sql_p := dbms_sql.open_cursor;
672: --Changes for Ekanban Bug 11829018
673: IF NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
674: d_sql_stmt := 'select mkps.pull_sequence_id ,mkps.organization_id ,mkps.inventory_item_id ,' ||
675: ' mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,' ||
676: ' mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,' ||
677: ' mkps.source_locator_id, mkps.wip_line_id, mkps.kanban_size, mkps.number_of_cards, ' ||
1000: v_org_code VARCHAR2(3);
1001: v_item_name mtl_system_items_kfv.concatenated_segments%TYPE;
1002: v_loc_name mtl_item_locations_kfv.concatenated_segments%TYPE;
1003:
1004: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1005: Begin
1006: if ( (X_ITEM_LO IS NULL) AND (X_ITEM_HI IS NULL) ) then
1007: Begin
1008: --Changes for Ekanban Bug 11829018
1005: Begin
1006: if ( (X_ITEM_LO IS NULL) AND (X_ITEM_HI IS NULL) ) then
1007: Begin
1008: --Changes for Ekanban Bug 11829018
1009: PUT_LINE('FLM_EKB_OPS_FLAG '||nvl(fnd_profile.VALUE('FLM_EKB_OPS_FLAG'),0));
1010: IF NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
1011:
1012: For KBCC in MKPSC_ekanban LOOP
1013: REC := TRUE;
1006: if ( (X_ITEM_LO IS NULL) AND (X_ITEM_HI IS NULL) ) then
1007: Begin
1008: --Changes for Ekanban Bug 11829018
1009: PUT_LINE('FLM_EKB_OPS_FLAG '||nvl(fnd_profile.VALUE('FLM_EKB_OPS_FLAG'),0));
1010: IF NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
1011:
1012: For KBCC in MKPSC_ekanban LOOP
1013: REC := TRUE;
1014: card_check_and_create( KBCC.PULL_SEQUENCE_ID, KBCC.ORGANIZATION_ID,
1068: query_range_itm( X_item_lo, X_item_hi, p_where);
1069: if ( p_where IS NOT NULL ) then
1070: d_sql_p := dbms_sql.open_cursor;
1071: --Changes for Ekanban Bug 11829018
1072: IF NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
1073: d_sql_stmt := 'select mkps.pull_sequence_id ,mkps.organization_id ,mkps.inventory_item_id ,' ||
1074: ' mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,' ||
1075: ' mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,' ||
1076: ' mkps.source_locator_id, mkps.wip_line_id, mkps.kanban_size, mkps.number_of_cards, ' ||
1305: l_future_card_size NUMBER;
1306: l_planning_effectivity DATE;
1307: end_of_code EXCEPTION;
1308: X_ERR_MSG VARCHAR2(1000);
1309: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1310:
1311: type t_kanban_card is table of number index by binary_integer;
1312: v_kanban_card t_kanban_card;
1313: l_temp Number;
1339:
1340: --Changes made for Generate Kanban Cards by javakat for eKanban
1341: put_line ('X_CREATE_CARD_FLAG -' || x_create_card_flag);
1342: put_line ('X_PLAN_CARD_FLAG -' || X_PLAN_CARD_FLAG);
1343: PUT_LINE('FLM_EKB_OPS_FLAG - '||NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0));
1344:
1345: If NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
1346: PUT_LINE('X_pull_sequence_id- '||X_pull_sequence_id);
1347: -- Step1: Logic is Find the planning_effectivity for pull_sequence_id from MTL_KANBAN_PULL_SEQUENCES
1341: put_line ('X_CREATE_CARD_FLAG -' || x_create_card_flag);
1342: put_line ('X_PLAN_CARD_FLAG -' || X_PLAN_CARD_FLAG);
1343: PUT_LINE('FLM_EKB_OPS_FLAG - '||NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0));
1344:
1345: If NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
1346: PUT_LINE('X_pull_sequence_id- '||X_pull_sequence_id);
1347: -- Step1: Logic is Find the planning_effectivity for pull_sequence_id from MTL_KANBAN_PULL_SEQUENCES
1348: SELECT number_of_cards
1349: , kanban_size
1581:
1582:
1583: --CUR2 CUR1%ROWTYPE;
1584:
1585: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1586: BEGIN
1587:
1588: Select id_flex_num into v_flex_num
1589: from fnd_id_flex_structures
1601:
1602: -- bug 4662395 set the profile mfg_organization_id so
1603: -- the call to MTL_PROJECT_V will return data.
1604:
1605: FND_PROFILE.put('MFG_ORGANIZATION_ID',X_org_id);
1606:
1607: -- Building the where clause
1608:
1609: for CUR2 in CUR1(v_flex_num) Loop
1707: order by a.segment_num;
1708:
1709: -- CUR2 CUR1%ROWTYPE;
1710:
1711: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1712: BEGIN
1713:
1714: Select id_flex_num into v_flex_num
1715: from fnd_id_flex_structures
1773: v_req_id NUMBER;
1774: v_sort_by NUMBER := 3;
1775: v_call_from NUMBER := 2;
1776:
1777: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1778:
1779: --declare below variables for ekanban by javakat
1780: v_conc_prog VARCHAR2(15);
1781: l_add_layout BOOLEAN;
1782: l_language VARCHAR2 (10);
1783: l_territory VARCHAR2 (10);
1784: BEGIN
1785: --Changes made for Generate Kanban Cards by javakat
1786: If NVL(FND_PROFILE.VALUE('FLM_EKB_OPS_FLAG'),0)=INVKBCGN.flm_ekb_yes THEN
1787: v_conc_prog:='INVKBCPR_XML';
1788:
1789: BEGIN
1790: SELECT LOWER(FL.iso_language),ISO_TERRITORY
1842:
1843: Procedure Print_Error IS
1844: l_count number;
1845: l_msg varchar2(2000);
1846: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1847: begin
1848: Fnd_msg_pub.Count_And_get(p_count => l_count,
1849: p_data => l_msg,
1850: p_encoded => 'F');
1902: a.display_flag = 'Y'
1903: order by a.segment_num;
1904:
1905:
1906: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1907: BEGIN
1908:
1909: Select id_flex_num into v_flex_num
1910: from fnd_id_flex_structures
1916:
1917: -- bug 4662395 set the profile mfg_organization_id so
1918: -- the call to MTL_PROJECT_V will return data.
1919:
1920: FND_PROFILE.put('MFG_ORGANIZATION_ID',X_org_id);
1921:
1922: v_delim := fnd_flex_ext.get_delimiter('INV',v_flex_code, v_flex_num);
1923:
1924: str1 := '||'''||v_delim||'''||';
2028: l_item_name varchar2(200);
2029: l_loc_name varchar2(200);
2030: l_subinventory varchar2(10);
2031:
2032: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
2033: Begin
2034: Select concatenated_segments,organization_code,
2035: subinventory_name,locator_id,pull.organization_id
2036: into x_item_name,x_org_code,x_subinventory,l_locator_id,
2069: p_Pull_sequence_id IN NUMBER,
2070: p_print_cards IN NUMBER
2071: )
2072: IS
2073: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
2074: l_error_msg VARCHAR2(2000);
2075: l_ret_code NUMBER;
2076:
2077: l_size Number;