DBA Data[Home] [Help]

APPS.AMS_EVENTHEADER_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 27

PROCEDURE Update_Metrics (
        p_evh_rec          IN  evh_rec_type,
   x_return_status  OUT NOCOPY   VARCHAR2,
   x_msg_count OUT NOCOPY VARCHAR2,
   x_msg_data OUT NOCOPY VARCHAR2
);
Line: 78

                SELECT ams_event_headers_all_b_s.NEXTVAL
                FROM DUAL;
Line: 82

                SELECT COUNT(*)
                FROM ams_event_headers_vl
                WHERE event_header_id = evh_id;
Line: 87

                SELECT system_status_code
                FROM ams_user_statuses_b
                WHERE user_status_id = ust_id
                AND system_status_type = 'AMS_EVENT_AGENDA_STATUS';
Line: 93

                SELECT resource_id
                FROM ams_jtf_rs_emp_v
                WHERE user_id = l_user_id;
Line: 180

                if AMS_ACCESS_PVT.check_update_access(l_evh_rec.parent_event_header_id, 'EVEH', l_res_id, 'USER') = 'N' then
                        IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
                                FND_MESSAGE.set_name('AMS', 'AMS_EVO_NO_UPDATE_ACCESS');-- reusing the message
Line: 314

            AMS_Utility_PVT.debug_message(l_full_name ||': insert B');
Line: 318

            AMS_Utility_PVT.debug_message(l_full_name ||': insert B1'||l_evh_rec.agenda_start_time||','||l_evh_rec.agenda_end_time);
Line: 322

            AMS_Utility_PVT.debug_message(l_full_name ||': insert B2'||l_evh_rec.active_from_date||','||l_evh_rec.active_to_date);
