|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/sap-abap-new-syntax/
课程评论:没有评论
**课程名称:**掌握新ABAP语法 7.40 和 7.50 **课程概述:** SAP ABAP 7.40 及以后版本引入了一种现代化的编程方法,称为“新语法”,其目标是创建一个面向表达式的语言。本课程将通过简单示例,深入讲解新语法的各种新元素。 **为何学习新ABAP语法?** 新ABAP语法引入了内联声明、表表达式、构造表达式等语言特性,使代码更简洁、更具表现力。了解新语法对于充分利用ABAP能力至关重要,这有助于编写更优、更高效、更易于维护的代码。例如,新 Open SQL 语法支持 SAP HANA 内置函数,允许在 SELECT 查询中使用 CASE 表达式、算术表达式和算术函数。 **课程内容:** 课程分为理论和实践两部分,涵盖以下主题: * **语言特性:** * 内联声明 (Inline Declaration) * 表表达式 (Table Expressions) * 值运算符 (Value Operator) * FOR 表达式 (FOR expressions) * CORRESPONDING 运算符 (CORRESPONDING Operator) * REDUCE 运算符 (REDUCE Operator) * COND 和 SWITCH 运算符 (COND and SWITCH Operator) * 字符串表达式 (STRING Expressions) * EXACT 运算符 (EXACT Operator) * CONV 运算符 (CONV Operator) * NEW 运算符 (NEW Operator) * REF 运算符 (REF Operator) * CAST 运算符 (CAST Operator) * 过滤运算符 (Filter operator) * **SQL:** * Open SQL vs 新 Open SQL * SELECT 查询中的 CASE 表达式、算术表达式和 SAP HANA 内置函数 * ABAP SQL 中的常用表表达式 (CTE) * **其他:** * 使用 STEP 附加进行反向循环 (Reverse looping using STEP addition) **新语法的优势及注意事项:** 新ABAP语法旨在简化开发者的工作。课程会通过对比新旧语法的例子(如表表达式读取数据),详细解释其功能和潜在风险(如新语法可能导致短转储),帮助您理解所有重要细节。 **课程特色:** * 直接切入要点,提供详细的理论和实践讲解。 * 通过新旧语法对比,加深理解。 * 示例简单易懂。 * 提供所有讲解的 ABAP 程序供练习和参考。 * 视频时长均不超过10分钟,保持专注。 * 提供选择题测试所学知识。 **关于新ABAP语法的几个事实:** * 新语法在保留旧语法的同时添加,具有向后兼容性。 * 无需 HANA 数据库即可实践。 * 可在 ECC 和 S/4 HANA 系统上练习。 **为最大化学习效果:** 1. 请准备一个 ABAP 系统进行实践。 2. 请按照课程 lectures 的顺序进行学习。 3. 可根据标题跳过部分内容。 **更新:** * 2025年06月30日:已添加电子书,方便快速参考。 * 2024年09月24日:为偏爱阅读的学习者添加了涵盖理论、代码和输出截图的文章。 * 2024年02月29日:学习新语法加入 AI ChatGPT 辅助。 **课程问题回顾与解答:** **问题:** 在以下代码片段中,`sy-tabix` 的值是什么? ```abap itab = col1 col2 1 val1 2 val2 3 val3 wa = itab[ col1 = 2 col2 = val2 ]. If sy-subrc EQ 0. Write: sy-tabix. End if. ``` **答案:** 表表达式不修改系统变量 `sy-subrc` 或 `sy-tabix`。因此,`sy-tabix` 的值为 0。 **祝您学习愉快!**
SAP has introduced a modern approach to programming in SAP ABAP from ABAP 7.40 onwards. Often referred to as the 'New Syntax', the modern approach aims at creating an expression-oriented language. There are various new elements introduced and let's try to understand this with simple examples in this course. Why learn New ABAP syntax?Answer the below simple question if you think it is only a New ABAP syntax course you already know, and then check if you need this course. The answer is given at the end.Que. Value in sy-tabix?itab = col1 col21 val12 val23 val3 wa = itab[ col1 = 2 col2 = val2 ].If sy-subrc EQ 0.Write: sy-tabix.End if.The new ABAP syntax introduces several new language elements, making it more expressive and powerful. For example, constructor expressions, table expressions, and inline declarations allow you to write more concise and expressive code.It is important to stay up to date with the latest developments in ABAP syntax to utilize its capabilities fully. For example, New Open SQL syntax supports SAP HANA built-in functions. You can write select queries with CASE expression, arithmetic expressions and arithmetic functions.Learning the new ABAP syntax can help you write better, more efficient, and more maintainable code.What will you learn in this course?We will discuss the topics below in 2 parts: Theory and Practice.Inline DeclarationTable ExpressionsValue OperatorFOR expressionsCORRESPONDING OperatorREDUCE OperatorCOND and SWITCH OperatorSTRING ExpressionsEXACT OperatorCONV OperatorNEW OperatorREF OperatorCAST OperatorFilter operatorOpen SQL vs New Open SQLSELECT query with CASE expression, Arithmetic Expression and SAP HANA built-in functions.Common Table Expression (CTE) in ABAP SQLReverse looping using STEP additionWhy Learn New ABAP Syntax with Us?A new ABAP syntax is designed to simplify the life of an ABAP developer, but without knowing the proper functionality, it can be disastrous. For example, let's consider we have an ITAB internal table with 5 records, and the code gets into a situation where it is reading a record at index 6.Old syntax: READ TABLE itab INTO wa INDEX indxNew syntax: wa = itab[ indx ].With old syntax, if you didn't get the record for index 6, just sy-subrc will fail and nothing will go wrong but with the new syntax, the program leads to a short dump. In detail explanations in the course will help you understand all such important things. No extra talk, straight to the point in detailed explanations with theory and practice sessions.You will learn by comparing old syntax with new syntax for better understanding.We have kept examples simple to understand in one go.You will get all the ABAP programs discussed in the course for your practice and quick reference.All the videos are less than 10 mins to keep you focused.Test what you have learned through MCQs.A few facts related to the New ABAP syntax:The new syntaxes have been added without removing the old syntax, i.e., it's with backward compatibility.Not necessary to have a HANA database.Can be practiced on ECC and S/4 HANA systems.To make the best of this course1. Get access to an ABAP system and practice on it.2. Follow the order in which lectures are arranged.3. Based on the title, feel free to skip certain parts.UPDATES: 06/30/2025: Added E-book for quick reference.09/24/2024: For folks who prefer reading over videos, we have added articles that cover theory in simple words, along with code and output screenshots.02/29/2024: Use AI ChatGPT to learn New Syntax.Answer to the question asked: table expression doesn't modify system variable sy-subrc or sy-tabix. sy-tabix = 0Happy Learning!