Upload
ferney23
View
218
Download
0
Embed Size (px)
Citation preview
8/17/2019 Intro to ABAP - Chapter 12_v1
1/7
IBM Global Services
© Copyright IBM Corporation 2003
Authority Objects in SAP
8/17/2019 Intro to ABAP - Chapter 12_v1
2/7
IBM Global Services
© Copyright IBM Corporation 2003
The AUTHORITY-CHECK Statement
AUTHORITY-CHECK OBJECT ‘S_DEVELOP’ ID ‘DEVCLASS’ FIELD‘YLJS’ ID ‘OBJTYPE’ DUMMY
ID ‘OBJNAME’ DUMMY ID ‘P_GROUP’ DUMMY ID ‘ACTVT’ DUMMY.
The o !"o# DUMMY The o !"o# DUMMY
$% &e$$e$ !he 'he'($% &e$$e$ !he 'he'()o&)o&!he $ e'"*e+ *e,+. The!he $ e'"*e+ *e,+. The#e!#e!e e'! "$ !h ! !he %$e&e e'! "$ !h ! !he %$e&' #' #
e&)o&/ #0 '!"1"!0 o#e&)o&/ #0 '!"1"!0 o#+e1e,o /e#! ', $$ YLJS.+e1e,o /e#! ', $$ YLJS.
The AUTHORITY-CHECK The AUTHORITY-CHECK ,"$!$ !he *e,+$ !o 2e,"$!$ !he *e,+$ !o 2e'he'(e+ #+ 1e&"*e$'he'(e+ #+ 1e&"*e$3h ! !he %$e& "$3h ! !he %$e& "$
!!e/ !"#4 !o +o!!e/ !"#4 !o +o4 "#$! 3h ! !he %$e& "$4 "#$! 3h ! !he %$e& "$
%!ho&"$e+ !o +o.%!ho&"$e+ !o +o.
8/17/2019 Intro to ABAP - Chapter 12_v1
3/7
IBM Global Services
© Copyright IBM Corporation 2003
Reacting to the AUTHORITY-CHECK Statement
AUTHORITY-CHECK OBJECT ‘S_DEVELOP’ ID ‘DEVCLASS’ FIELD‘YLJS’
ID ‘OBJTYPE’ DUMMY ID ‘OBJNAME’ DUMMY ID ‘P_GROUP’ DUMMY ID ‘ACTVT’ DUMMY.IF SY-SUBRC 56 7.
8RITE9 : ‘Yo% &e #o! %!ho&"$e+ !o+e1e,o /e#!’; ‘', $$ YLJS.’. E
8/17/2019 Intro to ABAP - Chapter 12_v1
4/7
IBM Global Services
© Copyright IBM Corporation 2003
The E PORT Statement
E#P$R% &'A1-&(''R
&'A1-B(&RS
E#P$R% S*-S(BRC %$ )E)$R* +D
S1/.
8/17/2019 Intro to ABAP - Chapter 12_v1
5/7
IBM Global Services
© Copyright IBM Corporation 2003
The I!PORT Statement
+)P$R% aria e name4 5R$) )E)$R*.
8/17/2019 Intro to ABAP - Chapter 12_v1
6/7
IBM Global Services
© Copyright IBM Corporation 2003
Catching Runtime Errors
CATCH SYST M! "C #TI$%S A&ITHM TIC' &&$&S ( )
C$%* &SI$%' &&$&S ( +,-.,,/
% CATCH,
8/17/2019 Intro to ABAP - Chapter 12_v1
7/7
IBM Global Services
© Copyright IBM Corporation 2003
Com"#eting the CATCH Co$e
ATA1 int type Ichar 34 type C val5e 6ABC7,
-.,,/
CATCH SYST M! "C #TI$%S
C$%* &SI$%' &&$&S ( 8, -.,,/ M$* char T$ int, 9M$* :ey;or< to trigger CATCH -.,,/
% CATCH,
I= SY!S>B&C ( 8, ?&IT 1 @ 6Conversion error has occ5rre