Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
supplier migration oracle apps

supplier migration oracle apps

Ratings: (0)|Views: 293 |Likes:
Published by priyanka532

More info:

Categories:Topics, Art & Design
Published by: priyanka532 on Mar 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

08/13/2014

pdf

text

original

 
CREATE OR REPLACE PACKAGE BODY APPS.XX_SUPPLIER_CREATE_PKG1 ASPROCEDURE XX_SUPPLIER_CREATE_PROC1(ERRBUF OUT VARCHAR2,RETCODE OUT NUMBER) ISl_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type;l_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;x_return_status VARCHAR2(2000);x_msg_count NUMBER;x_msg_data VARCHAR2(2000);l_upd number := 0;x_vendor_id number;x_party_id number;x_vendor_site_id number;x_party_site_id number;x_location_id number;l_party_site_id number;l_organization_id number;--============================================================================================================l_country_code VARCHAR2(20);l_error_flag varchar2(1):='N';l_error_mesg varchar2(2000);l_concat_error_mesg varchar2(4000);l_rec_count number :=0;l_rec_cnt_success number:=0;l_rec_cnt_failed number:=0;VENDOR_NAME varchar2(240);l_ship_to_location_code VARCHAR2(255);l_bill_to_location_code VARCHAR2(255);l_terms_disp VARCHAR2(255);l_country_of_origin_code VARCHAR2(255);SUMMARY_FLAG varchar2(10);ENABLED_FLAG varchar2(10);vat_registration_num varchar2(100);invoice_currency_code varchar2(100);vendor_id varchar2(100);L_PAYMENT_TERMS NUMBER;L_INVOICE_CURRENCY VARCHAR2(3);cursor c1 is select * from XX_SUPPLIER_STG where STATUS_CODE='N';beginFOR C_REC in c1 loopL_ERROR_FLAG :='N';L_ERROR_MESG := NULL;L_CONCAT_ERROR_MESG := NULL;-- L_PAYMENT_TERMS := NULL;L_INVOICE_CURRENCY := NULL;l_country_code :=NULL;l_rec_count:=l_rec_count+1;-- =====================================================-- CURRENCY VALIDATION STARTS ---- =====================================================FND_FILE.PUT_LINE ( fnd_file.LOG,'Currency Validation - Starts '); BEGINSELECT CURRENCY_CODEINTO L_INVOICE_CURRENCYFROM FND_CURRENCIESWHERE UPPER(CURRENCY_CODE)=UPPER(TRIM(C_REC.INVOICE_CURRENCY))AND ENABLED_FLAG='Y';
 
