Help for debug un package PL/SQL error at line 723 Encountered
create or replace package body SPR_AP_FUSION_EXTRACT_PKG is
PROCEDURE MAIN_FUSION_EXTRACT(
pv_errbuff IN OUT VARCHAR2,
pn_retcode IN OUT NUMBER
IS
lv_ligne VARCHAR2 (500);
lv_rep VARCHAR2 (260); --:= '/usr/tmp';
ln_retcode NUMBER;
vv_separator VARCHAR2 (2) := ';';
ln_compteur_lignes NUMBER := 0; -- nombre de lignes insérées dans le fichier
ln_counteur NUMBER := 0;
vv_buffer VARCHAR2 (32000);
vv_buffer_et VARCHAR2 (32000);
vv_buffer_etold VARCHAR2 (32000);
lt_id UTL_FILE.file_type;
ln_counter NUMBER (24, 0);
lv_seq VARCHAR2 (30);
lv_num_paiement VARCHAR2 (10);
flag_ecriture VARCHAR2 (1);
lv_filler_ligne VARCHAR2 (500);
ln_long_buff NUMBER := 0;
ln_compteur_factures NUMBER := 0;
lv_name VARCHAR2 (500);
vv_entete VARCHAR2 (500);
LV_INVOICE_ID ap_invoices_all.invoice_id%type;
ln_compteur_hold NUMBER := 0;
lv_hode_reason VARCHAR2 (500);
lv_release_reason VARCHAR2 (500);
lv_societe_absorbee VARCHAR2 (500);
lv_societe_absorbante VARCHAR2 (500);
ln_org_id NUMBER := 0;
lv_date_fusion DATE;
err_non_parameter Exception;
err_Soc_sr Exception;
err_file_write Exception;
err_file_invalid_path Exception;
err_ecriture_file Exception;
CURSOR cur_ap_hold_invoices
( LV$invoice_id IN AP_invoices_all.Invoice_Id%TYPE)
IS
SELECT aha.hold_reason, aha.release_reason
from ap_holds_all aha
where aha.invoice_id = LV$invoice_id
rec_ap_hold_invoices cur_ap_hold_invoices%ROWTYPE;
--Enregistrement "DESTINATAIRE"
CURSOR cur_fusion_extract_AP_invoice
( LV$Societe_absorbee IN cgey_parameters.VARCHAR2_VALUE%Type,
LV$Societe_absorbant IN cgey_parameters.VARCHAR2_VALUE%Type,
LV$Date_fusion IN cgey_parameters.DATE_VALUE%Type
IS
SELECT
Aia.Invoice_Id
, Aia.Invoice_Num
, Aia.Invoice_Type_Lookup_Code
, Aia.Invoice_Date
, Pv.Vendor_Id
, Pv.Segment1
, Pv.Vendor_Name
, pvsa.Vendor_Site_Id
, Pvsa.Vendor_Site_Code
, aia.invoice_amount
, aia.amount_paid
-- RG3: Montant repris = valeur restante a regler
, ROUND (NVL(SUM(Apsa.Amount_Remaining),0),2) Amount_Remaining
, Ap_Invoices_Utility_Pkg.get_approval_status(aia.invoice_id,aia.invoice_amount,aia.payment_status_flag,aia.invoice_type_lookup_code) STATUT
, aia.invoice_currency_code
, aia.exchange_rate
, aia.exchange_rate_type
, aia.exchange_date
, Ate.Name Terms_Name
, aia.terms_date
, aia.source
, aia.doc_category_code
, aia.payment_method_lookup_code
, aia.pay_group_lookup_code
, aia.gl_date
, Aia.Doc_Sequence_Id
, aia.accts_pay_code_combination_id
, CGEY_TOOLS_PKG.get_segments_from_ccid(Aia.Accts_Pay_Code_Combination_Id) Cle_Comptable_Founisseur
, aia.org_id
, aia.payment_cross_rate_type
, aia.payment_cross_rate_date
, aia.payment_cross_rate
, aia.payment_currency_code
, aia.attribute_category
, Aia.Attribute1
, Aia.Attribute2
, Aia.Attribute3
, Aia.Attribute4
, Aia.Attribute5
, Aia.Attribute6
, Aia.Attribute7
, Aia.Attribute8
, Aia.Attribute9
, Aia.Attribute10
, Aia.Attribute11
, Aia.Attribute12
, Aia.Attribute13
, Aia.Attribute14
, Aia.Attribute15
, Aia.Global_Attribute_Category
, Aia.Global_Attribute1
, Aia.Global_Attribute2
, Aia.Global_Attribute3
, Aia.Global_Attribute4
, Aia.Global_Attribute5
, Aia.Global_Attribute6
, Aia.Global_Attribute7
, Aia.Global_Attribute8
, Aia.Global_Attribute9
, Aia.Global_Attribute10
, Aia.Global_Attribute11
, Aia.Global_Attribute12
, Aia.Global_Attribute13
, Aia.Global_Attribute14
, Aia.Global_Attribute15
, Aia.Global_Attribute16
, Aia.Global_Attribute17
, Aia.Global_Attribute18
, Aia.Global_Attribute19
, Aia.Global_Attribute20
FROM
Ap_Invoices_All Aia
, Ap_Payment_Schedules_All Apsa
, Po_Vendor_Sites_All Pvsa
, Ap_Terms Ate
, Po_Vendors Pv
WHERE
1=1
-- RG1: Type de la facture
AND Aia.invoice_type_lookup_code IN ('STANDARD', 'CREDIT', 'DEBIT')
AND Apsa.Invoice_Id = Aia.Invoice_Id
AND Pvsa.Vendor_Site_Id = Aia.Vendor_Site_Id
AND Ate.Term_Id = Aia.Terms_Id
AND Pv.Vendor_Id = Aia.Vendor_Id
-- RG 1: pour les factures créées antétieur à la date de fusion
AND Aia.Creation_Date < LV$Date_fusion
-- RG1: Ensemble des lignes de la facture postees
AND NOT EXISTS ( SELECT 'x'
FROM
Ap_Invoice_Distributions_All Aida
WHERE
Aida.Invoice_id = Aia.Invoice_Id
AND NVL(Aida.Accrual_Posted_Flag,'N') <> 'Y' )
-- pour la société absorbée
AND aia.org_id = (select ORGANIZATION_ID from HR_ALL_ORGANIZATION_UNITS HAOU
where HAOU.Name = LV$Societe_absorbee
GROUP BY
Aia.Invoice_Id
, Aia.Invoice_Num
, Aia.Invoice_Type_Lookup_Code
, Aia.Invoice_Date
, Pv.Vendor_Id
, Pv.Segment1
, Pv.Vendor_Name
, pvsa.Vendor_Site_Id
, Pvsa.Vendor_Site_Code
, aia.invoice_amount
, aia.amount_paid
-- RG3: Montant repris = valeur restante a regler
, Apsa.Amount_Remaining
, aia.payment_status_flag
, aia.invoice_currency_code
, aia.exchange_rate
, aia.exchange_rate_type
, aia.exchange_date
, Ate.Name
, aia.terms_date
, aia.source
, aia.doc_category_code
, aia.payment_method_lookup_code
, aia.pay_group_lookup_code
, aia.gl_date
, Aia.Doc_Sequence_Id
, aia.accts_pay_code_combination_id
, aia.org_id
, aia.payment_cross_rate_type
, aia.payment_cross_rate_date
, aia.payment_cross_rate
, aia.payment_currency_code
, aia.attribute_category
, Aia.Attribute1
, Aia.Attribute2
, Aia.Attribute3
, Aia.Attribute4
, Aia.Attribute5
, Aia.Attribute6
, Aia.Attribute7
, Aia.Attribute8
, Aia.Attribute9
, Aia.Attribute10
, Aia.Attribute11
, Aia.Attribute12
, Aia.Attribute13
, Aia.Attribute14
, Aia.Attribute15
, Aia.Global_Attribute_Category
, Aia.Global_Attribute1
, Aia.Global_Attribute2
, Aia.Global_Attribute3
, Aia.Global_Attribute4
, Aia.Global_Attribute5
, Aia.Global_Attribute6
, Aia.Global_Attribute7
, Aia.Global_Attribute8
, Aia.Global_Attribute9
, Aia.Global_Attribute10
, Aia.Global_Attribute11
, Aia.Global_Attribute12
, Aia.Global_Attribute13
, Aia.Global_Attribute14
, Aia.Global_Attribute15
, Aia.Global_Attribute16
, Aia.Global_Attribute17
, Aia.Global_Attribute18
, Aia.Global_Attribute19
, Aia.Global_Attribute20
HAVING NVL(SUM(Apsa.Amount_Remaining),0) <> 0
UNION ALL
SELECT
Aia.Invoice_Id
, Aia.Invoice_Num
, Aia.Invoice_Type_Lookup_Code
, Aia.Invoice_Date
, Pv.Vendor_Id
, Pv.Segment1
, Pv.Vendor_Name
, pvsa.Vendor_Site_Id
, Pvsa.Vendor_Site_Code
, aia.invoice_amount
, aia.amount_paid
-- RG3: Montant repris = valeur restante a regler
, Ap_Invoices_Utility_PKG.get_prepay_amount_remaining (Aia.invoice_Id) "Amount_Remaining"
, Ap_Invoices_Utility_Pkg.get_approval_status(aia.invoice_id,aia.invoice_amount,aia.payment_status_flag,aia.invoice_type_lookup_code) STATUT
, aia.invoice_currency_code
, aia.exchange_rate
, aia.exchange_rate_type
, aia.exchange_date
, Ate.Name Terms_Name
, aia.terms_date
, aia.source
, aia.doc_category_code
, aia.payment_method_lookup_code
, aia.pay_group_lookup_code
, aia.gl_date
, Aia.Doc_Sequence_Id
, aia.accts_pay_code_combination_id
, CGEY_TOOLS_PKG.get_segments_from_ccid(Aia.Accts_Pay_Code_Combination_Id) Cle_Comptable_Founisseur
, aia.org_id
, aia.payment_cross_rate_type
, aia.payment_cross_rate_date
, aia.payment_cross_rate
, aia.payment_currency_code
, aia.attribute_category
, Aia.Attribute1
, Aia.Attribute2
, Aia.Attribute3
, Aia.Attribute4
, Aia.Attribute5
, Aia.Attribute6
, Aia.Attribute7
, Aia.Attribute8
, Aia.Attribute9
, Aia.Attribute10
, Aia.Attribute11
, Aia.Attribute12
, Aia.Attribute13
, Aia.Attribute14
, Aia.Attribute15
, Aia.Global_Attribute_Category
, Aia.Global_Attribute1
, Aia.Global_Attribute2
, Aia.Global_Attribute3
, Aia.Global_Attribute4
, Aia.Global_Attribute5
, Aia.Global_Attribute6
, Aia.Global_Attribute7
, Aia.Global_Attribute8
, Aia.Global_Attribute9
, Aia.Global_Attribute10
, Aia.Global_Attribute11
, Aia.Global_Attribute12
, Aia.Global_Attribute13
, Aia.Global_Attribute14
, Aia.Global_Attribute15
, Aia.Global_Attribute16
, Aia.Global_Attribute17
, Aia.Global_Attribute18
, Aia.Global_Attribute19
, Aia.Global_Attribute20
FROM
Ap_Invoices_All Aia
, Po_Vendor_Sites_All Pvsa
, Ap_Terms Ate
, Po_Vendors Pv
WHERE 1=1
-- RG2: Type de la facture
AND Aia.invoice_type_lookup_code = 'PREPAYMENT'
-- RG2: Amount_Paid <> Invoice_Amount
AND NVL(Aia.Invoice_Amount,0) = NVL(Aia.Amount_Paid,0)
AND Pvsa.Vendor_Site_Id = Aia.Vendor_Site_Id
AND Ate.Term_Id = Aia.Terms_Id
AND Pv.Vendor_Id = Aia.Vendor_Id
-- RG2: Ensemble des lignes de la facture postees
AND NOT EXISTS ( SELECT 'x'
FROM
Ap_Invoice_Distributions_All Aida
WHERE
Aida.Invoice_id = Aia.Invoice_Id
AND NVL(Aida.Accrual_Posted_Flag,'N') <> 'Y' )
-- pour la société absorbée
AND aia.org_id = (select ORGANIZATION_ID from HR_ALL_ORGANIZATION_UNITS HAOU
where HAOU.Name = LV$Societe_absorbee
-- RG 1: pour les factures créées antétieur à la date de fusion
AND Aia.Creation_Date < LV$Date_fusion
GROUP BY
Aia.Invoice_Id
, Aia.Invoice_Num
, Aia.Invoice_Type_Lookup_Code
, Aia.Invoice_Date
, Pv.Vendor_Id
, Pv.Segment1
, Pv.Vendor_Name
, pvsa.Vendor_Site_Id
, Pvsa.Vendor_Site_Code
, aia.invoice_amount
, aia.amount_paid
, aia.payment_status_flag
, aia.invoice_currency_code
, aia.exchange_rate
, aia.exchange_rate_type
, aia.exchange_date
, Ate.Name
, aia.terms_date
, aia.source
, aia.doc_category_code
, aia.payment_method_lookup_code
, aia.pay_group_lookup_code
, aia.gl_date
, Aia.Doc_Sequence_Id
, aia.accts_pay_code_combination_id
, aia.org_id
, aia.payment_cross_rate_type
, aia.payment_cross_rate_date
, aia.payment_cross_rate
, aia.payment_currency_code
, aia.attribute_category
, Aia.Attribute1
, Aia.Attribute2
, Aia.Attribute3
, Aia.Attribute4
, Aia.Attribute5
, Aia.Attribute6
, Aia.Attribute7
, Aia.Attribute8
, Aia.Attribute9
, Aia.Attribute10
, Aia.Attribute11
, Aia.Attribute12
, Aia.Attribute13
, Aia.Attribute14
, Aia.Attribute15
, Aia.Global_Attribute_Category
, Aia.Global_Attribute1
, Aia.Global_Attribute2
, Aia.Global_Attribute3
, Aia.Global_Attribute4
, Aia.Global_Attribute5
, Aia.Global_Attribute6
, Aia.Global_Attribute7
, Aia.Global_Attribute8
, Aia.Global_Attribute9
, Aia.Global_Attribute10
, Aia.Global_Attribute11
, Aia.Global_Attribute12
, Aia.Global_Attribute13
, Aia.Global_Attribute14
, Aia.Global_Attribute15
, Aia.Global_Attribute16
, Aia.Global_Attribute17
, Aia.Global_Attribute18
, Aia.Global_Attribute19
, Aia.Global_Attribute20
HAVING Ap_Invoices_Utility_PKG.get_prepay_amount_remaining (Aia.invoice_Id) <> 0
AND Ap_Invoices_Utility_Pkg.get_approval_status(aia.invoice_id,aia.invoice_amount,aia.payment_status_flag,aia.invoice_type_lookup_code) = 'AVAILABLE'
Rec_fusion_extract_AP_invoice cur_fusion_extract_AP_invoice%ROWTYPE;
BEGIN
---------Initialisation
pn_retcode := 0;
pv_errbuff := NULL;
ln_compteur_lignes := 0;
lv_societe_absorbee := CGEY_TOOLS_PKG.get_varchar2_parameter ('SPR_FUSION_AP_SOCIETE', 'SOC_SR');
lv_societe_absorbante :=CGEY_TOOLS_PKG.get_varchar2_parameter ('SPR_FUSION_AP_SOCIETE', 'SOC_CB');
lv_date_fusion := CGEY_TOOLS_PKG.get_date_parameter ('SPR_FUSION_AP_SOCIETE', 'DATE_FUSION');
lv_rep := cgey_tools_pkg.get_varchar2_parameter ('SPR_FUSION_AP_SOCIETE', 'REPERTOIRE_SORTIE');
----err_non_parameter
IF lv_societe_absorbee is null or lv_societe_absorbante is null or lv_date_fusion is null or lv_rep is null
THEN raise err_non_parameter;
select NVL(ORGANIZATION_ID, 'NULL')
INTO ln_org_id
from HR_ALL_ORGANIZATION_UNITS HAOU
where HAOU.Name = lv_societe_absorbee
----err_Soc_sr
IF ln_org_id ='NULL'
THEN Raise err_Soc_sr;
BEGIN
----Création du fichier sorti
cgey_tools_pkg.put_log_message ('Création et Ouverture du fichier en lecture');
lv_name := 'FUSION_fac_AP_EXTRAIRE' || TO_CHAR(SYSDATE, 'DDMMYYYY_HH24MISS') || '.txt';
cgey_tools_pkg.put_log_message ('Fichier sortie est '|| lv_name );
lt_id := UTL_FILE.FOPEN(lv_rep, lv_name, 'w');
IF UTL_FILE.IS_OPEN(lt_id) THEN
cgey_tools_pkg.put_log_message (cv_line);
cgey_tools_pkg.put_log_message('Creation OK du fichier: ' || lv_name);
ELSE
cgey_tools_pkg.put_log_message(cv_line);
cgey_tools_pkg.put_log_message('Probleme ouverture du fichier ' ||lv_name);
END IF;
----EXCEPTION UTL_FILE.WRITE_ERROR, UTL_FILE.INVALID_PATH
EXCEPTION
WHEN UTL_FILE.WRITE_ERROR
THEN raise err_file_write;
WHEN UTL_FILE.INVALID_PATH
THEN raise err_file_invalid_path;
----Création du fichier sorti
END;
BEGIN
UTL_FILE.PUT_LINE(lt_id, vv_entete);
----CURSOR FACTURE A EXTRAIRE
OPEN cur_fusion_extract_AP_invoice
(lv_societe_absorbee,
lv_societe_absorbante,
lv_date_fusion
LOOP
FETCH cur_fusion_extract_AP_invoice
INTO rec_fusion_extract_AP_invoice;
EXIT WHEN cur_fusion_extract_AP_invoice%NOTFOUND;
LV_INVOICE_ID := rec_fusion_extract_AP_invoice.Invoice_Id;
ln_compteur_hold := 0;
lv_hode_reason := null;
lv_release_reason := null;
OPEN cur_ap_hold_invoices (rec_fusion_extract_AP_invoice.Invoice_Id);
LOOP
FETCH cur_ap_hold_invoices
INTO rec_ap_hold_invoices;
EXIT WHEN cur_ap_hold_invoices%NOTFOUND;
----La première blocage à traiter
IF ln_compteur_hold =0 THEN
lv_hode_reason := nvl(rec_ap_hold_invoices.hold_reason, ' ') ;
lv_release_reason := nvl(rec_ap_hold_invoices.release_reason, ' ');
----concatener des autres blocages suivants pour la même facture
Else
lv_hode_reason := lv_hode_reason||nvl(rec_ap_hold_invoices.hold_reason, ' ');
lv_release_reason := lv_release_reason||nvl(rec_ap_hold_invoices.release_reason, ' ');
END IF;
ln_compteur_hold := ln_compteur_hold +1;
END LOOP;
CLOSE cur_ap_hold_invoices;
vv_buffer :=
NVL(lv_societe_absorbee, ' ') ||vv_separator||
NVL(lv_societe_absorbante, ' ') ||vv_separator||
NVL(to_char(lv_date_fusion,'dd/mm/yyyy' ), ' ') ||vv_separator||
NVL(to_char(rec_fusion_extract_AP_invoice.Invoice_Id), ' ') ||vv_separator
UTL_FILE.PUT_LINE(lt_id, vv_buffer);
ln_compteur_lignes := ln_compteur_lignes + 1;
END LOOP;
cgey_tools_pkg.put_log_message(to_char(ln_compteur_lignes) ||
' lignes inserees dans le fichier ' ||lv_rep||'/'
|| lv_name);
CLOSE cur_fusion_extract_AP_invoice;
UTL_FILE.FCLOSE(lt_id);
cgey_tools_pkg.put_log_message(' ');
cgey_tools_pkg.put_log_message(cv_line);
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
Raise err_ecriture_file;
END ;
EXCEPTION_
WHEN err_non_parameter THEN
pn_retcode := SQLCODE;
cgey_tools_pkg.put_log_message ('error'||SQLCODE);
cgey_tools_pkg.put_log_message ('error parameter : Veuillez vous verifier la configuration dans la table CGEY_PARAMETERS!');
WHEN err_Soc_sr THEN
pn_retcode := SQLCODE;
cgey_tools_pkg.put_log_message ('error'||SQLCODE);
cgey_tools_pkg.put_log_message ('error société_absorbée : Veuillez vous verifier le parameter de la société absorbée !');
WHEN err_file_write THEN
UTL_FILE.FCLOSE(lt_id);
pv_errbuff := SQLERRM;
pn_retcode := SQLCODE;
cgey_tools_pkg.put_log_message ('error'||SQLCODE);
cgey_tools_pkg.put_log_message('erreur write_error:'||pv_errbuff);
WHEN err_file_invalid_path THEN
UTL_FILE.FCLOSE(lt_id);
pn_retcode := SQLCODE;
pv_errbuff := SQLERRM;
cgey_tools_pkg.put_log_message ('error'||SQLCODE);
cgey_tools_pkg.put_log_message('erreur invalid_path:'||pv_errbuff);
WHEN err_ecriture_file THEN
UTL_FILE.FCLOSE(lt_id);
pn_retcode := SQLCODE;
pv_errbuff := SQLERRM;
cgey_tools_pkg.put_log_message ('error'||SQLCODE);
cgey_tools_pkg.put_log_message('err_ecriture_file:'||pv_errbuff);
WHEN OTHERS THEN
cgey_tools_pkg.put_log_message ('Une Erreur inconnue arrive lors que l''extraction du FUSION_fac_AP_EXTRAIRE!!');
END MAIN_FUSION_EXTRACT;
END SPR_AP_FUSION_EXTRACT_PKG;
error at line 723 PLS-100103 "EXCEPTION"
when expecting one of the following Error. Please help me!!
Thanks a lot
Edited by: kinkichin on 11 mars 2010 03:19
Hi ,
I have made some changes to the code search for --check condition* and check if the condition is correct.
CREATE OR REPLACE PACKAGE BODY spr_ap_fusion_extract_pkg
IS
PROCEDURE main_fusion_extract (
pv_errbuff IN OUT VARCHAR2,
pn_retcode IN OUT NUMBER
IS
lv_ligne VARCHAR2 (500);
lv_rep VARCHAR2 (260); --:= '/usr/tmp';
ln_retcode NUMBER;
vv_separator VARCHAR2 (2) := ';';
ln_compteur_lignes NUMBER := 0;
-- nombre de lignes insérées dans le fichier
ln_counteur NUMBER := 0;
vv_buffer VARCHAR2 (32000);
vv_buffer_et VARCHAR2 (32000);
vv_buffer_etold VARCHAR2 (32000);
lt_id UTL_FILE.file_type;
ln_counter NUMBER (24, 0);
lv_seq VARCHAR2 (30);
lv_num_paiement VARCHAR2 (10);
flag_ecriture VARCHAR2 (1);
lv_filler_ligne VARCHAR2 (500);
ln_long_buff NUMBER := 0;
ln_compteur_factures NUMBER := 0;
lv_name VARCHAR2 (500);
vv_entete VARCHAR2 (500);
lv_invoice_id ap_invoices_all.invoice_id%TYPE;
ln_compteur_hold NUMBER := 0;
lv_hode_reason VARCHAR2 (500);
lv_release_reason VARCHAR2 (500);
lv_societe_absorbee VARCHAR2 (500);
lv_societe_absorbante VARCHAR2 (500);
ln_org_id NUMBER := 0;
lv_date_fusion DATE;
err_non_parameter EXCEPTION;
err_soc_sr EXCEPTION;
err_file_write EXCEPTION;
err_file_invalid_path EXCEPTION;
err_ecriture_file EXCEPTION;
CURSOR cur_ap_hold_invoices (
lv$invoice_id IN ap_invoices_all.invoice_id%TYPE
IS
SELECT aha.hold_reason, aha.release_reason
FROM ap_holds_all aha
WHERE aha.invoice_id = lv$invoice_id;
rec_ap_hold_invoices cur_ap_hold_invoices%ROWTYPE;
--Enregistrement "DESTINATAIRE"
CURSOR cur_fusion_extract_ap_invoice (
lv$societe_absorbee IN cgey_parameters.varchar2_value%TYPE,
lv$societe_absorbant IN cgey_parameters.varchar2_value%TYPE,
lv$date_fusion IN cgey_parameters.date_value%TYPE
IS
SELECT aia.invoice_id, aia.invoice_num,
aia.invoice_type_lookup_code, aia.invoice_date, pv.vendor_id,
pv.segment1, pv.vendor_name, pvsa.vendor_site_id,
pvsa.vendor_site_code, aia.invoice_amount, aia.amount_paid
-- RG3: Montant repris = valeur restante a regler
ROUND (NVL (SUM (apsa.amount_remaining), 0),
2
) amount_remaining,
ap_invoices_utility_pkg.get_approval_status
(aia.invoice_id,
aia.invoice_amount,
aia.payment_status_flag,
aia.invoice_type_lookup_code
) statut,
aia.invoice_currency_code, aia.exchange_rate,
aia.exchange_rate_type, aia.exchange_date,
ate.NAME terms_name, aia.terms_date, aia.SOURCE,
aia.doc_category_code, aia.payment_method_lookup_code,
aia.pay_group_lookup_code, aia.gl_date, aia.doc_sequence_id,
aia.accts_pay_code_combination_id,
cgey_tools_pkg.get_segments_from_ccid
(aia.accts_pay_code_combination_id
) cle_comptable_founisseur,
aia.org_id, aia.payment_cross_rate_type,
aia.payment_cross_rate_date, aia.payment_cross_rate,
aia.payment_currency_code, aia.attribute_category,
aia.attribute1, aia.attribute2, aia.attribute3,
aia.attribute4, aia.attribute5, aia.attribute6,
aia.attribute7, aia.attribute8, aia.attribute9,
aia.attribute10, aia.attribute11, aia.attribute12,
aia.attribute13, aia.attribute14, aia.attribute15,
aia.global_attribute_category, aia.global_attribute1,
aia.global_attribute2, aia.global_attribute3,
aia.global_attribute4, aia.global_attribute5,
aia.global_attribute6, aia.global_attribute7,
aia.global_attribute8, aia.global_attribute9,
aia.global_attribute10, aia.global_attribute11,
aia.global_attribute12, aia.global_attribute13,
aia.global_attribute14, aia.global_attribute15,
aia.global_attribute16, aia.global_attribute17,
aia.global_attribute18, aia.global_attribute19,
aia.global_attribute20
FROM ap_invoices_all aia,
ap_payment_schedules_all apsa,
po_vendor_sites_all pvsa,
ap_terms ate,
po_vendors pv
WHERE 1 = 1
-- RG1: Type de la facture
AND aia.invoice_type_lookup_code IN
('STANDARD', 'CREDIT', 'DEBIT')
AND apsa.invoice_id = aia.invoice_id
AND pvsa.vendor_site_id = aia.vendor_site_id
AND ate.term_id = aia.terms_id
AND pv.vendor_id = aia.vendor_id
-- RG 1: pour les factures créées antétieur à la date de fusion
AND aia.creation_date < lv$date_fusion
-- RG1: Ensemble des lignes de la facture postees
AND NOT EXISTS (
SELECT 'x'
FROM ap_invoice_distributions_all aida
WHERE aida.invoice_id = aia.invoice_id
AND NVL (aida.accrual_posted_flag, 'N' = 'Y')
--check condition
-- pour la société absorbée
AND aia.org_id =
(SELECT organization_id
FROM hr_all_organization_units haou
WHERE haou.NAME = lv$societe_absorbee)
GROUP BY aia.invoice_id,
aia.invoice_num,
aia.invoice_type_lookup_code,
aia.invoice_date,
pv.vendor_id,
pv.segment1,
pv.vendor_name,
pvsa.vendor_site_id,
pvsa.vendor_site_code,
aia.invoice_amount,
aia.amount_paid
-- RG3: Montant repris = valeur restante a regler
apsa.amount_remaining,
aia.payment_status_flag,
aia.invoice_currency_code,
aia.exchange_rate,
aia.exchange_rate_type,
aia.exchange_date,
ate.NAME,
aia.terms_date,
aia.SOURCE,
aia.doc_category_code,
aia.payment_method_lookup_code,
aia.pay_group_lookup_code,
aia.gl_date,
aia.doc_sequence_id,
aia.accts_pay_code_combination_id,
aia.org_id,
aia.payment_cross_rate_type,
aia.payment_cross_rate_date,
aia.payment_cross_rate,
aia.payment_currency_code,
aia.attribute_category,
aia.attribute1,
aia.attribute2,
aia.attribute3,
aia.attribute4,
aia.attribute5,
aia.attribute6,
aia.attribute7,
aia.attribute8,
aia.attribute9,
aia.attribute10,
aia.attribute11,
aia.attribute12,
aia.attribute13,
aia.attribute14,
aia.attribute15,
aia.global_attribute_category,
aia.global_attribute1,
aia.global_attribute2,
aia.global_attribute3,
aia.global_attribute4,
aia.global_attribute5,
aia.global_attribute6,
aia.global_attribute7,
aia.global_attribute8,
aia.global_attribute9,
aia.global_attribute10,
aia.global_attribute11,
aia.global_attribute12,
aia.global_attribute13,
aia.global_attribute14,
aia.global_attribute15,
aia.global_attribute16,
aia.global_attribute17,
aia.global_attribute18,
aia.global_attribute19,
aia.global_attribute20
HAVING NVL (SUM (apsa.amount_remaining), 0) <>
0
--check condition
UNION ALL
SELECT aia.invoice_id, aia.invoice_num,
aia.invoice_type_lookup_code, aia.invoice_date,
pv.vendor_id, pv.segment1, pv.vendor_name,
pvsa.vendor_site_id, pvsa.vendor_site_code,
aia.invoice_amount, aia.amount_paid
-- RG3: Montant repris = valeur restante a regler
ap_invoices_utility_pkg.get_prepay_amount_remaining
(aia.invoice_id)
"Amount_Remaining",
ap_invoices_utility_pkg.get_approval_status
(aia.invoice_id,
aia.invoice_amount,
aia.payment_status_flag,
aia.invoice_type_lookup_code
) statut,
aia.invoice_currency_code, aia.exchange_rate,
aia.exchange_rate_type, aia.exchange_date,
ate.NAME terms_name, aia.terms_date, aia.SOURCE,
aia.doc_category_code,
aia.payment_method_lookup_code,
aia.pay_group_lookup_code, aia.gl_date,
aia.doc_sequence_id,
aia.accts_pay_code_combination_id,
cgey_tools_pkg.get_segments_from_ccid
(aia.accts_pay_code_combination_id
) cle_comptable_founisseur,
aia.org_id, aia.payment_cross_rate_type,
aia.payment_cross_rate_date,
aia.payment_cross_rate, aia.payment_currency_code,
aia.attribute_category, aia.attribute1,
aia.attribute2, aia.attribute3, aia.attribute4,
aia.attribute5, aia.attribute6, aia.attribute7,
aia.attribute8, aia.attribute9, aia.attribute10,
aia.attribute11, aia.attribute12, aia.attribute13,
aia.attribute14, aia.attribute15,
aia.global_attribute_category,
aia.global_attribute1, aia.global_attribute2,
aia.global_attribute3, aia.global_attribute4,
aia.global_attribute5, aia.global_attribute6,
aia.global_attribute7, aia.global_attribute8,
aia.global_attribute9, aia.global_attribute10,
aia.global_attribute11, aia.global_attribute12,
aia.global_attribute13, aia.global_attribute14,
aia.global_attribute15, aia.global_attribute16,
aia.global_attribute17, aia.global_attribute18,
aia.global_attribute19, aia.global_attribute20
FROM ap_invoices_all aia,
po_vendor_sites_all pvsa,
ap_terms ate,
po_vendors pv
WHERE 1 = 1
-- RG2: Type de la facture
AND aia.invoice_type_lookup_code = 'PREPAYMENT'
-- RG2: Amount_Paid Invoice_Amount
AND NVL (aia.invoice_amount, 0) =
NVL (aia.amount_paid, 0)
AND pvsa.vendor_site_id = aia.vendor_site_id
AND ate.term_id = aia.terms_id
AND pv.vendor_id = aia.vendor_id
-- RG2: Ensemble des lignes de la facture postees
AND NOT EXISTS (
SELECT 'x'
FROM ap_invoice_distributions_all aida
WHERE aida.invoice_id = aia.invoice_id
AND NVL (aida.accrual_posted_flag, 'N') =
'Y')
--check condition
-- pour la société absorbée
AND aia.org_id =
(SELECT organization_id
FROM hr_all_organization_units haou
WHERE haou.NAME = lv$societe_absorbee)
-- RG 1: pour les factures créées antétieur à la date de fusion
AND aia.creation_date < lv$date_fusion
GROUP BY aia.invoice_id,
aia.invoice_num,
aia.invoice_type_lookup_code,
aia.invoice_date,
pv.vendor_id,
pv.segment1,
pv.vendor_name,
pvsa.vendor_site_id,
pvsa.vendor_site_code,
aia.invoice_amount,
aia.amount_paid,
aia.payment_status_flag,
aia.invoice_currency_code,
aia.exchange_rate,
aia.exchange_rate_type,
aia.exchange_date,
ate.NAME,
aia.terms_date,
aia.SOURCE,
aia.doc_category_code,
aia.payment_method_lookup_code,
aia.pay_group_lookup_code,
aia.gl_date,
aia.doc_sequence_id,
aia.accts_pay_code_combination_id,
aia.org_id,
aia.payment_cross_rate_type,
aia.payment_cross_rate_date,
aia.payment_cross_rate,
aia.payment_currency_code,
aia.attribute_category,
aia.attribute1,
aia.attribute2,
aia.attribute3,
aia.attribute4,
aia.attribute5,
aia.attribute6,
aia.attribute7,
aia.attribute8,
aia.attribute9,
aia.attribute10,
aia.attribute11,
aia.attribute12,
aia.attribute13,
aia.attribute14,
aia.attribute15,
aia.global_attribute_category,
aia.global_attribute1,
aia.global_attribute2,
aia.global_attribute3,
aia.global_attribute4,
aia.global_attribute5,
aia.global_attribute6,
aia.global_attribute7,
aia.global_attribute8,
aia.global_attribute9,
aia.global_attribute10,
aia.global_attribute11,
aia.global_attribute12,
aia.global_attribute13,
aia.global_attribute14,
aia.global_attribute15,
aia.global_attribute16,
aia.global_attribute17,
aia.global_attribute18,
aia.global_attribute19,
aia.global_attribute20
HAVING ap_invoices_utility_pkg.get_prepay_amount_remaining
(aia.invoice_id) <>
0
AND ap_invoices_utility_pkg.get_approval_status
(aia.invoice_id,
aia.invoice_amount,
aia.payment_status_flag,
aia.invoice_type_lookup_code
) = 'AVAILABLE');
--check condition;
rec_fusion_extract_ap_invoice cur_fusion_extract_ap_invoice%ROWTYPE;
BEGIN
---------Initialisation
pn_retcode := 0;
pv_errbuff := NULL;
ln_compteur_lignes := 0;
lv_societe_absorbee :=
cgey_tools_pkg.get_varchar2_parameter ('SPR_FUSION_AP_SOCIETE',
'SOC_SR'
lv_societe_absorbante :=
cgey_tools_pkg.get_varchar2_parameter ('SPR_FUSION_AP_SOCIETE',
'SOC_CB'
lv_date_fusion :=
cgey_tools_pkg.get_date_parameter ('SPR_FUSION_AP_SOCIETE',
'DATE_FUSION'
lv_rep :=
cgey_tools_pkg.get_varchar2_parameter ('SPR_FUSION_AP_SOCIETE',
'REPERTOIRE_SORTIE'
----err_non_parameter
IF lv_societe_absorbee IS NULL
OR lv_societe_absorbante IS NULL
OR lv_date_fusion IS NULL
OR lv_rep IS NULL
THEN
RAISE err_non_parameter;
END IF;
SELECT NVL (organization_id, 'NULL')
INTO ln_org_id
FROM hr_all_organization_units haou
WHERE haou.NAME = lv_societe_absorbee;
----err_Soc_sr
IF ln_org_id = 'NULL'
THEN
RAISE err_soc_sr;
END IF;
BEGIN
----Création du fichier sorti
cgey_tools_pkg.put_log_message
('Création et Ouverture du fichier en lecture');
lv_name :=
'FUSION_fac_AP_EXTRAIRE'
|| TO_CHAR (SYSDATE, 'DDMMYYYY_HH24MISS')
|| '.txt';
cgey_tools_pkg.put_log_message ('Fichier sortie est ' || lv_name);
lt_id := UTL_FILE.fopen (lv_rep, lv_name, 'w');
IF UTL_FILE.is_open (lt_id)
THEN
cgey_tools_pkg.put_log_message (cv_line);
cgey_tools_pkg.put_log_message ( 'Creation OK du fichier: '
|| lv_name
ELSE
cgey_tools_pkg.put_log_message (cv_line);
cgey_tools_pkg.put_log_message
( 'Probleme ouverture du fichier '
|| lv_name
END IF;
----EXCEPTION UTL_FILE.WRITE_ERROR, UTL_FILE.INVALID_PATH
EXCEPTION
WHEN UTL_FILE.write_error
THEN
RAISE err_file_write;
WHEN UTL_FILE.invalid_path
THEN
RAISE err_file_invalid_path;
----Création du fichier sorti
END;
BEGIN
UTL_FILE.put_line (lt_id, vv_entete);
----CURSOR FACTURE A EXTRAIRE
OPEN cur_fusion_extract_ap_invoice (lv_societe_absorbee,
lv_societe_absorbante,
lv_date_fusion
LOOP
FETCH cur_fusion_extract_ap_invoice
INTO rec_fusion_extract_ap_invoice;
EXIT WHEN cur_fusion_extract_ap_invoice%NOTFOUND;
lv_invoice_id := rec_fusion_extract_ap_invoice.invoice_id;
ln_compteur_hold := 0;
lv_hode_reason := NULL;
lv_release_reason := NULL;
OPEN cur_ap_hold_invoices
(rec_fusion_extract_ap_invoice.invoice_id);
LOOP
FETCH cur_ap_hold_invoices
INTO rec_ap_hold_invoices;
EXIT WHEN cur_ap_hold_invoices%NOTFOUND;
----La première blocage à traiter
IF ln_compteur_hold = 0
THEN
lv_hode_reason :=
NVL (rec_ap_hold_invoices.hold_reason, ' ');
lv_release_reason :=
NVL (rec_ap_hold_invoices.release_reason, ' ');
----concatener des autres blocages suivants pour la même facture
ELSE
lv_hode_reason :=
lv_hode_reason
|| NVL (rec_ap_hold_invoices.hold_reason, ' ');
lv_release_reason :=
lv_release_reason
|| NVL (rec_ap_hold_invoices.release_reason, ' ');
END IF;
ln_compteur_hold := ln_compteur_hold + 1;
END LOOP;
CLOSE cur_ap_hold_invoices;
vv_buffer :=
NVL (lv_societe_absorbee, ' ')
|| vv_separator
|| NVL (lv_societe_absorbante, ' ')
|| vv_separator
|| NVL (TO_CHAR (lv_date_fusion, 'dd/mm/yyyy'), ' ')
|| vv_separator
|| NVL (TO_CHAR (rec_fusion_extract_ap_invoice.invoice_id),
|| vv_separator;
UTL_FILE.put_line (lt_id, vv_buffer);
ln_compteur_lignes := ln_compteur_lignes + 1;
END LOOP;
cgey_tools_pkg.put_log_message
( TO_CHAR (ln_compteur_lignes)
|| ' lignes inserees dans le fichier '
|| lv_rep
|| '/'
|| lv_name
CLOSE cur_fusion_extract_ap_invoice;
UTL_FILE.fclose (lt_id);
cgey_tools_pkg.put_log_message (' ');
cgey_tools_pkg.put_log_message (cv_line);
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
RAISE err_ecriture_file;
END;
EXCEPTION
WHEN err_non_parameter
THEN
pn_retcode := SQLCODE;
cgey_tools_pkg.put_log_message ('error' || SQLCODE);
cgey_tools_pkg.put_log_message
('error parameter : Veuillez vous verifier la configuration dans la table CGEY_PARAMETERS!'
WHEN err_soc_sr
THEN
pn_retcode := SQLCODE;
cgey_tools_pkg.put_log_message ('error' || SQLCODE);
cgey_tools_pkg.put_log_message
('error société_absorbée : Veuillez vous verifier le parameter de la société absorbée !'
WHEN err_file_write
THEN
UTL_FILE.fclose (lt_id);
pv_errbuff := SQLERRM;
pn_retcode := SQLCODE;
cgey_tools_pkg.put_log_message ('error' || SQLCODE);
cgey_tools_pkg.put_log_message ('erreur write_error:' || pv_errbuff);
WHEN err_file_invalid_path
THEN
UTL_FILE.fclose (lt_id);
pn_retcode := SQLCODE;
pv_errbuff := SQLERRM;
cgey_tools_pkg.put_log_message ('error' || SQLCODE);
cgey_tools_pkg.put_log_message ('erreur invalid_path:' || pv_errbuff);
WHEN err_ecriture_file
THEN
UTL_FILE.fclose (lt_id);
pn_retcode := SQLCODE;
pv_errbuff := SQLERRM;
cgey_tools_pkg.put_log_message ('error' || SQLCODE);
cgey_tools_pkg.put_log_message ('err_ecriture_file:' || pv_errbuff);
WHEN OTHERS
THEN
cgey_tools_pkg.put_log_message
('Une Erreur inconnue arrive lors que l''extraction du FUSION_fac_AP_EXTRAIRE!!'
END main_fusion_extract;
END spr_ap_fusion_extract_pkg;*009*
Edited by: 009 on Mar 11, 2010 3:31 AM
Similar Messages
-
How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication
Hi ALl,
I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server authentication
. This package runs fine if i click the server connection properties type the password and save it.
Now, my task is to set up a sql agent job which basically uses a proxy account and takes this package from the file system and runs it.But when i try to run this package, its failing with an error saying
"Login Failed For rpt5user" where rpt5user is the username for my sql server authentication of the source connection.
Can someone please help me with any suggestions on how to do this?
I have heard that we can achieve it by using xml config file which i have never used and i am trying to google around but for no luck.
So, If someone can please throw any suggestions or ideas on this it would be great.
ThanksYou need to add password as a config item and set it from the file source or sql table
see this as an example
http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Compile for Debug Proc/Package Size
Was attempting to debug a package on a DB but when compiling for debug got a message along the lines of 'Pacakge to large' and the compilation finished with warnings.
Is there a max size the compile for debug can handle and if so what is it.
Thanks
PaulGoogle gave me this from the Oracle 11.1 PL/SQL Langauge Reference:
>
In the shared memory pool, a package spec, object type spec, standalone subprogram, or anonymous block is limited to 67108864 (2**26) DIANA nodes which correspond to tokens such as identifiers, keywords, operators, and so on. This allows for <b>~6,000,000 lines of code</b>...
>
http://download-west.oracle.com/docs/cd/B28359_01/appdev.111/b28370/limits.htm -
Minimum requirements for deploying a package on Sql Server 2008
I am trying to setup a restricted login to deploy packages. At the very least I need to avoid using the sysadmin server role however all of my testing seems to point to my restricted login requiring it which sort of defeats the purpose of a restricted
login. Without the sysadmin account I get the following error: Create failed for JobStepRole
Read action
Write action
own package roles.
db_ssisoperator
Enumerate all packages.
View all packages.
Execute all packages.
Export all packages.
Execute all packages in SQL Server Agent.
None
Windows administrators
View execution details of all running packages.
Stop all currently running packages.
Sysssispackages Table
The sysssispackages table in msdb contains the packages that are saved to SQL Server. For more information, see sysssispackages
(Transact-SQL).
The sysssispackages table includes columns that contain information about the roles that are assigned to packages.
The readerrole column specifies the role that has read access to the package.
The writerrole column specifies the role that has write access to the package.
The ownersid column contains the unique security identifier of the user who created the package. This column defines the owner of the package.
Permissions
By default, the permissions of the db_ssisadmin and db_ssisoperator fixed database-level roles and the unique security identifier of the user who created the package apply to the reader role for packages,
and the permissions of the db_ssisadmin role and the unique security identifier of the user who created the package apply to the writer role. A user must be a member of the db_ssisadmin, db_ssisltduser,
or db_ssisoperator role to have read access to the package. A user must be a member of the db_ssisadmin role to have write access.
Please click "Mark as Answer" if the post solves your problem - Thanks -
New to java-need help for debugging
hey there
i just wanted my first program in java and here it is below with the error when i'm compiling it, i cant understand whats wrong:
public class SquareArea {
public static void main(String[] args); {
float length;
float width;
float SquareArea;
System.out.println ("Please enter length"+ length);
System.out.println ("Please enter width"+ width);
SquareArea= length*width;
System.out.println ("The area of the square is" + SquareArea);
The error is:C:\Documents and Settings\User\Desktop\SquareArea.java:5: missing method body, or declare abstract
public static void main(String[] args); {
^
1 error
Tool completed with exit code 1Reading inputs from the command line is a bit complicated in java, here is how it is done:
first add the line:
import java.io.*;to the beginning of your program.
float length;
float width;
float SquareArea;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try
System.out.println ("Please enter length:");
String lengthStr = reader.readLine();
length = Float.parseFloat(lengthStr);
System.out.println ("Please enter width");
String widthStr = reader.readLine();
width = Float.parseFloat(widthStr);
SquareArea= length*width;
System.out.println ("The area of the square is" + SquareArea);
catch (IOException ioe)
System.out.println("Error reading values.");
ioe.printStackTrace();
} -
Compile for Debug Results in "Error: No more data to read from socket"
I am testing the debugger in SQL Developer, and although I can compile objects normally (using the menu/tool bar options), when I compile a procedure for debug, I get this message:
Error: No more data to read from socket
There is no sql error message, just this statement.
I am using 1.5.1.54.40 on an XP SP2 machine. The database is hosted remotely.
Any advice is appreciated.
Thanks, Wolf MoritzWeird, I was going to say that these are network or port issues, but then a quick look around popped this up. It may be related. SQL error 17410 No more data to read from socket
-
if an sql statement is coded
how to check whether the sql has executed without errors
exception is one thing
is there any other way or means for this
if so, can any one help in this regardFor Checking the SQL error you can trap the error number and error message and log into any table by following way
CREATE OR REPLACE PROCEDURE FOR_ERROR_LOG as
v_err_num NUMBER (20) := 0;
v_err_msg VARCHAR2 (100) := NULL;
BEGIN
SQL statements like select, insert, update.
EXCEPTION
WHEN OTHERS THEN
v_err_num := SQLCODE;
v_err_msg := SUBSTR (SQLERRM, 1, 100);
INSERT INTO error_table VALUES ('FOR_ERROR_LOG',NULL, v_err_num, v_err_msg, SYSDATE);
COMMIT;
END ;
/ -
Debug of package results in ORA-30683
I'm having a problem trying to debug any package with SQL Developer.
Environment : Windows SQLDeveloper 1.1 to Unix database with SID "eai"
It's returning the following error messages :-
Connecting to the database eai.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: ALTER SESSION SET PLSQL_COMPILER_FLAGS=INTERPRETED Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '3717' )
ORA-30683: failure establishing connection to debugger
ORA-12541: TNS:no listener
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database eai.
Listener is OK.
tnsnames.ora file works and the list of databases comes up in the "new connection".
I'd be grateful for any assistance you could provide.The database needs to connect back to your PC for debugging. Sometimes sqldeveloper can't determine the address to pass to the database.
Go to Tools -> Preference -> Debugger and select Prompt for Debugger Host for Database Debugger.
You may still have problems if there is a firewall between you and the server. -
Receiving SQL Error: INTERNAL_ERROR while executing the query
Dear All,
I am receiving the below error while executing a query.
SQL Error: INTERNAL_ERROR
Diagnosis
The database system registered an SQL error. As available, the error number and a description are included in the short text. Possible causes for SQL errors include:
Overflow of database objects such as buffers, temporary tablespaces, rollback segments or data containers/tablespaces.
->These problems can generally be eliminated by system administrators.
Missing generated database objects such as tables or views based on inconsistent or inactive InfoCubes or InfoObjects. Examples of this include the view of the fact table for an InfoCube or the attribute SID table (X/Y table) of a characteristic.
-> These problems can generally be eliminated by a BW administrator.
SQL requests with incorrect content.
-> Problems of this type are generally programming errors.
System Response
Procedure
Contact your system administrator.
Procedure for System Administration
If there is no error description, look for one in the reference from the database producer.
Decide on the correct category for the SQL error and check if it can be eliminated. Generally the error can also be found in the syslog (transaction sm21). From there, transactions sm51 and sm50, the developer's trace log of the work process can be determined and the erroneous statement can be viewed in the log. This procedure is described in SAP Note 568768.
Notification Number DBMAN 257
I verified the table spaces and also done RSRV Repair of InfoObjects and InfoCubes and didnt find any error. But I am receiving this error for one particular month and remaining months are executing fine. Any ideas why i am receiving this error.
Regards
Ravi YOSS Note 1305568:
Symptom
A data mart query that
you want to execute within a data transfer process (DTP), for example, terminates with the
SQL error -1013 "Too many order columns".
The following is displayed in the monitor log of the data transfer process:
Error while extracting from source xxxxxx (type InfoProvider)
Message number RSBK 242
Exception CX_SQL_EXCEPTION occurred (program:
CL_SQL_STATEMENT==============CP, include:
CL_SQL_STATEMENT==============CM004, line: 32).
Message number RS_EXCEPTION 000
SQL error: POS(3306) Too many order columns
Message number DBMAN 257
Error reading the data of InfoProvider xxxxxx
Message number DBMAN 305
You have already implemented Note 1065380.
Other terms
CX_SQL_EXCEPTION, message number, RS_EXCEPTION 000, DBMAN 257, RSBK 242,
RS_EXCEPTION 000
Reason and Prerequisites
The MaxDB internal limit of 4016 bytes or 128 fields for GROUP BY columns was exceeded.
Solution
When you implement these corrections, no aggregation is performed for the data (GROUP BY) if the limits of the MaxDB database have been exceeded.
The limit values for the aggregation bahavior can also be manually reduced if there are problems with the default values.
Two RSADMIN parameters are provided for this.
MAXDB_MAX_GROUP_BY_FLDS is the maximum number of GROUP BY fields. The default value is 128.
MAXDB_MAX_GROUP_BY_LEN is the maximum total length of the GROUP BY fields. The default value is 4000.
SAP NetWeaver BI 7.00
Import Support Package 21 for SAP NetWeaver BI 7. 00 (SAPKW70021) into your BI system. The Support Package is available when Note 1270629"SAPBINews NW 7.00 BI Support Package 21", which describes this Support Package in more detail, is released for customers. -
F4 help for Billing document in vf02
Hi All,
In Sales scenario of free samples,after creating the billing document with net value as zero(as it is free sample).
I am new to ABAP.When i am going to VF02 Transaction and I press F4 help for Billing Document,it gives the error 'No values found'.
So,I checked the table VBRK for Billing document Numbers.But records are there in that table.
I checked whether there is any User exit or BADI.But I did not find any User exit or BADI related to this issue.
Please,Let me know what i have to do.
Kind Regards,
Gopal.KHi,
For VF02/ VF03 the search help [ Collective srch hlp VMCF] > VMCFA Billing documents still to be passed on to accounting
has data selection Selection method M_VMCFA it is a data base view with selection conditions
VBRK RFBSK EQ ' ' OR
VBRK RFBSK EQ 'A' OR
VBRK RFBSK EQ 'B' OR
VBRK RFBSK EQ 'F' OR
VBRK RFBSK EQ 'K' OR
VBRK RFBSK EQ 'L' OR
VBRK RFBSK EQ 'M' OR
VBRK RFBSK EQ 'N' OR
VBRK RFBSK EQ 'G' AND
VBRK FKTYP NE 'R'
Could be your billing document is not matching the selection criteria and please try to find out the condition on which it is giving the message by putting a break on message , could be
vbtyp_fakt(8) value 'MNOPSU56',
IF vbrk-vbtyp NA vbtyp_fakt.
MESSAGE e041 WITH vbrk-vbeln.
ENDIF. -
@/vobs/oracle/rdbms/admin/catproc.sql error message
After setting up 9i DB manually when i ran this script all went well with few errors , i am wondering these errors are ignoreable ....
@/vobs/oracle/rdbms/admin/catproc.sql
Grant succeeded.
drop package body sys.diana
ERROR at line 1:
ORA-04043: object DIANA does not exist
drop package sys.diana
ERROR at line 1:
ORA-04043: object DIANA does not exist
Package created.
Package body created.
drop package body sys.diutil
ERROR at line 1:
ORA-04043: object DIUTIL does not exist
drop package sys.diutil
ERROR at line 1:
ORA-04043: object DIUTIL does not exist
Package created.
ERROR at line 1:
ORA-04043: object PSTUBT does not exist
Procedure created.
Grant succeeded.
drop procedure sys.pstub
ERROR at line 1:
ERROR at line 1:
ORA-04043: object SUBPTXT2 does not exist
Procedure created.
drop procedure sys.subptxt
ERROR at line 1:
ORA-04043: object SUBPTXT does not exist
ERROR at line 1:
ORA-04043: object DBMS_XPLAN_TYPE_TABLE does not exist
drop type dbms_xplan_type
ERROR at line 1:
ORA-04043: object DBMS_XPLAN_TYPE does not exist
Type created.
ERROR at line 1:
ORA-00942: table or view does not exist
DROP TABLE ODCI_WARNINGS$
ERROR at line 1:
ORA-00942: table or view does not exist
Type created.
Table truncated.
drop sequence dbms_lock_id
ERROR at line 1:
ORA-02289: sequence does not exist
Sequence created.
drop table SYSTEM.AQ$_Internet_Agent_Privs
ERROR at line 1:
ORA-00942: table or view does not exist
drop table SYSTEM.AQ$_Internet_Agents
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
DROP SYNONYM def$_tran
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
DROP SYNONYM def$_call
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
DROP SYNONYM def$_defaultdest
ERROR at line 1:
DROP TYPE SYS.ExplainMVMessage FORCE
ERROR at line 1:
ORA-04043: object EXPLAINMVMESSAGE does not exist
Type created.
drop view sys.transport_set_violations
ERROR at line 1:
ORA-00942: table or view does not exist
PL/SQL procedure successfully completed.
drop table sys.transts_error$
ERROR at line 1:
ORA-00942: table or view does not exist
drop operator XMLSequence
ERROR at line 1:
ORA-29807: specified operator does not exist
drop function XMLSequenceFromXMLType
ERROR at line 1:
ORA-04043: object XMLSEQUENCEFROMXMLTYPE does not exist
drop function XMLSequenceFromRefCursor
ERROR at line 1:
drop function XMLSequenceFromRefCursor2
ERROR at line 1:
ORA-04043: object XMLSEQUENCEFROMREFCURSOR2 does not exist
drop type XMLSeq_Imp_t
ERROR at line 1:
ORA-04043: object XMLSEQ_IMP_T does not exist
drop type XMLSeqCur_Imp_t
ERROR at line 1:
ORA-04043: object KU$_IND_PART_T does not exist
drop type ku$_ind_part_list_t force
ERROR at line 1:
ORA-04043: object KU$_IND_PART_LIST_T does not exist
drop type ku$_piot_part_t force
ERROR at line 1:
Grant succeeded.
Synonym created.
Grant succeeded.
Package altered.
Package altered.
PL/SQL procedure successfully completed.These errors are ignorable, Oracle just trying to drop the package before creating them. If this is the first time you run catproc.sql, the errors are expected.
-
SQL Error 130, not found in ERROR.SQL file.
Dear All,
While connecting my application with Oracle Release 9.2.0.8.0 I am having the following error message would any one help in this regard please?
SQL Error 130, not found in ERROR.SQL file
Thanks
GQHow is this connection being made?
Is it Oracle Forms, SQL*Plus, Java, .NET, JDBC etc?
The error message doesn't look like a standard ORA-XXXXX oracle error so I would suggest the message relates to the application trying to make the connection. -
SQL Error while trying to createMarkupDefinition
We upgraded wls portal schem from 8.1 to 10 and when we tried to deploy the app we had issues inserting the MarkupDefinition. Attached is the error. The error also complains that there might be Possible markup duplication of [MrkupDefinition] <appname>. Any help is appreciated
vax.ejb.EJBException: SQL Error while trying to createMarkupDefinition: SQL [insert into PF_MARKUP_DEFINITION ( MARKUP_DEFINITION_ID, MARKUP_NAME, MARKUP_TYP
WEBAPP_NAME, MARKUP_FILE) values (?,?,?,?,?)] database error code [1,400] SQL state [23000]. Possible markup duplication of [
rkupDefinition:
webAppName = km
type = LookAndFeel
name = bighornXHTMLLookAndFeel
file = /framework/markup/lookandfeel/bighorn-xhtml.laf
beginXml = <netuix:lookAndFeel skin="bighorn" skeleton="bighorn-xhtml" $(definitionLabel) $(definitionId) $(markupType) $(markupName)><netuix:titlebarButtonO
r><netuix:otherButtons/><netuix:namedButton name="float"/><netuix:namedButton name="edit"/><netuix:namedButton name="help"/><netuix:namedButton name="minimiz
/><netuix:namedButton name="maximized"/><netuix:namedButton name="delete"/></netuix:titlebarButtonOrder></netuix:lookAndFeel>
endXml = null
MarkupDefinitionId = null].; nested exception is: java.sql.SQLException: ORA-01400: cannot insert NULL into ("WLPDEV"."PF_MARKUP_DEFINITION"."BEGIN_XML")
at com.bea.netuix.application.manager.persistence.jdbc.MarkupDefinitionDelegate.createMarkupDefinition(MarkupDefinitionDelegate.java:812)
at com.bea.netuix.application.manager.persistence.jdbc.MarkupDefinitionManagerImpl.createMarkupDefinition(MarkupDefinitionManagerImpl.java:161)
at com.bea.netuix.application.manager.persistence.jdbc.MarkupDefinitionManager_twpn9c_EOImpl.createMarkupDefinition(MarkupDefinitionManager_twpn9c_EOIm
java:418)
at com.bea.netuix.servlets.repository.LookAndFeelFilePersistenceManager.onNewFile(LookAndFeelFilePersistenceManager.java:170)
at com.bea.netuix.servlets.repository.LookAndFeelFilePersistenceManager.createUpdateLookAndFeelDefinitions(LookAndFeelFilePersistenceManager.java:262)
at com.bea.netuix.servlets.repository.LookAndFeelFilePersistenceManager.startupSync(LookAndFeelFilePersistenceManager.java:521)
at com.bea.netuix.servlets.repository.AbstractFilePersistenceManager$StartupSync.run(AbstractFilePersistenceManager.java:155)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSu
ct;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(Unknown Source)
at com.bea.netuix.servlets.repository.AbstractFilePersistenceManager.startup(AbstractFilePersistenceManager.java:97)
at com.bea.netuix.servlets.repository.LookAndFeelFilePersistenceManager.onNewFiles(LookAndFeelFilePersistenceManager.java:103)
at com.bea.netuix.poller.FrameworkPoller.newFiles(FrameworkPoller.java:226)
at com.bea.netuix.poller.NetuixFilePoller.start(NetuixFilePoller.java:153)
at com.bea.netuix.servlets.manager.PortalServlet.reinitInternal(PortalServlet.java:359)
at com.bea.netuix.servlets.manager.PortalServlet.initInternal(PortalServlet.java:241)
at com.bea.netuix.servlets.manager.PortalServlet.access$100(PortalServlet.java:120)
at com.bea.netuix.servlets.manager.PortalServlet$ServletLifecycleListenerImpl.init(PortalServlet.java:1874)
at com.bea.netuix.util.ServletLifecycleListener.initOrReinitInternal(ServletLifecycleListener.java:131)
at com.bea.netuix.util.ServletLifecycleService.addServletLifecycleListener(ServletLifecycleService.java:251)
at com.bea.netuix.util.ServletLifecycleService.addServletLifecycleListener(ServletLifecycleService.java:182)
at com.bea.netuix.servlets.manager.PortalServlet.init(PortalServlet.java:229)
at com.bea.netuix.servlets.manager.PortalServlet.init(PortalServlet.java:209)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:282)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSu
ct;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Unknown Source)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:63)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:504)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1830)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1807)
nested exception is:
javax.ejb.EJBException: SQL Error while trying to createMarkupDefinition: SQL [insert into PF_MARKUP_DEFINITION ( MARKUP_DEFINITION_ID, MARKUP_NAME, MA
P_TYPE, WEBAPP_NAME, MARKUP_FILE) values (?,?,?,?,?)] database error code [1,400] SQL state [23000]. Possible markup duplication of [
rkupDefinition:
webAppName = km
type = LookAndFeel
name = bighornXHTMLLookAndFeel
file = /framework/markup/lookandfeel/bighorn-xhtml.laf
beginXml = <netuix:lookAndFeel skin="bighorn" skeleton="bighorn-xhtml" $(definitionLabel) $(definitionId) $(markupType) $(markupName)><netuix:titlebarButtonO
r><netuix:otherButtons/><netuix:namedButton name="float"/><netuix:namedButton name="edit"/><netuix:namedButton name="help"/><netuix:namedButton name="minimiz
/><netuix:namedButton name="maximized"/><netuix:namedButton name="delete"/></netuix:titlebarButtonOrder></netuix:lookAndFeel>
endXml = null
MarkupDefinitionId = null].; nested exception is: java.sql.SQLException: ORA-01400: cannot insert NULL into ("WLPDEV"."PF_MARKUP_DEFINITION"."BEGIN_XML")
thrown while trying to do task [create] in class [com.bea.netuix.servlets.repository.LookAndFeelFilePersistenceManager].
vax.transaction.TransactionRolledbackException: EJB Exception: : javax.ejb.EJBException: SQL Error while trying to createMarkupDefinition: SQL [insert into P
ARKUP_DEFINITION ( MARKUP_DEFINITION_ID, MARKUP_NAME, MARKUP_TYPE, WEBAPP_NAME, MARKUP_FILE) values (?,?,?,?,?)] database error code [1,400] SQL state [23000
Possible markup duplication of [Hi,
Are you able to resolve ths problem? I am also getting the same problem when I upgraded wls portal schem from 8.1 to 10 and tried to deploy the app.
Any help is greatly appreciated.
Thanks -
ORA-01780: string literal required ( ERROR at line 7:)
Can anyone help me ?
The XMLQuery below show me ORA-01780:
with t as (
select xmltype('<Root>
<Child1 attribute1=''1'' attribute2=''2''></Child1>
<Child1 attribute1=''3'' attribute2=''4''></Child1>
<Child1 attribute1=''5'' attribute2=''6''></Child1>
<Child1 attribute1=''2'' attribute2=''1''></Child1>
</Root>') xml from dual )
SELECT warehouse2.attribute1
, warehouse2.attribute1
FROM warehouses
, XMLTABLE('/Root'
PASSING t.xml
COLUMNS
attribute1 varchar2(1) PATH '/Root/Child1/@attribute1',
attribute2 varchar2(1) PATH '/Root/Child1/@attribute2') warehouse2;
SQL>
SQL> </Root>') xml from dual )
SQL> *
SQL> ERROR at line 7:
SQL> ORA-01780: string literal requiredwrong "table"
[oracle@apex00 ~]$ sqlplus system/manager
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Apr 22 17:11:50 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> with t as (
2 select xmltype('<Root>
3 <Child1 attribute1=''1'' attribute2=''2''></Child1>
4 <Child1 attribute1=''3'' attribute2=''4''></Child1>
5 <Child1 attribute1=''5'' attribute2=''6''></Child1>
6 <Child1 attribute1=''2'' attribute2=''1''></Child1>
7 </Root>') xml from dual )
8 SELECT warehouse2.attribute1
9 , warehouse2.attribute1
10 FROM warehouses
11 , XMLTABLE('/Root'
12 PASSING t.xml
13 COLUMNS
14 attribute1 varchar2(1) PATH '/Root/Child1/@attribute1',
15 attribute2 varchar2(1) PATH '/Root/Child1/@attribute2') warehouse2;
FROM warehouses
ERROR at line 10:
ORA-00942: table or view does not exist
SQL> with t as (
2 select xmltype('<Root>
3 <Child1 attribute1=''1'' attribute2=''2''></Child1>
4 <Child1 attribute1=''3'' attribute2=''4''></Child1>
5 <Child1 attribute1=''5'' attribute2=''6''></Child1>
6 <Child1 attribute1=''2'' attribute2=''1''></Child1>
7 </Root>') xml from dual )
8 SELECT warehouse2.attribute1
9 , warehouse2.attribute1
10 FROM t --<< so not warehouses >>--
11 , XMLTABLE('/Root'
12 PASSING t.xml
13 COLUMNS
14 attribute1 varchar2(1) PATH '/Root/Child1/@attribute1',
15 attribute2 varchar2(1) PATH '/Root/Child1/@attribute2') warehouse2
16 ;
A A
1 1
1 row selected. -
Syntax error in line 1.
When I post to my hosting company that I have had for years, I get a syntax error in line one every time. I have posted to my ISP's "free web space" and it works fine. Has anyone else had this problem, and if not where do you host? I am using ITX hosting and it just won't work with iWeb. When I called Customer Support they told me to use Dreamweaver, but I think that it is about $400 too expensive.
Thanks in advance,
MikeWhen I post to my hosting company that I have had for years, I get a syntax error in line one every time.
Their server is probably misconfigured. Here is a note on the subject. It's pretty rare, but often the people in charge don't understand it or won't change it.
http://homepage.mac.com/thgewecke/parsingerror.html
Maybe you are looking for
-
What is ap and ar open item revaluation
hi in the month end ap/ar open item revaluation mean what/why should we do.plz tell me thank u sowmya
-
Bex Broadcaster schedule in background
Hi all, Lately I'm using Bex broacaster to run a query and send a report to portal users through schedule, the problem appears when the query exceeds the time limit, so is there a way not only for the bex schedule to run in background but also for th
-
I am currently using CS5, but have CS4 still installed in my computer because in order to save a file to be opened with CS3, it has to go threw CS4. My problem is that all of a sudden all of my InDesign files are opening with CS4. I recently reinstal
-
Invalid views with missing underlying tables
I have completed an import from one database, 8i version, to a new 10g database and in the process of the import a view was imported in the SYS schema. The table being accessed by the view has since been dropped during another import and now the view
-
I wants to know if SAP banking supports Service Granularity. Are the services Fine grained or Course grained. Please provide a pointer or document abt SOA and web services for SAP / SAP banking.