Line: 333

        INSERT INTO ams_event_headers_all_b(
                event_header_id
                ,setup_type_id
                ,last_update_date
                ,last_updated_by
                ,creation_date
                ,created_by
                ,last_update_login
                ,object_version_number
                ,event_level
                ,application_id
                ,event_type_code
                ,active_flag
                ,private_flag
                ,user_status_id
                ,system_status_code
                ,last_status_date
                ,stream_type_code
                ,source_code
                ,event_standalone_flag
                ,day_of_event
                ,agenda_start_time
                ,agenda_end_time
                ,reg_required_flag
                ,reg_charge_flag
                ,reg_invited_only_flag
                ,partner_flag
                ,overflow_flag
                ,parent_event_header_id
                ,duration
                ,duration_uom_code
                ,active_from_date
                ,active_to_date
                ,reg_maximum_capacity
                ,reg_minimum_capacity
                ,main_language_code
                ,cert_credit_type_code
                ,certification_credits
                ,inventory_item_id
                ,organization_id
                ,org_id
                ,forecasted_revenue
                ,actual_revenue
                ,forecasted_cost
                ,actual_cost
                ,coordinator_id
                ,fund_source_type_code
                ,fund_source_id
                ,fund_amount_tc
                ,fund_amount_fc
                ,currency_code_tc
                ,currency_code_fc
                ,owner_user_id
                ,url
                ,phone
                ,email
                ,priority_type_code
                ,cancellation_reason_code
                ,inbound_script_name
                ,attribute_category
                ,attribute1
                ,attribute2
                ,attribute3
                ,attribute4
                ,attribute5
                ,attribute6
                ,attribute7
                ,attribute8
                ,attribute9
                ,attribute10
                ,attribute11
                ,attribute12
                ,attribute13
                ,attribute14
                ,attribute15
                ,country_code
                ,business_unit_id
                ,event_calendar
                ,start_period_name
                ,end_period_name
                ,global_flag
                ,task_id
                ,program_id
                ,CREATE_ATTENDANT_LEAD_FLAG /*hornet*/
                ,CREATE_REGISTRANT_LEAD_FLAG /*hornet*/
                ,EVENT_PURPOSE_CODE    /*hornet*/
        )
        VALUES(
                l_evh_rec.event_header_id,
                l_evh_rec.custom_setup_id,
                SYSDATE,
                FND_GLOBAL.user_id,
                SYSDATE,
                FND_GLOBAL.user_id,
                FND_GLOBAL.conc_login_id,
                l_ovn,
                l_evh_rec.event_level,                                  -- MAIN (event header), SUB (agenda item)
                                                                        -- Level will be sent by the UI.
                l_evh_rec.application_id,
                l_evh_rec.event_type_code,
                NVL(l_evh_rec.active_flag, 'Y'),                        -- it is set to Y if it is null.
                NVL(l_evh_rec.private_flag,'N'),                        -- Value will come from the User Interface.
                l_evh_rec.user_status_id,                                       -- This is defaulted to 1 for level=MAIN
                l_evh_rec.system_status_code,                           -- This is defaulted to 'NEW' for level=MAIN
                NVL(l_evh_rec.last_status_date,SYSDATE),
                l_evh_rec.stream_type_code,
                l_evh_rec.source_code,                                  -- If the incoming value is NULL, it is generated.
                NVL(l_evh_rec.event_standalone_flag,'N'),       -- Value will come from the User Interface.
                l_evh_rec.day_of_event,
                l_evh_rec.agenda_start_time,                            -- This is converted appropriately
                l_evh_rec.agenda_end_time,                              -- This is converted appropriately
                NVL(l_evh_rec.reg_required_flag,'Y'),           -- Value will come from the UI.
                NVL(l_evh_rec.reg_charge_flag,'Y'),             -- Value will come from the UI.
                NVL(l_evh_rec.reg_invited_only_flag,'N'),       -- Value will come from the UI.
                NVL(l_evh_rec.partner_flag,'N'),
                NVL(l_evh_rec.overflow_flag,'N'),                       -- Value will come from the UI.
                l_evh_rec.parent_event_header_id,
                l_evh_rec.duration,
                l_evh_rec.duration_uom_code,
                l_evh_rec.active_from_date,
                l_evh_rec.active_to_date,
                l_evh_rec.reg_maximum_capacity,
                l_evh_rec.reg_minimum_capacity,
                l_evh_rec.main_language_code,
                l_evh_rec.cert_credit_type_code,
                l_evh_rec.certification_credits,
                l_evh_rec.inventory_item_id,
                l_evh_rec.organization_id,
                --TO_NUMBER(SUBSTRB(userenv('CLIENT_INFO'),1,10)),        -- org_id
                l_org_id,
                l_evh_rec.forecasted_revenue,
                l_evh_rec.actual_revenue,
                l_evh_rec.forecasted_cost,
                l_evh_rec.actual_cost,
                l_evh_rec.coordinator_id,
                l_evh_rec.fund_source_type_code,
                l_evh_rec.fund_source_id,
                l_evh_rec.fund_amount_tc,
                l_evh_rec.fund_amount_fc,
                l_evh_rec.currency_code_tc,
                l_evh_rec.currency_code_fc,
                l_evh_rec.owner_user_id,
                l_evh_rec.url,
                l_evh_rec.phone,
                l_evh_rec.email,
                l_evh_rec.priority_type_code,
                l_evh_rec.cancellation_reason_code,
                l_evh_rec.inbound_script_name,
                l_evh_rec.attribute_category,
                l_evh_rec.attribute1,
                l_evh_rec.attribute2,
                l_evh_rec.attribute3,
                l_evh_rec.attribute4,
                l_evh_rec.attribute5,
                l_evh_rec.attribute6,
                l_evh_rec.attribute7,
                l_evh_rec.attribute8,
                l_evh_rec.attribute9,
                l_evh_rec.attribute10,
                l_evh_rec.attribute11,
                l_evh_rec.attribute12,
                l_evh_rec.attribute13,
                l_evh_rec.attribute14,
                l_evh_rec.attribute15,
        --      l_evh_rec.country_code,
        --      The above will require the JSP to send the country_code as part of the rec.
        --      This is not needed the API can pick it up as follows:
                NVL(l_evh_rec.country_code, TO_NUMBER(FND_PROFILE.value('AMS_SRCGEN_USER_CITY'))),
        --      The above picks up the country code from the Profile option if the one sent in
        --      by the JSP page is null.
                l_evh_rec.business_unit_id,
        --      The JSPs are expected to send the value of the business_unit_id. It is nullable.
                l_evh_rec.event_calendar,
                l_evh_rec.start_period_name,
                l_evh_rec.end_period_name,
                nvl(l_evh_rec.global_flag, 'N'),
        --above 4 fields added to be in synch with campaigns
                l_evh_rec.task_id, /*hornet create Taskid */
                l_evh_rec.program_id /*hornet create Taskid */
                ,l_evh_rec.CREATE_ATTENDANT_LEAD_FLAG /*hornet*/
                ,l_evh_rec.CREATE_REGISTRANT_LEAD_FLAG /*hornet*/
                ,l_evh_rec.EVENT_PURPOSE_CODE /*hornet*/
        );