EXCEPTIONWHEN NO_DATA_FOUNDTHENl_error_mesg:='Currency not Defined';l_concat_error_mesg:=l_concat_error_mesg l_error_mesg;FND_FILE.PUT_LINE ( fnd_file.LOG,l_error_mesg);l_error_flag:='Y'; WHEN OTHERSTHENl_error_mesg:= SUBSTR(SQLERRM,1,255);FND_FILE.PUT_LINE ( fnd_file.LOG,l_error_mesg);l_concat_error_mesg:=l_concat_error_mesg'~'l_error_mesg;l_error_flag:='Y'; END;FND_FILE.PUT_LINE(FND_FILE.LOG,'Currency is 'L_INVOICE_CURRENCY);FND_FILE.PUT_LINE ( fnd_file.LOG,'Currency is 'L_INVOICE_CURRENCY); FND_FILE.PUT_LINE ( fnd_file.LOG,'Currency Validation - Ends '); -- =====================================================-- CURRENCY VALIDATION ENDS ---- =====================================================-- =====================================================-- PAYMENT TERMS VALIDATION STARTS ---- =====================================================FND_FILE.PUT_LINE ( fnd_file.LOG,'PAYMENT Validation - Starts ');IF C_REC.PAYMENT_TERMS IS NOT NULL THENBEGINSELECT ap_terms.term_idINTO L_PAYMENT_TERMSFROM ap_termsWHERE UPPER(ap_terms.NAME)=UPPER(TRIM(C_REC.PAYMENT_TERMS))AND ENABLED_FLAG='Y';EXCEPTIONWHEN NO_DATA_FOUNDTHENL_PAYMENT_TERMS:=10001;l_error_mesg:='PAYMENT not Defined';l_concat_error_mesg:=l_concat_error_mesg l_error_mesg;FND_FILE.PUT_LINE ( fnd_file.LOG,l_error_mesg);l_error_flag:='Y'; WHEN OTHERSTHENL_PAYMENT_TERMS:=10001;l_error_mesg:= SUBSTR(SQLERRM,1,255);FND_FILE.PUT_LINE ( fnd_file.LOG,l_error_mesg);l_concat_error_mesg:=l_concat_error_mesg'~'l_error_mesg;l_error_flag:='Y'; END;FND_FILE.PUT_LINE(FND_FILE.LOG,'PAYMENT is 'L_PAYMENT_TERMS);FND_FILE.PUT_LINE ( fnd_file.LOG,'PAYMENT is 'L_PAYMENT_TERMS); FND_FILE.PUT_LINE ( fnd_file.LOG,'PAYMENT Validation - Ends ');END IF;-- =====================================================
 
-- PAYMENT TERMS VALIDATION ENDS ---- =====================================================--country validation--================================================================FND_FILE.PUT_LINE ( fnd_file.LOG,'country Validation - Starts ');beginselect LOOKUP_CODEinto l_country_codefrom fnd_lookup_values where lookup_type='GHR_US_CNTRY_WRLD_CTZN'and meaning=trim(C_REC.COUNTRY)AND ENABLED_FLAG='Y';EXCEPTIONWHEN NO_DATA_FOUNDTHENl_error_mesg:='PAYMENT not Defined';l_concat_error_mesg:=l_concat_error_mesg l_error_mesg;FND_FILE.PUT_LINE ( fnd_file.LOG,l_error_mesg);l_error_flag:='Y'; WHEN OTHERSTHENl_error_mesg:= SUBSTR(SQLERRM,1,255);FND_FILE.PUT_LINE ( fnd_file.LOG,l_error_mesg);l_concat_error_mesg:=l_concat_error_mesg'~'l_error_mesg;l_error_flag:='Y';end;FND_FILE.PUT_LINE(FND_FILE.LOG,'country is 'l_country_code);FND_FILE.PUT_LINE ( fnd_file.LOG,'country is 'l_country_code); FND_FILE.PUT_LINE ( fnd_file.LOG,'country Validation - Ends ');--========================================================================================== BEGINIF l_error_flag ='N' THENl_vendor_rec.VENDOR_NAME := trim(C_REC.supplier_name);l_vendor_rec.SUMMARY_FLAG := 'N';l_vendor_rec.ENABLED_FLAG := 'Y';l_vendor_rec.invoice_currency_code:=TRIM(L_INVOICE_CURRENCY);--l_vendor_rec.TERMS_ID:=10001;--TRIM(nvl(L_PAYMENT_TERMS,10001));IF C_REC.PAYMENT_TERMS IS NOT NULL THENl_vendor_rec.TERMS_ID:=L_PAYMENT_TERMS;--TRIM(nvl(L_PAYMENT_TERMS,10001));ELSEl_vendor_rec.TERMS_ID:=10001;END IF;if C_REC.ALIAS is not null thenl_vendor_rec.VENDOR_NAME_ALT := TRIM(C_REC.ALIAS );end if;FND_FILE.PUT_LINE ( fnd_file.LOG,'STARTING API'); AP_VENDOR_PUB_PKG.Create_Vendor( p_api_version => 1,x_return_status => x_return_status,

Activity (4)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
smslca liked this
nagrajforever liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->