dear all
I want load Orazation data through API name hr_organization_api.crate_organization in organization form i have some DFF field in organization form when i run my API script Organizatoin name and date from are insert in there respactive fields but DFF are not insert kindly help me in this regards. API script are given below
Regards
Moin
===========================
declare
v_validate BOOLEAN;
v_effective_date DATE;
--,p_language_code VARCHAR2;
v_business_group_id NUMBER;
v_date_from DATE;
v_name VARCHAR2(100);
v_location_id number;
-- ,p_date_to in date default null
-- ,p_internal_external_flag in varchar2 default null
-- ,p_internal_address_line in varchar2 default null
v_type varchar2(200);
v_attribute1 varchar2(100);
v_attribute4 varchar2(100);
v_attribute5 varchar2(100);
v_attribute6 varchar2(100);
v_organization_id NUMBER; -- out_p
v_object_version_number NUMBER; -- out_p
v_duplicate_org_warning BOOLEAN; --out_p
v_loc_id number;
/*
cursor loc_cur is select distinct reagion||' '|| decode (to_char(level_1), 1, '(' ||'Region'|| ')',
2, '(' ||'Area'||')',
3, '(' ||'Station'||')' ||'-'||type) org_name,
decode(type, 'D', 'Distribution',
'T', 'Transmission') core_function_att4,
-- '01-JAN-1948' effecttive_date,
code org_code_att1,
decode ( to_char(level_1), 1, 'Region',
2, 'Area',
3, 'Station') type,
short_name Sh_name_att5,
head_code HC_Att6
from loc_tab1;
*/
--loc_det loc_cur%rowtype;
begin
/*
open loc_cur;
loop
fetch loc_cur into loc_det;
exit when loc_cur%notfound;
*/
/*select loc.location_id into v_loc_id
from hr_locations_all loc, LOC_TAB1 b
where upper(loc.location_code) = upper(b.reagion||decode(to_char(level_1),1, 'Region',
2, 'Area',
3, 'Station') || '('||type||')')
and loc.location_id = 2376
and business_group_id = 102;*/
hr_organization_api.create_organization(
p_validate => False
,p_effective_date => to_date('01-JAN-2005','DD-MON-YYYY')
--,p_language_code
,p_business_group_id => 202
,p_date_from => to_date('01-JAN-2005','DD-MON-YYYY')
,p_name => 'SNGPL Head Office' --loc_det.org_name
,p_location_id => v_location_id -- v_loc_id
-- ,p_date_to in date default null
-- ,p_internal_external_flag in varchar2 default null
-- ,p_internal_address_line in varchar2 default null
,p_type => v_type --loc_det.type
-- ,p_comments in varchar2 default null
-- ,p_attribute_category in varchar2 default null
,p_attribute1 => '10000' -- loc_det.org_code_att1
,p_attribute2 => 'ABC'
,p_attribute3 => 'ABC'
--,p_attribute4 => '5100000' --loc_det.core_function_att4
,p_attribute5 => 'SNGPL HO' --loc_det.Sh_name_att5
,p_attribute6 => '12345' --loc_det.HC_Att6
,p_organization_id => v_organization_id -- out_p
,p_object_version_number => v_object_version_number -- out_p
,p_duplicate_org_warning => v_duplicate_org_warning
);
--end loop;
--close loc_cur;
--exception
--when no_data_found then
--dbms_output.put_line (v_organization_id);
end;
API Script Not working
-
- Posts: 2
- Joined: Tue May 19, 2009 7:22 pm
- Location: USA
-
- Posts: 258
- Joined: Sun Oct 12, 2008 1:50 pm
- Location: Saudi Arabia
- Contact:
Who is online
Users browsing this forum: No registered users and 0 guests