API to add Employee(Worker) as Buyer --> po_agents_pkg.insert_row.
DECLARE
l_agent_id per_all_people_f.person_id%type := 'XXXX'; ---Person ID of an employee
l_employee_number VARCHAR2 (20);
l_buyer_rowid VARCHAR2 (100);
BEGIN
apps.po_agents_pkg.insert_row (x_rowid => l_buyer_rowid,
x_agent_id => l_agent_id,
x_last_update_date => SYSDATE,
x_last_updated_by => 0,
x_last_update_login => 0,
x_creation_date => SYSDATE,
x_created_by => 0,
x_location_id => NULL,
x_category_id => NULL,
x_authorization_limit => NULL,
x_start_date_active => SYSDATE,
x_end_date_active => NULL,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_attribute5 => NULL,
x_attribute6 => NULL,
x_attribute7 => NULL,
x_attribute8 => NULL,
x_attribute9 => NULL,
x_attribute10 => NULL,
x_attribute11 => NULL,
x_attribute12 => NULL,
x_attribute13 => NULL,
x_attribute14 => NULL,
x_attribute15 => NULL
);
COMMIT;
DBMS_OUTPUT.put_line ('Successfully Setup as a buyer ');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error in Setting up as Buyer ' || SQLERRM);
END;
DECLARE
l_agent_id per_all_people_f.person_id%type := 'XXXX'; ---Person ID of an employee
l_employee_number VARCHAR2 (20);
l_buyer_rowid VARCHAR2 (100);
BEGIN
apps.po_agents_pkg.insert_row (x_rowid => l_buyer_rowid,
x_agent_id => l_agent_id,
x_last_update_date => SYSDATE,
x_last_updated_by => 0,
x_last_update_login => 0,
x_creation_date => SYSDATE,
x_created_by => 0,
x_location_id => NULL,
x_category_id => NULL,
x_authorization_limit => NULL,
x_start_date_active => SYSDATE,
x_end_date_active => NULL,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_attribute5 => NULL,
x_attribute6 => NULL,
x_attribute7 => NULL,
x_attribute8 => NULL,
x_attribute9 => NULL,
x_attribute10 => NULL,
x_attribute11 => NULL,
x_attribute12 => NULL,
x_attribute13 => NULL,
x_attribute14 => NULL,
x_attribute15 => NULL
);
COMMIT;
DBMS_OUTPUT.put_line ('Successfully Setup as a buyer ');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error in Setting up as Buyer ' || SQLERRM);
END;
No comments:
Post a Comment