ORACLE

ORACLE
Let us share our knowledge to the world of oracle apps. I am trying my best to do so and I request every one to contribute their part. If you have any thing useful related to oracle apps, do send me I will post in my blog on behalf of you. If you like my blog tell the world about it, else tell me i will improve. You can suggest me, what exactly you want on oracle apps. Mail your queries.

Wednesday, May 21, 2014

REVERSING a Receipt

DECLARE
   l_return_status     VARCHAR2 (1);
   l_msg_count         NUMBER;
   l_msg_data          VARCHAR2 (240);
   l_count             NUMBER;
   l_cash_receipt_id   NUMBER;
   l_msg_data_out      VARCHAR2 (240);
   l_mesg              VARCHAR2 (240);
   p_count             NUMBER;
BEGIN
   arp_standard.enable_debug;
   arp_standard.enable_file_debug ('/usr/tmp', 'Api_Create.log');
   ar_receipt_api_pub.REVERSE (p_api_version                 => 1.0,
                               p_init_msg_list               => fnd_api.g_true,
                               p_commit                      => fnd_api.g_true,
                               p_validation_level            => fnd_api.g_valid_level_full,
                               x_return_status               => l_return_status,
                               x_msg_count                   => l_msg_count,
                               x_msg_data                    => l_msg_data,
                               p_receipt_number              => '&receipt_number',
                               p_reversal_category_name      => 'Reverse Payment',             --values can be modified.
                               p_reversal_reason_name        => 'Nsf'                         -- values can be modified.
                              );
   DBMS_OUTPUT.put_line (   'Message count '
                         || l_msg_count);
   DBMS_OUTPUT.put_line (   'Status '
                         || l_return_status);

   IF l_msg_count = 1
   THEN
      DBMS_OUTPUT.put_line (   'l_msg_data A '
                            || RTRIM (LTRIM (l_msg_data))
                            || '****');
   ELSIF l_msg_count > 1
   THEN
      LOOP
         p_count :=   p_count
                    + 1;
         l_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next, fnd_api.g_false);

         IF l_msg_data IS NULL
         THEN
            EXIT;
         END IF;

         DBMS_OUTPUT.put_line (   'Message'
                               || p_count
                               || ' ---'
                               || l_msg_data);
      END LOOP;
   END IF;

   arp_standard.disable_debug;
END;

No comments:

Post a Comment