SAP R/3 System 系统 Application 应用 Products 产品 Real-time 三层系统架构 ******************************************************************************* 1,Abap的数据类型分为三种类型 *1,类型 *2,结构 *3,内表 ******************************************************************************* 2,数据定义 *1 直接定义 Data int_a type I. *2 参照自己定义的数据类型定义 Type char_six(6) type c. Data chs type char_six. *3 参照se11中建立的数据类型定义 *4 直接使用like Data ch4 like ch3. (其中ch3已经在se11中定义过) 定义常数:使用constants 基本语法: Constants: <const.name> type <type> value <literal>. CONSTANTS INT TYPE I VALUE 99. ******************************************************************************* 3. 选择copy按钮,输入程序名字即可(客户的程序名字,需要以Z开头)
******************************************************************************* 4,如何设置关键字的大小写功能? 路径:在utilities--settings—pretty printer ******************************************************************************* 5,模式按钮 作用:可以call function,写write等固定格式,message等功能 操作方法:将光标放在程序中你要输入的地方,然后按pattern,输入你要输入的参数,回车即可。 旁边的pretty printer 是美化program,即是以标准的缩进和注释对program ******************************************************************************* 6,如何进行程序调试?
其中 F5 单步执行 F6 执行子程序的时候,不进入子程序,即跳过子程序 F7 跳出目前的子程序 F8 直接执行 ******************************************************************************* 7,在窗口上直接输入 /h 就可以进入程序调试的模式 ******************************************************************************* 8,创建事务代码t-code:SE93 另一种创建T-Code的方法是在程序中点击右键—创建—transaction 也可以创建一个T-Code ******************************************************************************* 9,write:a ,b,c。 其中的冒号是语法链的作用。 ****************************************************************************** 10,如何定义一格结构? *1,直接定义结构 Data : begin of stru_ztaly, Name(10) type c, …… End of stru_ztaly. *2,自己在程序里先定义结构类型,再参照类型定义结构对象。 Types: begin of stru_ztaly, Name(10) type c, …… End of stru_ztaly. Data: stru_ztaly2 type stru_ztaly.
*3,在se11定义一个公共的类型,再参照类型定义结构对象。 Data :stru_italy type ityp_s_ztaly. *4,使用like Data stru_italy2 like stru_italy (其中stru_italy是已经定义了的结构) ******************************************************************************* 11,如何建立内表? *1, 直接建内表 Data : begin of itab_italy occurs 0, Ino type I, ….. End of itab_italy. *2,自己先建一个结构类型,再根据这个结构类型建内表 Type :begin of typ, ino type I, …… end of typ. Data: itab_typ type table of typ. 其中关键字table不能少,否则还是结构,而不是内表 *3,现在数据字典中建一个内表类型,再参照这个类型 Data:itab_italys type zty_t_italy. 说明:对内表的操作必须依靠结构进行。 For example: append stru_italy to Itab_italy. 增加一行到内表中。 *4,内表输出必须依靠于结构,而且要循环输出 For example: Loop at itab_italy into stru_ztaly. Write: / ………. Endloop. *5,特殊情况 Tables: 表名A 说明:定义了一个和A同样名称的数据结构。 A type B occurs N。 说明:定义出来的一格内表 *6,data <itab> type <itabtype> [with header line] 说明:在定义的时候同时生成一个同名的结构 ******************************************************************************* 12,如何理解程序中的流程呢? 说明:程序其实存放在database中的 ******************************************************************************* 13,数据元素,结构和内表的区别是什么? 用一句话说明:就相当于数学中的 点 线 面 ******************************************************************************* 14, open sql与 native sql的流程区别是什么? 说明:使用了open sql 就不必要理会后台的数据库,只要掌握了open sql就ok 使用native sql 只和后台数据库习习相关 上图:主要说明了 Open sql 只能使用DML 而 native sql 可以使用DML 和DDL Open sql 包含:insert,update,delete,modfy ******************************************************************************* 15,processing of tha abap processing block resumes(摘要)? ******************************************************************************* 16,系统参数sy-subrc的功能是? 若返回值为 0 表示系统执行数据成功 若返回值不为0 表示系统执行数据不成功(返回具体数据的含义参加F1帮助文件) ******************************************************************************* 17,message 的语法使用的例子? 说明: 其中bc400 是message class 而message: 040:the name of the airline &1 is &2. 041:Airline &1 is not available. (&1和&2 都是program中的变量) ******************************************************************************* 18,系统得消息类型有几种? 其中warning的类型,可以不必理会,直接回车,就可继续执行 Error的类型,在执行过程中若产生Error类型的,将阻止系统继续往下执行 19,t-code:se14的作用? 主要是调整表的作用,具体功能未知 20,系统参数sy-dbcnt的作用是? Sy-dbcnt表示找到的记录的序号,第一条记录为1,第二条记录为2,最后一条记录的序号也是记录数 21,消息管理的t-code:se91 管理请求号t-code:se10 创建账号 t-code:su01 创建角色 t-code:pfcg 传输管理系统t-code:stms 跨客户端的应用层次 t-code:se81 寻找跨客户端组件 t-code:se84 创建事务代码:t-code:se93 创建增强工程:t-code:cmod 22,modify语句的作用? 这个是sap特有的语句,若该数据在数据库中存在,则update 若该数据在数据库中不存在,则insert 23,报表分为哪四类? *1,tools --query *2,simple lists --简单报表 *3,interactivelists --交互式报表 *4,alv grid Control --alv 24,query 的特征 *1,user basic reports *2,each user defines own quickviews which only they can display *3,uses existing data *4,no administrative(管理的) work *5,可以使用query进行修改 *6,interface to internal(EIS,ABC,ALV)and external application *7,fewer functions than infoset query *8,no transports 24,如何产生一个简单的报表? Report zrl003. Data:wa_spfli like spfli. Select carrid connid cityfrom cityto into corresponding fields of wa_spfli from spfli. Write: / wa_spfli-carrid, wa_spfli-connid, Wa_spfli-cityfrom, wa_spfli-cityto. Endselect. 25,setting the list format(报表的宽度和高度)? 基本的语法: Report <name> line-size <s> line-count <m[(n)]>. For example: Report zrl003 line-size 50 Line-count 12. …… Write:… 产生出来的效果图为: 26,如何在程序中显示图标? For example: Report zrl003. Include<icon> Include <symbol> …… *state of free seats If seatsfree < 1. Write icon_red_light as icon. Elseif seatsfree >1. Write icon_green_light as icon. Endif. *state of booked seats If wa_sflight-seatocc < 10. Write sym_left_hand as symbol Endif.
27,设置固定列和显示最后一页的语法 33,层级报表的流程? 34,关于使用程序中的关键字notes 35,在write语句中,让鼠标移到输出的栏位上就会出现手型的图标 36,如何得到鼠标取得的数? 37,事件on change of |
|