Wednesday, March 9, 2011

JTF_NOTES_PUB API - Create Note

Here is sample program unit to create note for Installaed Base Instance.
(JTF_NOTES_PUB.CREATE_NOTE)


DECLARE
   x_return_status   varchar2 (1);
   x_msg_count       number;
   x_msg_data        varchar2 (200);
   x_jtf_note_id     number;
   x_msg_index_out   number;
BEGIN
   DBMS_APPLICATION_INFO.set_client_info (ORG_ID);
   fnd_global.apps_initialize (USER_ID, RESP_ID, APPL_ID);


   jtf_notes_pub.create_note (p_api_version          => 1.0,
                              x_return_status        => x_return_status,
                              x_msg_count            => x_msg_count,
                              x_msg_data             => x_msg_data,
                              p_source_object_id     => 999999999, -- INSTANCE_ID
                              p_source_object_code   => 'CP', --Customer Product
                              p_notes                => 'Customer Note',
                              p_notes_detail         => NULL,
                              p_note_status          => 'I',
                              x_jtf_note_id          => x_jtf_note_id,
                              p_last_update_date     => SYSDATE,
                              p_last_updated_by      => fnd_global.user_id,
                              p_creation_date        => SYSDATE,
                              p_created_by           => fnd_global.user_id,
                              p_note_type            => 'ASF_CONVERSATION');

   IF x_return_status = Fnd_Api.G_RET_STS_SUCCESS
   THEN
      DBMS_OUTPUT.put_line (
         'Note has been created with Note Id:' || x_jtf_note_id
      );
   ELSE
      FOR j IN 1 .. x_msg_count
      LOOP
         x_msg_data := NULL;
         fnd_msg_pub.get (j,
                          FND_API.G_FALSE,
                          x_msg_data,
                          x_msg_index_out);


         FND_FILE.PUT_LINE (
            FND_FILE.LOG,
            'Error at Created Acct Relationship. ' || x_msg_data
         );

         DBMS_OUTPUT.put_line (x_msg_data);
      END LOOP;
   END IF;
END;



Visit for more information http://blog.optiosys.com/

1 comment:

  1. Hi, Foreign Direct Investment is encouraged with Registered Agents in Qatar and developed by the Ministry of Economy and Commerce with the help of its subsidiary.Thanks...

    ReplyDelete