[Home] [Help]
3233: -- Pre-reqs : Supplier Access Lock entries with the given buyer_tp_contact_id
3234: -- (p_From_FK_id) must exists in the database
3235: --
3236: -- Function : This procedure will be attached to the BUYER_TP_CONTACT_ID
3237: -- merge for Sourcing PON_SUPPLIER_ACCESS entity.
3238: --
3239: -- It will veto Party Merge if -
3240: -- p_From_FK_id and p_To_FK_id both are not Buyer user party
3241: --
3238: --
3239: -- It will veto Party Merge if -
3240: -- p_From_FK_id and p_To_FK_id both are not Buyer user party
3241: --
3242: -- This will merge the all the PON_SUPPLIER_ACCESS records
3243: -- having BUYER_TP_CONTACT_ID equals to p_From_FK_id
3244: -- to party id having value (p_To_FK_id)
3245: --
3246: -- Parameters:
3323:
3324: fnd_file.put_line (fnd_file.log, '20 : Incompatible or Seller Merge - Error');
3325: --
3326: -- This can not happen in any normal scenario as
3327: -- PON_SUPPLIER_ACCESS.BUYER_TP_CONTACT_ID
3328: -- can never contain a seller user id. Thus, raising a veto though
3329: -- it will possibly never be called
3330: --
3331: FND_MESSAGE.SET_NAME('AR', 'PON_TCA_MRG_ERR'); -- Need to put some Sourcing Specific Error Message
3341: --
3342: -- there is no chance of unique key constraint violation
3343: -- due to the following updates
3344: --
3345: UPDATE PON_SUPPLIER_ACCESS
3346: SET LAST_UPDATE_DATE = SYSDATE,
3347: LAST_UPDATED_BY = -1,
3348: BUYER_TP_CONTACT_ID = p_To_FK_id
3349: WHERE BUYER_TP_CONTACT_ID = p_From_FK_id;
3347: LAST_UPDATED_BY = -1,
3348: BUYER_TP_CONTACT_ID = p_To_FK_id
3349: WHERE BUYER_TP_CONTACT_ID = p_From_FK_id;
3350:
3351: fnd_file.put_line (fnd_file.log, '50 : Buyer Merge - Updated BUYER_TP_CONTACT_IDs in PON_SUPPLIER_ACCESS: '||sql%rowcount||' rows');
3352:
3353: --
3354: -- We will be updating the user_id column of pon_neg_team_members table
3355: -- if there are only one FND_USER associated with the merge from ot merge to party id.