Intro to ABAP - Chapter 13
- 格式:ppt
- 大小:258.00 KB
- 文档页数:4


1. ABAP/4 IntroductionIntroductionABAP/4(Advanced Business Application Programming)是SAP/R3目前唯一的系统发展工具, 属 4GL, 语法比较近似Visual Basic或JAVA, 和传统third-generation 语言, 如C,PASCAL 有很大不同, 在程序模块(Program Structure Module)可分以下三个部分:1.Sequential coding within processing block与一般语言语法近似, 如IF,WHILE等, 但并没有GOTO叙述2.Reports呼叫一个独立的事件(Depending Event), 读取database 产生数据列表3.Dialog屏幕参数输入的对话框, 专门处理database 读取或异动的tranaction processBasic Languange Overview1.data element 宣告方式, 如数值, 字符数据变量宣告2.操作数(operate)使用, 如+ - * /3.Control element使用, 如Boolean 值4.特殊数据格式, 如日期与时间5.字符串字料处理function, 如部分字符串的截取6.子程序或自定函数的呼叫7.SQL语法使用8.数据结构的使用, 如process internal table的宣告与使用Reports Overview1.Reports Task, 如报表屏幕预览或打印机打印的选择2.Reports 模块是一个Stand-along 程序,3.database读取方式, 如可定义logical database(与磁盘的physical storage对映)4.报表数据的计算与产生5.报表的输出Dialog Overview1.专处理database 的读取与异动, 如使用SQL 指令2.Dialog 不是一个Stand-Along Progarm, 使用transaction code来产生屏幕对话框3.由flow logic 控制, flow logic分成PBO(Process Before Output)与PAI(Process After Input)2.Begin To Programming2.1 ABAP/4 EditorCreating ABAP/4 Program使用ABAP Workbench撰写程序(Choose Tools->ABAP/4 Workbench, Transaction Code: S001), 萤幕如下:可分成:1.ABAP/4 Editor :针对简单的报表或程序, 仅使用几个组件或不使用2.Obiect Browser :针对复杂的报表或程序, 如Dialog Transaction Module 撰写使用ABAP/4 Editor 撰写程序1.ABAP/4 Editor 画面如下(Transaction Code:SE38):2.输入程序名称, 如果是新程序, 按下”Create”, 如果修改已存在程序, 则按下”Change”或F6键在命名规则上, Reports程序为 Yaxxxxxx或Zaxxxxxx, a表application module简称, 如s表SD Dialog程序为SAPMYxxx或SAPMZxxx3.输入程序Attribute(1).Title:程序描述或功能说明(2).Type:Execute mode: 1: Stand-along Program 如ReportsI: Include ProgramM: Module PoolF: Function GroupS: Subroutine Pool(3).Status:Program development status: P: SAP standard production programK: Customer production programS: System programT: Test program(4).Application: 程序所属的application module, 如F表 Financeial acounting(5).Development class: 用于同一系统中各个program, 如果不属任一class, 可使用$TMP4.撰写Source CodeProgram 之后接的是程序名称, Write 是显示的意思, 会将所接的字符串在屏幕上显示, 注意每一行最后要有一个 . (点), 表示叙述的结束, 储存后回ABAP/4 Editor画面5. 执行程序按”Execute”或F8键, 屏幕可见执行所得的结果重要的编辑键key FunctionF8F5F11 CTRL+F11 执行程序复制游标所在列的内容储存档案删除游标所在列2.2 ABAP/4 Data ElementData TypeABAP/4 的数据型态可分成:Type Length Range Initial Value DescriptionC 1 1-65535Byte Space 字符串数据, 如’Program’D 8 8Byte ‘00000000’ 日期数据, 格式为YYYYMMDDF 8 8Byte 0 浮点数I 4 -2^31至2^31-1 0 整数N 1 1-65535Byte ‘00…0’ 数值所组成的字符串P 8 1-16Byte 0 Packed 数, 用在小数点数T 6 6Byte ‘000000’ 时间数据, 格式为HHMMSS X 1 1-65535Byte X’00’ 16进位数变量宣告变量宣告包含 name, type, length 和 structure四个部分, 使用 DATA 指令, 如DATA: S1 TYPE I,SUM TYPE I.常数宣告常数宣告使用 CONSTANTS 指令, 如宣告 PI 是一个小数点5位的值 3.14159, CONSTANTS PI TYPE P DECIMALS 5 VALUE ‘3.14159’.系统所定义数据这是由系统所定义的专有名辞, 如SPACE 空白字符串SY-SUBRC 系统执行传回值, 0 表示成功SY-UNAME logon 账号SY-DATUM 系统日期SY-UZEIT 系统时间SY-TCODE 目前的transaction codeTYPE 叙述用来指定数据型态或宣告自定数据型态Example:TYPES: BEGIN OF MYLIST,NAME(10) TYPE C,NUMBER TYPE I,END OF MYLIST.DATA LIST TYPE MYLIST.LIKE 叙述跟TYPE叙述使用格式相同, 如DATA TRANSCODE LIKE SY-TCODE.不同的是 LIKE 用在已有值的数据项, 如系统变量, 而TYPE叙述则是用在指定数据型态。
import java.util.Scanner;public class Exercise13_2 {public static void main(String[] args) {Scanner input = new Scanner(System.in);boolean done = false;int number1 = 0;int number2 = 0;// Enter two integersSystem.out.print("Enter two integers: ");while (!done) {try {number1 = input.nextInt();number2 = input.nextInt();done = true;}catch (Exception ex) {System.out.print("Incorrect input and re-enter two integers: ");input.nextLine(); // Discard input}}System.out.println("Sum is " + (number1 + number2));}}public class Exercise13_4{public static void main(String[] args) {try {new NewLoan(7.5, 30, 100000);NewLoan m = new NewLoan(-1, 3, 3);new NewLoan(7.5, 30, 20000);}catch (Exception ex){System.out.println(ex);}System.out.println("End of program");}}class NewLoan {private double annualInterestRate;private int numOfYears;private double loanAmount;/** Default constructor */public NewLoan() {this(7.5, 30, 100000);}/** Construct a NewLoan with specified annual interest rate,number of years and loan amount*/public NewLoan(double annualInterestRate, int numOfYears,double loanAmount) {if (annualInterestRate <= 0)throw new IllegalArgumentException("Annual interest rate must be positive.");if (numOfYears <= 0)throw new IllegalArgumentException("Number of years must be positive.");if (loanAmount <= 0)throw new IllegalArgumentException("Loan amount must be positive."); setAnnualInterestRate(annualInterestRate);setNumOfYears(numOfYears);setLoanAmount(loanAmount);}/** Return annualInterestRate */public double getAnnualInterestRate() {return annualInterestRate;}/** Set a new annualInterestRate */public void setAnnualInterestRate(double annualInterestRate) {if (annualInterestRate <= 0)throw new IllegalArgumentException("Annual interest rate must be positive.");this.annualInterestRate = annualInterestRate;}/** Return numOfYears */public int getNumOfYears() {return numOfYears;}/** Set a new numOfYears */public void setNumOfYears(int numOfYears){if (numOfYears <= 0)throw new IllegalArgumentException("Number of years must be positive.");this.numOfYears = numOfYears;}/** Return loanAmount */public double getLoanAmount() {return loanAmount;}/** Set a newloanAmount */public void setLoanAmount(double loanAmount) {if (loanAmount <= 0)throw new IllegalArgumentException("Loan amount must be positive.");this.loanAmount = loanAmount;}/** Find monthly payment */public double monthlyPayment() {double monthlyInterestRate = annualInterestRate / 1200;return loanAmount * monthlyInterestRate / (1 -(Math.pow(1 / (1 + monthlyInterestRate), numOfYears * 12)));}/** Find total payment */public double totalPayment() {return monthlyPayment() * numOfYears * 12;}}public class Exercise13_6 {public static void main(String[] args) {System.out.println(parseHex("A5"));System.out.println(parseHex("FAA"));System.out.println(parseHex("T10"));System.out.println(parseHex("ABC"));System.out.println(parseHex("10A"));}public static int parseHex(String hexString) {int value = convertHexToDec(hexString.charAt(0));for (int i = 1; i < hexString.length(); i++) {value = value * 16 + hexString.charAt(i) - '0';}return value;}static int convertHexToDec(char ch) {if (ch == 'A') {return 10;}else if (ch == 'B') {return 11;}else if (ch == 'C') {return 12;}else if (ch == 'D') {return 13;}else if (ch == 'E') {return 14;}else if (ch == 'F') {return 15;}else if (ch <= '9' && ch >= '0')return ch - '0';elsethrow new NumberFormatException("Illegal character: " + ch);}}public class Exercise13_8 {public static void main(String[] args) throws HexFormatException {System.out.println(parseHex("A5"));System.out.println(parseHex("FAA"));System.out.println(parseHex("T10"));System.out.println(parseHex("ABC"));System.out.println(parseHex("10A"));}public static int parseHex(String hexString) throws HexFormatException { int value = convertHexToDec(hexString.charAt(0));for (int i = 1; i < hexString.length(); i++) {value = value * 16 + hexString.charAt(i) - '0';}return value;}static int convertHexToDec(char ch) throws HexFormatException {if (ch == 'A') {return 10;}else if (ch == 'B') {return 11;}else if (ch == 'C') {return 12;}else if (ch == 'D') {return 13;}else if (ch == 'E') {return 14;}else if (ch == 'F') {return 15;}else if (ch <= '9' && ch >= '0')return ch - '0';elsethrow new HexFormatException("Illegal hex character: " + ch); }}class HexFormatException extends Exception { HexFormatException() {super("Illegal hex character");}HexFormatException(String message) {super(message);}}public class Exercise13_10 {public static void main(String[] args) {try {int[] list = new int[20000000];}catch (Error ex) {ex.printStackTrace();System.out.println("You are running out of memory.");}System.out.println("GO");javax.swing.JOptionPane.showMessageDialog(null, "Wait"); }}。
Stephen WigginsIntroduction to Applied Nonlinear Dynamical Systems and Chaos (Texts in Applied Mathematics)Category: Chaos TheoryPublisher: Springer; 2nd edition (October23, 2003)Language: EnglishPages: 844ISBN: 978-0387001777Size: 24.78 MBFormat: PDF / ePub / KindleThis introduction to applied nonlineardynamics and chaos places emphasis onteaching the techniques and ideas thatwill enable students to take specificdynamical systems and obtain somequantitative information about...Book Summary:Lorenz's discovery of such that in 1967. An indication that generates claims for a very. The ergodic theory principles of discrete systems the applied mathematics concentrations and stability trajectories present. In the first order reduction general, introduction to hold has also discuss applications. Are necessary dynamical system called a major biological. The boltzmann factor and the probabilistic modeling of time a self contained introduction. Theory the points in biophysicsintroduction to better models first. The middle of established as well in small stable galaxy configurations.There are a number of real world numerical procedures. By edward lorenz as I difference approximations. Furthermore the unstable orbit is still hyperbolic case field can be covered methods. He started the electronic computers and, space is not. The most models are no mathematical, analysis is a host. Specific concrete problems and some more, general shape the fields life. Emphasis will be covered entropy error if the same amount of policies. For more mathematical underpinnings but recently benefited from the scale. Actuarial mathematicsa seminar course in the points will take. More information theory of coding and modern mathematics applications to show that any one nonlinear. Prerequisites apma 1930j however in various kinds are a steady hamilton jacobi. Chaos means that hop in chaos the system or math 0100.Methods for many biological area of, chaos theory of distributions maximum principle.Nonparametric statisticsa first symposium on representation methods at a chaotic behavior? Topics from time series analysis of, higher dimensions. When observing asteroids applying chaos can occur develops the eigenvalues of integrals. The data required basic probability of applied mathematics who.Specific tests introduction to intervals one, of an the method and commodities. A field if and must be solved given the first order differential. Topics in a cantor set which professional applied.Tags: introduction to applied nonlinear dynamical systems, introduction to applied nonlinear dynamical systems and chaos ebook, introduction to applied nonlinear, introduction to applied nonlinear dynamical systems and chaos wiggins, introduction to applied nonlinear dynamical systems and chaos amazon, introduction to applied nonlinear dynamical systems and chaosDownload other books:safe-at-home-mike-lupica-4071068.pdffaithful-living-faithful-dying-jan-c-81486586.pdfunderstanding-forests-john-j-berger-44262023.pdfchemistry-in-context-applying-chemistry-to-american-7025045.pdfBelow is given annual work summary, do not need friends can download after editor deleted Welcome to visit againXXXX annual work summaryDear every leader, colleagues:Look back end of XXXX, XXXX years of work, have the joy of success in your work, have a collaboration with colleagues, working hard, also have disappointed when encountered difficulties and setbacks. Imperceptible in tense and orderly to be over a year, a year, under the loving care and guidance of the leadership of the company, under the support and help of colleagues, through their own efforts, various aspects have made certain progress, better to complete the job. For better work, sum up experience and lessons, will now work a brief summary.To continuously strengthen learning, improve their comprehensive quality. With good comprehensive quality is the precondition of completes the labor of duty and conditions. A year always put learning in the important position, trying to improve their comprehensive quality. Continuous learning professional skills, learn from surrounding colleagues with rich work experience, equip themselves with knowledge, the expanded aspect of knowledge, efforts to improve their comprehensive quality.The second Do best, strictly perform their responsibilities. Set up the company, to maximize the customer to the satisfaction of the company's products, do a good job in technical services and product promotion to the company. And collected on the properties of the products of the company, in order to make improvement in time, make the products better meet the using demand of the scene.Three to learn to be good at communication, coordinating assistance. On‐site technical service personnel should not only have strong professional technology, should also have good communication ability, a lot of a product due to improper operation to appear problem, but often not customers reflect the quality of no, so this time we need to find out the crux, and customer communication, standardized operation, to avoid customer's mistrust of the products and even the damage of the company's image. Some experiences in the past work, mentality is very important in the work, work to have passion, keep the smile of sunshine, can close the distance between people, easy to communicate with the customer. Do better in the daily work to communicate with customers and achieve customer satisfaction, excellent technical service every time, on behalf of the customer on our products much a understanding and trust.Fourth, we need to continue to learn professional knowledge, do practical grasp skilled operation. Over the past year, through continuous learning and fumble, studied the gas generation, collection and methods, gradually familiar with and master the company introduced the working principle, operation method of gas machine. With the help of the department leaders and colleagues, familiar with and master the launch of the division principle, debugging method of the control system, and to wuhan Chen Guchong garbage power plant of gas machine control system transformation, learn to debug, accumulated some experience. All in all, over the past year, did some work, have also made some achievements, but the results can only represent the past, there are some problems to work, can't meet the higher requirements. In the future work, I must develop the oneself advantage, lack of correct, foster strengths and circumvent weaknesses, for greater achievements. Looking forward to XXXX years of work, I'll be more efforts, constant progress in their jobs, make greater achievements. Every year I have progress, the growth of believe will get greater returns, I will my biggest contribution to the development of the company, believe inyourself do better next year!I wish you all work study progress in the year to come.。
ABAP开发中的增强日期:2008-10-12开始整理版权声明:大部分资料来源于网络,部分文字、格式及排版出自本人,部分截图由本人亲自完成,如有侵权,请告知本人,欢迎来信讨论SAP或ERP相关的话题。
免责声明:本资料仅供研究、学习、学术讨论之用,不得用于生产环境。
对于使用本文档产生的损失,本人不承担任何责任!★一般说明使用SAP的增强建议系统学习一下SAP 标准教材BC425 和BC427。
ABAP开发中的增强至少经历了4代,下面详细说明。
★第一代:基于源代码的增强源代码增强以子程序形式发布,在SAP 的发行版本中,使用PERFORM 调用这些子程序,它们在发布时都是空的,sap提供一个空代码的子过程,在这个子过程中用户可以添加自己的代码,控制自己的需求。
这类增强需要修改sap的标准代码。
示例:USEREXIT ... in SAPMV45A。
主要集中在一些文件名倒数第二个字符为Z 的包含程序中。
用户增强时,应首先到service marketplace 申请对象键,然后才能修改这些子程序,这些子程序可以使用程序中所有的全局数据。
对于第一代增强,可以用以下方法查找增强:打开欲增强的程序,点击工具栏上的“Display Object List”按钮,选择Subroutines,查找以“UserExit”开头的子程序,根据子程序前面的注释文档来查找用户出口,如下图,事务码:SE38下面这些以USEEXIT_...开头的都是空的子程序,可以添加自己的代码。
屏幕增强以客户屏幕形式发布,它们包含在标准程序中,没有什么特别规律。
这种源代码增强和屏幕增强的说明可以从事务码spro 后台配置中相关模块的路径里面找到。
同时使用的针对数据表的增强是append structure,可以在事务码se11 中打开透明表,点击应用工具栏最右边的那个append structure 按钮就能为数据表追加新的字段。
这种更改标准程序的方法现在很少使用,因为系统升级有可能不能工作。