1 Reply Latest reply: Dec 1, 2011 9:55 AM by 796938 RSS

    Customer Master - Inactivate Customers

    885863
      I need your help.

      We are using Oracle R12 and we are trying to clean our Customer Master as there are too many duplicates. I'm able to inactivate the accounts (sites), but I have not been able to inactivate the Customer. So, when Sales is trying to create a quote, a list of Customers with the same name comes up.

      What do I need to do?

      Your help is much appreciated.

      Patricia
        • 1. Re: Customer Master - Inactivate Customers
          796938
          /**

          select party_number,
          party_id
          ,object_version_number
          ,status
          from
          hz_parties
          where
          party_id = 191524

          **/



          ---------------------Script to make organization inactive------------------------------

          DECLARE
          p_organization_rec HZ_PARTY_V2PUB.organization_REC_TYPE;
          xin_xout_object_version_number NUMBER;
          x_profile_id NUMBER;
          x_return_status VARCHAR2(2000);
          x_msg_count NUMBER;
          x_msg_data VARCHAR2(2000);

          BEGIN
          p_organization_rec.Party_rec.party_id := 191524; --<< party_id from 1c >
          xin_xout_object_version_number := 13; --<< OBJECT_VERSION_NUMBER from 1c >
          p_organization_rec.party_rec.status := 'I'; --<< this is the new status >

          HZ_PARTY_V2PUB.update_organization(
          'T',
          p_organization_rec,
          xin_xout_object_version_number,
          x_profile_id,
          x_return_status,
          x_msg_count,
          x_msg_data);

          dbms_output.put_line('***************************');
          dbms_output.put_line('Output information ....');
          dbms_output.put_line('xin_xout_object_version_number: '||xin_xout_object_version_number);
          dbms_output.put_line('x_profile_id: '||x_profile_id);
          dbms_output.put_line('x_return_status: '||x_return_status);
          dbms_output.put_line('x_msg_count: '||x_msg_count);
          dbms_output.put_line('x_msg_data: '||x_msg_data);
          dbms_output.put_line('***************************');

          END;

          /


          Use the above API to inactive the customer and after running it ran the DQM staging program hopefully it will resolve the issue

          Regards,
          Prakash Ranjan