Line: 521

            AMS_Utility_PVT.debug_message(l_full_name ||': insert TL');
Line: 525

        INSERT INTO ams_event_headers_all_tl(
                event_header_id,
                language,
                last_update_date,
                last_updated_by,
                creation_date,
                created_by,
                last_update_login,
                source_lang,
                event_header_name,
                event_mktg_message,
                description
   )
   SELECT
                l_evh_rec.event_header_id,
                l.language_code,
                SYSDATE,
                FND_GLOBAL.user_id,
                SYSDATE,
                FND_GLOBAL.user_id,
                FND_GLOBAL.conc_login_id,
                USERENV('LANG'),
                l_evh_rec.event_header_name,
                l_evh_rec.event_mktg_message,
                l_evh_rec.description
        FROM fnd_languages l
        WHERE l.installed_flag in ('I', 'B')
        AND NOT EXISTS(
                        SELECT NULL
                        FROM ams_event_headers_all_tl t
                        WHERE t.event_header_id = l_evh_rec.event_header_id
                        AND t.language = l.language_code );
Line: 590

               AMS_Utility_PVT.debug_message('Before Add_Update_Access_record');
Line: 592

        AMS_EvhRules_PVT.Add_Update_Access_record(p_object_type => 'EVEH',
                                                  p_object_id => l_evh_rec.event_header_id,
                                                  p_Owner_user_id => l_evh_rec.owner_user_id,
                                                  x_return_status => l_return_status,
                                                 x_msg_count          => x_msg_count,
                                                 x_msg_data           => x_msg_data);
Line: 600

               AMS_Utility_PVT.debug_message('After Add_Update_Access_record' || l_return_status);
Line: 671

PROCEDURE delete_event_header(
   p_api_version       IN  NUMBER,
   p_init_msg_list     IN  VARCHAR2 := FND_API.g_false,
   p_commit            IN  VARCHAR2 := FND_API.g_false,

   x_return_status     OUT NOCOPY VARCHAR2,
   x_msg_count         OUT NOCOPY NUMBER,
   x_msg_data          OUT NOCOPY VARCHAR2,

   p_evh_id           IN  NUMBER,
   p_object_version    IN  NUMBER
)
IS

   l_api_version CONSTANT NUMBER       := 1.0;
Line: 686

   l_api_name    CONSTANT VARCHAR2(30) := 'delete_event_header';
Line: 693

   SELECT resource_id
   FROM ams_jtf_rs_emp_v
   WHERE user_id = l_user_id;
Line: 698

   SELECT event_level,parent_event_header_id
   FROM ams_event_headers_all_b
   WHERE event_header_id = l_evh_id
   and   event_level = 'SUB';
Line: 706

   SAVEPOINT delete_event_header;
Line: 752

        if AMS_ACCESS_PVT.check_update_access(l_hdr_id, 'EVEH', l_res_id, 'USER') = 'N' then
                IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
         FND_MESSAGE.set_name('AMS', 'AMS_EVO_NO_UPDATE_ACCESS'); --reusing the message
Line: 762

       AMS_Utility_PVT.debug_message(l_full_name ||': delete');
Line: 765

   UPDATE ams_event_headers_all_b
   SET active_flag = 'N'
   WHERE event_header_id = p_evh_id
   AND object_version_number = p_object_version;
Line: 779

   DELETE FROM ams_event_headers_all_tl
   WHERE event_header_id = p_evh_id;
Line: 813

      ROLLBACK TO delete_event_header;
Line: 822

      ROLLBACK TO delete_event_header;
Line: 831

      ROLLBACK TO delete_event_header;
Line: 845

END delete_event_header;
Line: 875

   SELECT event_header_id
     FROM ams_event_headers_all_b
    WHERE event_header_id = p_evh_id
      AND object_version_number = p_object_version
   FOR UPDATE OF event_header_id NOWAIT;
