227: BEGIN
228: -- For each interest type
229: FOR scr in C_Get_Int_Type
230: LOOP
231: FND_MESSAGE.Set_Name('AS', 'API_PROCESSING_INTEREST_TYPE');
232: FND_MESSAGE.Set_Token('NAME', scr.interest_type);
233: FND_FILE.PUT_LINE(FND_FILE.LOG,'->' || FND_MESSAGE.Get());
234:
235: -- Create Mtl categories and associate to inventory items
228: -- For each interest type
229: FOR scr in C_Get_Int_Type
230: LOOP
231: FND_MESSAGE.Set_Name('AS', 'API_PROCESSING_INTEREST_TYPE');
232: FND_MESSAGE.Set_Token('NAME', scr.interest_type);
233: FND_FILE.PUT_LINE(FND_FILE.LOG,'->' || FND_MESSAGE.Get());
234:
235: -- Create Mtl categories and associate to inventory items
236: Process_Categories(p_int_typ_cod_id => scr.interest_type_id,
229: FOR scr in C_Get_Int_Type
230: LOOP
231: FND_MESSAGE.Set_Name('AS', 'API_PROCESSING_INTEREST_TYPE');
232: FND_MESSAGE.Set_Token('NAME', scr.interest_type);
233: FND_FILE.PUT_LINE(FND_FILE.LOG,'->' || FND_MESSAGE.Get());
234:
235: -- Create Mtl categories and associate to inventory items
236: Process_Categories(p_int_typ_cod_id => scr.interest_type_id,
237: p_structure_id => l_structure_id,
354:
355: COMMIT;
356:
357: if (l_warning = 'Y') then
358: l_status := fnd_concurrent.set_completion_status('WARNING',FND_MESSAGE.Get_String('AS','API_REQUEST_WARNING_STATUS'));
359: end if;
360: EXCEPTION
361: WHEN OTHERS THEN
362: Rollback;
432: EXCEPTION
433: WHEN OTHERS THEN
434: if (SQLCODE = '-6502') then
435: -- Warning! Unable to create category for interest type/code as category name is too long.
436: FND_MESSAGE.Set_Name('AS', 'API_WARNING_CREATE_CATEGORY');
437: FND_MESSAGE.Set_Token('NAME', p_category_name);
438: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
439:
440: x_warning_flag := 'Y';
433: WHEN OTHERS THEN
434: if (SQLCODE = '-6502') then
435: -- Warning! Unable to create category for interest type/code as category name is too long.
436: FND_MESSAGE.Set_Name('AS', 'API_WARNING_CREATE_CATEGORY');
437: FND_MESSAGE.Set_Token('NAME', p_category_name);
438: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
439:
440: x_warning_flag := 'Y';
441: return;
434: if (SQLCODE = '-6502') then
435: -- Warning! Unable to create category for interest type/code as category name is too long.
436: FND_MESSAGE.Set_Name('AS', 'API_WARNING_CREATE_CATEGORY');
437: FND_MESSAGE.Set_Token('NAME', p_category_name);
438: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
439:
440: x_warning_flag := 'Y';
441: return;
442: end if;
465: EXCEPTION
466: WHEN OTHERS THEN
467: if (SQLCODE = '-6502') then
468: -- Warning! Unable to create legacy category for interest type/code as legacy category name is too long.
469: FND_MESSAGE.Set_Name('AS', 'API_WARNING_CREATE_LEGACY');
470: FND_MESSAGE.Set_Token('NAME', p_category_name);
471: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
472:
473: x_warning_flag := 'Y';
466: WHEN OTHERS THEN
467: if (SQLCODE = '-6502') then
468: -- Warning! Unable to create legacy category for interest type/code as legacy category name is too long.
469: FND_MESSAGE.Set_Name('AS', 'API_WARNING_CREATE_LEGACY');
470: FND_MESSAGE.Set_Token('NAME', p_category_name);
471: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
472:
473: x_warning_flag := 'Y';
474: return;
467: if (SQLCODE = '-6502') then
468: -- Warning! Unable to create legacy category for interest type/code as legacy category name is too long.
469: FND_MESSAGE.Set_Name('AS', 'API_WARNING_CREATE_LEGACY');
470: FND_MESSAGE.Set_Token('NAME', p_category_name);
471: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
472:
473: x_warning_flag := 'Y';
474: return;
475: end if;
673: if (x_return_status = FND_API.G_FALSE) then
674: x_warning_flag := 'Y';
675:
676: -- Warning! Unable to grant access to catalog (Error code:' || x_errorcode || '). Please notify the administrator about this error.
677: FND_MESSAGE.Set_Name('AS', 'API_WARNING_GRANT_CATALOG');
678: FND_MESSAGE.Set_Token('ERRORCODE', x_errorcode);
679: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
680: end if;
681:
674: x_warning_flag := 'Y';
675:
676: -- Warning! Unable to grant access to catalog (Error code:' || x_errorcode || '). Please notify the administrator about this error.
677: FND_MESSAGE.Set_Name('AS', 'API_WARNING_GRANT_CATALOG');
678: FND_MESSAGE.Set_Token('ERRORCODE', x_errorcode);
679: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
680: end if;
681:
682: IF G_debug and (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
675:
676: -- Warning! Unable to grant access to catalog (Error code:' || x_errorcode || '). Please notify the administrator about this error.
677: FND_MESSAGE.Set_Name('AS', 'API_WARNING_GRANT_CATALOG');
678: FND_MESSAGE.Set_Token('ERRORCODE', x_errorcode);
679: FND_FILE.PUT_LINE(FND_FILE.LOG, FND_MESSAGE.Get());
680: end if;
681:
682: IF G_debug and (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
683: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,'as.plsql.conc.asxmcatb', 'Grant guid=' || x_grant_guid);