1. Review Business Requirements & Write Functional Specification
The first part of any ABAP development project begin with meeting the end users or business experts and understand the business requirements that need to be implemented in the SAP system during the realization phase. A best approach is to conduct workshops to gather all the business requirements. Make sure that if any SAP function consultants are involved than they are in the meetings as well. After all the business requirements are collected, either a SAP functional consultant or business expert will write a detailed functional specification. Review the functional specification until the document has all the details, different business scenarios and expected goals clearly defined. A well defined functional specification should contain UML diagrams and test case scenarios. It is important to have an official signoff on the functional specification before continuing with design and development.
2. Review ABAP Development Standards
In ideal case, your SAP Project Lead or ABAP Development Manager should have created a programming standards and guidelines document. Review this document so that you follow the naming conventions for function modules, classes, dictionary objects, software components, name spaces and proxies (if using SAP XI / PI), program input/output parameters, etc just to name a few. Following the guideline for the project helps maintain a consistent coding approach and also helps other functional and technical analysts to read and debug your code. ABAP objects naming should begin with Z if it will be migrated to SAP production system and Y if it will not be migrated into the production system.
3. Write and Review Test Cases
The test case documents are written by the business experts or functional SAP consultants in most SAP implementation projects. But on some SAP implementation projects a programmer may be required to write test cases. Before writing a test case review the functional specification document thoroughly and review the written test case with the business users or functional consultants. Get a sign-off as mentioned in most steps in this article. As an ABAP Development Manager for a variety of SAP implementation projects, my goal has been to keep my team motivated and always cover the team against any change of scope on the development tasks. Having a sign-off at each phase of a SAP custom development or enhancement tasks always helps the SAP implementation team and project management team keep in sync which is a vital to complete the SAP implementation in time and budget.
4. Write and Review Technical Design Specifications
Read the functional specification and list all the development objects that would be needed to implement the required functionality in the SAP system. First step is to draw a flowchart and review with technical and business experts. The technical design document should include a technical overview, list of new database objects, ABAP objects that can be reused, a data model and class diagram (if using ABAP OO classes). It is highly recommended to have a rough prototype in the sandbox system (Development system if no SAP sandbox system is available) if the development being done is complex or if the end deliverable is not well defined. You should then review your prototype with functional experts and business users. Make sure that the ABAP Development team lead or manager signs off on the prototype. If effort required to complete the ABAP programming task is not presented and approved by the senior project management then this would be a good time to get the development estimate and timeline approved.
5. Realization of the Specification - ABAP Development
During this step you will be creating development objects and implementing the code in the SAP development system. Before you begin, if prototype was done in the sandbox system then analyze the prototype and design specification. Remember that quality and reusability of existing ABAP objects are more important than strictly following the design specification. Determine which existing dictionary objects can be reused for this topic. If new dictionary objects or classes needs to be created then ensure that these objects can be extended and reused for other development tasks. It may require extra effort to develop objects that are reusable and flexible. This one time effort for building reusable ABAP objects during the course of a development project can potentially save a lot of work for programming similar objects that could otherwise utilize already built objects. Review your approach with an SAP technical team lead or a development manager on your project before deviating from the technical design specification and implementing your own ideas. If you are involved in SAP XI (now Process Integration) related tasks or creating enterprise services then this is the best area where you could reuse existing objects. Review the message types that already exist within your SAP business unit and see if any existing messages can be extended with new fields. Review with the team lead whether the communication should be synchronous or asynchronous before you generate proxies.
6. SAP Development Best Practices
SAP ABAP (or JAVA if working on SAP Netweaver) development best practices should be followed throughout the development lifecycle of the project. Although this aspect depends on your project technical manager, I personally have maintained a checklist for developers in my team on all projects and it has been a tremendous success in delivering high quality output on all development tasks. Here are a few best practices worth adapting in your project. Check whether you adhere to all naming conventions as described in the programming standards set for your implementation project. Include comments in your code to allow someone else to easily understand your programs. This is particularly helpful when you work in large teams and multiple people work with same objects. Ensure that you have check for user authorization if you are building transactions or web user-interfaces that will require human interaction. Check that you do not have ABAP code segments that could take a hit on performance like nested loops, nested select statements (use views if desired), excess database commits (persistent objects or buffering alternatives may be a good option), etc. Field symbols are a great asset when it comes to processing internal tables and also variables with unknown data types that are resolved at runtime. Field symbols are very similar to concept of using pointers in OO programming landscape. Check if all exceptions are handled and error messages are communicated accurately to the end users. As an ABAP programmer it should be well accepted by now that short dumps should not be OK to occur. All these do occur in unknown special case scenarios the short dumps should be fixed.
7. ABAP Code Reviews and Performance
As a ABAP programmer you should test your code upon completion for all possible scenarios. Verify that end results are same as that expected in the documented test cases. Perform ABAP runtime analysis to check for performance of your code. Seek suggestions from your technical team lead or manager on how to improve code performance if you notice any red flags during the runtime analysis. Schedule a formal code review with your mentor or a senior ABAP developer once the development is completed and tested by all responsible developers. Make any revisions and retest your code against the desired output as documented in the test scripts. Remember that code reviews is not to find flaws in your programming but it will only make you a better ABAP developer and maintain consistency.
8. Documentation
Make sure you write an end user documents with overview of the functionality or enhancement upon completion. Include screenshots where possible. Prepare documentation keeping in mind that an end user unfamiliar with your deliverable can read the document and test the functionality. Include contact information in this document for users to easily reach the SAP technical team for any questions.
9. User Acceptance Testing
Now that your ABAP coding is completed and reviewed by technical experts, it is time for the business users to perform a formal user acceptance testing. UAT testers will check whether the output meets business process requirements and suggest any improvements or modifications to the delivered functionality. After completion of these fixes or modifications you should request a formal sign-off on the functionality.
10. Migration to SAP Test System and Production System
Quality assurance engineers will test your functionality in the SAP QA environment to verify that everything is working in your delivered functionality as tested during user acceptance testing. Also any problems in transporting your ABAP objects across SAP systems will be identified and addressed during this step. If no problems are found then your transports will be approved to be migrated to SAP production system in the next transport cycle.
1. Review Business Requirements & Write Functional Specification
The first part of any ABAP development project begin with meeting the end users or business experts and understand the business requirements that need to be implemented in the SAP system during the realization phase. A best approach is to conduct workshops to gather all the business requirements. Make sure that if any SAP function consultants are involved than they are in the meetings as well. After all the business requirements are collected, either a SAP functional consultant or business expert will write a detailed functional specification. Review the functional specification until the document has all the details, different business scenarios and expected goals clearly defined. A well defined functional specification should contain UML diagrams and test case scenarios. It is important to have an official signoff on the functional specification before continuing with design and development.
2. Review ABAP Development Standards
In ideal case, your SAP Project Lead or ABAP Development Manager should have created a programming standards and guidelines document. Review this document so that you follow the naming conventions for function modules, classes, dictionary objects, software components, name spaces and proxies (if using SAP XI / PI), program input/output parameters, etc just to name a few. Following the guideline for the project helps maintain a consistent coding approach and also helps other functional and technical analysts to read and debug your code. ABAP objects naming should begin with Z if it will be migrated to SAP production system and Y if it will not be migrated into the production system.
3. Write and Review Test Cases
The test case documents are written by the business experts or functional SAP consultants in most SAP implementation projects. But on some SAP implementation projects a programmer may be required to write test cases. Before writing a test case review the functional specification document thoroughly and review the written test case with the business users or functional consultants. Get a sign-off as mentioned in most steps in this article. As an ABAP Development Manager for a variety of SAP implementation projects, my goal has been to keep my team motivated and always cover the team against any change of scope on the development tasks. Having a sign-off at each phase of a SAP custom development or enhancement tasks always helps the SAP implementation team and project management team keep in sync which is a vital to complete the SAP implementation in time and budget.
4. Write and Review Technical Design Specifications
Read the functional specification and list all the development objects that would be needed to implement the required functionality in the SAP system. First step is to draw a flowchart and review with technical and business experts. The technical design document should include a technical overview, list of new database objects, ABAP objects that can be reused, a data model and class diagram (if using ABAP OO classes). It is highly recommended to have a rough prototype in the sandbox system (Development system if no SAP sandbox system is available) if the development being done is complex or if the end deliverable is not well defined. You should then review your prototype with functional experts and business users. Make sure that the ABAP Development team lead or manager signs off on the prototype. If effort required to complete the ABAP programming task is not presented and approved by the senior project management then this would be a good time to get the development estimate and timeline approved.
5. Realization of the Specification - ABAP Development
During this step you will be creating development objects and implementing the code in the SAP development system. Before you begin, if prototype was done in the sandbox system then analyze the prototype and design specification. Remember that quality and reusability of existing ABAP objects are more important than strictly following the design specification. Determine which existing dictionary objects can be reused for this topic. If new dictionary objects or classes needs to be created then ensure that these objects can be extended and reused for other development tasks. It may require extra effort to develop objects that are reusable and flexible. This one time effort for building reusable ABAP objects during the course of a development project can potentially save a lot of work for programming similar objects that could otherwise utilize already built objects. Review your approach with an SAP technical team lead or a development manager on your project before deviating from the technical design specification and implementing your own ideas. If you are involved in SAP XI (now Process Integration) related tasks or creating enterprise services then this is the best area where you could reuse existing objects. Review the message types that already exist within your SAP business unit and see if any existing messages can be extended with new fields. Review with the team lead whether the communication should be synchronous or asynchronous before you generate proxies.
6. SAP Development Best Practices
SAP ABAP (or JAVA if working on SAP Netweaver) development best practices should be followed throughout the development lifecycle of the project. Although this aspect depends on your project technical manager, I personally have maintained a checklist for developers in my team on all projects and it has been a tremendous success in delivering high quality output on all development tasks. Here are a few best practices worth adapting in your project. Check whether you adhere to all naming conventions as described in the programming standards set for your implementation project. Include comments in your code to allow someone else to easily understand your programs. This is particularly helpful when you work in large teams and multiple people work with same objects. Ensure that you have check for user authorization if you are building transactions or web user-interfaces that will require human interaction. Check that you do not have ABAP code segments that could take a hit on performance like nested loops, nested select statements (use views if desired), excess database commits (persistent objects or buffering alternatives may be a good option), etc. Field symbols are a great asset when it comes to processing internal tables and also variables with unknown data types that are resolved at runtime. Field symbols are very similar to concept of using pointers in OO programming landscape. Check if all exceptions are handled and error messages are communicated accurately to the end users. As an ABAP programmer it should be well accepted by now that short dumps should not be OK to occur. All these do occur in unknown special case scenarios the short dumps should be fixed.
7. ABAP Code Reviews and Performance
As a ABAP programmer you should test your code upon completion for all possible scenarios. Verify that end results are same as that expected in the documented test cases. Perform ABAP runtime analysis to check for performance of your code. Seek suggestions from your technical team lead or manager on how to improve code performance if you notice any red flags during the runtime analysis. Schedule a formal code review with your mentor or a senior ABAP developer once the development is completed and tested by all responsible developers. Make any revisions and retest your code against the desired output as documented in the test scripts. Remember that code reviews is not to find flaws in your programming but it will only make you a better ABAP developer and maintain consistency.
8. Documentation
Make sure you write an end user documents with overview of the functionality or enhancement upon completion. Include screenshots where possible. Prepare documentation keeping in mind that an end user unfamiliar with your deliverable can read the document and test the functionality. Include contact information in this document for users to easily reach the SAP technical team for any questions.
9. User Acceptance Testing
Now that your ABAP coding is completed and reviewed by technical experts, it is time for the business users to perform a formal user acceptance testing. UAT testers will check whether the output meets business process requirements and suggest any improvements or modifications to the delivered functionality. After completion of these fixes or modifications you should request a formal sign-off on the functionality.
10. Migration to SAP Test System and Production System
Quality assurance engineers will test your functionality in the SAP QA environment to verify that everything is working in your delivered functionality as tested during user acceptance testing. Also any problems in transporting your ABAP objects across SAP systems will be identified and addressed during this step. If no problems are found then your transports will be approved to be migrated to SAP production system in the next transport cycle.
PART I.
1,下面的语句中,哪一个语句编译会报错(假设XXX 和结构sflight都已经定义). ( )
A)write at 12 XXX.
B)data type type sflight.
C)sflight-price = a+b.
D)write sy-vline.
2.在ABAP/4的开发工作中,哪一个TCODE是直接进入就可以创建程序,函数组以及程序内部各种元素的. ( )
A) SE80 B) SE11 C) SE93 D)SE16
3.直接进入就可以查询表的结构是哪个TCODE. ( )
A) SE80 B) SE11 C) SE93 D)SE16
4. 很多表当中都有一个字段,叫做MANDT, 为第一个主键,这个字段的用处是.( )
A)区分后台数据库的类型
B)区分表中记录属于哪个客户端(client)
C)区分表的数据量大小
D)SAP系统保留字段
5.下面的定义语句中,哪一个语句定义出来的结果是一个内表. ()
A)DATA zsflight TYPE sflight.
B)DATA: COLS LIKE LINE OF TC-COLS.
C)TABLES SFLIGHT.
D)DATA: zsflight TYPE TABLE OF sflight.
6.ABAP中三种基本的数据对象是. ( )
A)内表 结构 基本数据对象
B)内表 程序 语句
C)字符 数字 日期
D)语句 程序 表
7.语句loop at itab into wa. 的准确意思是. ( )
A)把wa中的值进行循环,每一次循环都写回内表
B)求出迷宫itab的出口放在wa里
C)对内表itab的数值列进行累加放入wa中
D)对内表itab进行循环,把循环中每一行的结果写入结构wa中
8.程序中执行了这么一段代码
DATA it_sflight type sflight with header line.
Loop at it_sflight.
it_sflight-carrid = 'AA'.
Modify it_sflight.
Endloop.
该段语法中出现了四次it_sflight,其中后三次分别代表的是内表还是结构. ( )
A)内表 内表 内表
B)内表 结构 内表
C)内表 结构 结构
D)内表 内表 结构
9.在设计报表程序时,选择的程序类型应该是. ( )
A)可执行程序
B)模块池程序
C)包含程序
D)函数组程序
10.在报表程序的屏幕筛选条件里,SELECT-OPTIONS定义出来的元素是. ()
A)内表
B)结构
C)基本数据对象
D)指针型字段
11.在报表程序的屏幕事件里,有一个事件叫做AT LINE-SELECTION.参见如下代码:
WRITE / ‘ABAP’.
AT LINE-SELECTION.
WRITE /‘TEST’.
那么,以下哪种情况会发生. ( )
A)先显示出一行ABAP,当用户双击一次时,屏幕上在原来ABAP那行下面换
行一次显示出一行新的TEST
B)先显示出一行ABAP,当用户双击一次时,屏幕上每次只显示出一行的TEST取
代原先的屏幕
C)先显示出一行ABAP,当用户双击一次时,屏幕上永远只显示出一行TEST
(放在原来ABAP那行下面)
D)先显示出一行ABAP,当用户第一次双击时,产生一个新屏幕,显示一行
TEST,然后每次双击都在其下换行显示一行新的TEST
12.选择事件的执行顺序正确的一组. ( )
A)INITIALIZATION / START-OF-SELECTION / TOP-OF-PAGE / AT LINE-SELECTION
B)INITIALIZATION / TOP-OF-PAGE / START-OF-SELECTION / AT LINE-SELECTION
C)START-OF-SELECTION/ INITIALIZATION / TOP-OF-PAG / AT LINE-SELECTION
D)INITIALIZATION / TOP-OF-PAGE / AT LINE-SELECTION / START-OF-SELECTION
13.在层级报表的开发里,下面哪个条件不是必需的. ( )
A)对内表先按层级字段排序
B)对内表和结构定义时层级字段必须排在前面
C)层级字段不能出现在at 和 end at 语句之外
D)层级字段必须存在
14.在明细报表的开发中,双击一行转向明细报表的取数依据是. ()
A)你双击那行的主键字段
B)你双击的那个字段本身
C)你双击那行在循环中预先hide的字段
D)你双击那行在循环中预先已经write出来的字段
15.在交互式报表的设计中,假如想在明细报表里加入任意字段的排序功能,
请选择正确的选项(多选). ( )
A)要先用get cursor field XXX.取得字段
B)对内表排序时该字段要用括号括起来
C)在排序时要把该字段加上一个数字以去除前面的结构名称
(如果是用结构-字段定义的话)
D)排序后显示完要把sy-lsind = 0,以防止产生多余的list
16.在屏幕编程的设计中,下面共有四个主要步骤:
a 设计屏幕的格式(有哪些字段,放在什么位置)
b 设计屏幕的整体属性
c 设计屏幕上字段的属性
d 编写屏幕的流逻辑( flow logic )
请选择通常请况下正确的顺序. ( )
A)a b c d
B)c d b a
C)b a c d
D)d b a c
17. 如果屏幕A 的下一个屏幕仍然是A , 那么当执行程序时,对于屏幕的主要事件,下面哪种顺序是正确的. ()
A)A 的 PAI ? A 的 PBO ? A 的 PAI ? A 的 PBO
B)A 的 PBO ? A 的 PAI ? A 的 PAI ? A 的 PBO
C)A 的 PAI ? A 的 PAI ? A 的 PBO ? A 的 PBO
D)A 的 PBO ? A 的 PAI ? A 的 PBO ? A 的 PAI
18.屏幕编程中一个屏幕所使用的工具栏应如何设计. ( )
A) 先设计一个Gui Status,再在程序中绑定
B) 先设计一个Gui Titles,再在程序中绑定
C) 在程序中用Add button 语法添加
D)在屏幕设计格式的界面上添加工具栏及其按钮
19. 以下四种系统变量,各是什么含意. ( )
SY-UCOMM SY-DATUM SY-SUBRC SY-TABIX
A)用户触发的屏幕上的功能码 当前日期 当前时间 循环次数
B)当前日期 当前时间 循环次数 用户触发的屏幕上的功能码
C)用户触发的屏幕上的功能码 循环次数 语句执行结果返回值当前日期
D)用户触发的屏幕上的功能码 当前日期 语句执行结果返回值循环次数
20.一个程序的子屏幕编程是如何实现的. ( )
A)子屏幕区域外加屏幕(属性设置为正常屏幕)
B)自定义控件外加屏幕(属性设置为正常屏幕)
C)子屏幕区域外加屏幕(属性设置为子屏幕)
D)自定义控件外加屏幕(属性设置为子屏幕)
21.对于表格控件和内表的绑定的做法,下面哪种说法是正确的. ()
A)PBO时同步循环内表和表格控件把内表的值写入表格控件,PAI时用同样的
循环把表格控件的值写回内表
B)PBO时同步循环内表和表格控件把表格控件的值写入内表,PAI时用同样的
循环把内表的值写回表格控件
C)在定义内表时定义与之绑定的表格控件,PBO和PAI事件要各循环内表一次
D)在制作表格控件时定义与之绑定的内表,PBO和PAI事件要各循环表格控件一次
22.如果要把表格控件某列的属性动态的改变成不可输入,下面哪种做法是可行的. ( )
A)在PAI事件中修改table的general attribute值
B)在PBO事件中修改table的general attribute值
C)在PAI事件中取得table的COLS属性,利用它本身是个内表的特点循环找到该列修改之,修改完后写回COLS内表
D)在PAI事件中取得table的COLS属性,利用它本身是个结构的特点找到其中表示该列的字段修改
23.要对表格控件增加一个可由用户写入信息的列,下面哪种方式是可行的(多选).()
A)在设计屏幕上点击dictionary / program fields window 按钮,输入字典表或者程序中定义的元素,把它拖到表格控件中
B)在设计屏幕上修改table的attributes,增加一列
C)在设计屏幕中的表格控件里拖入一个text field(文本字段)
D)在设计屏幕中的表格控件里拖入一个input/output field(输入/输出字段)
24.在编写ALV GRID CONTROL时,应遵循以下哪种顺序. ( )
A)在屏幕上建区域,创建区域对象,创建ALVGRID对象,调用ALVGRID的set_table_for_first_display方法
B)在屏幕上建区域,创建ALVGRID对象,创建区域对象,调用ALVGRID的set_table_for_first_display方法
C)调用ALVGRID的set_table_for_first_display方法,在屏幕上建区域,创建ALVGRID对象,创建区域对象
D)创建区域对象,调用ALVGRID的set_table_for_first_display方法,在屏幕上建区域,创建ALVGRID对象,
25.自己制作一个搜索帮助,引用的表是SBOOKINGS,Dialog Type是Dialog with value restriction,里面customid和name这两个字段的IMP属性打勾,customid,name,carrid,connid这四个字段的EXP属性打勾,四个字段都设定了LPOS和SPOS,这个搜索帮助的输出效果是. ( )
A)先输出两个栏位的筛选屏幕,再按照筛选结果输出两个栏位的表格信息让用户选择,
选择结果影响到四个栏位
B)先输出两个栏位的表格信息让用户选择,选择结果影响到四个栏位
C)先输出四个栏位的表格信息让用户选择,选择结果影响到两个栏位
D)先输出四个栏位的筛选屏幕,再按照筛选结果输出四个栏位的表格信息让用户选择,
选择结果影响到两个栏位
26.ABAP的OPEN SQL的取数语句是否可以实现数据库无关性,其原因是什么. ( )
A)不可以,数据库的SQL格式不同
B)可以,因为它的名字叫做OPEN SQL
C)可以,因为中间有一层DB Interface做转换
D)不可以,各种数据库的版本不同
27.对ABAP的OPEN SQL语句的两个返回系统变量,描述正确的是. ()
A)Sy-dbcnt表示执行结果是否正确,sy-subrc表示执行影响到的数据条数
B)Sy-dbcnt表示执行影响到的数据条数,sy-subrc表示执行结果是否正确
C)Sy-dbamt表示执行结果是否正确,sy-sudnc表示执行影响到的数据条数
D)Sy-dbamt表示执行影响到的数据条数,sy-sudnc表示执行结果是否正确
28.一个表TA有三个字段,其中第一个字段是主键,目前有一条记录是1 /‘first’/ 19,结构wa_result是和表相同类型的,当前值是2 / ‘second’ / 20 .执行OPEN SQL语句 :modify TA from wa_result.执行后对系统的影响为. ( )
A)没有任何影响
B)TA有两条记录1 / ‘first’/ 19 和 2 / ‘second’ / 20
C)TA有一条记录2 / ‘second’ / 20
D)系统出错退出,对表没有任何影响29.SAP对锁的主要实现手段是. ( )
A)在SE11里加锁对象,然后在程序中调用锁对象生成的函数
B)在数据库里加锁,在程序中声明
C)由数据库自动进行,SAP不用处理
D)在程序中通过SQL语句实现
30.有一程序,起始画面里有一个用户可以输入字段为A ,如果想在程序进入的时候自动设置成上次退出时的值,可以采用的方法是. ( )
A)在退出时使用GET PARAMETER ID 'XXX' FIELD A.
在进入时使用SET PARAMETER ID 'XXX' FIELD A.
B)在退出时使用SET PARAMETER ID 'XXX' FIELD A.
在进入时使用GET PARAMETER ID 'XXX' FIELD A.
C)不管是退出还是进入时,都执行语句GET PARAMETER ID 'XXX' FIELD A.
D)不管是退出还是进入时,都执行语句SET PARAMETER ID 'XXX' FIELD A.
31.SAP的SMARTFORM和ABAP PROGRAM的对应关系是. ( )
A)一个SMARTFORM对应多个程序
B)一个程序对应多个SMARTFORM
C)一个SMARTFORM对应多个程序,一个程序也可以对应多个SMARTFORM
D)一个SMARTFORM对应一个程序
32.设计SMARTFORM显示一个表格,如果第一页是一种格式,后面几页是一种格式,
如何设计. ( )
A)第一页指向第二页,第二页指向空
B)第一页指向自己,第二页指向第一页
C)第一页指向第二页,第二页指向第一页
D)第一页指向第二页,第二页指向自己
33.如果想设计SMARTFORM中大家公用的文本,应该使用什么技术. ()
A)SMART TEXT
B)SMART STYLE
C)SAP SCRIPT
D)TEXT MODULE
34.下面对于SMARTFORM中TABLE和 TEMPLATE的描述,正确的是. ()
A)TEMPLATE用来设计表格模版,TABLE用来设计表格实体
B)TEMPLATE用来设计表格样式,TABLE用来设计表格实体
C)TEMPLATE用来设计静态表格,TABLE用来设计表格实体
D)TEMPLATE用来设计静态表格,TABLE用来设计动态表格
35.SMARTFORM中TABLE的排序事件的触发场合是. ( )
A)循环到排序字段第一次开始时触发开始事件,循环到排序字段结束时
触发结束事件
B)循环到排序字段第一次开始时触发开始事件,循环到表格结束时
触发结束事件
C)当表格开始时触发开始事件,表格结束时触发结束事件
D)循环到排序字段第一次开始时触发开始事件,然后触发结束事件,然后
开始正式循环该排序字段剩余记录
36.在SMARTFORM中显示一个表格,其中有一个栏位为wa_sflight-price,现在里面有三行数据,其值依次分别是10,30,50 ,现在在表格设计的时候在Global Definition中定义一个变量G_TOL,在表格的Main Area中加入一个真假节点,节点的条件为WA_SFLIGHT-PRICE > 10 .然后,在真节点下加一个程序行,内容为G_TOL = wa_sflight-price + 10.假节点下加一个程序行,内容为G_TOL = wa_sflight-price + 20.最后在表格的Footer下加一个表行(在表格最后显示),下加一个文本节点显示这个字段G_TOL,它显示的值应该是. ( )
A)60
B)70
C)140
D)150
37.SAP提供的修改系统标准功能的方案里,哪几种是不需要修改系统标准程序
就可以实现的. ( )
A)Customer Develepment ,Enhancement, Modification
B)Customer Develepment ,Customizing, Modification
C)Customer Develepment ,Customizing, Enhancement
D)Enhancement, Modification,Customizing
38.对于客户定制需求的解决方案,应该遵循哪一种顺序进行为宜. ()
A)先判断能否配置;再判断系统有无类似功能,
有的话先判断能否修改标准程序,再判断能否进行Enhancement;
最后考虑自己开发
B)先判断系统有无类似功能,有的话先判断能否修改标准程序,
再判断能否进行Enhancement;然后判断能否配置;
最后考虑自己开发
C)先判断能否配置;再判断系统有无类似功能,
有的话先判断能否进行Enhancement,再判断能否修改标准程序;
最后考虑自己开发
D)先判断系统有无类似功能,有的话先判断能否进行Enhancement,
再判断能否修改标准程序;然后判断能否配置;
最后考虑自己开发
39.自己定义一个增强项目,加入系统的增强,并在其中激活增强的TCODE应该是. ( )
A)SMOD
B)CMOD
C)SE84
D)SE80
40.在SAP系统标准增强功能里,主要包含了以下哪组功能. ()
A)Table Enhancement/Screen Exit/Menu Exit/Function module Exit
B)Table Enhancement/Structure Exit/Menu Exit/Event Exit
C)Menu Exit/Function module Exit/Field Exit/BAPI Exit
D)Structure Exit/Menu Exit/Table Enhancement/Screen Exit
二 问答题(共1题,20分)
请简述SAP二次开发中REPORT , SCREEN , 数据库更新,SMARTFORM及增强等主要技术的开发方法和主要应用场合
PART II
一:添加字段
向 SAP 表中添加字段的方法是哪两种?
二:修改(Modifications)
在 SAP 系统中是怎样定义"修改"的?它们对更新(upgrade)有怎样的影响?
三:簇表和POOL TABLE 的概念
四:授权对象(Authorization Objects)
什么是授权对象?在 ABAP 程序中使用哪条语句进行授权检查?
五:ABAP 内存(ABAP Memory)交换
在使用 ABAP 内存的程序间进行数据交换时用到的两个语句是什么?
六:锁对象(Lock Object)和 FM(Function Module),激活Lock Object时,产生的 FM 的名字是什么?
七:更新方面的 FM
更新 FM 分为 V1 和 V2,那么首先会执行哪一种更新类型呢?每种类型又是以哪种模式(异步、同步或本地)执行的呢?
八:修改助手(Modification Assistant)
什么是修改助手?
九:功能模块出口(Function Module Exit)
实现功能模块出口时 SAP 应用程序中应使用哪条语句?
十:更改 SAP (Changing SAP)
请列出用户修改 SAP 标准功能的不同方式。
Part III
问答题答案
六:锁对象(Lock Object)和 FM(Function Module),激活Lock Object时,产生的 FM 的名字是什么?
答案:首先要在 ABAP 字典中创建锁对象,然后才能在 ABAP 程序中设锁。创建锁对象时,系统会自动生成两个 FM 来进行锁管理。
用于设锁的 FM 为: ENQUEUE_<锁对象名>。它用于在锁表(Lock Table)中生成一个锁项(Lock Entry)。若设锁不成功的话,就会在 Return 中反映出来。
用于释放锁的 FM 为:DEQUEUE_<锁对象名>。它用于从锁表中删除一个锁项。在 ABAP 程序中,只需使用 "CALL FUNCITION ..." 语句就可以调用它们。
这两个锁 FM 是在 SAP 系统的一个特殊工作进程中执行的,专门进行锁管理。它运行在一个单独的服务器上,而该服务器专门用于维护整个 SAP 系统的主锁表(Central Lock Table)。
有两种锁类型:
1. 共享锁——只读锁,一个用户正在读数据时,阻止其他用户更改该数据。
2. 独占锁——可写锁,一个用户正在修改数据时,阻止其他用户更改该数据。
七:更新方面的 FM
更新 FM 分为 V1 和 V2,那么首先会执行哪一种更新类型呢?每种类型又是以哪种模式(异步、同步或本地)执行的呢?
答案:V1 更新类型比 V2 更新类型的优先级高,因此,V1 比 V2 行执行。V1 的执行模式可以为异步、同步或本地;V2 只能为异步执行。
八:修改助手(Modification Assistant)
什么是修改助手?
答案:修改助手是 4.5 版中引入的一个工具,用于简化更新过程。可以通过 ABAP 编辑器触发修改助手,它会记录对系统进行的修改。修改助手支持通过 ABAP 编辑器、Screen Painter、Menu Painter、文本元素维护、Function Builder 和 ABAP 字典进行的修改。
九:功能模块出口(Function Module Exit)
实现功能模块出口时 SAP 应用程序中应使用哪条语句?
答案:某些 SAP 应用程序中存在功能模块出口,它使用户能够向 SAP 程序中添加一些功能。通过搜索 "CALL CUSTOMER" 可以发现是否存在功能模块出口。
十:更改 SAP (Changing SAP)
请列出用户修改 SAP 标准功能的不同方式。
答案:SAP Standard 可以通过 Personalization、Customizing、Modifications、Enhancements 及自定义 ABAP 程序进行更改。这些方式的示例如下:
Personalization——Personalization 技术包含创建变式、设置/获取参数及活动组(Activity Groups)。
Customizing ——是最常用的使用 SAP 工具(如 R/3 Reference Model and Implementation Guide)更改 SAP Standard 的方式。可以认为 Customizing 是实施 R/3 所必需的,通常由 Functional Team 来执行。
Enhancements——常由开发 Team 执行,包含的活动有:字典增强、Funciton Module Exits、菜单和屏幕出口及 Business Add-ins (BADI)。
自定义 ABAP 程序——可以与 SAP 对象或自定义开发的对象一起工作。
Modifications——不建议对 SAP 对象使用 Modifications。使用 SSCR (SAP Software Change Registration)注册所有对 SAP 对象的手动修改。
一:添加字段
向 SAP 表中添加字段的方法是哪两种?
答案:这两种方法是:Append 结构(Append Structure)和自定义 Include(Customizing Include)。Append 结构是在向表尾添加字段时创建的,自定义 Include 由 SAP 开发人员指定,以使用户可以创建新字段。
二:修改(Modifications)
在 SAP 系统中是怎样定义"修改"的?它们对更新(upgrade)有怎样的影响?
答案:修改是指用户对 SAP 发布的库对象(Repository Object)进行的更改。
必须在更新期间对修改进行评审(Review),来决定是否应该使用新的 SAP 对象,以及将来使用时是否需要进一步修改该对象。
三:簇表和POOL TABLE 的概念
答案:
Pools和Cluster table;他们已经不是各种数据库常规的表了,也不能够被数据库直接访问。只能通过SAP自己的工具来直接访问。
透明表:
每个透明表在数据库中有一个相应的物理表。物理表的名称和数据字典中的逻辑表
定义的名称一致。所有事务和应用数据存贮在透明表中。
结构:
结构在数据库不存在数据记录。结构用于在程序之间或程序与屏幕之间的接口定义。
附加结构:
附加结构定义字段的子集,该字段属于其他表格或结构,但是在修正管理中作为单
独的对象。
存贮表:
存储表可以用来存贮控制数据(例如:屏幕顺序,程序参数或临时数据)。几个存
储表可以组合成一个表库。该表库和数据库中的一物理表库相一致。它包含了各组
合库分派给它的所有记录。
簇KEKEKEY表:
连续的文本如文档之类可以存贮在簇表中。几个簇表可以组合成一个表簇。对这种
表类型,不同表中的几个逻辑行组合到一物理记录。这可以实现一对象接一对象地
存贮或访问,访问簇中的表的一个前提是,至少关键字的一部分必须相符合。几个
簇表存贮在数据库中 一个相应的表里。
四:授权对象(Authorization Objects)
什么是授权对象?在 ABAP 程序中使用哪条语句进行授权检查?
答案:授权对象由一组字段组成,这些字段中的值将被用于进行授权检查。ABAP 程序中使用 AUTHORITY-CHECK 语句根据授权对象进行授权检查。在 AUTHORITY-CHECK 语句中,必须指明授权对象的所有字段,但有一个例外,可以用 DUMMY 关键字来绕过某个字段的检查。
一个授权对象中最多可以定义 10 个字段。
五:ABAP 内存(ABAP Memory)交换
在使用 ABAP 内存的程序间进行数据交换时用到的两个语句是什么?
答案:EXPORT to MEMORY ID 用于将数据复制到 ABAP 内存,IMPORT from MEMORY ID 用于将数据从 ABAP 内存复制到程序中。
在 ABAP 内存间进行交换的数据必须在两个程序中都进行声明,并包含同样的数据声明。
test my signature
There is no mandatory event in a report program. Events are actually used to organize the statements and control the flow of the program. If the program contains no explicitly defined event blocks, all the statements in the program form the entire event block START-OF-SELECTION. ABAP runtime environment automatically introduces a START-OF-SELECTION at the first execution line.
ABAP/4 report programs are event driven programs. Following events are triggered in a report.
LOAD OF PROGRAM. - If propgram is of type 1, M, F, or S; then LOAD-OF-PROGRAM is trigerred first and then INITIALIZATION. The purpose of load of program is to load the program into system memory so that the program can be executed.
INITIALIZATION. - just once.
AT SELECTION-SCREEN OUTPUT. - when there is selection-screen
AT SELECTION-SCREEN. - when user interacts.
START-OF-SELECTION. - when F8.This is the default event in ABAP.
END-OF-SELECTION. - At the end
EVENTS IN A CLASSICAL REPORT:
1. INITIALIZATION: This is triggered when the report is loaded in memory.
2. AT SELECTION-SCREEN OUTPUT: This is triggered when the selection screen is loaded in memory before being displayed.
3. AT SELECTION-SCREEN/<field> : This event is triggered before leaving the selection screen.
4. START-OF-SELECTION: This is the the first and default event for displaying the report. Data retrieval logic is written under this event.
OUTPUT EVENT(5, 6):
5. TOP-OF-PAGE: This event is triggered every time a new page is started in the list.
6. END-OF-PAGE : This event is triggered every time the list data reaches the footer region of the page.
7. END-OF-SELECTION: This event is triggered after the START-OF-SELECTION is completed.
This event is used when there is use of logical data base in the report. It is triggered in type 1 programs once the logical database completes reading all data i.e. all the selection is finished and before the list processor is started. This statement tells the server that all the database reading is completed and no more data reading is going to take place. END-OF-SELECTION is generally used for the summary/results of reports. In an executable program without logical data base, there is no need to implement the event block END-OF-SELECTION.
After a program is executed by the user, the database is locked when it encounters a START-OF-SELECTION statement and the lock is released when an END-OF-SELECTION statement is encountered (to maintain the consistency). Data selection is done between START-OF-SELECTION and END-OF-SELECTION. Now if we don’t write the END-OF-SELECTION statement, the database will remain locked till the programs get terminated. Hence, the performance will be reduced. So it is always good practice to write END-OF-SELECTION statement after finishing the data selection from database.
EVENTS IN AN INTERACTIVE REPORT:
In addition of the above, the following events are possible in case of Interactive Reports.
1. Top of page during line selection : top of page event for secondary list.
2. At line-selection : evey time user dbl-clicks(F2) on the list data.
3. At pF<key> : function key from F5 to F12 to perform interactive action on the list.
4. At user-command.
==================================================
Finally I want to include one point:
If you debug your report program from the Abap editor screen then it triggers from
1.Initialization,
2.At Selection-screen,
3.Start-of Selection,
4.End-of Selection,
5.Top-of-page,
6.End-of-page.
But if you debug from the selection-screen then it triggers from
1.At Selection-Screen,
2.Start-of-selection,
3.Top-of-page,
4.End-of-page.