Line: 882

   SELECT event_header_id
     FROM ams_event_headers_all_tl
    WHERE event_header_id = p_evh_id
      AND USERENV('LANG') IN (language, source_lang)
   FOR UPDATE OF event_header_id NOWAIT;
Line: 1005

PROCEDURE update_event_header(
   p_api_version       IN  NUMBER,
   p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
   p_commit            IN  VARCHAR2  := FND_API.g_false,
   p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,

   x_return_status     OUT NOCOPY VARCHAR2,
   x_msg_count         OUT NOCOPY NUMBER,
   x_msg_data          OUT NOCOPY VARCHAR2,

   p_evh_rec          IN  evh_rec_type
)
IS

   l_api_version CONSTANT NUMBER := 1.0;
Line: 1020

   l_api_name    CONSTANT VARCHAR2(30) := 'update_event_header';
Line: 1035

   SELECT system_status_code
   FROM ams_user_statuses_b
   WHERE user_status_id = p_evh_rec.user_status_id
     AND system_status_type = 'AMS_EVENT_STATUS';
Line: 1041

   SELECT system_status_code
   FROM ams_user_statuses_b
   WHERE user_status_id = p_evh_rec.user_status_id
     AND system_status_type = 'AMS_EVENT_AGENDA_STATUS';
Line: 1047

   SELECT resource_id
   FROM ams_jtf_rs_emp_v
   WHERE user_id = l_user_id;
Line: 1052

   SELECT count(*)
   FROM OZF_ACT_BUDGETS  --anchaudh: changed call from ams_act_budgets to ozf_act_budgets : bug#3453430
   WHERE arc_act_budget_used_by = objtype_in
   AND act_budget_used_by_id =id_in;
Line: 1058

   SELECT global_flag,source_code
   FROM ams_event_headers_vl
   WHERE event_header_id = p_evh_rec.event_header_id;
Line: 1066

   SAVEPOINT update_event_header;
Line: 1134

       AMS_Utility_PVT.debug_message(l_full_name ||':before Rules_EVH_Update');
Line: 1138

   AMS_EvhRules_PVT.check_evh_update(
         p_evh_rec       => p_evh_rec,
         x_return_status  => l_return_status
   );
Line: 1153

       AMS_Utility_PVT.debug_message(l_full_name ||':after Rules_EVH_Update');
Line: 1162

         p_validation_mode => JTF_PLSQL_API.g_update,
         x_return_status   => l_return_status
      );
Line: 1206

         p_validation_mode => JTF_PLSQL_API.g_update,
         x_return_status   => l_return_status
      );
Line: 1303

       AMS_Utility_PVT.debug_message(l_full_name ||': update source code:'||l_evh_rec.system_status_code);
Line: 1323

                    AMS_Utility_PVT.debug_message(l_full_name ||': update source code:'||l_evh_rec.system_status_code);
Line: 1328

                 AMS_EvhRules_PVT.update_evh_source_code(
                         l_evh_rec.event_header_id,
                         l_evh_rec.source_code,
                         l_evh_rec.global_flag,
                         l_dummy_source_code,
                         l_return_status
                 );
Line: 1342

                 FND_MESSAGE.set_name('AMS', 'AMS_CAMP_UPDATE_SRC_STAT');
Line: 1369

                 AMS_EvhRules_PVT.update_evh_source_code(
                         l_evh_rec.event_header_id,
                         l_evh_rec.source_code,
                         l_evh_rec.global_flag,
                         l_dummy_source_code,
                         l_return_status
                 );
Line: 1383

                 FND_MESSAGE.set_name('AMS', 'AMS_EVNT_UPDATE_GFLG_STAT');
Line: 1407

   if AMS_ACCESS_PVT.check_update_access(l_hdr_id, 'EVEH', l_res_id, 'USER') = 'N' then
      IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
      THEN
         FND_MESSAGE.set_name('AMS', 'AMS_EVO_NO_UPDATE_ACCESS');-- reusing the message
Line: 1467

   Update_Metrics (
            p_evh_rec => l_evh_rec,
       x_return_status  => x_return_status,
       x_msg_count  => x_msg_count,
                 x_msg_data  =>x_msg_data
     );
