-
Notifications
You must be signed in to change notification settings - Fork 0
/
abapcall_function_exc_short_form.html
139 lines (137 loc) · 5.82 KB
/
abapcall_function_exc_short_form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="EN">
<!-- ABAPCALL_FUNCTION_EXC_SHORT_FORM -->
<!-- Mirrored from help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapcall_function_exc_short_form.htm by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 20 Jan 2022 18:03:52 GMT -->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="SAP">
<meta name="description" content="CALL FUNCTION EXCEPTIONS - Short Form">
<title>
CALL FUNCTION EXCEPTIONS - Short Form - ABAP Keyword Documentation
</title>
<link rel="icon" href="ABAPIcon.ico" type="image/ico">
<link rel="shortcut icon" href="ABAPIcon.ico">
<LINK rel="stylesheet" href="abap_docu.css" type="text/css">
<script type="text/JavaScript">
function call_link(linked_file)
{
if(parent.frames.length>0){
parent.window.frames["basefrm"].window.location = linked_file;
parent.window.frames["treeframe"].window.location = "abap_docu_tree92bd.html?file=" + linked_file;}
else {
window.location = linked_file;}
}
function urlToClipboard(id){
try{ var loc = top.location.href;}
catch(e){ alert( "URL cannnot be determined" ); return; }
var field = document.getElementById(id);
field.focus();
if ( loc.search( ".htm" ) == -1 && loc.search( ".HTM" ) == -1 ){ loc = loc + "index.htm"; }
if ( loc.search( "index.html" ) != -1
|| loc.search( "INDEX-2.html" ) != -1 ){
var off = loc.search( "file=" );
if ( off == -1 ){
field.value = loc + "?file=abapcall_function_exc_short_form.htm"; }
else {
field.value = loc.substring( 0, off ) + "file=abapcall_function_exc_short_form.htm";
}
}
else {
field.value = loc; }
field.setSelectionRange(0, field.value.length);
var r = confirm( "Copy URL to clipboard?\n\n" + field.value + "\n\nCopy to clipboard does not work in all browsers." );
if (r == true) {
try{
document.execCommand("copy");
}
catch(e){ alert( "URL could not be copied to clipboard" ); }
}
window.scrollTo(0,0);
}
</script>
</head>
<body>
<div class="all">
<p class="copyright">SAP NetWeaver AS ABAP Release 751, ©Copyright 2017 SAP AG. All rights reserved.
<input type="button" value="URL" style="font-size:8px; width:26px; height:16px; padding:0"
onclick="urlToClipboard('url')" title="Copy URL to Clipboard" >
</p>
<span class="path">
<a href="javascript:call_link('abenabap.html')" class="blue">ABAP - Keyword Documentation</a> →
<a href="javascript:call_link('abenabap_reference.html')" class="blue">ABAP - Reference</a> →
<a href="javascript:call_link('abenabap_obsolete.html')" class="blue">Obsolete Language Elements</a> →
<a href="javascript:call_link('abenprogram_call_obsolete.html')" class="blue">Obsolete Calls</a> →
</span>
<A NAME="@@CALL FUNCTION EXCEPTIONS - short form@@!ABAP_STATEMENT_OBS!@@"></A>
<p><span class="h1">
CALL FUNCTION EXCEPTIONS - Short Form
</span></p>
<p><span class="h2">
<span class="bold">Obsolete Syntax</span>
</span></p>
<P>
<span class="qtext">CALL FUNCTION func ... <br> EXCEPTIONS exc1 exc2 ...</span> <br><br>
</P>
<p><span class="h4">
Effect
</span></p>
<P>
This short form for specifying non-class-based exceptions in the
<a href="javascript:call_link('abapcall_function_parameter.html')" class="blue">parameter list</a> of the statement <a href="javascript:call_link('abapcall_function_general.html')" class="blue">
<span class="qtext">CALL FUNCTION</span></a> is obsolete. It has the same effect as the following:
</P>
<dl><dd>
<span class="qtext">CALL FUNCTION func ... <br> EXCEPTIONS exc1 = 1 <br>
exc2 = 1 <br>
...</span>
</dd></dl>
<P>
Each exception specified after <span class="qtext">EXCEPTIONS</span> that is not assigned to an explicit return code using <span class="qtext">=</span> is given the value 1 implicitly.
</P>
<p><span class="h4">
Notes
</span></p>
<ul class="disc">
<li>
This short form is extremely error-prone and should never be used.
<br><br></li>
<li>
Both the short form and the complete form can appear in a <span class="qtext">CALL FUNCTION</span> statement.
<br></li>
</ul>
<p><span class="h4">
Example
</span></p>
<P>
The syntax of the following function module call is correct, but can have unpredictable results.
</P>
<dl><dd>
<span class="qtext">CALL FUNCTION func EXCEPTIONS = 4.</span>
</dd></dl>
<P>
The developer probably expected the following:
</P>
<dl><dd>
<span class="qtext">CALL FUNCTION func EXCEPTIONS OTHERS = 4.</span>
</dd></dl>
<P>
The complete form of the statement is as follows, however:
</P>
<dl><dd>
<span class="qtext">CALL FUNCTION func EXCEPTIONS = = 1 <br>
4 = 1.</span>
</dd></dl>
<P>
Since exceptions called "=" are not possible, and exceptions called "4" are unlikely, this call will almost certainly not catch any exceptions, even though it is designed to catch every exception.
</P>
<br>
<br>
<br>
<br>
</DIV>
<fieldset style="opacity:0">
<input id="url" type="text" />
</fieldset>
</BODY>
<!-- Mirrored from help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapcall_function_exc_short_form.htm by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 20 Jan 2022 18:03:52 GMT -->
</html>