ABAP interview

来源:互联网 发布:淘宝差评有什么用 编辑:程序博客网 时间:2024/05/16 12:35
 

1. What is the typical structure of an ABAP program?   //ABAP程序的基本结构是什么?

HEADER ,BODY,FOOTER.

2. What are field symbols and field groups.? Have you used "component idx of structure" clause with field groups?
在ABAP/4 程序中,字段符号是现有字段的占位符。字段符号本身不直接为字段保留空间,而只是指向一个字段( 该字段在程 序运行前还未可知)。 字段符号可以与程序语言C 中的指针概念相比较( 即,用内容 操作符 * 表示的指针 )。然而, 在 ABAP/4 中,从变量的意义上说,与指针不是真正等价的,此处,变量包含内存地址,并且不用内容操作符即可使用。您只能使用字段符号指向的数据对象。

将摘录记录定义为字段组
摘录数据集由一系列记录组成。这些记录可以有不同的结构。所有具有相同结构的记录形成 一个记录类 型。必须使用 FIELD-GROUPS 语句将摘录数据集的每 个记录类型定义为字段组。

语法
FIELD-GROUPS <fg></fg>.
该语句定义了字段组<fg></fg>。字段组将几个字段组合到一个名称下。
字段组不为字段保留存储空间,但它包含现有字段的指针。用记录填充摘录数据集时,这些指针将决定存储记录的内容。


3. What should be the approach for writing a BDC program?   //写BDC程序的一般步骤是什么

STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal table CALLED "CONVERSION".
STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA TRANSFER".
STEP 3: DEPENDING UPON THE BDC TYPE
          i)call transaction(Write the program explicity)
         ii) create sessions (sessions are created and processed.if success data will transfer).

我做的最多的就是用SHDB生成源代码,然后再进行适当的修改 

4. What is a batch input session?

BATCH INPUT SESSION is an intermediate step between internal table and database table. 
Data along with the action is stored in session ie data for screen fields, to which screen it is passed,program name behind it, and how next screen is processed.

5. What is the alternative to batch input session?

Call transaction.

6. A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in background. How to do it?
     go to SM36 and create background job by giving 
     job name,job class and job steps (JOB SCHEDULING) 

7. What is the difference between a pool table and a transparent table and how they are stored at the database level?

8. What are the problems in processing batch input sessions? How is batch input process different from processing on line?

9. What do you define in the domain and data element?   //如何定义domain和element?这是内表定义的基本工作

se11

10. What are the different types of data dictionary objects?

11. How many types of tables exists and what are they in data dictionary?  

12. What is the step by step process to create a table in data dictionary? //如何在数据字典中创建一个表

se11 ->创建一个表,输入表类型

然后输入表的字段(如果要找不到参考element,要创建element)

在技术设置中进行表的属性设置

货币类型需要输入参考字段 如:NETWR 与WAERK

13. Can a transparent table exist in data dictionary but not in the data base physically?

14. What are the domains and data elements?

数据元素都会参考一个domain,domain的内容包括:数据类型、长度、小数位等

15. Can you create a table with fields not referring to data elements?   //

考察创建element与domain的技术 :se11

16. What is the advantage of structures? How do you use them in the ABAP programs?

17. What does an extract statement do in the ABAP program?
18. What is a collect statement? How is it different from append?   //collect与append的区别
19. What is open sql vs native sql?
native直接传送SQL到数据库

20. What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
无法进行调试及错误检查

21. What is the meaning of ABAP editor integrated with ABAP data dictionary?
22. What are the events in ABAP language?
23. What is an interactive report? What is the obvious diff of such report compared with classical type reports?
24. What is a drill down report?
25. How do you write a function module in SAP? describe.
如何写一个function: se37
import与export
26. What are the exceptions in function module?
27. What is a function group?
28. How are the date abd time field values stored in SAP?
29. What are the fields in a BDC_Tab Table.
PROGRAM DYNPRO DYNBEGIN  FNAM  FVAL

30. Name a few data dictionary objects?
31. What happens when a table is activated in DD?
32. What is a check table and what is a value table?
33. What are match codes? describe?
34. What transactions do you use for data analysis?
se12 se16
35. What is table maintenance generator?
se11中创建 sm31中使用
36. What are ranges? What are number ranges?

37. What are select options and what is the diff from parameters?

38. How do you validate the selection criteria of a report? And how do you display initial values in a selection screen?

39. What are selection texts?
40. What is CTS and what do you know about it?
41. When a program is created and need to be transported to prodn does selection texts always go with it? if not how do you make sure? Can you change the CTS entries? How do you do it?
42. What is the client concept in SAP? What is the meaning of client independent?
43. Are programs client dependent?
44. Name a few system global variables you can use in ABAP programs?
45. What are internal tables? How do you get the number of lines in an internal table? How to use a specific number occurs statement?