Line: 1481

   /* If the owner user id cahnges call AMS_EvhRules_PVT.Update_Owner */
    -- Change the owner in Access table if the owner is changed.

   IF  p_evh_rec.owner_user_id <> FND_API.g_miss_num
   THEN
      AMS_EvhRules_PVT.Update_Owner(
           p_api_version       => p_api_version,
           p_init_msg_list     => p_init_msg_list,
           p_commit            => p_commit,
           p_validation_level  => p_validation_level,
           x_return_status     => l_return_status,
           x_msg_count         => x_msg_count,
           x_msg_data          => x_msg_data,
           p_object_type       => 'EVEH',
           p_event_id          => l_evh_rec.event_header_id,
           p_owner_id          => p_evh_rec.owner_user_id
           );
Line: 1509

       AMS_Utility_PVT.debug_message(l_full_name ||': update');
Line: 1520

   UPDATE ams_event_headers_all_b SET
      last_update_date = SYSDATE,
      last_updated_by = FND_GLOBAL.user_id,
      last_update_login = FND_GLOBAL.conc_login_id,
      object_version_number = l_evh_rec.object_version_number + 1,
      application_id = l_evh_rec.application_id,
      event_type_code = l_evh_rec.event_type_code,
      source_code = l_evh_rec.source_code,
      active_flag = l_evh_rec.active_flag,
      private_flag = l_evh_rec.private_flag,
      stream_type_code = l_evh_rec.stream_type_code,
      event_standalone_flag = l_evh_rec.event_standalone_flag,
      day_of_event = l_evh_rec.day_of_event,
          agenda_start_time = to_date((to_char(l_evh_rec.agenda_start_time,'HH24:MI')),'HH24:MI'),
          agenda_end_time = to_date((to_char(l_evh_rec.agenda_end_time,'HH24:MI')),'HH24:MI'),
      reg_required_flag = l_evh_rec.reg_required_flag,
      reg_charge_flag = l_evh_rec.reg_charge_flag,
      reg_invited_only_flag = l_evh_rec.reg_invited_only_flag,
      partner_flag = l_evh_rec.partner_flag,
      overflow_flag = l_evh_rec.overflow_flag,
      parent_event_header_id = l_evh_rec.parent_event_header_id,
      duration = l_evh_rec.duration,
      duration_uom_code = l_evh_rec.duration_uom_code,
      active_from_date = l_evh_rec.active_from_date,
      active_to_date = l_evh_rec.active_to_date,
      reg_maximum_capacity = l_evh_rec.reg_maximum_capacity,
      reg_minimum_capacity = l_evh_rec.reg_minimum_capacity,
      main_language_code = l_evh_rec.main_language_code,
      cert_credit_type_code = l_evh_rec.cert_credit_type_code,
      certification_credits = l_evh_rec.certification_credits,
      organization_id = l_evh_rec.organization_id,                              -- check if update is allowed on this field.
      inventory_item_id = l_evh_rec.inventory_item_id,                  -- check if update is allowed on this field.
      forecasted_revenue = l_evh_rec.forecasted_revenue,
      actual_revenue = l_evh_rec.actual_revenue,
      forecasted_cost = l_evh_rec.forecasted_cost,
      actual_cost = l_evh_rec.actual_cost,
      coordinator_id = l_evh_rec.coordinator_id,
      fund_source_type_code = l_evh_rec.fund_source_type_code,
      fund_source_id = l_evh_rec.fund_source_id,
      fund_amount_tc = l_evh_rec.fund_amount_tc,
      fund_amount_fc = l_evh_rec.fund_amount_fc,
      currency_code_tc = l_evh_rec.currency_code_tc,
      currency_code_fc = l_evh_rec.currency_code_fc,
      owner_user_id = l_evh_rec.owner_user_id,
      url = l_evh_rec.url,
      phone = l_evh_rec.phone,
      email = l_evh_rec.email,
      priority_type_code = l_evh_rec.priority_type_code,
      cancellation_reason_code = l_evh_rec.cancellation_reason_code,
      inbound_script_name = l_evh_rec.inbound_script_name,
      attribute_category = l_evh_rec.attribute_category,
      attribute1 = l_evh_rec.attribute1,
      attribute2 = l_evh_rec.attribute2,
      attribute3 = l_evh_rec.attribute3,
      attribute4 = l_evh_rec.attribute4,
      attribute5 = l_evh_rec.attribute5,
      attribute6 = l_evh_rec.attribute6,
      attribute7 = l_evh_rec.attribute7,
      attribute8 = l_evh_rec.attribute8,
      attribute9 = l_evh_rec.attribute9,
      attribute10 = l_evh_rec.attribute10,
      attribute11 = l_evh_rec.attribute11,
      attribute12 = l_evh_rec.attribute12,
      attribute13 = l_evh_rec.attribute13,
      attribute14 = l_evh_rec.attribute14,
      attribute15 = l_evh_rec.attribute15,
          country_code = l_evh_rec.country_code,
          business_unit_id = l_evh_rec.business_unit_id,
          event_calendar  = l_evh_rec.event_calendar,
          start_period_name = l_evh_rec.start_period_name,
          end_period_name = l_evh_rec.end_period_name,
          global_flag = nvl(l_evh_rec.global_flag, 'N'),
          task_id = l_evh_rec.task_id,
          program_id = l_evh_rec.program_id
         ,CREATE_ATTENDANT_LEAD_FLAG = l_evh_rec.CREATE_ATTENDANT_LEAD_FLAG /*hornet*/
         ,CREATE_REGISTRANT_LEAD_FLAG = l_evh_rec.CREATE_REGISTRANT_LEAD_FLAG /*hornet*/
         ,EVENT_PURPOSE_CODE = l_evh_rec.EVENT_PURPOSE_CODE /*hornet*/
   WHERE event_header_id = l_evh_rec.event_header_id
   AND object_version_number = l_evh_rec.object_version_number;
