ABAP(1)

1.flow of an ABAPProgram

SAP NetWeaverApplication Sever( basis for the scalability) 

        architecture: database level,application sever level(where ABAP run), presentation server level

2.introduction to the ABAP Workbench

theRepository : includes all system development objects - programs, functionmodules, definitions of database tables and so on.

Therepository information system is suitable for the random search for repositoryobjects.

Youuse the application hierarchy for the application-specific search for  Repositoryobjects.

Syntax:

  1. ABAP programs are comprised of individual sentences (statements).
  2. The first word in a statement is called an ABAP keyword.
  3. Each statement ends with a period.
  4. Words must always be separated by at least one space.
  5. Statements can be indented as you wish.
  6. With keywords, additions and operands, the ABAP runtime system does not differentiate between upper and lowercase.
  7. Statements can extend beyond one line.
  8. You can have several statements in a single line (though this is not recommended).
  1. Lines that begin with asterisk * in the first column are recognized as comment lines by the ABAP runtime system and are ignored.
  1. Double quotations marks " indicate that the remainder of a line is a comment.

Standard Types:complete and incomplete types

                            D T I F STRINGXSTRING C N X P

Statement:

         MOVE: transfer the contents of a dataobject to another data object

         CLEAR: reset the contents of a dataobjects to the type-related initial value

         MESSAGE: send dialog messages to theusers of your program

Calculations:+ - * /**(Exponentiation) DIV(Integral division without remainder) MOD

         processing sequence: Expressions inparentheses come first, then functions, then powers, then               multiplication/division, andfinally addition/subtraction.

Conditionalbranches: IF construct ;  CASEconstruct    ENDIF ENDCASE

Loops: four loopsconstructs

         Unconditional loops: DO and ENDDO

         Header-Controlled Loops: WHILE andENDWHILE

         Read Loops: SELECT ; read function

System Fields:

         Sy-subrc: indicate whether thestatement could be executed successfully. The value  zero means that the statement was executedsuccessfully

Dialog messages:three digit message number and the messages class

            supply placeholders with values byusing the WITH addition

4.modularization

There are twotechniques for local program modularization in the ABAP programming language:Subroutines, also known as form routines; Methods in local classes

There are also twotechniques for global modularization in the ABAP programming language: Functionmodules that are organized in function groups; Methods in global classes

Data encapsulation:Data in the modularization units should not be changed directly by the callingprogram.

Parameter Definitionfor Subroutines: defined within the main program, Defining an Interface

The way these mainprogram variables are passed to the formal parameters of the subroutine iscalled the pass type and is specified for each parameter in the interface ofthe subroutine.

There are three passtypes for subroutines: call by value, call by value and result, call byreference

Structure of asubroutine

  1. A subroutine is introduced with FORM.
  2. You specify the name and the interface of the subroutine after FORM.
  3. The statements of the subroutine then follow.
  4. The ENDFORM statement concludes the subroutine.

call by value: Youlist each of the formal parameters that is supposed to have the pass type"call by value" (here: f1) with the VALUE prefix under USING. (Referto the above graphic for the syntax.)

call by value andresult: You list each of the formal parameters that is supposed to have thepass type "call by value and result" (here: f1) with the VALUE prefixunder CHANGING. (Refer to the above graphic for the syntax.)

call by reference:You list each of the formal parameters that is supposed to have the pass type"call by reference" (here: f3) without the VALUE prefix underCHANGING.(Refer to the above graphic for the syntax.)

When the subroutineis called, the actual parameters to be transferred without the VALUE prefix arespecified under USING or CHANGING.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值