46. How do you take care of performance issues in your ABAP programs?
47. What are datasets?
48. How to find the return code of a stmt in ABAP programs?
49. What are interface/conversion programs in SAP?
50. Have you used SAP supplied programs to load master data?
51. What are the techniques involved in using SAP supplied programs? Do you prefer to write your own programs to load master data? Why?

52. What are logical databases? What are the advantages/disadvantages of logical databases?

逻辑数据库是特殊的 ABAP/4 程序,将一 定数据库表的内容组合在一起。可以将逻辑数据库链接为 ABAP/4 报表程序的属性。这样,逻辑数据库就可向报表程序提供一组层次结构表格行。该层次结构表格行可从不同数据库表中提取。

创建或维护逻辑数据库的事务是SE36 或者SLDB。 选择 “工具 -> ABAP/4 工作台 -> 开发 -> 编程环境 -> 逻辑数据库”。

53. What specific statements do you using when writing a drill down report?
54. What are different tools to report data in SAP? What all have you used?
55. What are the advantages and disadvantages of ABAP query tool?
56. What are the functional areas? User groups? and how does ABAP query work in relation to these?
57. Is a logical database a requirement/must to write an ABAP query?
58. What is the structure of a BDC sessions.
59. What are Change header/detail tables? Have you used them?
60. What do you do when the system crashes in the middle of a BDC batch session?
61. What do you do with errors in BDC batch sessions?
62. How do you set up background jobs in SAP? What are the steps? What are the event driven batch jobs?
63. Is it possible to run host command from SAP environment? How do you run?
64. What kind of financial periods exist in SAP? What is the relavent table for that?
65. Does SAP handle multiple currencies? Multiple languages?
66. What is a currency factoring technique?
67. How do you document ABAP programs? Do you use program documentation menu option?
68. What is SAPscript and layout set?
69. What are the ABAP commands that link to a layout set?
70. What is output determination?
71. What are IDOCs?
72. What are screen painter? menu painter? Gui status? ..etc.
73. What is screen flow logic? What are the sections in it? Explain PAI and PBO.
74. Overall how do you write transaction programs in SAP?
75. Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What is the other type of screen painter called?
76. What are step loops? How do you program pagedown pageup in step loops?
77. Is ABAP a GUI language?
78. Normally how many and what files get created when a transaction program is written? What is the XXXXXTOP program?
79. What are the include programs?
80. Can you call a subroutine of one program from another program?
81. What are user exits? What is involved in writing them? What precations are needed?
82. What are RFCs? How do you write RFCs on SAP side?
83. What are the general naming conventions of ABAP programs?
84. How do you find if a logical database exists for your program requrements?
85. How do you find the tables to report from when the user just tell you the transaction he uses? And all the underlying data is from SAP structures?
86. How do you find the menu path for a given transaction in SAP?
87. What are the different modules of SAP?
88. What is IMG in SAP?
89. How do you get help in ABAP?
90. What are different ABAP editors? What are the differences?
91. What are the different elements in layout sets?
92. Can you use if then else, perform ..etc statements in sap script?
93. What type of variables normally used in sap script to output data?
94. How do you number pages in sapscript layout outputs?
95. What takes most time in SAP script programming?
96. How do you use tab sets in layout sets?
97. How do you backup sapscript layout sets? Can you download and upload? How?
98. What are presentation and application servers in SAP?
99. In an ABAP program how do you access data that exists on a presentation server vs on an application server?
100. What are different data types in ABAP?
101. What is difference between BDC and Call Transaction?
102. Setting up a BDC program where you find information from?
103. What has to be done to the packed fields before submitting to a BDC session.

参考答案: http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm

 

问题一:锁对象(Lock Object)和 FM(Function Module)
激活锁定对象时,产生的 FM 的名字是什么?
答案:首先要在 ABAP 字典中创建锁对象,然后才能在 ABAP 程序中设锁。创建锁对象时,系统会自动生成两个 FM 来进行锁管理。

用于设锁的 FM 为:ENQUEUE_<锁对象名>。它用于在锁表(Lock Table)中生成一个锁项(Lock Entry)。若设锁不成功的话,就会在 Return 中反映出来。
用于释放锁的 FM 为:DEQUEUE_<锁对象名>。它用于从锁表中删除一个锁项。
在 ABAP 程序中,只需使用 "CALL FUNCITION ..." 语句就可以调用它们。
这两个锁 FM 是在 SAP 系统的一个特殊工作进程中执行的,专门进行锁管理。它运行在一个单独的服务器上,而该服务器专门用于维护整个 SAP 系统的主锁表(Central Locak Table)。
有两种锁类型:
共享锁——只读锁,一个用户正在读数据时,阻止其他用户更改该数据。

独占锁——可写锁,一个用户正在修改数据时,阻止其他用户更改该数据。

 

