2157: * end loop;
2158: * end if;
2159: *
2160: * -- Get flexfield
2161: * fnd_dflex.get_flexfield('INV', l_attributes_name, v_flexfield, v_flexinfo);
2162: *
2163: * -- Get Contexts
2164: * fnd_dflex.get_contexts(v_flexfield, v_contexts);
2165: * -- Get Context Value.
2160: * -- Get flexfield
2161: * fnd_dflex.get_flexfield('INV', l_attributes_name, v_flexfield, v_flexinfo);
2162: *
2163: * -- Get Contexts
2164: * fnd_dflex.get_contexts(v_flexfield, v_contexts);
2165: * -- Get Context Value.
2166: * if g_lot_attributes_tbl(9).column_value is null then
2167: * inv_lot_sel_attr.get_context_code(l_context_value,
2168: * p_organization_id,p_inventory_item_id,l_attributes_name);
2181: * IF(v_contexts.is_enabled(i) AND ((UPPER(v_contexts.context_code(i)) =
2182: * UPPER(l_context_value)) OR
2183: * v_contexts.is_global(i))) THEN
2184: * -- Get segments
2185: * fnd_dflex.get_segments(fnd_dflex.make_context(v_flexfield,
2186: * v_contexts.context_code(i)), v_segments, TRUE);
2187: * <
2188: * FOR j IN 1..v_segments.nsegments LOOP
2189: * IF v_segments.is_enabled(j) THEN
2234: , p_transaction_type_id IN NUMBER
2235: )
2236: IS
2237: l_attributes_name VARCHAR2 (50) := 'Lot Attributes';
2238: v_flexfield fnd_dflex.dflex_r;
2239: v_flexinfo fnd_dflex.dflex_dr;
2240: v_contexts fnd_dflex.contexts_dr;
2241: v_segments fnd_dflex.segments_dr;
2242: l_attributes_default_count NUMBER;
2235: )
2236: IS
2237: l_attributes_name VARCHAR2 (50) := 'Lot Attributes';
2238: v_flexfield fnd_dflex.dflex_r;
2239: v_flexinfo fnd_dflex.dflex_dr;
2240: v_contexts fnd_dflex.contexts_dr;
2241: v_segments fnd_dflex.segments_dr;
2242: l_attributes_default_count NUMBER;
2243: l_enabled_attributes NUMBER;
2236: IS
2237: l_attributes_name VARCHAR2 (50) := 'Lot Attributes';
2238: v_flexfield fnd_dflex.dflex_r;
2239: v_flexinfo fnd_dflex.dflex_dr;
2240: v_contexts fnd_dflex.contexts_dr;
2241: v_segments fnd_dflex.segments_dr;
2242: l_attributes_default_count NUMBER;
2243: l_enabled_attributes NUMBER;
2244: l_attributes_default inv_lot_sel_attr.lot_sel_attributes_tbl_type;
2237: l_attributes_name VARCHAR2 (50) := 'Lot Attributes';
2238: v_flexfield fnd_dflex.dflex_r;
2239: v_flexinfo fnd_dflex.dflex_dr;
2240: v_contexts fnd_dflex.contexts_dr;
2241: v_segments fnd_dflex.segments_dr;
2242: l_attributes_default_count NUMBER;
2243: l_enabled_attributes NUMBER;
2244: l_attributes_default inv_lot_sel_attr.lot_sel_attributes_tbl_type;
2245: v_context_value mtl_flex_context.descriptive_flex_context_code%TYPE;
2553: END IF;
2554:
2555: IF (l_debug = 1)
2556: THEN
2557: print_debug ('calling fnd_dflex.get_flexfield', 'Validate_Attributes');
2558: END IF;
2559:
2560: -- Get flexfield
2561: fnd_dflex.get_flexfield ('INV', l_attributes_name, v_flexfield
2557: print_debug ('calling fnd_dflex.get_flexfield', 'Validate_Attributes');
2558: END IF;
2559:
2560: -- Get flexfield
2561: fnd_dflex.get_flexfield ('INV', l_attributes_name, v_flexfield
2562: , v_flexinfo);
2563:
2564: IF (l_debug = 1)
2565: THEN
2562: , v_flexinfo);
2563:
2564: IF (l_debug = 1)
2565: THEN
2566: print_debug ('calling fnd_dflex.get_context', 'Validate_Attributes');
2567: END IF;
2568:
2569: -- Get Contexts
2570: l_context_value := NULL;
2567: END IF;
2568:
2569: -- Get Contexts
2570: l_context_value := NULL;
2571: fnd_dflex.get_contexts (v_flexfield, v_contexts);
2572:
2573: --will get the number of contexts, their name etc
2574:
2575: --till now we have populated the attributes in the g_lot_attributes table...now we
2680: --get the segments that have been enabled for this context
2681: -- Get segments
2682: IF (l_debug = 1)
2683: THEN
2684: print_debug ('calling fnd_dflex.get_segments'
2685: , 'Validate_Attributes'
2686: );
2687: END IF;
2688: fnd_dflex.get_segments
2684: print_debug ('calling fnd_dflex.get_segments'
2685: , 'Validate_Attributes'
2686: );
2687: END IF;
2688: fnd_dflex.get_segments
2689: (fnd_dflex.make_context (v_flexfield
2690: , v_contexts.context_code (i)
2691: )
2692: , v_segments
2685: , 'Validate_Attributes'
2686: );
2687: END IF;
2688: fnd_dflex.get_segments
2689: (fnd_dflex.make_context (v_flexfield
2690: , v_contexts.context_code (i)
2691: )
2692: , v_segments
2693: , TRUE
2975: , p_result_ser_attr_tbl IN inv_lot_sel_attr.lot_sel_attributes_tbl_type
2976: )
2977: IS
2978: l_attributes_name VARCHAR2 (50) := 'Serial Attributes';
2979: v_flexfield fnd_dflex.dflex_r;
2980: v_flexinfo fnd_dflex.dflex_dr;
2981: v_contexts fnd_dflex.contexts_dr;
2982: v_segments fnd_dflex.segments_dr;
2983: l_attributes_default_count NUMBER;
2976: )
2977: IS
2978: l_attributes_name VARCHAR2 (50) := 'Serial Attributes';
2979: v_flexfield fnd_dflex.dflex_r;
2980: v_flexinfo fnd_dflex.dflex_dr;
2981: v_contexts fnd_dflex.contexts_dr;
2982: v_segments fnd_dflex.segments_dr;
2983: l_attributes_default_count NUMBER;
2984: l_enabled_attributes NUMBER;
2977: IS
2978: l_attributes_name VARCHAR2 (50) := 'Serial Attributes';
2979: v_flexfield fnd_dflex.dflex_r;
2980: v_flexinfo fnd_dflex.dflex_dr;
2981: v_contexts fnd_dflex.contexts_dr;
2982: v_segments fnd_dflex.segments_dr;
2983: l_attributes_default_count NUMBER;
2984: l_enabled_attributes NUMBER;
2985: l_attributes_default inv_lot_sel_attr.lot_sel_attributes_tbl_type;
2978: l_attributes_name VARCHAR2 (50) := 'Serial Attributes';
2979: v_flexfield fnd_dflex.dflex_r;
2980: v_flexinfo fnd_dflex.dflex_dr;
2981: v_contexts fnd_dflex.contexts_dr;
2982: v_segments fnd_dflex.segments_dr;
2983: l_attributes_default_count NUMBER;
2984: l_enabled_attributes NUMBER;
2985: l_attributes_default inv_lot_sel_attr.lot_sel_attributes_tbl_type;
2986: v_context_value mtl_flex_context.descriptive_flex_context_code%TYPE;
3160: END IF;
3161:
3162: IF (l_debug = 1)
3163: THEN
3164: print_debug ('calling fnd_dflex.get_flexfield'
3165: , 'validate_serial_attributes'
3166: );
3167: END IF;
3168:
3166: );
3167: END IF;
3168:
3169: -- Get flexfield
3170: fnd_dflex.get_flexfield ('INV', l_attributes_name, v_flexfield
3171: , v_flexinfo);
3172:
3173: IF (l_debug = 1)
3174: THEN
3171: , v_flexinfo);
3172:
3173: IF (l_debug = 1)
3174: THEN
3175: print_debug ('calling fnd_dflex.get_context'
3176: , 'validate_serial_attributes'
3177: );
3178: END IF;
3179:
3178: END IF;
3179:
3180: -- Get Contexts
3181: l_context_value := NULL;
3182: fnd_dflex.get_contexts (v_flexfield, v_contexts);
3183:
3184: --will get the number of contexts, their name etc
3185:
3186: --till now we have populated the attributes in the g_lot_attributes table...now we
3299: --get the segments that have been enabled for this context
3300: -- Get segments
3301: IF (l_debug = 1)
3302: THEN
3303: print_debug ('calling fnd_dflex.get_segments'
3304: , 'validate_serial_attributes'
3305: );
3306: END IF;
3307:
3320: value_set value_set_a,
3321: default_type default_type_a,
3322: default_value default_value_a)
3323: */
3324: fnd_dflex.get_segments
3325: (fnd_dflex.make_context (v_flexfield
3326: , v_contexts.context_code (i)
3327: )
3328: , v_segments
3321: default_type default_type_a,
3322: default_value default_value_a)
3323: */
3324: fnd_dflex.get_segments
3325: (fnd_dflex.make_context (v_flexfield
3326: , v_contexts.context_code (i)
3327: )
3328: , v_segments
3329: , TRUE