2567: -- Get the party ID if we don't already know it --
2568: --------------------------------------------------------------------------
2569:
2570: IF L_PARTY_ID IS NULL OR
2571: FND_GLOBAL.USER_NAME <> g_username THEN
2572:
2573: --
2574: -- New user - find out its party ID.
2575: --
2581: BEGIN
2582: SELECT 'HZ_PARTY:'||TO_CHAR(PARTY_ID)
2583: INTO l_party_id
2584: FROM EGO_USER_V
2585: WHERE USER_NAME = FND_GLOBAL.USER_NAME;
2586: EXCEPTION
2587: WHEN NO_DATA_FOUND THEN
2588:
2589: ERROR_HANDLER.Add_Error_Message(
2606:
2607: -- Cache this most recent username to party ID mapping to avoid
2608: -- redundantly performing this lookup again.
2609: g_party_id := l_party_id;
2610: g_username := FND_GLOBAL.USER_NAME;
2611:
2612: ELSE
2613:
2614: -- Bug 6531908: The user is the same as previously, so reuse the same
2680: FROM MTL_PARAMETERS
2681: WHERE ORGANIZATION_ID = p_organization_id;
2682:
2683: l_token_table(1).TOKEN_NAME := 'USER_NAME';
2684: l_token_table(1).TOKEN_VALUE := FND_GLOBAL.USER_NAME;
2685: l_token_table(2).TOKEN_NAME := 'ITEM_NUMBER';
2686: l_token_table(2).TOKEN_VALUE := l_item_number;
2687: l_token_table(3).TOKEN_NAME := 'ORG_CODE';
2688: l_token_table(3).TOKEN_VALUE := l_org_code;
3295:
3296: BEGIN
3297: l_owner_party_name := NULL;
3298: IF p_user_id IS NULL THEN
3299: OPEN c_user_party_id(cp_user_id => FND_GLOBAL.User_Id);
3300: ELSE
3301: OPEN c_user_party_id(cp_user_id => p_user_id);
3302: END IF;
3303: FETCH c_user_party_id INTO l_owner_party_id, l_owner_party_name;
3465: -- user must not be able to delete his own grants
3466: l_api_name := 'Process_item_role';
3467: l_api_version := 1.0;
3468: x_return_status := FND_API.G_RET_STS_SUCCESS;
3469: l_user_id := FND_GLOBAL.User_Id;
3470: code_debug(l_api_name ||' started with params - grant guid '||RAWTOHEX(x_grant_guid));
3471: code_debug(' p_api_version '|| p_api_version||' p_commit '||p_commit||' p_init_msg_list '||p_init_msg_list );
3472: code_debug(' p_transaction_type '||p_transaction_type ||' p_inventory_item_id '||p_inventory_item_id||' p_item_number '||p_item_number );
3473: code_debug(' p_organization_id '||p_organization_id ||' p_organization_code '||p_organization_code||' p_role_id '||p_role_id );
4080: BEGIN
4081: l_api_name := 'Process_item_phase_and_status';
4082: l_api_version := 1.0;
4083: x_return_status := FND_API.G_RET_STS_SUCCESS;
4084: l_user_id := FND_GLOBAL.User_Id;
4085: l_policy_co_required := 'CHANGE_ORDER_REQUIRED';
4086: l_policy_not_allowed := 'NOT_ALLOWED';
4087: code_debug(l_api_name ||' started with params -- effective date '|| p_effective_date);
4088: code_debug(' p_api_version '|| p_api_version||' p_commit '||p_commit||' p_init_msg_list '||p_init_msg_list );
4649: ) THEN
4650: code_debug(l_api_name ||' user does not have privilege to update the existing change '||p_transaction_type);
4651: l_change_status_flag := FALSE;
4652: fnd_message.Set_Name(G_APP_NAME,l_error_message);
4653: fnd_message.set_token('USER', FND_GLOBAL.USER_NAME);
4654: fnd_message.set_token('ITEM_NUMBER', l_item_number);
4655: fnd_message.set_token('ORGANIZATION', l_org_name);
4656: fnd_msg_pub.Add;
4657: END IF;
6411: p_organization_id
6412: ,p_inventory_item_id
6413: ,p_template_id
6414: ,l_transaction_type_id
6415: ,fnd_global.user_id
6416: ,sysdate
6417: ,fnd_global.user_id
6418: ,sysdate
6419: ,fnd_global.login_id
6413: ,p_template_id
6414: ,l_transaction_type_id
6415: ,fnd_global.user_id
6416: ,sysdate
6417: ,fnd_global.user_id
6418: ,sysdate
6419: ,fnd_global.login_id
6420: ,null
6421: );
6415: ,fnd_global.user_id
6416: ,sysdate
6417: ,fnd_global.user_id
6418: ,sysdate
6419: ,fnd_global.login_id
6420: ,null
6421: );
6422:
6423: