[WEB]FORM의 DATA를 ARRAY PROCESSING하는 방법 - Application Server (Korean)

제품: Application Server
작성날짜 : 1998-06-22
[WEB]Form의 Data를 Array Processing하는 방법
FormText에서 입력된 자료를 PL/SQL을 통해 Array방식으로 Parameter passing
하는 방법을 소개 합니다.
Data를 전송하는 방법은 POST 방식으로 해야 가능합니다.
(※ 주: WebServer V2.1 이상에서 적용 바랍니다.)
create or replace procedure para_form
as
begin
htp.htmlOpen;
htp.headOpen;
htp.title( 'Owa Parameter passing demo form' );
htp.headClose;
htp.bodyOpen;
htp.formOpen( '/rc/owa/para_form2', 'POST' );
htp.formSubmit( NULL );
htp.br;
for i in 1 .. 100 loop
begin
htp.formHidden( 'p_names', i);
htp.formText ( 'p_values', 30, 30, i);
htp.br;
exception
when no_data_found then exit;
end;
end loop;
htp.formClose;
htp.bodyClose;
htp.htmlClose;
end para_form;
/
show errors;
create or replace procedure para_form2
( p_names in owa.vc_arr,
p_values in owa.vc_arr)
as
begin
htp.htmlOpen;
htp.headOpen;
htp.title( 'Owa Parameter passing demo form2' );
htp.headClose;
htp.bodyOpen;
for i in 1 .. 100 loop
begin
htp.p( i || ') The value of the variable ' || p_names(i) );
htp.p( 'is ' || p_values(i) );
htp.br;
exception
when no_data_found then exit;
end;
end loop;
htp.hr;
htp.bodyClose;
htp.htmlClose;
end para_form2;
/
show errors;

Related

how to assign project specific task with the newly created projects ?

Hi All,
I need help. I need to assign project specific tasks (which i will be taking from staging table) other than the default task which are assigned during project creation. How do I proceed with this within same package. I am attaching the code of my package below...
-----------------------------------------------------------------------------------------------------------------------------------------------------------
CREATE OR REPLACE PACKAGE body xxpa_proj_conv_pkg as
PROCEDURE xxpa_create_project_proc(O_ERRBUF OUT VARCHAR2,O_RETCODE OUT VARCHAR2)
is
variables need to derive global parameters
v_responsibility_id NUMBER; --- PA Supervisor responsibility id
v_user_id NUMBER;
deriving global parameters-
-- Variables needed for API standard parameters
v_api_version_number NUMBER := 1.0;
v_commit VARCHAR2(1) := 'F';
v_return_status VARCHAR2(1);
v_init_msg_list VARCHAR2(1) := 'F';
v_msg_count NUMBER;
v_msg_index_out NUMBER;
v_msg_data VARCHAR2(2000);
v_data VARCHAR2(2000);
v_workflow_started VARCHAR2(1) := 'Y';
v_pm_product_code VARCHAR2(10);
---variables for catching errors---
v_error_flag number:=0;
-- Predefined Composite data types
v_project_in PA_PROJECT_PUB.PROJECT_IN_REC_TYPE;
v_project_out PA_PROJECT_PUB.PROJECT_OUT_REC_TYPE;
v_key_members PA_PROJECT_PUB.PROJECT_ROLE_TBL_TYPE;
v_class_categories PA_PROJECT_PUB.CLASS_CATEGORY_TBL_TYPE;
v_tasks_in_rec PA_PROJECT_PUB.TASK_IN_REC_TYPE;
v_tasks_in PA_PROJECT_PUB.TASK_IN_TBL_TYPE;
v_tasks_out_rec PA_PROJECT_PUB.TASK_OUT_REC_TYPE;
v_tasks_out PA_PROJECT_PUB.TASK_OUT_TBL_TYPE;
v_CREATED_FROM_PROJECT_ID varchar2(20);
v_CARRYING_OUT_ORGANIZATION_ID varchar2(20);
v_person_id NUMBER;
v_project_role_type VARCHAR2(20);
API_ERROR EXCEPTION;
v_a NUMBER;
cursor for project in data
CURSOR cur_project_in_data IS SELECT * FROM XXPA_PROJECT_IN_STG;
cursor for task data
CURSOR cur_task_in_data IS SELECT * FROM XXPA_TASK_IN_STG;
------------------------Cursors used for validations----------------------------------
cursor for product code used for validation
cursor cprc is select distinct PROJECT_RELATIONSHIP_CODE from PA_PROJECT_CUSTOMERS;
cursor for distribution rule-
cursor cdr is select DISTRIBUTION_RULE from PA_DISTRIBUTION_RULES;
cursor for project status code
cursor cpsc is SELECT PROJECT_STATUS_CODE, PROJECT_STATUS_NAME FROM PA_PROJECT_STATUSES WHERE STATUS_TYPE = 'PROJECT';
cursor for template/created from project id
cursor ccpid is select project_id from pa_projects where template_flag='Y';
BEGIN
select user_id, responsibility_id into v_user_id, v_responsibility_id
from PA_USER_RESP_V
where user_name like 'amit_kumar%'
and responsibility_name like'PA SupervisorS';
-- --Fnd_global.apps_initialize(user_id,resp_id, resp_appl_id);
-- Fnd_global.apps_initialize(v_user_id,v_responsibility_id,275);
--
-- -------calling global parameters---
--
pa_interface_utils_pub.set_global_info
(
p_api_version_number =>v_api_version_number,
p_responsibility_id =>v_responsibility_id,
p_user_id =>v_user_id,
p_msg_count =>v_msg_count,
p_msg_data =>v_msg_data,
p_return_status =>v_return_status
);
--
dbms_output.put_line ('Set Global status ->' || v_return_status);
----Cursor for PRODUCT RELATED DATA-----------
FOR REC IN cur_project_in_data LOOP
-----PASSING VALUES TO THE COMPOSITE DATA TYPE(PROJECT_IN_REC_TYPE)-------
----retrieving product code-----
select lookup_code into v_pm_product_code
from pa_lookups
where lookup_type = 'PM_PRODUCT_CODE'
and meaning = 'Oracle Project Manufacturing';
-----retrieving and validating created from project id----
BEGIN
select project_id
into v_CREATED_FROM_PROJECT_ID
from pa_projects_all
where name=rec.created_from_project_name;
EXCEPTION
when others then
O_Retcode := '1';
O_Errbuf :='Incorrent CREATED_FROM_PROJECT_NAME';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where created_from_project_name = rec.CREATED_FROM_PROJECT_NAME;
END;
-----retrieving & validating carrying out organization id-----
BEGIN
select distinct(CARRYING_OUT_ORGANIZATION_ID)
into v_CARRYING_OUT_ORGANIZATION_ID
from pa_projects_prm_v
where CARRYING_OUT_ORGANIZATION_NAME=rec.carrying_out_organization_name;
EXCEPTION
when others then
O_Retcode := '1';
O_Errbuf :='Incorrent Carrying Out Organization name';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where carrying_out_organization_name = rec.carrying_out_organization_name;
END ;
v_project_in.pm_project_reference := rec.segment1;
v_project_in.project_name := rec.PROJECT_NAME;
v_project_in.created_from_project_id := v_CREATED_FROM_PROJECT_ID;
v_project_in.carrying_out_organization_id := v_CARRYING_OUT_ORGANIZATION_ID;
v_project_in.project_status_code := rec.PROJECT_STATUS_CODE;
v_project_in.description := rec.PROJECT_DESCRIPTION;
v_project_in.start_date := rec.PROJECT_START_DATE;
v_project_in.completion_date := rec.PROJECT_COMPLETION_DATE;
v_project_in.distribution_rule := rec.DISTRIBUTION_RULE;
v_project_in.project_relationship_code := rec.PROJECT_RELATIONSHIP_CODE;
-------------------------Validation of incoming project data--------------------------------
v_error_flag := 1;
project relationship code validation
BEGIN
for prc in cprc
loop
if (rec.PROJECT_RELATIONSHIP_CODE=prc.PROJECT_RELATIONSHIP_CODE) or (rec.PROJECT_RELATIONSHIP_CODE is null)--can be overridden from template
then
v_error_flag :=0;
else null;
end if;
end loop;
END;
project distribution rule validation
BEGIN
for dr in cdr
loop
if (rec.DISTRIBUTION_RULE=dr.DISTRIBUTION_RULE) or (rec.DISTRIBUTION_RULE is null) null since the value can be taken from template too
then
v_error_flag :=0;
else null;
end if;
end loop;
END;
project status code validation
BEGIN
for sc in cpsc
loop
if (rec.PROJECT_STATUS_CODE=sc.PROJECT_STATUS_CODE) or (rec.PROJECT_STATUS_CODE is null) null since the value can be taken from template too
then
v_error_flag :=0;
else null;
end if;
end loop;
END;
dbms_output.put_line ('Error at PROJECT_STATUS_CODE>' ||v_error_flag);
validation logic for project start date
BEGIN
if TRUNC(rec.PROJECT_START_DATE) >= TRUNC(rec.PROJECT_COMPLETION_DATE)
THEN
v_error_flag := 1;
O_Retcode := '1';
O_Errbuf :='Project start date cannnot be greater than completion date';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
END IF;
END;
validation logic for project completion date
BEGIN
if (TRUNC(rec.PROJECT_COMPLETION_DATE)<=TRUNC(rec.PROJECT_START_DATE))
then
if ( rec.PROJECT_STATUS_CODE='CLOSED' and rec.PROJECT_COMPLETION_DATE>sysdate)
THEN
v_error_flag := 1;
O_Retcode := '1';
O_Errbuf :='completion date cannot be greater than sysdate for closed projects';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
END IF;
v_error_flag := 1;
O_Retcode := '1';
O_Errbuf :='Project closed date cannot be less than start date';
end if;
END;
--------Update staging table for the error records--------
BEGIN
if v_error_flag =1
then
O_Retcode := '1';
O_Errbuf :='Incorrect project relationship code';
Fnd_File.Put_Line (Fnd_File.LOG, O_Errbuf);
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET ERROR_FLAG ='1' ,last_updation_date='sysdate' where PROJECT_RELATIONSHIP_CODE = rec.PROJECT_RELATIONSHIP_CODE;
end if;
END;
-----------------------End of validation of incoming project data----------------------------------
---------------Project Task DATA-----------------
v_a:=0;
FOR tsk IN cur_task_in_data LOOP
v_tasks_in_rec.pm_task_reference :=tsk.task_reference ;
v_tasks_in_rec.task_name :=tsk.task_name;
v_tasks_in_rec.pm_parent_task_reference :=tsk.parent_task_reference ;
v_tasks_in_rec.task_start_date :=tsk.task_start_date ;
v_tasks_in_rec.task_completion_date :=tsk.task_completion_date ;
v_tasks_in(v_a) := v_tasks_in_rec;
v_a:=v_a+1;
end loop;
---------------end of task details------------------
--INIT_CREATE_PROJECT
pa_project_pub.init_project;
---------------------CREATE_PROJECT--------------------------
pa_project_pub.create_project(
p_api_version_number=> v_api_version_number,
p_commit => v_commit,
p_init_msg_list => v_init_msg_list,
p_msg_count => v_msg_count,
p_msg_data => v_msg_data,
p_return_status => v_return_status,
p_workflow_started => v_workflow_started,
p_pm_product_code => v_pm_product_code,
p_project_in => v_project_in,
p_project_out => v_project_out,
p_key_members => v_key_members,
p_class_categories => v_class_categories,
p_tasks_in => v_tasks_in,
p_tasks_out => v_tasks_out);
if v_return_status = 'S'
then
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET INTERFACE_STATUS ='Success' where segment1 = v_project_out.pa_project_number; ---P->pending & S-> Success
dbms_output.put_line('New Project Id: ' || v_project_out.pa_project_id);
dbms_output.put_line('New Project Number: ' || v_project_out.pa_project_number);
else
UPDATE XXPA.XXPA_PROJECT_IN_STG
SET INTERFACE_STATUS ='Pending' where segment1 = v_project_out.pa_project_number;
raise API_ERROR;
end if;
END LOOP;
Commit;
------Handling Exception--------
EXCEPTION
WHEN api_error THEN
dbms_output.put_line('An error occured during project creation');
IF (v_msg_count > 0 ) THEN
FOR i IN 1..v_msg_count LOOP
apps.PA_INTERFACE_UTILS_PUB.get_messages(
p_msg_count => v_msg_count,
p_encoded => 'F',
p_msg_index => i,
p_msg_data => v_msg_data,
p_data => v_data,
p_msg_index_out => v_msg_index_out);
dbms_output.put_line('Error message v_data ->'||v_data);
dbms_output.put_line('Error message v_msg_data ->'||v_msg_data);
dbms_output.put_line('Error message v_msg_index_out ->'||v_msg_index_out);
dbms_output.put_line('Error message p_msg_index ->'||i);
APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
END LOOP;
END IF;
WHEN OTHERS THEN
dbms_output.put_line('An error occured during conversion, SQLCODE ->'|| SQLERRM);
IF (v_msg_count >=1 ) THEN
FOR i IN 1..v_msg_count LOOP
PA_INTERFACE_UTILS_PUB.get_messages(
p_msg_count => v_msg_count,
p_msg_index => i,
p_encoded => 'F',
p_msg_data => v_msg_data,
p_data => v_data,
p_msg_index_out => v_msg_index_out);
dbms_output.put_line('Error message ->'||v_data);
APPS.fnd_file.put_line(APPS.FND_FILE.LOG,v_data);
END LOOP;
END IF;
end; --end procedure
END xxpa_proj_conv_pkg;
--------------------------------------------------------------
* Please tell me how to assign project specific task with the newly created projects??? *
Also please tell me how to assign multiple * Project_Relationship_Code * (ex: END CLIENT, GENERAL CONTRACTOR, PRIMARY) for a particular project during project creation? 
Are you not storing the project number in the staging table designed for storing the task data? You can use create_project API to create the project and tasks at the same time with one single call. You may want to try that option

입력한 두 단어를 문구에 넣어 출력하는 방법

제품: Application Server
작성날짜 : 1997-11-20
/* 패키지의 spec 을 정의한 부분 */
CREATE OR REPLACE PACKAGE hanseo AS
PROCEDURE aaa(p_str IN VARCHAR2 DEFAULT NULL);
PROCEDURE bbb(p_str IN VARCHAR2 DEFAULT NULL);
END hanseo;
/
show error;
/
/* 패키지의 spec 의 끝 */
/* 패키지의 body 부분을 정의한 부분 */
CREATE OR REPLACE PACKAGE BODY hanseo AS
PROCEDURE aaa(p_str IN VARCHAR2 DEFAULT NULL)
IS
BEGIN
htp.htmlopen;
htp.headopen;
htp.title('테스트입니다');
htp.headclose;
htp.comment('Thanks');
htp.bodyopen;
htp.paragraph('CENTER');
htp.print(' 다음은 테스트 화면입니다 ');
htp.br;
htp.formopen('hanseo.aaa');
htp.centeropen;
htp.print(' 문구 : ');
htp.formtext('p_str');
htp.br;
htp.br;
htp.formSubmit (cvalue=>'수행');
htp.formreset (cvalue=>'취소');
htp.formclose;
IF (p_str IS NOT NULL) THEN
bbb(p_str);
END IF;
htp.centerclose;
htp.bodyclose;
htp.htmlclose;
END aaa;
PROCEDURE bbb(p_str IN VARCHAR2 default null)
IS
pos integer;
BEGIN
pos := instr(p_str,',');
htp.p(substr(p_str,1,pos-1)||'은 학생이고,
'||substr(p_str,pos+1)||'은 회사이다');
END bbb;
END hanseo;
/
show error;

R12 API Supplier site purpose shows blank after set pay_site_flag:='Y';

hi,
i have set the pay_site_flag of supplier site to 'Y', but when i go to Address Book, but the purpose shows blank. Click on Update, it brings me to the detail screen, the Payment also shown as not ticked.
any idea?
below is my code.
declare
-- Local variables here
x_return_status VARCHAR2(2000); x_msg_count NUMBER; x_msg_data VARCHAR2(2000);
p_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type; p_vendor_rec_null AP_VENDOR_PUB_PKG.r_vendor_rec_type;
x_vendor_id number; x_party_id number;
p_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type; p_vendor_site_rec_null AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
x_vendor_site_id number; x_party_site_id number; x_location_id number;
p_vendor_contact_rec AP_VENDOR_PUB_PKG.r_vendor_contact_rec_type; p_vendor_contact_rec_null AP_VENDOR_PUB_PKG.r_vendor_contact_rec_type;
x_vendor_contact_id number;     x_per_party_id number;     x_rel_party_id number;     x_rel_id number;     x_org_contact_id number;
     x_cparty_site_id number;
begin
p_vendor_rec:=p_vendor_rec_null;
p_vendor_rec.segment1:='R0003_12'; p_vendor_rec.VENDOR_NAME:='3ED FORKLIFTS REPAIRERS_12'; p_vendor_rec.VENDOR_NAME_alt:='3ED FORKLIFTS REPAIRERS_12';
p_vendor_rec.INVOICE_CURRENCY_CODE:='SGD'; p_vendor_rec.PAYMENT_CURRENCY_CODE:='SGD';
begin
select term_id into p_vendor_rec.terms_id from AP_TERMS_TL where upper(description)=upper('30 DAYS');
exception when others then
rollback;
dbms_output.put_line('error term id not found:'||'30 DAYS');
return;
end;
p_vendor_rec.ext_payee_rec.default_pmt_method := 'CHECK';
AP_VENDOR_PUB_PKG.Create_Vendor(p_api_version=>1,
     p_init_msg_list=>'T',
     x_return_status=>x_return_status,
     x_msg_count=>x_msg_count,
     x_msg_data=>x_msg_data,
     p_vendor_rec=>p_vendor_rec,
     x_vendor_id=>x_vendor_id,
     x_party_id=>x_party_id);
DBMS_OUTPUT.put_line('creating vendor id:'||x_vendor_id||',party id:'||x_party_id);
if x_return_status!='S' then
DBMS_OUTPUT.put_line('x_msg_count = ' || TO_CHAR(x_msg_count));
DBMS_OUTPUT.put_line(SUBSTR('x_msg_data = ' || x_msg_data, 1, 255));
IF x_msg_count > 1 then
FOR i IN 1 .. x_msg_count loop
DBMS_OUTPUT.put_line(i|| '. '|| SUBSTR(fnd_msg_pub.get(p_encoded => fnd_api.g_false),1,255));
END LOOP;
END IF;
rollback;
return;
end if;
--must select from hr_operating_units to see what is the org_id!
p_vendor_site_rec:=p_vendor_site_rec_null;
p_vendor_site_rec.vendor_id:=x_vendor_id; p_vendor_site_rec.vendor_site_code:=1001; p_vendor_site_rec.country:='SG';
p_vendor_site_rec.address_line1:='NO.22 SUNGEI KADUT WAY'; p_vendor_site_rec.address_line2:='SINGAPORE 728777';
p_vendor_site_rec.terms_id:=p_vendor_rec.terms_id; p_vendor_site_rec.org_id:=121;
p_vendor_site_rec.INVOICE_CURRENCY_CODE:='SGD'; p_vendor_site_rec.PAYMENT_CURRENCY_CODE:='SGD';
begin
select code_combination_id into p_vendor_site_rec.ACCTS_PAY_CODE_COMBINATION_ID from GL_CODE_COMBINATIONS where --LIABILITY
segment1||'-'||segment2||'-'||segment3||'-'||segment4||'-'||segment5||'-'||segment6||'-'||segment7='01-000-210060-00-0000-0000-000';
select code_combination_id into p_vendor_site_rec.PREPAY_CODE_COMBINATION_ID from GL_CODE_COMBINATIONS where --PREPAYMENT
segment1||'-'||segment2||'-'||segment3||'-'||segment4||'-'||segment5||'-'||segment6||'-'||segment7='01-000-150227-00-0000-0000-000';
exception when others then
rollback;
dbms_output.put_line('error not found for comb_id');
return;
end;
--HARCODE
p_vendor_site_rec.purchasing_site_flag:='N'; p_vendor_site_rec.pay_site_flag:='Y'; p_vendor_site_rec.PRIMARY_PAY_SITE_FLAG:='Y';
p_vendor_site_rec.EXT_PAYEE_REC.Exclusive_Pay_Flag:='Y';
p_vendor_site_rec.pay_on_receipt_summary_code:='RECEIPT'; p_vendor_site_rec.create_debit_memo_flag:='N';
p_vendor_site_rec.gapless_inv_num_flag:='N';
begin
select location_id into p_vendor_site_rec.ship_to_location_id from HR_LOCATIONS_ALL where location_code='UBTS MAIN';
exception when others then
rollback;
dbms_output.put_line('error not found for location_code=UBTS_MAIN');
return;
end;
p_vendor_site_rec.BILL_TO_LOCATION_ID:=p_vendor_site_rec.ship_to_location_id;
p_vendor_site_rec.address_style:='SG';
AP_VENDOR_PUB_PKG.create_vendor_site(p_api_version=>1,
     p_init_msg_list=>'T',
     x_return_status=>x_return_status,
     x_msg_count=>x_msg_count,
     x_msg_data=>x_msg_data,
     p_vendor_site_rec=>p_vendor_site_rec,
     x_vendor_site_id=>x_vendor_site_id,
     x_party_site_id=>x_party_site_id,
     x_location_id=>x_location_id);
DBMS_OUTPUT.put_line('creating vendor site id:'||x_vendor_id||',party site id:'||x_party_id||',location_id:'||x_location_id);
if x_return_status!='S' then
DBMS_OUTPUT.put_line('x_msg_count = ' || TO_CHAR(x_msg_count));
DBMS_OUTPUT.put_line(SUBSTR('x_msg_data = ' || x_msg_data, 1, 255));
IF x_msg_count > 1 then
FOR i IN 1 .. x_msg_count loop
DBMS_OUTPUT.put_line(i|| '. '|| SUBSTR(fnd_msg_pub.get(p_encoded => fnd_api.g_false),1,255));
END LOOP;
END IF;
rollback;
return;
end if; 
can anyone help me pls...

Update default Payment Method at vendor and vendor site level

Hi,
I need to update the default payment method from 'XXX' to 'YYY' (need to update the default payment method check box flag) for around 5000 vendors.
Could you please let me know is there any api available to update the same?
Thanks!! 
hi
>
Could you please let me know is there any api available to update the same?please check whether this API AP_VENDOR_PUB_PKG.Update_Vendor_Site is what you need to use
Suppliers -- >  payment method default
;) AppsMasti ;)
Sharing is Caring 
Hi,
I tried to update the default paymet mehtod with the below code, but was not updating in front end..in the back end it was saying successfully updated
DECLARE
v_error_reason VARCHAR2 (2000) := NULL;
v_msg_data VARCHAR2 (1000) := NULL;
v_msg_count NUMBER := NULL;
v_return_status VARCHAR2 (100) := NULL;
v_vensite_rec_type AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
ext_payee_rec IBY_DISBURSEMENT_SETUP_PUB.external_payee_rec_type;
BEGIN
DBMS_OUTPUT.put_line ('BEFORE apps initialization');
fnd_global.apps_initialize (8526, 50614, 200);
DBMS_OUTPUT.put_line ('AFTER apps initialization');
v_error_reason := NULL;
v_return_status := NULL;
v_msg_count := NULL;
v_msg_data := NULL;
ext_payee_rec.default_pmt_method := 'PRINTECH';
v_vensite_rec_type.ext_payee_rec.default_pmt_method:= 'PRINTECH';
DBMS_OUTPUT.put_line ('BEFORE remittance API');
AP_VENDOR_PUB_PKG.Update_Vendor_Site
( p_api_version => 1.0,
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 =>v_return_status ,
x_msg_count => v_msg_count,
x_msg_data => v_msg_data,
p_vendor_site_rec =>v_vensite_rec_type,
p_vendor_site_id => '702'
);
commit;
DBMS_OUTPUT.put_line ('AFTER pymt mtd API');
DBMS_OUTPUT.put_line (v_return_status);
DBMS_OUTPUT.put_line (v_msg_count);
DBMS_OUTPUT.put_line (v_msg_data);
DBMS_OUTPUT.put_line ( fnd_api.g_ret_sts_success);
IF v_return_status =fnd_api.g_ret_sts_success THEN
IF v_msg_count >= 1 THEN
FOR i IN 1 .. v_msg_count
LOOP
IF v_error_reason IS NULL THEN
v_error_reason := SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false), 1, 255);
ELSE
v_error_reason := v_error_reason|| ' ,'|| SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false), 1, 255);
END IF;
DBMS_OUTPUT.put_line ('VENDOR_remittance email UPDATE API ERROR-' || v_error_reason);
END LOOP;
END IF;
ROLLBACK;
ELSE
DBMS_OUTPUT.put_line ('The updation is sucessful');
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line (SQLERRM || '-' || SQLCODE);
END;
Edited by: NZ on May 14, 2013 1:12 AM 
Can anybody correct me out with this code.. 
Did you query it after it updated successfully ?
please see this
Payment Method Defaulted is Inactive [ID 1290279.1]
Payment Method Defaults for Suppliers at the Table Level [ID 737128.1]
Supplier Does Not Default Correct Payment Method [ID 1549325.1]
Supplier Does Not Default Payment Method Due to Duplicate Payees [ID 1231460.1]
How to Get Default Payment Method For Supplier from Back End(Database) [ID 848023.1]
Default Payment Method at Supplier level Incorrect After Upgrade to R12 [ID 1088977.1]
;) AppsMAsti ;)
Sharing is Caring 
Yes, i queried but was not updated.. it will be very helpful if u can check and update me..
We r using 12.1.3 instance.
Thanks in advance!!

Extending send_mail

I am using this code (below) within a procedure and it is working great. But, I can not figure out the symantecs on how to add more than the two e-mails to the recipient list. Any help would be greatly appreciated.
Thanks.
Brian
send_email( sender => 'senderemail#test.com',
recipient => 'recipemail#test.com',
add_recip => 'addrecipemail#test.com',
subject => 'test',
message => ..... 
I found another alternative that you can try which purportedly allows you to use multiple recipients. This one I got from Metalink. I haven't tried it myself, but I assume it works. Here it is pasted below:
--------------------------------------------------------
From: Michael Devlin 11-Sep-02 13:12
Subject: Re : utl_smtp for multiple recipients
In case anyone is looking for the code to actually do this:
(sender varchar2, recipient varchar2, subj varchar2, msg varchar2) is
--(sender varchar2, recipient varchar2, subrecipient varchar2, subj varchar2, msg varchar2) is
--v_OutPutFileHandle UTL_FILE.FILE_TYPE ;
conn utl_smtp.connection;
smtp_host varchar2(50) := 'fs-ajd03';
port varchar2(2) := 25;
--mesg varchar2(2000) := null;
cr varchar2(2) := chr(10)||chr(13);
subj_line varchar2(50);
commaPos number(3) := 0;
recipientlist varchar2(2000);
subrecipient varchar2(50) := '';
BEGIN
--v_OutputFileHandle := UTL_FILE.FOPEN('c:\temp\', 'test1.txt', 'w');
conn := utl_smtp.open_connection(smtp_host, port);
utl_smtp.helo(conn, smtp_host);
utl_smtp.mail(conn, sender);
--UTL_FILE.PUT_LINE(v_OutputFileHandle, sender);
UTL_FILE.PUT_LINE(v_OutputFileHandle, '---------------');
--UTL_FILE.PUT_LINE(v_OutputFileHandle, recipient);
commaPos := INSTR(recipient, ',');
IF commaPos > 0 THEN
recipientlist := recipient;
LOOP
subrecipient := SUBSTR(recipientlist, 1, INSTR(recipientlist, ',', 1, 1) - 1);
--UTL_FILE.PUT_LINE(v_OutputFileHandle, subrecipient);
utl_smtp.rcpt(conn, subrecipient);
commaPos := INSTR(recipientlist, ',');
recipientlist := LTRIM(SUBSTR(recipientlist, commaPos + 1));
--UTL_FILE.PUT_LINE(v_OutputFileHandle, recipientlist);
commaPos := INSTR(recipientlist, ',');
IF commaPos = 0 THEN
utl_smtp.rcpt(conn, recipientlist);
EXIT;
END IF;
END LOOP;
ELSE
utl_smtp.rcpt(conn, recipient);
END IF;
utl_smtp.open_data(conn);
subj_line := 'Subject: '||subj || cr;
utl_smtp.write_data(conn, subj_line);
--utl_smtp.write_data(conn, 'Date: ' || TO_CHAR( SYSDATE, 'dd-Mon-yy hh24:mi:ss' ) || cr);
--utl_smtp.send_header(mail_conn,' ');
utl_smtp.write_data(conn, msg);
utl_smtp.close_data(conn);
utl_smtp.quit(conn);
--UTL_FILE.FCLOSE(v_OutputFileHandle);
/*EXCEPTION
WHEN UTL_FILE.INVALID_PATH THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20100, 'Reset: Invalid Path');
WHEN UTL_FILE.INVALID_MODE THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20101, 'Reset: Invalid Mode');
WHEN UTL_FILE.INVALID_OPERATION THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20101, 'Reset: Invalid Operation');
WHEN UTL_FILE.INVALID_FILEHANDLE THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20101, 'Reset: Invalid File Handle');
WHEN VALUE_ERROR THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20101, 'Reset: Value Error');
WHEN UTL_FILE.READ_ERROR THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20101, 'Reset: Read Error');
WHEN UTL_FILE.INTERNAL_ERROR THEN
UTL_FILE.FCLOSE(v_OutputFileHandle);
RAISE_APPLICATION_ERROR(-20101, 'Reset: Internal Error');*/
END;
Michael P. Devlin
Developer/Programmer
A. James de Bruin & Sons
mdevlin#ajdebruin.com

Categories

Resources