版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 SAP BC400SAP BC400 Authorization CheckAuthorization Check 权限检查权限检查 page 2 In this lesson, you will learn why an authorization check is useful and how to include it in your programs. 本课程中,我们将学习为什么权限检查是有用的和 如何在我们的程序中包含权限检查 Lesson Overview page 3 After completing this lesson, you will be able to: Expl
2、ain the SAP authorization concept Implement authorization checks 完成本课程,我们将能够: 解释SAP权限概念 实现权限检查 Lesson Objectives page 4 Authorization ChecksAuthorization Checks Critical data and parts of the functional scope of the SAP System must be protected from unauthorized access. You have to implement authori
3、zation checks in your program so that the user may only access areas for which he or she is authorized. The following graphic illustrates the SAP authorization concept. SAP系统的关键数据和 部分功能必须被保护而 不被无权地访问。我们 必须在我们的程序中实 现权限检查,以便用户 只访问其授权的部分。 图示说明了SAP权限概 念。 page 5 Authorization ChecksAuthorization Checks A
4、uthorization objects can be defined within object classes. When you define an authorization object, you have to specify appropriate fields (without values). You create an actual authorization by subsequently assigning values to these fields. This authorization can be integrated into the required use
5、r master records by means of an authorization profile. Several different authorizations (for the integration into different user master records) can be created for an authorization object. 权限对象可以在对象类中被定义, 当我们定义一个权限对象,我们 必须指定适当的字段。我们随后 通过给这些字段分配值来创建实 际的权限对象。这个权限能够被 通过权限参数文件被集成到需要 的用户主数据中。 多个不同的权限可以被创
6、建在一个 权限对象中。 page 6 Authorization ChecksAuthorization Checks At runtime, you can use the AUTHORITY-CHECK statement to check whether the current user has the authorization required for executing the function in his or her user master record. Depending on the check result (sy-subrc), you can continue y
7、our program accordingly: 在运行时,我们可以使 用AUTHORITY-CHECK 语句来检查当前用户在其 用户主记录中是否有必需 权执行功能。根据检查结 果(sy-subrc),我们可 以因此继续我们的程序: page 7 Authorization ChecksAuthorization Checks Depending on the check result (sy-subrc), you can continue your program accordingly: sy-subrc = 0: User has required authorization - di
8、splay data, for example sy-subrc 0: Authorization not available - display error message to user, for example. 根据检查结 果(sy-subrc),我们可 以因此继续我们的程序: sy-subrc = 0:用户有权 限必需权限 -例如显示数据 Sy-subrc 0:没有权限 - 例如给用户显示错误信息。 page 8 Authorization ChecksAuthorization Checks Under normal circumstances, the definition of
9、 authorization objects is part of data modeling and the creation of database tables. Since we access an existing data model in this course, we use the authorization object S_CARRID that belongs to this data model. 通常情况下,权限对象的定义是 数据模型和数据库表的一部分。 本课中我们访问一个已经存在的 数据模型,我们因此使用属于这 个数据模型的权限对象S_CARRID。 page 9
10、 Authorization ChecksAuthorization Checks Implementing the authorization concept is one of the tasks of the developer who programs access to the database tables. The subsequent steps, such as defining the authorizations and profiles and designing the user master records, belong to the tasks of the a
11、dministrator. 实行权限的概念是编程访问数据 库表的开发人员的任务之一。 后续的步骤,如定义权限和参数 文件和设计用户主数据记录,属 于管理员的任务。 page 10 Authorization ChecksAuthorization Checks Before you can implement the required authorization check in your program, you must first determine the structure (the fields) of the respective authorization concept. A
12、n object usually consists of the ACTVT (activity) field and one other field, which specifies the data type to be protected (i.e., material number, airline and so on.) The values of these authorization fields specify what the user is authorized to do. 在我们能够在我们的程序中实行 必需的权限检查之前,我们必须 首先确定各自权限概念的结构( 字段)。
13、一个对象通常包含 ACTVT字段和一个其它字段,指 定被保护的数据类型。这些权限 字段的值指定了用户有做什么的 权限。 page 11 Authorization ChecksAuthorization Checks You can display an authorization object directly in the ABAP Workbench (for example, by using the Other Object . pushbutton, or the Other tab page). You can also use transaction SU21. You wil
14、l also get an overview of all the authorization objects created in the system here. 我们可以在ABAP工作台中直接显示权限对象,我们也可以使用交易事务SU21 来显示权限对象。我们也将在系统这里概览权限对象的创建。 page 12 Authorization ChecksAuthorization Checks The following graphic shows how an authorization check is implemented. 图示展示了权限检查是如何实现的。 page 13 Autho
15、rization ChecksAuthorization Checks For the authorization check in the program, you specify the authorization that is to be checked in the master record of the current user. The authorization is specified by specifying the authorization object, its fields, as well as the appropriate field values. Re
16、fer to the syntax in the above graphic. 对于程序中的权限检查, 我们指定在当前用户主 记录中要被检查的权限。 这个权限通过指定权限 对象、它的字段,和适 当的字段值来指定。 page 14 Authorization ChecksAuthorization Checks In our example, there is a check as to whether the user has authorization for the S_CARRID object, in which the field CARRID (airline) contains
17、the airline entered by the user, and the field ACTVT (activity) contains the value 03 (display). 在我们的例子中,有是否 用户有对象S_CARRID的 权限检查,字段CARRID 包含用户的航空公司,字 段ACTVT包含值03 page 15 Authorization ChecksAuthorization Checks After the AUTHORITY-CHECK statement, you should check the return code sy-subrc and monitor further processing of your program accordingly. 在AUTHORITY-CHECK语句之后,我们应该检查返回码sy-subrc,并相应地实 行程序的进一步处理。 page 16 Authorization ChecksAuthorization Checks AUTHORITY-CHECK statement generated into your source code using the Pattern button. After
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026甘肃兰州市七里河区第二实验幼儿园招聘1人笔试备考试题及答案解析
- 2026广东江门市农业控股集团有限公司招聘4人笔试模拟试题及答案解析
- 生物必修2《遗传与进化》DNA分子的双螺旋结构模型第1课时教学设计
- 2026广东深圳市罗湖区清泉幼儿园教研员招聘1人笔试模拟试题及答案解析
- 2026北京第四实验学校第一批招聘60人考试参考题库及答案解析
- 2026年中国电信宁夏分公司校园招聘考试模拟试题及答案解析
- 劳动版教学设计-2025-2026学年中职中职专业课汽车制造与维修类66 装备制造大类
- 人教B版 (2019)必修 第二册6.1.3 向量的减法教案设计
- 拟胆碱药教学设计中职专业课-药理学基础-药剂-医药卫生大类
- 劳动项目五 利用废旧雨伞制作购物袋教学设计小学劳动六年级下册人教版《劳动教育》
- 2025学年第二学期杭州市高三年级二模教学质量检测数学试卷(含答案)
- 工程质量验收规范练习题及答案
- 2026年体育场馆物业赛事活动保障方案
- 2025年北京市各区高三语文一模作文范文汇编(议论文部分)
- 网络安全知识培训资料
- 发电公司现货交易奖惩制度
- 2026年机关事务管理局遴选笔试试题及参考答案
- DB34-T 5395-2026 高速公路机电设施设备编码规范
- 2026浙江事业单位招聘(公基)考试题目及答案
- 中药贴敷技术
- 电力建设土建工程施工、试验及验收标准表式-第2部分:试验
评论
0/150
提交评论