Monday, September 3, 2012

API to Create Organization Manager



DECLARE
   v_org_information_id      NUMBER;
   v_object_version_number   NUMBER;
   v_warning                 BOOLEAN;
BEGIN
   INSERT INTO fnd_sessions
     VALUES   (USERENV ('sessionid'), SYSDATE);

   hr_organization_api.create_org_manager (
      p_validate                => FALSE,
      p_effective_date          => TRUNC (SYSDATE),
      p_organization_id         => 569,
      p_org_info_type_code      => 'Organization Name Alias',
      p_org_information2        => 88247,
      p_org_information3        => TO_CHAR (TRUNC (SYSDATE),
                                            'YYYY/MM/DD HH24:MI:SS'),
      p_org_information4        => '4712/12/31 00:00:00',
      p_org_information_id      => v_org_information_id,
      p_object_version_number   => v_object_version_number,
      p_warning                 => v_warning
   );
   DBMS_OUTPUT.put_line ('success');
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (SQLERRM);
END;

No comments:

Post a Comment