Line: 1602

   UPDATE ams_event_headers_all_b SET
      last_update_date = SYSDATE,
      last_updated_by = FND_GLOBAL.user_id,
      last_update_login = FND_GLOBAL.conc_login_id,
      object_version_number = l_evh_rec.object_version_number + 1,
      application_id = l_evh_rec.application_id,
      event_type_code = l_evh_rec.event_type_code,
          source_code = l_evh_rec.source_code,
      active_flag = l_evh_rec.active_flag,
      private_flag = l_evh_rec.private_flag,
      user_status_id = l_evh_rec.user_status_id,
      system_status_code = l_evh_rec.system_status_code,
      last_status_date = l_evh_rec.last_status_date,
      stream_type_code = l_evh_rec.stream_type_code,
      event_standalone_flag = l_evh_rec.event_standalone_flag,
      day_of_event = l_evh_rec.day_of_event,
          agenda_start_time = to_date((to_char(l_evh_rec.agenda_start_time,'HH24:MI')),'HH24:MI'),
          agenda_end_time = to_date((to_char(l_evh_rec.agenda_end_time,'HH24:MI')),'HH24:MI'),
      reg_required_flag = l_evh_rec.reg_required_flag,
      reg_charge_flag = l_evh_rec.reg_charge_flag,
      reg_invited_only_flag = l_evh_rec.reg_invited_only_flag,
      partner_flag = l_evh_rec.partner_flag,
      overflow_flag = l_evh_rec.overflow_flag,
      parent_event_header_id = l_evh_rec.parent_event_header_id,
      duration = l_evh_rec.duration,
      duration_uom_code = l_evh_rec.duration_uom_code,
      active_from_date = l_evh_rec.active_from_date,
      active_to_date = l_evh_rec.active_to_date,
      reg_maximum_capacity = l_evh_rec.reg_maximum_capacity,
      reg_minimum_capacity = l_evh_rec.reg_minimum_capacity,
      main_language_code = l_evh_rec.main_language_code,
      cert_credit_type_code = l_evh_rec.cert_credit_type_code,
      certification_credits = l_evh_rec.certification_credits,
      organization_id = l_evh_rec.organization_id,                              -- check if update is allowed on this field.
      inventory_item_id = l_evh_rec.inventory_item_id,                  -- check if update is allowed on this field.
      forecasted_revenue = l_evh_rec.forecasted_revenue,
      actual_revenue = l_evh_rec.actual_revenue,
      forecasted_cost = l_evh_rec.forecasted_cost,
      actual_cost = l_evh_rec.actual_cost,
      coordinator_id = l_evh_rec.coordinator_id,
      fund_source_type_code = l_evh_rec.fund_source_type_code,
      fund_source_id = l_evh_rec.fund_source_id,
      fund_amount_tc = l_evh_rec.fund_amount_tc,
      fund_amount_fc = l_evh_rec.fund_amount_fc,
      currency_code_tc = l_evh_rec.currency_code_tc,
      currency_code_fc = l_evh_rec.currency_code_fc,
      owner_user_id = l_evh_rec.owner_user_id,
      url = l_evh_rec.url,
      phone = l_evh_rec.phone,
      email = l_evh_rec.email,
      priority_type_code = l_evh_rec.priority_type_code,
      cancellation_reason_code = l_evh_rec.cancellation_reason_code,
      inbound_script_name = l_evh_rec.inbound_script_name,
      attribute_category = l_evh_rec.attribute_category,
      attribute1 = l_evh_rec.attribute1,
      attribute2 = l_evh_rec.attribute2,
      attribute3 = l_evh_rec.attribute3,
      attribute4 = l_evh_rec.attribute4,
      attribute5 = l_evh_rec.attribute5,
      attribute6 = l_evh_rec.attribute6,
      attribute7 = l_evh_rec.attribute7,
      attribute8 = l_evh_rec.attribute8,
      attribute9 = l_evh_rec.attribute9,
      attribute10 = l_evh_rec.attribute10,
      attribute11 = l_evh_rec.attribute11,
      attribute12 = l_evh_rec.attribute12,
      attribute13 = l_evh_rec.attribute13,
      attribute14 = l_evh_rec.attribute14,
      attribute15 = l_evh_rec.attribute15,
          country_code = l_evh_rec.country_code,
          business_unit_id = l_evh_rec.business_unit_id,
          event_calendar  = l_evh_rec.event_calendar,
          start_period_name = l_evh_rec.start_period_name,
          end_period_name = l_evh_rec.end_period_name,
          global_flag = nvl(l_evh_rec.global_flag, 'N')
   WHERE event_header_id = l_evh_rec.event_header_id
   AND object_version_number = l_evh_rec.object_version_number;
Line: 1688

       AMS_Utility_PVT.debug_message(l_full_name ||': update done');
Line: 1709

       AMS_Utility_PVT.debug_message('FOR NAGEN : Before Update evhname = ' || l_evh_rec.event_header_name);
Line: 1713

       AMS_Utility_PVT.debug_message('FOR NAGEN : Before Update evhdesc = ' || l_evh_rec.description);
Line: 1719

   update ams_event_headers_all_tl set
      event_header_name = l_evh_rec.event_header_name,
      event_mktg_message = l_evh_rec.event_mktg_message,
      description = l_evh_rec.description,
      last_update_date = SYSDATE,
      last_updated_by = FND_GLOBAL.user_id,
      last_update_login = FND_GLOBAL.conc_login_id,
      source_lang = USERENV('LANG')
   WHERE event_header_id = l_evh_rec.event_header_id
   AND USERENV('LANG') IN (language, source_lang);
Line: 1750

           AMS_EvhRules_PVT.update_event_status(
                                           p_event_id => l_evh_rec.event_header_id,
                                           p_event_activity_type => 'EVEH',
                                           p_user_status_id => l_evh_rec.user_status_id,
                                           p_fund_amount_tc => l_evh_rec.fund_amount_tc,
                                           p_currency_code_tc => l_evh_rec.currency_code_tc
                                          );
Line: 1759

            AMS_Utility_PVT.debug_message('calling before Add_Update_Access_record');
Line: 1761

        AMS_EvhRules_PVT.Add_Update_Access_record(p_object_type => 'EVEH',
                                                  p_object_id => l_evh_rec.event_header_id,
                                                  p_Owner_user_id => l_evh_rec.owner_user_id,
                                                  x_return_status => l_return_status,
                                                  x_msg_count          => x_msg_count,
                                                 x_msg_data           => x_msg_data);
Line: 1769

            AMS_Utility_PVT.debug_message('after  before Add_Update_Access_record || l_return_status');
Line: 1814

      ROLLBACK TO update_event_header;
Line: 1823

      ROLLBACK TO update_event_header;
Line: 1832

      ROLLBACK TO update_event_header;
Line: 1845

END update_event_header;
Line: 2022

PROCEDURE check_evh_update_ok_items(
   p_evh_rec        IN  evh_rec_type,
   x_return_status  OUT NOCOPY VARCHAR2
)
IS

