SAP专业学习资料Intro to ABAP - Chapter 06.ppt

  1. 1、本文档共18页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Mod_6 Control Statements Objectives The participants will be able to: Use the basic Control Flow Constructs that are available in the ABAP Editor Use the following statements in an ABAP Program IF, CASE, DO, WHILE, ON CHANGE OF, CHECK, EXIT, and CONTINUE Use the Logical Expressions that are available in the ABAP Editor Basic Flow Control in ABAP The IF Statement Logical Expressions Relational Operators Logical Operators Good Programming Practice with Logical Operators String Comparison Operators The CASE Statement The DO Loop The WHILE Loop Nested Loops and Control Structures The ON CHANGE OF Statement The CHECK Statement The EXIT Statement The CONTINUE Statement Summary The participants should be able to: Use the basic Control Flow Constructs that are available in the ABAP Editor Use the following statements in an ABAP Program IF, CASE, DO, WHILE, ON CHANGE OF, CHECK, EXIT, and CONTINUE Use the Logical Expressions that are available in the ABAP Editor BC170_2.06.* IF X = 5. WRITE:/ ‘The value of X is 5’. ELSEIF X = 6. WRITE:/ ‘The value of X is 6’. ELSE . WRITE:/ ‘X is neither 5 nor 6’. ENDIF. Logical Expressions use : RELATIONAL OPERATORS LOGICAL OPERATORS STRING COMPARISON OPERATORS Comparison Syntax Is Equal to =, EQ Is not equal to , , NE Greater than , GT Greater than or equal to =, = , GE Less than , LT Less than or equal to =, =, LE NOT AND OR The hierarchy of the logical operators is: NOT, AND, and then OR. (i.e., different from creating views) If not ( X = 0 ) or not ( Y = 1 and Z = X or X = 3 and ( Z = 5 ) Bad Comparison Syntax Contains only Contains any Contains string Contains pattern Contains not only Contains not any Contains no string Contains no pattern CO CA CS CP CN NA NS NP DATA: year(4) type c. …..some code to fill year variable with data….. CASE year. WHEN ‘1997’. FORMAT COLOR 6. WHEN ‘1998’. FORMAT COLOR 2. WHEN OTHERS. FORMAT COLOR 1. ENDCASE. DO. WRITE :/ ‘Hello world!’. ENDDO. J =4. DO J TIMES. WRIT

文档评论(0)

SAP顾问学院 + 关注
实名认证
内容提供者

方程SAP顾问学院

1亿VIP精品文档

相关文档