<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ABAP Tutorials &#187; Dump</title>
	<atom:link href="http://www.abap-tutorials.com/tag/dump/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abap-tutorials.com</link>
	<description>ABAP Tutorials, Guides, Training, Manuals</description>
	<lastBuildDate>Thu, 17 Nov 2011 07:43:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Tracing your SQL in SAP</title>
		<link>http://www.abap-tutorials.com/2009/08/04/tracing-your-sql/</link>
		<comments>http://www.abap-tutorials.com/2009/08/04/tracing-your-sql/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 00:59:16 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Dump]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Trace]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=459</guid>
		<description><![CDATA[The SQL Trace function is an on-demand log of selected SQL statements that are issued against the database through the Open SQL Engine. The SQL Trace can be switched on or off dynamically. The log format is database independent. Besides the SQL statement text, each log record contains information about the point in time when the statement [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">The SQL Trace function is an on-demand log of selected SQL statements that are issued against the database through the Open SQL Engine. The SQL Trace can be switched on or off dynamically. The log format is database independent. Besides the SQL statement text, each log record contains information about the point in time when the statement was executed, its duration, its input parameters and results (where applicable) as well as context information.</p>
<p style="text-align:justify;">The SQL Trace is especially useful for Development and Performance analysis.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span id="more-459"></span></p>
<p>Steps to follow for applying SQL Trace:</p>
<p>  - Launch the SQL Trace application.<br />
  - Activate the SQL Trace.<br />
 - Run the application that you want to trace.<br />
 - Deactivate the SQL Trace.<br />
 - Set filters optionally.<br />
 - Evaluate the trace.</p>
<p>Lets follow the steps and trace the SQL:</p>
<p>(i) Launch the SQL Trace application &#8211; with T-Code ST05.</p>
<p> </p>
<div id="attachment_461" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-461" title="SQL Trace - Initial Screen" src="http://naveenvishal.files.wordpress.com/2009/07/sql_trace1.jpg" alt="SQL Trace - Initial Screen" width="450" height="326" /><p class="wp-caption-text">SQL Trace - Initial Screen</p></div>
<p>Following function can be performed on the Initial Screen:</p>
<p>Select trace Mode:</p>
<p> · Select the trace mode SQL Trace, Enqueue Trace, RFC Trace, or Table Buffer Trace. You can select multiple trace modes simultaneously.</p>
<p> Select trace function:</p>
<p> · Start the trace recording.</p>
<p> · Stop the trace recording.</p>
<p> · Branch to trace list, detailed list, or time-sorted list.</p>
<p> · Branch to Explain SQL to analyze an SQL statement without an explicit trace file.</p>
<p> </p>
<p>(ii) Activate the SQL Trace:</p>
<p>If you want to switch on the trace under your user name, choose Trace on.</p>
<p>If you want to pass on values for one or several filter criteria, choose Trace with Filter.( Typical filter criteria are: the name of the user, transaction name, process name, and program name).</p>
<p>  (iii) Run the application that you want to trace. Execute all the screens/steps for which you want to trace.</p>
<p>(iv) Deactivate the SQL Trace &#8211; Get back to ST05 and click deactivate button to deactivate the SQL trace. It will stop further / unnecessary SQL recording.</p>
<p>(v) Evaluate the trace by clicking Display Trace. The basic list is displayed at the start.</p>
<p> </p>
<div id="attachment_557" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-557" title="Basic Trace List" src="http://naveenvishal.files.wordpress.com/2009/07/basic_list_trace.jpg" alt="Basic Trace List" width="450" height="223" /><p class="wp-caption-text">Basic Trace List</p></div>
<p> </p>
<p>The displayed result can be drilled down to get more detailed result for better analysis.</p>
<p>Apart from this, summary report can also be generated shown as below.</p>
<p> </p>
<div id="attachment_558" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-558" title="Summary Trace List" src="http://naveenvishal.files.wordpress.com/2009/07/summary_trace_list.jpg" alt="Summary Trace List" width="450" height="195" /><p class="wp-caption-text">Summary Trace List</p></div>
<p> </p>
<p> </p>
<p>(vi) Evolving Individual SQL statements:</p>
<p>Click Enter SQL statement to enter the SQL statement you want to evaluate. Enter the SQL and click Explain.</p>
<p> </p>
<div id="attachment_559" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-559" title="Enter SQL" src="http://naveenvishal.files.wordpress.com/2009/07/sql_trace_sqlstmt1.jpg" alt="Enter SQL" width="450" height="101" /><p class="wp-caption-text">Enter SQL</p></div>
<p> </p>
<p>The details of SQL is then displayed.</p>
<p> </p>
<div id="attachment_560" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-560" title="SQL statement Evaluation" src="http://naveenvishal.files.wordpress.com/2009/07/sql_trace_sqlstmt2.jpg" alt="SQL statement Evaluation" width="450" height="326" /><p class="wp-caption-text">SQL statement Evaluation</p></div>
<p> </p>
<p>Summarized Table Information can also be display by clicking the Table Name.</p>
<p> </p>
<div id="attachment_561" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-561" title="Display Table Details" src="http://naveenvishal.files.wordpress.com/2009/07/sql_trace_sqlstmt3.jpg" alt="Display Table Details" width="450" height="325" /><p class="wp-caption-text">Display Table Details</p></div>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/08/04/analyzing-the-dumps/' rel='bookmark' title='Analyzing the SAP Dumps'>Analyzing the SAP Dumps</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/23/debugging-smartforms-and-sapscript/' rel='bookmark' title='Debugging Smartforms and SAPScript in ABAP'>Debugging Smartforms and SAPScript in ABAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/08/06/finding-obsolete-bapis/' rel='bookmark' title='Finding Obsolete BAPIs in SAP'>Finding Obsolete BAPIs in SAP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/08/04/tracing-your-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing the SAP Dumps</title>
		<link>http://www.abap-tutorials.com/2009/08/04/analyzing-the-dumps/</link>
		<comments>http://www.abap-tutorials.com/2009/08/04/analyzing-the-dumps/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 00:54:44 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ABAP]]></category>
		<category><![CDATA[analizing]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[Dump]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=555</guid>
		<description><![CDATA[ABAP programs are checked statically when they are created and dynamically when they are running. Error states, which are not statically predictable and only occur at runtime are dynamically identified by the ABAP runtime environment. States of this type lead to exceptions. If an exception is not handled or cannot be handled, a runtime error [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">ABAP programs are checked statically when they are created and dynamically when they are running. Error states, which are not statically predictable and only occur at runtime are dynamically identified by the ABAP runtime environment. States of this type lead to exceptions. If an exception is not handled or cannot be handled, a runtime error occurs.</p>
<p style="text-align:justify;"><span id="more-555"></span></p>
<p style="text-align:justify;">If a runtime error occurs, the ABAP runtime environment terminates the execution of the program, generates a short dump and branches to a special screen for analyzing the short dump. You can also find short dumps in transaction ST22 or by choosing the menu path Tools → ABAP Workbench → Test → Dump Analysis.</p>
<p style="text-align:justify;"> A short dump is divided into different sections that document the error. The overview shows what other information is output in the short dump, such as contents of data objects, active calls, control structures, and so on. You can branch to the ABAP Debugger at the termination point from the short dump view.</p>
<p style="text-align:justify;">The following different <strong><span style="color:#339966;">error situations</span> </strong>exist:</p>
<p style="text-align:justify;">. <strong>Internal Error</strong> -The kernel identifies an error state. In this case, notify SAP.</p>
<p style="text-align:justify;">. <strong>Installation and Environment/Resource Error -</strong> In this case, an error occurred that was caused by incorrect system installation or missing resources (such as the database being shutdown).</p>
<p style="text-align:justify;">. <strong>Error in Application Program</strong></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Typical causes of errors are</span>:</strong></p>
<p style="text-align:justify;">. Content of a numerical field not in the correct format</p>
<p style="text-align:justify;">. Arithmetic overrun</p>
<p style="text-align:justify;">. An external procedure is not available</p>
<p style="text-align:justify;">. Type conflict when transferring parameters to an external procedure</p>
<p style="text-align:justify;">By default, short dumps are stored in the system for 14 days. The transaction for managing short dumps is ST22. You can delete short dumps in accordance with a time specification using the Reorganize function, which you can call by choosing Goto → Reorganize. You can save a short dump without a time limit using the Keep function, which you can choose under Short Dump → Keep/Release.</p>
<p style="text-align:justify;">If problems that you cannot solve yourself occur with ABAP programs, you can send an extract of the short dump to SAP. A short dump is the basis on which the SAP Hotline and remote consulting solve problems.</p>
<p style="text-align:justify;">. If a runtime error occurs, a short dump is generated. You can use transaction ST22 to analyze this short dump.</p>
<p style="text-align:justify;">. Dump data is stored in the database.</p>
<p style="text-align:justify;">. Dump data can be reorganized.</p>
<p style="text-align:justify;">. Individual short dumps can be flagged for retention.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">SAP System Trace</span></strong></p>
<p style="text-align:justify;">You can use the system trace to record internal system activities. The system trace is primarily used if an authorization trace is to be created. SAP recommends that you use the system log or the developer trace for system monitoring and problem analysis.</p>
<p style="text-align:justify;">You can call the SAP System Trace using transaction ST01 or by choosing the menu path Tools → Administration → Monitor → Traces → System Trace. You can also use transaction ST01 to display the inactive trace file.</p>
<p style="text-align:justify;">You can use the SAP system trace to monitor the following components:</p>
<p style="text-align:justify;">. Authorization checks</p>
<p style="text-align:justify;">. Kernel functions</p>
<p style="text-align:justify;">. Kernel modules</p>
<p style="text-align:justify;">. DB accesses (SQL Trace)</p>
<p style="text-align:justify;">. Table buffers</p>
<p style="text-align:justify;">. Lock operations (client-side)</p>
<p style="text-align:justify;">You select the components to be logged on the initial screen. If the trace is activated for the authorization check, all authorization checks performed by the system are recorded. During the evaluation, you can identify which authorizations the system checked at which times. The following detail information is also provided: Date, time, work process number, user, authorization object, program, line, number of authorization values, authorization values.</p>
<p style="text-align:justify;">You can use the SQL Trace to follow how the Open SQL commands in reports and transactions are converted to standard SQL commands and the parameters with which the SQL commands are transferred to the database system in use. The results of the SQL command are also logged, such as the return code and the number of records found, inserted, or deleted by the database. Logging the execution time and the callpoint in the application program allows you to perform more advanced evaluations.</p>
<p style="text-align:justify;">With the enqueue trace, you can follow which lock instructions the SAP system performs on which lock objects, and which parameters the system uses for these locks.</p>
<p style="text-align:justify;">The program that triggered the lock, the owner of the lock, and the time that the enqueue server required to release the lock again are all also logged in the trace file.</p>
<p style="text-align:justify;">You can use the RFC trace to follow which remote calls the SAP system executes, and the instance on which these calls are executed. You can see from the trace which function modules were called remotely by the program that is to be analyzed, and whether the RFC was successfully executed. The total time required for the execution of the remote call and the number of bytes sent and received during the RFC are also logged in the trace file.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/30/catch-the-dump/' rel='bookmark' title='Catch the Dump in ABAP &#8211; I'>Catch the Dump in ABAP &#8211; I</a></li>
<li><a href='http://www.abap-tutorials.com/2009/08/04/tracing-your-sql/' rel='bookmark' title='Tracing your SQL in SAP'>Tracing your SQL in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/16/assigncreate-authorization-group-for-a-table/' rel='bookmark' title='Assign/Create Authorization Group for a Table in SAP'>Assign/Create Authorization Group for a Table in SAP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/08/04/analyzing-the-dumps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catch the Dump in ABAP – II</title>
		<link>http://www.abap-tutorials.com/2009/07/31/catch-the-dump-ii/</link>
		<comments>http://www.abap-tutorials.com/2009/07/31/catch-the-dump-ii/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 00:14:34 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[analizing]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[Dump]]></category>
		<category><![CDATA[SAP]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=545</guid>
		<description><![CDATA[As an ABAPer, you probably know how combursome it is to work with classical exceptions (discussed in last post), since you must handle all of them immediately after a function or method call. Beside being labourious, these mappings clutter our code and make it difficult to read.  SAP also have Object Oriented Class based exceptions [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">As an ABAPer, you probably know how combursome it is to work with classical exceptions (discussed in last post), since you must handle all of them immediately after a function or method call. Beside being labourious, these mappings clutter our code and make it difficult to read.</p>
<p style="text-align:justify;"> SAP also have Object Oriented Class based exceptions which are easy to handle and less cumbersome.</p>
<p style="text-align:justify;"> <span id="more-545"></span></p>
<p style="text-align:justify;">Class-based exceptions are handled in the following control structure:</p>
<p style="text-align:justify;">TRY.</p>
<p style="text-align:justify;">&#8230;                       <span style="color:#3366ff;">&#8221; TRY block (application coding)</span></p>
<p style="text-align:justify;">CATCH cx_&#8230; cx_&#8230; &#8230;</p>
<p style="text-align:justify;">&#8230;                     <span style="color:#3366ff;">&#8221; CATCH block (exception handler)</span></p>
<p style="text-align:justify;">CATCH cx_&#8230; cx_&#8230; &#8230;</p>
<p style="text-align:justify;">&#8230;                     <span style="color:#3366ff;">&#8221; CATCH block (exception handler)</span></p>
<p style="text-align:justify;">&#8230;</p>
<p style="text-align:justify;">CLEANUP.</p>
<p style="text-align:justify;">&#8230;                     <span style="color:#3366ff;">&#8221; CLEANUP block (cleanup context)</span></p>
<p style="text-align:justify;">ENDTRY.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">The TRY statement opens a control structure to be ended with ENDTRY, in which three statement blocks can be listed in a specified order (this is not obligatory).</p>
<p style="text-align:justify;"> 1. A TRY block, in which exceptions can occur.</p>
<p style="text-align:justify;">This exception block consists of all the statements between the TRY and the CATCH statement.</p>
<p style="text-align:justify;"> 2. One or more CATCH blocks for catching exceptions.</p>
<p style="text-align:justify;">These exception blocks are initiated with CATCH and ended with a further CATCH, CLEANUP, or ENDTRY.</p>
<p style="text-align:justify;"> 3. A CLEANUP block for cleanup work after the exceptions have been caught.</p>
<p style="text-align:justify;">This statement block is initiated by CLEANUP and ended with ENDTRY. A TRY-ENDTRY structure must not contain more than one CLEANUP block in precisely this position.</p>
<p style="text-align:justify;"> We can also raise explicit exception by using statement RAISE EXCEPTION &lt;CUSTOM_EXCEPTION&gt;.</p>
<p style="text-align:justify;">  </p>
<p style="text-align:justify;"><span style="color:#339966;"><strong>Sample Report</strong></span></p>
<p style="text-align:justify;"> Report DEMO_HANDLE_EXCEPTIONS.</p>
<p style="text-align:justify;">parameters NUMBER type I.</p>
<p style="text-align:justify;">data RESULT type P decimals 2.<br />
data OREF type ref to CX_ROOT.<br />
data TEXT type STRING.</p>
<p style="text-align:justify;">start-of-selection.<br />
write: / &#8216;Testing division and Sqare root with&#8217;, NUMBER.</p>
<p style="text-align:justify;">uline.</p>
<p style="text-align:justify;">try.</p>
<p style="text-align:justify;">if ABS( NUMBER ) &gt; 100.<br />
raise exception type CX_DEMO_ABS_TOO_LARGE.</p>
<p style="text-align:justify;">endif.</p>
<p style="text-align:justify;">try.</p>
<p style="text-align:justify;">RESULT =  1 / NUMBER.<br />
write: / &#8216;Result of division:&#8217;, RESULT.<br />
RESULT = SQRT( NUMBER ).<br />
write: / &#8216;Result of square root:&#8217;, RESULT.</p>
<p style="text-align:justify;">catch CX_SY_ZERODIVIDE into OREF.<br />
TEXT = OREF-&gt;GET_TEXT( ).<br />
cleanup.<br />
clear RESULT.</p>
<p style="text-align:justify;">endtry.</p>
<p style="text-align:justify;">catch CX_SY_ARITHMETIC_ERROR into OREF.<br />
TEXT = OREF-&gt;GET_TEXT( ).</p>
<p style="text-align:justify;">catch CX_ROOT into OREF.<br />
TEXT = OREF-&gt;GET_TEXT( ).</p>
<p style="text-align:justify;">endtry.</p>
<p style="text-align:justify;">if not TEXT is initial.<br />
write / TEXT.<br />
endif.</p>
<p style="text-align:justify;">write: / &#8216;Final result:&#8217;, RESULT.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">The output of the above program when zero (0) is entered:</p>
<p style="text-align:justify;"> </p>
<div id="attachment_553" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-553" title="Catching Exception" src="http://naveenvishal.files.wordpress.com/2009/07/exception1.jpg" alt="Catching Exception" width="450" height="134" /><p class="wp-caption-text">Catching Zero (0) Exception</p></div>
<p> </p>
<p> </p>
<p style="text-align:justify;">  </p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/30/catch-the-dump/' rel='bookmark' title='Catch the Dump in ABAP &#8211; I'>Catch the Dump in ABAP &#8211; I</a></li>
<li><a href='http://www.abap-tutorials.com/2009/09/16/abap-program-for-table-maintenance-in-sap/' rel='bookmark' title='ABAP Program for Table Maintenance in SAP'>ABAP Program for Table Maintenance in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/27/sap-data-in-3-dimension/' rel='bookmark' title='ABAP Program to display SAP Data in 3-Dimension'>ABAP Program to display SAP Data in 3-Dimension</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/07/31/catch-the-dump-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catch the Dump in ABAP &#8211; I</title>
		<link>http://www.abap-tutorials.com/2009/07/30/catch-the-dump/</link>
		<comments>http://www.abap-tutorials.com/2009/07/30/catch-the-dump/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:16:46 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[analizing]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[Dump]]></category>
		<category><![CDATA[SAP]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=535</guid>
		<description><![CDATA[Normally, if any exception occurred it will go to dump immediately in a program, then we will process this through the tcode ST22(dump analysis).  This code comes handy when the behaviour of function module is not predictable. We will convert the dump into an error message (like in above snap) or some text statement. For this we need to call this [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Normally, if any exception occurred it will go to dump immediately in a program, then we will process this through the tcode ST22(dump analysis).  This code comes handy when the behaviour of function module is not predictable.</p>
<div id="attachment_537" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-537" title="Explicit Error Handling" src="http://naveenvishal.files.wordpress.com/2009/07/err_handling.jpg" alt="Explicit Error Handling" width="450" height="44" /><p class="wp-caption-text">Explicit Error Handling</p></div>
<p style="text-align:justify;">We will convert the dump into an error message (like in above snap) or some text statement. For this we need to call this statement<br />
<strong>     RECEIVE RESULTS FROM FUNCTION &#8216;function module&#8217;</strong> </p>
<p style="text-align:justify;"> </p>
<p><span id="more-535"></span></p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Sample Program</span></strong></p>
<p style="text-align:justify;"><strong> </strong><br />
REPORT zcustom_errmsg.<br />
PARAMETERS: p_file LIKE rlgrap-filename .<br />
DATA: v_file TYPE string.<br />
DATA: BEGIN OF itab OCCURS 0,<br />
      name(23) TYPE  c,<br />
      END OF itab.</p>
<p style="text-align:justify;">DATA: errormessage TYPE char50.<br />
v_file = p_file.<br />
CALL FUNCTION &#8216;GUI_UPLOAD&#8217;<br />
  EXPORTING<br />
    filename            = v_file<br />
    filetype            = &#8216;ASC&#8217;<br />
    has_field_separator = &#8216; &#8216;<br />
  TABLES<br />
    data_tab            = itab.</p>
<p style="text-align:justify;">RECEIVE RESULTS FROM FUNCTION &#8216;GUI_UPLOAD&#8217;<br />
 EXCEPTIONS<br />
   file_open_error               = 1<br />
   file_read_error               = 2<br />
   no_batch                      = 3<br />
   gui_refuse_filetransfer       = 4<br />
   invalid_type                  = 5<br />
   no_authority                  = 6<br />
   unknown_error                 = 7<br />
   bad_data_format               = 8<br />
   header_not_allowed            = 9<br />
   separator_not_allowed         = 10<br />
   header_too_long               = 11<br />
   unknown_dp_error              = 12<br />
   access_denied                 = 13<br />
   dp_out_of_memory              = 14<br />
   disk_full                     = 15<br />
   dp_timeout                    = 16<br />
   OTHERS                        = 17 .</p>
<p>CASE sy-subrc.<br />
  WHEN 0.<br />
    errormessage     = &#8216;Data Loaded&#8217;.<br />
  WHEN 1.<br />
    errormessage     = &#8216;FILE_OPEN_ERROR&#8217;.<br />
  WHEN 2.<br />
    errormessage     = &#8216;FILE_READ_ERROR&#8217;.<br />
  WHEN 3.<br />
    errormessage     = &#8216;NO_BATCH&#8217;.<br />
  WHEN 4.<br />
    errormessage     = &#8216;GUI_REFUSE_FILETRANSFER&#8217;.<br />
  WHEN 5.<br />
    errormessage     = &#8216;INVALID_TYPE&#8217;.<br />
  WHEN 6.<br />
    errormessage     = &#8216;NO_AUTHORITY&#8217;.<br />
  WHEN 7.<br />
    errormessage     = &#8216;UNKNOWN_ERROR&#8217;.<br />
  WHEN 8.<br />
    errormessage     = &#8216;BAD_DATA_FORMAT&#8217;.<br />
  WHEN 9.<br />
    errormessage     = &#8216;HEADER_NOT_ALLOWED&#8217;.<br />
  WHEN 10.<br />
    errormessage     = &#8216;SEPARATOR_NOT_ALLOWED&#8217;.<br />
  WHEN 11.<br />
    errormessage     = &#8216;HEADER_TOO_LONG&#8217;.<br />
  WHEN 12.<br />
    errormessage     = &#8216;UNKNOWN_DP_ERROR&#8217;.<br />
  WHEN 13.<br />
    errormessage     = &#8216;ACCESS_DENIED&#8217;.<br />
  WHEN 14.<br />
    errormessage     = &#8216;DP_OUT_OF_MEMORY&#8217;.<br />
  WHEN 15.<br />
    errormessage     = &#8216;DISK_FULL&#8217;.<br />
  WHEN 16.<br />
    errormessage     = &#8216;DP_TIMEOUT&#8217;.<br />
  WHEN 17.<br />
    errormessage     = &#8216;OTHERS&#8217;.<br />
ENDCASE.</p>
<p style="text-align:justify;">MESSAGE e001(00) WITH errormessage .</p>
<p style="text-align:justify;">The above program will give an error message instead of a dump, dump in terms of minor errors is quite worthless to search for.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/31/catch-the-dump-ii/' rel='bookmark' title='Catch the Dump in ABAP – II'>Catch the Dump in ABAP – II</a></li>
<li><a href='http://www.abap-tutorials.com/2009/08/04/analyzing-the-dumps/' rel='bookmark' title='Analyzing the SAP Dumps'>Analyzing the SAP Dumps</a></li>
<li><a href='http://www.abap-tutorials.com/2009/08/06/search-for-smartforms-in-your-language/' rel='bookmark' title='ABAP Program to Search For SMARTFORMS in your Language'>ABAP Program to Search For SMARTFORMS in your Language</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/07/30/catch-the-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

