Home » SQL & PL/SQL » SQL & PL/SQL » Error using API (Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production)
Error using API [message #671471] Thu, 30 August 2018 16:13 Go to next message
vharish006
Messages: 70
Registered: August 2015
Location: Chicago
Member
Hi All,

This should be a simple mistake but unable to get it.Please help.

Below is the error while trying to compile.

"PLS-00703: multiple instances of named argument in list"

Line 48 is where it shows error(l_party_site_rec.PARTY_SITE_ID :=l_party_site_id Wink



[LIST TYPE=1]
[/LIST]
CREATE OR REPLACE PROCEDURE apps.xxpq_inactivate_party_site (
   p_party_site_number      IN     VARCHAR2,
   p_err_flag           OUT VARCHAR2,
   p_err_msg            OUT VARCHAR2)
AS
   l_party_site_rec          apps.hz_party_site_v2pub.PARTY_SITE_REC_TYPE;
   x_return_status           VARCHAR2 (2000);
   x_msg_count               NUMBER;
   x_msg_data                VARCHAR2 (2000);
   l_party_site_id           NUMBER;
   l_object_version_number   NUMBER;
BEGIN
   p_err_flag := 'N';
   p_err_msg := NULL;

   BEGIN
      SELECT PARTY_SITE_ID, OBJECT_VERSION_NUMBER
        INTO l_party_site_id, l_object_version_number
        FROM apps.HZ_PARTY_SITES
       WHERE party_site_number = p_party_site_number;
   EXCEPTION
      WHEN OTHERS
      THEN
         p_err_flag := 'E';
         p_err_msg :=
               'Error in getting Party Site id for Party Site number:'
            || p_party_site_number
            || ':'
            || SQLERRM;
         apps.fnd_file.put_line (
            apps.fnd_file.LOG,
               'Error in getting Party Site id for Party Site number:'
            || p_party_site_number
            || ':'
            || SQLERRM);
         DBMS_OUTPUT.put_line (
               'Error in getting Party Site id for Party Site number:'
            || p_party_site_number
            || ':'
            || SQLERRM);
   END;

   IF P_err_flag = 'N'
   THEN
      l_party_site_rec.PARTY_SITE_ID :=l_party_site_id ;
      l_party_site_rec.status := 'I';

      apps.hz_party_site_v2pub.update_party_site (
         p_init_msg_list           => apps.FND_API.G_TRUE,
         p_party_site_rec          => l_party_site_rec,
         p_object_version_number   => l_object_version_number,
         x_return_status           => x_return_status,
         x_msg_count               => x_msg_count,
         x_msg_count               => x_msg_data);

      IF x_return_status = apps.fnd_api.g_ret_sts_success
      THEN
         p_err_flag := 'S';
         p_err_msg := 'Party Site Inactivated';
         COMMIT;
      ELSE
         apps.fnd_file.put_line (
            apps.fnd_file.LOG,
               'Inactivation Failed for Party Site:'
            || p_party_site_number
            || ':'
            || x_msg_data);
         DBMS_OUTPUT.put_line (
               'Inactivation Failed for Party Site:'
            || p_party_site_number
            || ':'
            || x_msg_data);
         ROLLBACK;
         p_err_flag := 'E';

         IF x_msg_count > 1
         THEN
            FOR i IN 1 .. x_msg_count
            LOOP
               x_msg_data :=
                     apps.fnd_msg_pub.get (p_msg_index => i, p_encoded => 'F')
                  || ','
                  || x_msg_data;
               apps.fnd_file.put_line (apps.fnd_file.LOG,
                                       (i || ') ' || x_msg_data));
            END LOOP;
         END IF;

         p_err_msg := x_msg_data;
      END IF;
   END IF;
EXCEPTION
   WHEN OTHERS
   THEN
      p_err_flag := 'E';
      p_err_msg :=
            'Error in Procedure xxpq_inactivate_party_site:'
         || p_party_site_number
         || ':'
         || SQLERRM;
      apps.fnd_file.put_line (
         apps.fnd_file.LOG,
            'Inactivation Failed for Party Site:'
         || p_party_site_number
         || '-'
         || SQLERRM
         || '-'
         || DBMS_UTILITY.format_error_backtrace ());
      DBMS_OUTPUT.put_line (
            'Inactivation Failed for Party Site:'
         || p_party_site_number
         || '-'
         || SQLERRM
         || '-'
         || DBMS_UTILITY.format_error_backtrace ());
END xxpq_inactivate_party_site;
Re: Error using API [message #671472 is a reply to message #671471] Thu, 30 August 2018 16:21 Go to previous messageGo to next message
John Watson
Messages: 8928
Registered: January 2010
Location: Global Village
Senior Member
         x_msg_count               => x_msg_count,
         x_msg_count               => x_msg_data);

Which do you want? You can't have both.
Re: Error using API [message #671473 is a reply to message #671471] Thu, 30 August 2018 16:27 Go to previous messageGo to next message
vharish006
Messages: 70
Registered: August 2015
Location: Chicago
Member
Please ignore.I found the error.
Re: Error using API [message #671474 is a reply to message #671473] Thu, 30 August 2018 17:48 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
vharish006 wrote on Thu, 30 August 2018 14:27
Please ignore.I found the error.
please post actual solution to assist those who find this thread later
Re: Error using API [message #673961 is a reply to message #671473] Wed, 19 December 2018 14:26 Go to previous message
Michel Cadot
Messages: 68637
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
BlackSwan wrote on Fri, 31 August 2018 00:48
vharish006 wrote on Thu, 30 August 2018 14:27
Please ignore.I found the error.
please post actual solution to assist those who find this thread later
Previous Topic: XML Through PL/SQL
Next Topic: Execution plan alters with DDL change
Goto Forum:
  


Current Time: Tue Apr 16 12:58:14 CDT 2024