Home » Applications » Oracle Fusion Apps & E-Business Suite » Create OLM course by using API (Oracle Applications : 12.1.3)
Create OLM course by using API [message #624799] Thu, 25 September 2014 14:50 Go to next message
jamalfarooq
Messages: 35
Registered: August 2006
Member
Hi Guru,

I am new in Oracle OLM, I have one assignment in which I have to load course into Oracle OLM by using API, I found one API which called "OTA_ACTIVITY_VERSION_API.CREATE_ACTIVITY_VERSION" but it's given me ORA-20001: OTA_13892_TAV_INV_COMB_INVALID, on further investigation I found this error is related to "mtl_system_items_b" table, in my environment I don't have any data in this table.
Please see the below code that I was using to load course using this API.
I will appriciate any help regarding .....


DECLARE
     V_EFFECTIVE_DATE                DATE := sysdate;
     V_VALIDATE                      BOOLEAN := TRUE;
     V_ACTIVITY_ID                   NUMBER := 14;
     V_SUPERSEDED_BY_ACT_VERSION_ID  NUMBER := 16023;
     V_DEVELOPER_ORGANIZATION_ID     NUMBER := 82;
     V_CONTROLLING_PERSON_ID         NUMBER := 06371;
     V_VERSION_NAME                  VARCHAR2(2000) := 'API TESTING';
     V_COMMENTS                      VARCHAR2(2000) := 'API TESTING IN DEV ENV';
     V_DESCRIPTION                   VARCHAR2(2000) := 'TEST COUSE';
     V_DURATION                      NUMBER := 2;
     V_DURATION_UNITS                VARCHAR2(2000) := 'D';
     V_END_DATE                      DATE := sysdate + 5;
     V_INTENDED_AUDIENCE             VARCHAR2(2000) := 10;
     V_LANGUAGE_ID                   NUMBER ;
     V_MAXIMUM_ATTENDEES             NUMBER := 10;
     V_MINIMUM_ATTENDEES             NUMBER := 1;
     V_OBJECTIVES                    VARCHAR2(2000) := 'testing testing testing';
     V_START_DATE                    DATE := sysdate;
     V_SUCCESS_CRITERIA              VARCHAR2(2000);
     V_USER_STATUS                   VARCHAR2(2000);
     V_VENDOR_ID                     NUMBER;
     V_ACTUAL_COST                   NUMBER := 500;
     V_BUDGET_COST                   NUMBER;
     V_BUDGET_CURRENCY_CODE          VARCHAR2(2000) :='CAD';
     V_EXPENSES_ALLOWED              VARCHAR2(2000) := 'N' ;
     V_PROFESSIONAL_CREDIT_TYPE      VARCHAR2(2000);
     V_PROFESSIONAL_CREDITS          NUMBER;
     V_MAXIMUM_INTERNAL_ATTENDEES    NUMBER;
     V_TAV_INFORMATION_CATEGORY      VARCHAR2(2000);
     V_TAV_INFORMATION1              VARCHAR2(2000) := 'Y' ;
     V_TAV_INFORMATION2              VARCHAR2(2000) := 2;
     V_TAV_INFORMATION3              VARCHAR2(2000) := 'N';
     V_TAV_INFORMATION4              VARCHAR2(2000);
     V_TAV_INFORMATION5              VARCHAR2(2000);
     V_TAV_INFORMATION6              VARCHAR2(2000);
     V_TAV_INFORMATION7              VARCHAR2(2000);
     V_TAV_INFORMATION8              VARCHAR2(2000);
     V_TAV_INFORMATION9              VARCHAR2(2000);
     V_TAV_INFORMATION10             VARCHAR2(2000);
     V_TAV_INFORMATION11             VARCHAR2(2000);
     V_TAV_INFORMATION12             VARCHAR2(2000);
     V_TAV_INFORMATION13             VARCHAR2(2000);
     V_TAV_INFORMATION14             VARCHAR2(2000);
     V_TAV_INFORMATION15             VARCHAR2(2000);
     V_TAV_INFORMATION16             VARCHAR2(2000);
     V_TAV_INFORMATION17             VARCHAR2(2000);
     V_TAV_INFORMATION18             VARCHAR2(2000);
     V_TAV_INFORMATION19             VARCHAR2(2000);
     V_TAV_INFORMATION20             VARCHAR2(2000);
     V_INVENTORY_ITEM_ID             NUMBER ;
     V_ORGANIZATION_ID               NUMBER := 82;
     V_RCO_ID                        NUMBER;
     V_VERSION_CODE                  VARCHAR2(2000);
     V_KEYWORDS                      VARCHAR2(2000);
     V_BUSINESS_GROUP_ID             NUMBER := 82;
     -- Output Variables
     V_ACTIVITY_VERSION_ID           NUMBER;
     V_OBJECT_VERSION_NUMBER         NUMBER;
     -- Input Variables
     V_DATA_SOURCE                   VARCHAR2(2000) := 'OIL';
     V_COMPETENCY_UPDATE_LEVEL       VARCHAR2(2000) := 'NOTIFYUPDATE';
BEGIN
     BEGIN
     fnd_global.apps_initialize (1260, 25182, 810);
     END;
     --  Calling API OTA_ACTIVITY_VERSION_API.CREATE_ACTIVITY_VERSION
     OTA_ACTIVITY_VERSION_API.CREATE_ACTIVITY_VERSION(P_EFFECTIVE_DATE               => V_EFFECTIVE_DATE
                                                     ,P_VALIDATE                     => V_VALIDATE
                                                     ,P_ACTIVITY_ID                  => V_ACTIVITY_ID
                                                     ,P_SUPERSEDED_BY_ACT_VERSION_ID => V_SUPERSEDED_BY_ACT_VERSION_ID
                                                     ,P_DEVELOPER_ORGANIZATION_ID    => V_DEVELOPER_ORGANIZATION_ID
                                                     ,P_CONTROLLING_PERSON_ID        => V_CONTROLLING_PERSON_ID
                                                     ,P_VERSION_NAME                 => V_VERSION_NAME
                                                     ,P_COMMENTS                     => V_COMMENTS
                                                     ,P_DESCRIPTION                  => V_DESCRIPTION
                                                     ,P_DURATION                     => V_DURATION
                                                     ,P_DURATION_UNITS               => V_DURATION_UNITS
                                                     ,P_END_DATE                     => V_END_DATE
                                                     ,P_INTENDED_AUDIENCE            => V_INTENDED_AUDIENCE
                                                     ,P_LANGUAGE_ID                  => V_LANGUAGE_ID
                                                     ,P_MAXIMUM_ATTENDEES            => V_MAXIMUM_ATTENDEES
                                                     ,P_MINIMUM_ATTENDEES            => V_MINIMUM_ATTENDEES
                                                     ,P_OBJECTIVES                   => V_OBJECTIVES
                                                     ,P_START_DATE                   => V_START_DATE
                                                     ,P_SUCCESS_CRITERIA             => V_SUCCESS_CRITERIA
                                                     ,P_USER_STATUS                  => V_USER_STATUS
                                                     ,P_VENDOR_ID                    => V_VENDOR_ID
                                                     ,P_ACTUAL_COST                  => V_ACTUAL_COST
                                                     ,P_BUDGET_COST                  => V_BUDGET_COST
                                                     ,P_BUDGET_CURRENCY_CODE         => V_BUDGET_CURRENCY_CODE
                                                     ,P_EXPENSES_ALLOWED             => V_EXPENSES_ALLOWED
                                                     ,P_PROFESSIONAL_CREDIT_TYPE     => V_PROFESSIONAL_CREDIT_TYPE
                                                     ,P_PROFESSIONAL_CREDITS         => V_PROFESSIONAL_CREDITS
                                                     ,P_MAXIMUM_INTERNAL_ATTENDEES   => V_MAXIMUM_INTERNAL_ATTENDEES
                                                     ,P_TAV_INFORMATION_CATEGORY     => V_TAV_INFORMATION_CATEGORY
                                                     ,P_TAV_INFORMATION1             => V_TAV_INFORMATION1
                                                     ,P_TAV_INFORMATION2             => V_TAV_INFORMATION2
                                                     ,P_TAV_INFORMATION3             => V_TAV_INFORMATION3
                                                     ,P_TAV_INFORMATION4             => V_TAV_INFORMATION4
                                                     ,P_TAV_INFORMATION5             => V_TAV_INFORMATION5
                                                     ,P_TAV_INFORMATION6             => V_TAV_INFORMATION6
                                                     ,P_TAV_INFORMATION7             => V_TAV_INFORMATION7
                                                     ,P_TAV_INFORMATION8             => V_TAV_INFORMATION8
                                                     ,P_TAV_INFORMATION9             => V_TAV_INFORMATION9
                                                     ,P_TAV_INFORMATION10            => V_TAV_INFORMATION10
                                                     ,P_TAV_INFORMATION11            => V_TAV_INFORMATION11
                                                     ,P_TAV_INFORMATION12            => V_TAV_INFORMATION12
                                                     ,P_TAV_INFORMATION13            => V_TAV_INFORMATION13
                                                     ,P_TAV_INFORMATION14            => V_TAV_INFORMATION14
                                                     ,P_TAV_INFORMATION15            => V_TAV_INFORMATION15
                                                     ,P_TAV_INFORMATION16            => V_TAV_INFORMATION16
                                                     ,P_TAV_INFORMATION17            => V_TAV_INFORMATION17
                                                     ,P_TAV_INFORMATION18            => V_TAV_INFORMATION18
                                                     ,P_TAV_INFORMATION19            => V_TAV_INFORMATION19
                                                     ,P_TAV_INFORMATION20            => V_TAV_INFORMATION20
                                                     ,P_INVENTORY_ITEM_ID            => V_INVENTORY_ITEM_ID
                                                     ,P_ORGANIZATION_ID              => V_ORGANIZATION_ID
                                                     ,P_RCO_ID                       => V_RCO_ID
                                                     ,P_VERSION_CODE                 => V_VERSION_CODE
                                                     ,P_KEYWORDS                     => V_KEYWORDS
                                                     ,P_BUSINESS_GROUP_ID            => V_BUSINESS_GROUP_ID
                                                     ,P_ACTIVITY_VERSION_ID          => V_ACTIVITY_VERSION_ID
                                                     ,P_OBJECT_VERSION_NUMBER        => V_OBJECT_VERSION_NUMBER
                                                     ,P_DATA_SOURCE                  => V_DATA_SOURCE
                                                     ,P_COMPETENCY_UPDATE_LEVEL      => V_COMPETENCY_UPDATE_LEVEL
                                                     );
exception when others then
     dbms_output.put_line('error : ' || sqlerrm);
END;

Re: Create OLM course by using API [message #624844 is a reply to message #624799] Fri, 26 September 2014 09:03 Go to previous messageGo to next message
jamalfarooq
Messages: 35
Registered: August 2006
Member
Hi Gurus,
let me add some more comments, could any one please provide me some sample code for creating course through API that will be big help for me ... please help...
Re: Create OLM course by using API [message #624848 is a reply to message #624844] Fri, 26 September 2014 10:14 Go to previous messageGo to next message
John Watson
Messages: 8547
Registered: January 2010
Location: Global Village
Senior Member
When you say that you "found an API" how did you find it? The docs say this,

Quote:
Publicly Callable Business Process APIs in OLM
Application Programmatic Interfaces (APIs) are a logical grouping of all external
process routines. The OLM API strategy delivers a set of PL/SQL packages procedures
and functions that provide an open interface to the database.
Oracle® Integration Repository, an integral part of Oracle E-Business Suite, is a
compilation of information about the numerous interface endpoints exposed by Oracle
applications. The full list of public APIs and the purpose of each API is available in the
integration repository. See: Oracle Integration Repository Overview, Oracle Integration Repository User Guide
For information on how to access and use Oracle Integration Repository, see: Accessing
Oracle Integration Repository,
Oracle Integration Repository User Guide
For information on how to call APIs, see the technical essay APIs in Oracle HRMS,
Oracle HRMS Implementation Guide
You do need to be sure that you are running the public APIs, not something internal.
Re: Create OLM course by using API [message #624867 is a reply to message #624848] Fri, 26 September 2014 14:40 Go to previous message
jamalfarooq
Messages: 35
Registered: August 2006
Member
Thanks John for your reply, I checked it's says that it's public API when I describe "ota_activity_version_api" package.

CREATE OR REPLACE PACKAGE APPS.ota_activity_version_api AUTHID CURRENT_USER as
/* $Header: ottavapi.pkh 120.4.12010000.2 2009/08/11 13:01:11 smahanka ship $ */
/*#
 * This package contains the course APIs.
 * [b]@rep:scope public[/b]
 * @rep:product ota
 * @rep:displayname Course
*/
--
-- ----------------------------------------------------------------------------
-- |-------------------------< create_activity_version >----------------------|
-- ----------------------------------------------------------------------------
--
-- {Start Of Comments}
/*#
 * This API creates a course.
 *
 * This business process creates a course record.
Previous Topic: Using fnd_function.execute to invoke another form in oracle applications
Next Topic: Need to change Lot expiration date format with time stamp using Form Personalisation
Goto Forum:
  


Current Time: Thu May 13 04:03:04 CDT 2021