Fetching SSIS error message into Audit table using SP
Hi Experts,
I want to fetch SSIS Error Info along with Task Name into Audit table 'Error_Info' column. This is nvarchar(max) datatype, i wrote below Stored Procedure for this (Column names passing dynamically in SP)
CREATE PROC [dbo].[usp_AuditErrorHandler]
@AuditTableName nvarchar(MAX)
,@Audit_Status nvarchar(100)
,@Audit_ErrorDescription sql_variant
,@Audit_PkgEnd_dttm nvarchar(100)
,@task sql_variant
,@errordescription sql_variant
,@Audit_ID nvarchar(10)
,@LogID INT
AS
BEGIN
DECLARE @STRQuery NVARCHAR(MAX)
SET @STRQuery = '
UPDATE '+@AuditTableName+'
SET '+@Audit_Status+' = ''Failed''
,'+@Audit_PkgEnd_dttm+' = GETDATE()
,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+@errordescription +'''
WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
The above procedure is working fine in SSMS and inserting complete error info into table, but when i am executing thru SSIS Pkg i am getting error like
"[Execute SQL Task] Error: Executing the query "exec usp_AuditErrorHandler ?,?,?,?,?,?,?,?" failed with the following error: "Incorrect syntax near '@P1'.". Possible failure reasons: Problems with the query, "ResultSet"
property not set correctly, parameters not set correctly, or connection not established correctly."
So, i tot of checking with string lenght and modifed the code by adding left () to @errordescription as below.
UPDATE '+@AuditTableName+'
SET '+@Audit_Status+' = ''Failed''
,'+@Audit_PkgEnd_dttm+' = GETDATE()
,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+LEFT(@errordescription ,100)+'''
WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
Here, it is inserting till 119 chars, if i give more than 119 chars pkg is failing with above error.
I want to get insert Complete error info into the column.
Can anybody suggest on this??
Thanks in advance !!!
Thanks Arthur for the response, i have tried with the Sql_Variant data type also, here procedure itself not creating and throwing below error.
"The data types nvarchar(max) and sql_variant are incompatible in the add operator."
This is the procedure i am using to fetch error info into Audit table.
ALTER PROC [dbo].[usp_AuditErrorHandler]
@AuditTableName nvarchar(MAX)
,@Audit_Status nvarchar(100)
,@Audit_PkgEnd_dttm nvarchar(100)
,@Audit_Task_ErrorCode nvarchar(100)
,@Audit_ErrorDescription SQL_VARIANT
,@errorcode nvarchar(max)
,@task SQL_VARIANT
,@errordescription SQL_VARIANT
,@Audit_ID nvarchar(10)
,@LogID INT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @STRQuery SQL_VARIANT
BEGIN TRY
SET @STRQuery = '
UPDATE '+@AuditTableName+'
SET '+@Audit_Status+' = ''Failed''
,'+@Audit_PkgEnd_dttm+' = GETDATE()
,'+@Audit_Task_ErrorCode+' = '''+@errorcode+'''
,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+ @errordescription +'''
(Error is giving in this line)
WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
EXEC (@STRQuery)
END TRY
Below is the Audit Table Schema
Similar Messages
-
Error ,message into table
Hi all,
i am trying to put a error message into a table...any idea how i can get this without doing move 'matnr & is in error' into my table?
thanxHi,
There's a few ways you could do this;
Construct your message first (i.e. combine the message text and variables into one string, then move this into the table)
or
Don't store the text, instead store the message ID, number and variable parts of the message. This has the advantage if you're running a multi-language system the log can be used by users of different languages.
Regards,
Nick -
Loading multiple .csv files into a table using SSIS
Hi,
I have a requirement where I have 200+ csv files to be loaded into Netezza table using SSIS.
Issue I am facing is all columns have different number of columns, for ex, file 1 has columns A,B,C and file 2 has columns C,D,E. My target table has all columns from A to E in it.
But, when I am using for each loop container, only the file for which I have specified filepath+filename in loop variable, that is getting loaded. Rest all files, no data is getting loaded from them and package is executing successfully.
Any help is appreciated.
Regards,
VTif you want to iterate through files then all files should be in same folder and you should use file enumerator type within ForEach loop. Then inside loop you might need a script task to generate the data flow on the fly based on the avialble input columns
from the file and do the mapping in the destination. So I assume you put NULLs (or some default value) for missing columns from the file
http://blog.quasarinc.com/ssis/best-solution-to-load-dynamically-change-csv-file-in-ssis-etl-package/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Insert error message into session
hi all,
I need to Insert error message into the log of SM35 session.
1. I have created a BDC that creates a session in SM35.
2. The session is scheduled daily and gets executed automatically.
3. there is a scenario where the session should be stopped manually with a error message.
the system doesnt generate any error automatically for that scenario
can any one pls tell me whether its possible to put a manual error into SM35 session log ?
Thanks in Advance,
SanthosiniHi,
There's a few ways you could do this;
Construct your message first (i.e. combine the message text and variables into one string, then move this into the table)
or
Don't store the text, instead store the message ID, number and variable parts of the message. This has the advantage if you're running a multi-language system the log can be used by users of different languages.
Regards,
Nick -
Change of error message into warning message
While doing FBZP i have found the following error.
Clearing acct only allowed for an outgoing bill of exch.pmnt
Message no. F3029
I am not able to go further, the above message is coming.
I want to make the error message into warning message.
Please suggest, how to overcomeHello BSR,
The Error message F3029 is raised when the clearing account (T042I-VKONT) is filled but the payment method in question is not defined as "Bill/exchange".
I assume that the field is not changable at the moment. You may make necessary changes (delete the entry or delete the specified account) with the instructions below.
1. Go to Tcd: FBZP -> Click [Pmt methods in country]
2. Select the entry for the erroneous country(?)/payment method
3. Change Payment method classification to 'Bill/ex' and save
Now you should be able to change "Set Up Bank Determination for Payment
Transactions" table.
If you still want to use this payment method, please change back to the original classification after making necessary changes in T042I.
I believe this information would help you in resolving the reported issue.
Best Regards,
Vanessa Barth. -
Audit- Not laoding Audit data into Audit tables
Hi ,
Audit data not loading into audit tables in my XI3.1 SP4Environament.
Audit data base is in SQL SERVER 2008 R2
where Audit database congigured , audit events enabled properly.
and also log files creating without any errors also
Please help me ..
Edited by: Reddeppa Konduru on Nov 9, 2011 11:31 AM
Edited by: Reddeppa Konduru on Nov 9, 2011 12:31 PMI am getting below error
bsystem_impl.cpp:2651: TraceLog message 1
2011/11/09 03:22:47.071|>>|A| |13664|9368| |||||||||||||||assert failure: (.\auditsubsystem_impl.cpp:2651). (false : Next event id value should be greater than the current one, check the auditee packing events code). -
How can I put all output error message into a String Variable ??
Dear Sir:
I have following code, When I run it and I press overflow radio button, It outputs following message:
Caught RuntimeException: java.lang.NullPointerException
java.lang.NullPointerException
at ExceptionHandling.ExceptTest.actionPerformed(ExceptTest.java:72)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)Caught RuntimeException: java.lang.NullPointerException
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)I hope to catch all these error message into a String Variable such as StrErrorMsg, then I can use System.out.println(StrErrorMsg) to print it out or store somewhere, not only display at runtime,
How can I do this??
Thanks a lot,
See code below.
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.FileInputStream;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
public class ExceptTest extends JFrame implements ActionListener {
private double[] a;
private JRadioButton divideByZeroButton;
private JRadioButton badCastButton;
private JRadioButton arrayBoundsButton;
private JRadioButton nullPointerButton;
private JRadioButton negSqrtButton;
private JRadioButton overflowButton;
private JRadioButton noSuchFileButton;
private JRadioButton throwUnknownButton;
public ExceptTest() {
JPanel p = new JPanel();
ButtonGroup g = new ButtonGroup();
p.setLayout(new GridLayout(8, 1));
divideByZeroButton = addRadioButton("Divide by zero", g, p);
badCastButton = addRadioButton("Bad cast", g, p);
arrayBoundsButton = addRadioButton("Array bounds", g, p);
nullPointerButton = addRadioButton("Null pointer", g, p);
negSqrtButton = addRadioButton("sqrt(-1)", g, p);
overflowButton = addRadioButton("Overflow", g, p);
noSuchFileButton = addRadioButton("No such file", g, p);
throwUnknownButton = addRadioButton("Throw unknown", g, p);
getContentPane().add(p);
private JRadioButton addRadioButton(String s, ButtonGroup g, JPanel p) {
JRadioButton button = new JRadioButton(s, false);
button.addActionListener(this);
g.add(button);
p.add(button);
return button;
public void actionPerformed(ActionEvent evt) {
try {
Object source = evt.getSource();
if (source == divideByZeroButton) {
a[1] = a[1] / a[1] - a[1];
} else if (source == badCastButton) {
Frame f = (Frame) evt.getSource();
} else if (source == arrayBoundsButton) {
a[1] = a[10];
} else if (source == nullPointerButton) {
Frame f = null;
f.setSize(200, 200);
} else if (source == negSqrtButton) {
a[1] = Math.sqrt(-1);
} else if (source == overflowButton) {
a[1] = 1000 * 1000 * 1000 * 1000;
int n = (int) a[1];
} else if (source == noSuchFileButton) {
FileInputStream is = new FileInputStream("Java Source and Support");
} else if (source == throwUnknownButton) {
throw new UnknownError();
} catch (RuntimeException e) {
System.out.println("Caught RuntimeException: " + e);
e.printStackTrace();
System.out.println("Caught RuntimeException: " + e);
} catch (Exception e) {
System.out.println("Caught Exception: " + e);
public static void main(String[] args) {
JFrame frame = new ExceptTest();
frame.setSize(150, 200);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.show();
}yes, I update as follows,
but not looks good.
import java.io.*;
public class UncaughtLogger implements Thread.UncaughtExceptionHandler {
private File file;
private static String errorMessage;
public UncaughtLogger(File file) {
this.file = file;
//Thread.setDefaultUncaughtExceptionHandler(this);
public UncaughtLogger(String str) {
this.errorMessage = str;
Thread.setDefaultUncaughtExceptionHandler(this);
//@Override()
public void uncaughtException(Thread t, Throwable e){
try {
log(e);
} catch (Throwable throwable) {
System.err.println("error in logging:");
throwable.printStackTrace();
private void log(Throwable e) throws IOException {
PrintWriter out = new PrintWriter(new FileWriter(file, true));
try {
e.printStackTrace(out);
} finally {
out.close();
private static UncaughtLogger logger = new UncaughtLogger(new File("C:/temp/log.txt"));
private static UncaughtLogger logger2 = new UncaughtLogger(errorMessage);
public static void main(String[] args) {
String s1 = "Hello World!";
s1 = null;
String s2 = s1.getClass().getName();
System.out.println(s1);
System.out.println(s2);
System.out.println("errorMessage =" + errorMessage);
} -
Hi everyone,
I have a problem when displaying error messages in a table (with values, not based on a model)
In a column I have an inputText and a validation that checks valuechangelistener. If not true, throw an error message for that component.
facesContext.addMessage (client, message);
The table is a DropTarget so each time dragging the dragsource to the table renders the table and missed the error message.
I had thought to save the id of the components in a list and the dragDropEndListener force to be redisplayed.
The problem is that the IDs of the components varies each time the table is rendered so even save the id of the components is worthless because they are not the same.
Anybody can help me?How I can re-display the errors of the components?
I can not use validator instead of valuechangelistenerI am not sure if you want something like highlighting the components which have errors -
If yes , then try this code bit
public void addMessage(UIComponent component, FacesMessage.Severity type,
String message) {
FacesContext fctx = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(type, message, null);
fctx.addMessage(component.getClientId(fctx), fm);
You can call the method like this addMessage(this.componentName,FacesMessage.SEVERITY_ERROR,ErroMessage)
-Sudipto -
Unable to show error message in Advanced Table
Hi All,
I have an requirement to show a pdf ouput when user clicks on image or button in advanced table. I have created a new button in advanced table and when user clicks on button, I am showing an error message for testing. i used below code for CO extn, but when I click on button, I can see the diagnostic message but the error message is not showing in the page.
Need your assistance.
package XXJava.oracle.apps.ar.program.webui;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Hashtable;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import oracle.apps.ar.irec.common.webui.CustomCustSearchCO;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.OADataBoundValueFireActionURL;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAImageBean;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.OAWebBeanData;
import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
import oracle.cabo.ui.UIConstants;
import oracle.cabo.ui.action.FireAction;
public class XX_CustomCustSearchCO extends CustomCustSearchCO {
public XX_CustomCustSearchCO() {
public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
super.processRequest(paramOAPageContext, paramOAWebBean);
OAAdvancedTableBean CustomCustSearchTable= (OAAdvancedTableBean)paramOAWebBean.findChildRecursive("CustomCustSearchTable");
OAImageBean XX_Attach =(OAImageBean)CustomCustSearchTable.findChildRecursive("XX_Attach");
/*Hashtable params = new Hashtable (1);
//params.put ("XX_ACTION","XXX");
params.put ("XX_ACTION","ATTACHMENT");
Hashtable paramsWithBinds = new Hashtable(1);
//paramsWithBinds.put ("XX_PRIMARY",new OADataBoundValueFireActionURL((OAWebBeanData) XX_Attach, "{$ConsInvId}"));
paramsWithBinds.put ("CONS_ID",new OADataBoundValueFireActionURL((OAWebBeanData) XX_Attach, "{$ConsInvId}"));
//paramsWithBinds.put ("CONS_ID",new OADataBoundValueFirePartialActionURL((OAWebBeanData) XX_Attach, "{$ConsInvId}"));
XX_Attach.setFireActionForSubmit("addnInfoEvent",params,paramsWithBinds,false,false);*/
FireAction localaction = new FireAction("tempEvent");
OAButtonBean XX_Button1 =(OAButtonBean)CustomCustSearchTable.findChildRecursive("XX_Button1");
XX_Button1.setAttributeValue(UIConstants.PRIMARY_CLIENT_ACTION_ATTR, localaction);
public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
super.processFormRequest(paramOAPageContext, paramOAWebBean);
String flaction = paramOAPageContext.getParameter("event");
if (flaction.equalsIgnoreCase("tempEvent"))
paramOAPageContext.writeDiagnostics(this, "XX_CustomCustSearchCO :Inside the event ", 1);
throw new OAException("The file path is invalid. Please check the value of the profile option",OAException.ERROR);
Regards,
RamYou are throwing the message and then catching it yourself, and then printing the stack, which is what java is doing.
So, you need to
remove
}catch(Exception e)
e.printStackTrace();
and you would need to place the try block appropriately, since some methods you have used want exceptions caught.
Tapash -
Error message when importing data using Import and export wizard
Getting below error message when importing data using IMPORT and EXPORT WIZARD
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
<dir>
<dir>
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Could not allocate a new page for database REPORTING' because of insufficient disk space in filegroup 'PRIMARY'.
Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Buyer_.Inputs[Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Destination
- Buyer_First_Qtr.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Buyer" (28) failed with error code 0xC0209029 while processing input "Destination Input" (41). The
identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information
about the failure.
(SQL Server Import and Export Wizard)
Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)
</dir>
</dir>
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Buyer_First_Qtr returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput().
The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Smash126Hi Smash126,
Based on the error message” Could not allocate a new page for database REPORTING' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting
autogrowth on for existing files in the filegroup”, we can know that the issue is caused by the there is no sufficient disk space in filegroup 'PRIMARY' for the ‘REPORTING’ database.
To fix this issue, we can add additional files to the filegroup by add a new file to the PRIMARY filegroup on Files page, or setting Autogrowth on for existing files in the filegroup to increase the necessary space.
The following document about Add Data or Log Files to a Database is for your reference:
http://msdn.microsoft.com/en-us/library/ms189253.aspx
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Why do I keep getting an error message when trying to use passbook?
Why do I keep getting an error message when trying to use passbook?
Kind of hard to answer without some details such as iPhoto version and OS version. Are you signed into your Facebook account?
-
Can select, but cannot insert into oracle tables using php.
I am having trouble inserting data into a tables in oracle using PHP. I can insert into the tables using baninst1, but nothing else. I can't even insert using the tables' owner. Every time I try I get the ORA-00492 error of table or view does not exist. However, I can run a select statement just fine. So far, baninst1 is the only user that can actually do inserts. I've triple checked all the table grants and everything is fine. Also, I can copy/paste the exact insert statement into SQL*Plus and it works with the correct user. It doesn't have to be baninst1. I've tried everything I can think of. I've tried putting the table name in quotes, adding the schema name to the table, checking public synonyms, but everything appears to be ok. I would greatly appreciate any suggestions others may have.
I'm using PHP 5.2.3 with an oracle 9i DB.Here is the code that doesn't work. It works only with baninst1, no other username will work and all I do is change the my_username/my_password to something different. This is one example function where I try to do an insert, but it doesn't work on any of the tables I try.
Thanks for looking.
class Oracle {
private $oracleUser = "my_username";
private $oraclePassword = "my_password";
private $oracleDB = "MY_DB";
private $c = null;
function Connect() {
if ( !($this->c = ocilogon( $this->oracleUser, $this->oraclePassword, $this->oracleDB ) ) )
return false;
return true;
function AddNewTest($testName, $course, $section, $term, $maxAttempts, $length, $startDate, $startTime, $endDate, $endTime)
$result = "";
if( $this->c == null )
$this->Connect();
$splitIndex = strpos($course, " ");
$subjectCode = substr($course, 0, $splitIndex);
$courseNumber = substr($course, $splitIndex + 1);
$insertStatment = "insert into szbtestinfo(szbtestinfo_test_name,
szbtestinfo_course_numb,
szbtestinfo_section,
szbtestinfo_max_attempts,
szbtestinfo_length_minutes,
szbtestinfo_start,
szbtestinfo_end,
szbtestinfo_id,
szbtestinfo_subj_code,
szbtestinfo_eff_term)
values( '" . $testName .
"', '" . $courseNumber .
"', '" . $section .
"', " . $maxAttempts .
", " . $length .
", to_date('" . $startDate . " " . $startTime . "', 'MM/DD/YYYY HH24:MI')" .
", to_date('" . $endDate . " " . $endTime . "', 'MM/DD/YYYY HH24:MI')" .
", szsnexttest.nextval" .
", '" . $subjectCode .
"', '" . $term . "')";
//return $insertStatment;
$s = OCIParse($this->c, $insertStatment);
try
$result = OCIExecute($s);
catch(exception $e)
return $result;
} -
Collect message into internal table
Hi,
does any one knows how BAPIs or CALL TRANSACTIONs collect messages into internal table.
My problem is that some BI with CALL TRANSACTION doesn't collect right message into return table and I would like to collect this last message after CALL TRANSACTION and therefore be sure that everything went OK.....
thx
mariohi
good
check this
Call Transaction p_trans using ZBDC_Table
Mode p_mode
Update p_update
Messages into p_messages.
Move sy-subrc to w__subrc.
Scan the messages in YDCRAISES to see if we need to
change the message class.
Loop at p_messages.
Select single msgtyp
into w__msgtp
from zdcraise
where tcode = p_messages-tcode and
msgid = p_messages-msgid and
msgnr = p_messages-msgnr.
If sy-subrc = 0.
Move w__msgtp to p_messages-msgtyp.
Modify p_messages.
EndIf.
EndLoop.
Dump the message table ?
If w__ydcset-dumpmsg = True.
thanks
mrutyun^ -
How to Inscribe all the error messages into a single package ??
Hi,
I want to Inscribe all the error messages into a single package., and call the concern package from the exception block in every sp by passing the error code to that package, which will return the Concern error message to the calling Sp.,
Can any one help me out how to accomplish this ., ?
regards
RajaI want to Inscribe all the error messages into a single package., Why do you want to inscribe all the messages in a package?
I would suggest you to store them in a table instead and you can write a functin to retrive the error messages required.
But if your requirement is for 'Package' then assuming that you store all the error messages in a table 'error_table' (say) following code may help you .
CREATE TABLE Error_Table (
Error_Code VARCHAR2(10),
Error_Desc VARCHAR2(1024));Now insert your error codes and descriptions in this table.
CREATE OR REPLACE PACKAGE pkg_Error_Handler
AS
FUNCTION f_Get_Error_Message(p_Error_Code Error_Table.Error_Code%TYPE) RETURN VARCHAR2;
END pkg_Error_Handler;/
CREATE OR REPLACE PACKAGE BODY pkg_Error_Handler
AS
FUNCTION f_Get_Error_Message
(p_Error_Code Error_Table.Error_Code%TYPE)
RETURN VARCHAR2
IS
lv_Error_msg Error_Table.Error_desc%TYPE;
BEGIN
BEGIN
SELECT Error_desc
INTO lv_Error_msg
FROM Error_Table
WHERE Error_Code = p_Error_Code;
EXCEPTION
WHEN No_Data_Found THEN
lv_Error_msg := 'No such error code '
||p_Error_Code
||' defined in the system';
WHEN OTHERS THEN
lv_Error_msg := p_Error_Code;
END;
RETURN lv_Error_msg;
END f_Get_Error_Message;
END pkg_Error_Handler;
/and you can call this packaged funtion from any exception block to get the error description.
Regards,
Abhijit.
N.B.: Code not tested -
Getting the Datatype error data into a table or file
Hi experts,
I have a scenario where I need to capture the datatype mismatch records between source & target or the data length error records into a table or file.
For example.
1. I have source table column of datatype varchar which is mapped to a target table column of datatype Integer.
2. I have source table column of datatype varchar2(2000) is mapped to a target table column of datatype varchar2(200).
I know that while interface execution, if any of the above scenario comes an error occurs respectively and execution stops.
My question is whether is there anyway to capture those types of records and insert into a table or file. If yes kindly suggest me how to do it.
Thanks in advanceHi Siva,
Use SqlUnload tool to capture error out records in excel file.
Hope this will helps you
Thanks,
Phani
Maybe you are looking for
-
Crystal Report Error - Mobile Sales - 4.0 SP 12
Some of the users are getting the following error message while trying to open the Crystal Reports from Mobile Sales. "This program is used to host and to initialize the UF F has encountered a problem and needs to close. We are sorry for the inconven
-
I was wondering if you could help we with this. PART 1 i have a table of students info. I give the students praise points for doing well in the lesson. I want to compare two students's praise points, if one is bigger (Higher) than the other i want to
-
"The built-in network interface could not be found"
I'm trying to do a new setup of time machine on my wife's macbook air running 10.5.6 to a hard disk connected via USB. When I try to configure Time Machine (previously unconfigured) to use the disk I get the error "Time Machine could not be configure
-
Hi, I have to insert in a database a lot of images, documents, audio and video files, (2G/mounth) My database should keep this entire files and any time to have the possibility to recover the information in case of disaster. If I will use bfile filed
-
Can I reinstall the mail app ?
I deleted my mail app a while back, thinking that I would not need it, but now I do. Is it possible to download and reinstall the mail app without reinstalling the entire os? Thanks for any help.