问题二:更新方面的 FM
更新 FM 分为 V1 和 V2,那么首先会执行哪一种更新类型呢?每种类型又是以哪种模式(异步、同步或本地)执行的呢?

答案:V1 更新类型比 V2 更新类型的优先级高,因此,V1 比 V2 行执行。V1 的执行模式可以为异步、同步或本地;V2 只能为异步执行。

 

问题三:ABAP 内存(ABAP Memory)交换
在使用 ABAP 内存的程序间进行数据交换时用到的两个语句是什么?
答案:EXPORT to MEMORY ID <id> 用于将数据复制到 ABAP 内存,IMPORT from MEMORY ID <id> 用于将数据从 ABAP 内存复制到程序中。

在 ABAP 内存间进行交换的数据必须在两个程序中都进行声明,并包含同样的数据声明。

 

问题四:授权对象(Authorization Objects)
什么是授权对象?在 ABAP 程序中使用哪条语句进行授权检查?
答案:授权对象由一组字段组成,这些字段中的值将被用于进行授权检查。ABAP 程序中使用 AUTHORITY-CHECK 语句根据授权对象进行授权检查。
在 AUTHORITY-CHECK 语句中,必须指明授权对象的所有字段,但有一个例外,可以用 DUMMY 关键字来绕过某个字段的检查。
一个授权对象中最多可以定义 10 个字段。

问题五:修改(Modifications)
在 SAP 系统中是怎样定义"修改"的?它们对更新(upgrade)有怎样的影响?
答案:修改是指用户对 SAP 发布的库对象(Repository Object)进行的更改。
必须在更新期间对修改进行评审(Review),来决定是否应该使用新的 SAP 对象,以及将来使用时是否需要进一步修改该对象。

问题六:修改助手(Modification Assistant)
什么是修改助手?
答案:修改助手是 4.5 版中引入的一个工具,用于简化更新过程。可以通过 ABAP 编辑器触发修改助手,它会记录对系统进行的修改。修改助手支持通过 ABAP 编辑器、Screen Painter、Menu Painter、文本元素维护、Function Builder 和 ABAP 字典进行的修改。


问题七:功能模块出口(Function Module Exit)
实现功能模块出口时 SAP 应用程序中应使用哪条语句?
答案:某些 SAP 应用程序中存在功能模块出口,它使用户能够向 SAP 程序中添加一些功能。通过搜索 "CALL CUSTOMER" 可以发现是否存在功能模块出口。

问题八:事务变式(Transaction Variants)
什么是事务变式?为何要使用它?
答案:事务变式是一组屏幕变式,用于预定义屏幕行为和默认值。通过使用变式功能,可以将用户不需要的字段、子屏幕及全屏幕从用户视图中取消。可以给任何输入字段设置默认值,字段也可以不用带 "Ready for Input" 状态。
只能为对话和报表事务创建事务变式;变式中只能包含普通屏幕、子屏幕及对话屏幕。
开发人员可以使用 GuiXT 脚本语言通过事务变式维护对屏幕进行修改。修改屏幕布局的方式有:插入按钮、值帮助(Value Helps)、移动对象、插入屏幕等等。

问题九:更改 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 开发人员指定,以使用户可以创建新字段。

问题十一:什么是 BADI?
答案:BADI 是 Business Add-in 的缩写。它是一种新的功能增强概念,使用 ABAP 对象技术。这是一种使用面向对象的方法来进行 SAP 增强。实现 BADI 要用到类、接口及方法等面向对象的概念。
要对一个 SAP 应用程序进行增强,必须首先定义 BADI。为 BADI 创建一个接口,接着创建一个适配器类(Adapter Class)来实现这个接口, 然后创建这个适配器类的实例。


问题十二:
三:簇表和POOL TABLE 的概念
答案:
Pools和Cluster table;他们已经不是各种数据库常规的表了,也不能够被数据库直接访问。只能通过SAP自己的工具来直接访问。
透明表:
每个透明表在数据库中有一个相应的物理表。物理表的名称和数据字典中的逻辑表定义的名称一致。所有事务和应用数据存贮在透明表中。
结构:
结构在数据库不存在数据记录。结构用于在程序之间或程序与屏幕之间的接口定义。
附加结构:
附加结构定义字段的子集,该字段属于其他表格或结构,但是在修正管理中作为单独的对象。
存贮表:
存储表可以用来存贮控制数据(例如:屏幕顺序,程序参数或临时数据)。几个存储表可以组合成一个表库。该表库和数据库中的一物理表库相一致。它包含了各组合库分派给它的所有记录。
簇表:
连续的文本如文档之类可以存贮在簇表中。几个簇表可以组合成一个表簇。对这种表类型,不同表中的几个逻辑行组合到一物理记录。这可以实现一对象接一对象地存贮或访问,访问簇中

 

 

 

 

原创粉丝点击