HRMS: SIT Assignment to BGs Script

 declare

l_sp_info_type_id number;
l_flex_num number;
cursor c1 is
select business_Group_id
from per_special_info_types
where id_flex_num=<Sample SIT where required bg available>
order by 1;
begin
select id_flex_num
into l_flex_num
from fnd_id_flex_Structures
where id_flex_structure_code='<XXXXXXXXXX>';

for NEW_ASSN in C1
loop
per_sit_pkg.ins_sit ( p_special_information_type_id => l_sp_info_type_id,
p_id_flex_num => l_flex_num,
p_comments => null,
p_enabled_flag => null,
p_request_id => null,
p_program_application_idd => null,
p_program_id => null,
p_program_update_date => null,
p_attribute_category => null,
p_attribute1 => null,
p_attribute2 => null,
p_attribute3 => null,
p_attribute4 => null,
p_attribute5 => null,
p_attribute6 => null,
p_attribute7 => null,
p_attribute8 => null,
p_attribute9 => null,
p_attribute10 => null,
p_attribute11 => null,
p_attribute12 => null,
p_attribute13 => null,
p_attribute14 => null,
p_attribute15 => null,
p_attribute16 => null,
p_attribute17 => null,
p_attribute18 => null,
p_attribute19 => null,
p_attribute20 => null,
p_multiple_occurrences_flag => null,
);
per_sit_pkg.reset_usages( p_special_information_type_id => l_sp_info_type_id,
p_job_category => null,
p_position_category => null,
p_skill_category => null,
p_other_category => null,
p_osha_category => null,
p_ada_category => null
);

end loop;
end; 
/