BEGIN
   x_return_status := FND_API.g_ret_sts_success;
Line: 2034

END check_evh_update_ok_items;
Line: 2165

   SELECT 1 FROM DUAL WHERE EXISTS (select 1 from ams_source_codes
                          where SOURCE_CODE = src_code_in);
Line: 2230

         /* source code should not be passed from screen and it can never be updated
         will not complete source code column in complete_evh_rec and will not
         update this column in update sql stmt
         CHANGE OF LOGIC: SOURCE CODE CAN BE PASSED FROM SCREEN
                WILL BE COMPLETED IN COMPLETE_EVH_REC AND WILL BE UPDATED
                UNDER EVENTRULES_API, WILL CHECK FOR UNIQUENESS OF SOURCE CODE PASSED AND REVOKE OLD CODE AND CREATE NEW ONE
                IF NECESSARY.
        HOWEVER, SOURCE CODE CANNOT BE CHANGED IF STATUS <> NEW... CHECKED IN BUSINESS RULES AS WELL...

   ELSIF p_evh_rec.source_code <> FND_API.g_miss_char THEN
      IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
      THEN
         FND_MESSAGE.set_name('AMS', 'AMS_EVH_CANT_UPD_SRCCODE');
Line: 2878

   IF p_validation_mode = JTF_PLSQL_API.g_update THEN
          check_evh_update_ok_items(
                p_evh_rec        => p_evh_rec,
                x_return_status  => x_return_status
          );
Line: 3129

        x_evh_rec.last_update_date := FND_API.g_miss_date;
Line: 3130

        x_evh_rec.last_updated_by := FND_API.g_miss_num;
Line: 3133

        x_evh_rec.last_update_login := FND_API.g_miss_num;
Line: 3324

   SELECT *
     FROM ams_event_headers_vl
     WHERE event_header_id = p_evh_rec.event_header_id;
Line: 3334

   select setup_type_id
   from ams_event_headers_all_b
   where event_header_id = p_evh_rec.event_header_id;
Line: 3734

PROCEDURE unit_test_update
IS

        l_evh_rec                       AMS_EVENTHEADER_PVT.evh_rec_type;
Line: 3758

    AMS_EVENTHEADER_PVT.update_event_header(
         p_api_version                  => 1.0                                   -- p_api_version
        ,p_init_msg_list                => FND_API.G_FALSE
        ,p_commit                               => FND_API.G_FALSE
        ,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_evh_rec                              => l_evh_rec
        );
Line: 3776

END unit_test_update;
Line: 3791

         SELECT status_code FROM ams_campaigns_v
                 WHERE campaign_id = p_evh_rec.program_id;
Line: 3834

         SELECT actual_exec_start_date , actual_exec_end_date FROM ams_campaigns_vl
                 WHERE campaign_id = p_evh_rec.program_id;
Line: 3838

    SELECT event_start_date AS start_date,
           event_end_date AS end_date
      FROM ams_event_offers_vl
   WHERE event_header_id = p_evh_rec.event_header_id and system_status_code<> 'CANCELLED';--implemented ER2381975 by anchaudh.
Line: 3955

PROCEDURE Update_Metrics (
        p_evh_rec          IN  evh_rec_type,
   x_return_status  OUT NOCOPY   VARCHAR2,
   x_msg_count OUT NOCOPY VARCHAR2,
   x_msg_data OUT NOCOPY VARCHAR2
 ) IS
l_program_id NUMBER;
Line: 3967

        SELECT program_id from ams_event_headers_v
        WHERE event_header_id = p_evh_rec.event_header_id;
Line: 3978

        1) When Program is removed or updated (changed)
        2) No need of calling when program is attached first time
      */

      IF( l_program_id IS NOT NULL )THEN
        IF( l_program_id <> nvl(p_evh_rec.program_id,0))THEN
            AMS_ACTMETRIC_PVT.INVALIDATE_ROLLUP(
               p_api_version => l_api_version,
               p_init_msg_list   => Fnd_Api.g_false,
               p_commit  => Fnd_Api.G_FALSE,

               x_return_status => x_return_status,
               x_msg_count => x_msg_count,
               x_msg_data => x_msg_data,

               p_used_by_type => 'EVEH',
               p_used_by_id => p_evh_rec.event_header_id
            );
Line: 4006

 END Update_Metrics;