Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
danrega committed Jun 27, 2024
1 parent e4341b1 commit deef64a
Show file tree
Hide file tree
Showing 22 changed files with 113 additions and 126 deletions.
81 changes: 40 additions & 41 deletions 01_Internal_Tables.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 03_ABAP_SQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ SELECT id FROM @itab AS tab
DATA rangestab TYPE RANGE OF i.
"Populating a ranges table using the VALUE operator
rangestab = VALUE #( ( sign = 'I' option = 'BT' low = 1 high = 3 )
( sign = 'I' option = 'GE' low = 10 ) ).
( sign = 'I' option = 'GE' low = 10 ) ).
SELECT id FROM @itab AS tab WHERE id IN @rangestab INTO TABLE @it. "1,2,3,10,11,12
Expand Down Expand Up @@ -1700,4 +1700,4 @@ Find more information in the [ABAP for RAP: Entity Manipulation Language (ABAP E
> - Changing data in database tables using `INSERT`, `UPDATE`, `MODIFY` and `DELETE`
> - Excursions: Operands and expressions in ABAP SQL statements
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 04_ABAP_Object_Orientation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2314,4 +2314,4 @@ in the ABAP Keyword Documentation.
> - Concepts such as factory methods, singleton and abstract classes
> - Events
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 05_Constructor_Expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1986,4 +1986,4 @@ DATA(it_reduced) = REDUCE string_table(

> **💡 Note**<br>
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
4 changes: 2 additions & 2 deletions 06_Dynamic_Programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ ENDCLASS.
<p align="right"><a href="#top">⬆️ back to top</a></p>

### Dynamic Invoke
The following code snippet shows dynamically specifying [procedure](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenprocedure_glosry.htm "Glossary Entry") calls.
The following code snippet shows dynamically specifying [procedures](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenprocedure_glosry.htm "Glossary Entry") calls. The snippet covers methods. Find an example of a dynamic function module call in the [Program Flow Logic](./13_Program_Flow_Logic.md#function-module-example) cheat sheet.

``` abap
"Note: Dynamic method calls require a CALL METHOD statement.
Expand Down Expand Up @@ -3311,4 +3311,4 @@ CREATE DATA dref_cr TYPE HANDLE tdo_ref.
> - Dynamic ABAP syntax components
> - Runtime type services (RTTS), i. e. runtime type identification (RTTI) and runtime type creation (RTTC)
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 07_String_Processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2262,4 +2262,4 @@ The following list (as also covered in the [Misc ABAP Classes cheat sheet](22_Mi
> - Searching and replacing
> - Regular expressions
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 08_EML_ABAP_for_RAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -1914,4 +1914,4 @@ This cheat sheet is supported by different executable examples demonstrating var
> - Due to the simplification, the examples do not entirely meet all requirements of the [RAP BO contract](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenrap_bo_contract_glosry.htm) and do not represent semantic or best practice examples.
> - You can check out the "RAP calculator" example using the preview version of an SAP Fiori Elements UI. See the comments in the class for more information.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 11_Internal_Tables_Grouping.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ SIZE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file

> **💡 Note**<br>
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 12_AMDP.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,4 @@ Find more information in the subtopics of the [ABAP Keyword Documentation (Stand
> - AMDP table functions for AMDP methods
> - AMDP table functions for CDS table functions
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
4 changes: 2 additions & 2 deletions 13_Program_Flow_Logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ Further keywords for defining loops are as follows. They are not dealt with here

## Calling Procedures

Calling [procedures](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenprocedure_glosry.htm) fits in the context of dealing with program flow logic since they can be called explicitly in an [ABAP program](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_program_glosry.htm).
[Procedures](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenprocedure_glosry.htm) can be explicitly called within an [ABAP program](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_program_glosry.htm), thereby influencing the program flow logic.

### Methods of Classes

Expand Down Expand Up @@ -1159,4 +1159,4 @@ ASSERT flag = abap_true.
> - Terminating loop passes
> - Handling exceptions
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 14_ABAP_Unit_Tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,4 @@ For more information about evaluating ABAP unit test results, see [here](https:/
> - Implementing and injecting test doubles (constructor injection, back door injection, test seams)
> - contains comments in the code for more information.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
2 changes: 1 addition & 1 deletion 15_CDS_View_Entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ The following links take you to the source code of the cheat sheet artifacts to
> - Using exposed associations in ABAP statements
> - The example CDS view entities (`zdemo_abap_cds_ve...`) and the [class](./src/zcl_demo_abap_cds_ve.clas.abap) contains comments in the code for more information.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
27 changes: 2 additions & 25 deletions 16_Data_Types_and_Objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -1467,30 +1467,7 @@ For more information, see the [Dynamic Programming](06_Dynamic_Programming.md) c
- Internal tables that have the predefined columns `SIGN`, `OPTION`, `LOW`, and `HIGH`
- Declared with the `TYPE RANGE OF` addition in `DATA` and `TYPES` statements
- Used to store range conditions that can be evaluated in expressions using the `IN` operator (each row in the table represents a separate comparison)

```abap
"Populating an integer table with values from 1 to 20
TYPES int_tab_type TYPE TABLE OF i WITH EMPTY KEY.
DATA(inttab) = VALUE int_tab_type( FOR x = 1 WHILE x <= 20 ( x ) ).
"Declaring a ranges table
DATA rangestab TYPE RANGE OF i.
"Populating a ranges table using VALUE
rangestab = VALUE #( sign = 'I'
option = 'BT' ( low = 1 high = 3 )
( low = 6 high = 8 )
( low = 12 high = 15 )
option = 'GE' ( low = 18 ) ).
"Using a SELECT statement and the IN addition to retrieve internal table
"content based on the ranges table specifications
SELECT * FROM @inttab AS tab
WHERE table_line IN @rangestab
INTO TABLE @DATA(result).
"result: 1, 2, 3, 6, 7, 8, 12, 13, 14, 15, 18, 19, 20
```
- Find more information and a code snippet in the [Internal Table](./01_Internal_Tables.md#ranges-tables) cheat sheet.

<p align="right"><a href="#top">⬆️ back to top</a></p>

Expand Down Expand Up @@ -1568,7 +1545,7 @@ SELECT SINGLE
> - Enumerated types and objects
> - does not have as many things to be output compared to other ABAP cheat sheet executable examples. The focus is on syntax options and declarations. In the class, you can set breakpoints and use the debugger to check out data objects. You can also use the F2 information for the many types and data objects. Simply select a type or object in the code and press F2 in ADT to check out the information.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)


6 changes: 3 additions & 3 deletions 17_SAP_LUW.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Consider the following example of transactional consistency:

> **💡 Note**<br>
> - This cheat sheet focuses on [classic ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_abap_glosry.htm). Hence, the links in this cheat sheet open topics in the ABAP Keyword Documentation for [Standard ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_abap_glosry.htm).
> - The SAP LUW concept is certainly relevant to ABAP Cloud, too. The [ABAP RESTful Application Programming Model (RAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenarap_glosry.htm) is the transactional programming model for [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm). It comes with a well-defined transactional model and follows the rules of the SAP LUW. Find out more in this [blog](https://blogs.sap.com/2022/12/05/the-sap-luw-in-abap-cloud/).
> - The SAP LUW concept is also relevant to ABAP Cloud. The [ABAP RESTful Application Programming Model (RAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenarap_glosry.htm) is the transactional programming model for [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm). It comes with a well-defined transactional model and follows the rules of the SAP LUW. Find out more in this [blog](https://blogs.sap.com/2022/12/05/the-sap-luw-in-abap-cloud/).
## Terms

Expand Down Expand Up @@ -293,7 +293,7 @@ There are RAP-specific [ABAP EML](https://help.sap.com/doc/abapdocu_latest_index
## Controlled SAP LUW
- The *controlled SAP LUW* is an enhancement to the SAP LUW concept.
- The *controlled SAP LUW* is an enhancement to the SAP LUW concept, available in both [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm) and [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm).
- It introduces a check mechanism to detect violations of [transactional contracts](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentransactional_contract_glosry.htm) to guarantee transactional consistency.
- Such contracts specify which ABAP statements and operations are allowed and which are not allowed in a [transactional phase](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentr_phase_glosry.htm).
- In this way, applications can be made more robust and the SAP LUW can be made more tangible.
Expand Down Expand Up @@ -383,7 +383,7 @@ After the import of the repository, proceed as follows:
> - is explained in more detail in the expandable section below. Click to view the details.
> - Dynpros cannot be created in ABAP Cloud. As mentioned earlier, RAP is the transactional programming model for ABAP Cloud. It comes with a well-defined transactional model and follows the rules of the SAP LUW. See the links in the [More Information](#more-information) section.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)

<br>
Expand Down
2 changes: 1 addition & 1 deletion 18_Dynpro.md
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ After the import of the repository, proceed as follows:
> - is only intended to demonstrate a selection of keywords and visualize dynpro-related syntax in action on a high level.
> - is explained in more detail below in the expandable section below. Click to view the details.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
<br>
<details>
Expand Down
15 changes: 9 additions & 6 deletions 19_ABAP_for_Cloud_Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ It provides references to more detailed information on the topic.
- Supported in all SAP products that are based on ABAP technology (in the products it can be fully or partly mandatory).
- Classic ABAP
- Progamming paradigm for legacy solutions
- Based on the ABAP technology without restrictions regarding ABAP language versions (i.e. you can use [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm) - the unrestricted ABAP language version - and also ABAP for Cloud Development there), usage of tools (ADT and/or SAP GUI) or access to repository objects (also objects provided by SAP).
- Based on the ABAP technology without restrictions regarding the ...
- ABAP language versions, i.e. you can use both [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm) (the unrestricted ABAP language version) and ABAP for Cloud Development
- usage of tools (ADT and/or SAP GUI)
- access to repository objects (i.e. also objects provided by SAP can be accessed).
- Supported in [SAP S/4HANA](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensap_s4hana_glosry.htm)


Expand All @@ -56,7 +59,7 @@ It provides references to more detailed information on the topic.

For deprecated and invalid syntax in ABAP for Cloud Development, refer to the following example code. You can create a demo class and insert the code below (adjust the class name if necessary). Several syntax errors and warnings will be displayed:
- ABAP SQL statements
- The first two ABAP SQL statements select from demo database tables. The first one is a demo table provided by SAP, but it cannot be accessed directly in ABAP Cloud like in classic ABAP. Therefore, it cannot be used as a data source for selection.
- The first two ABAP SQL statements select from demo database tables. The first one is a demo table provided by SAP, but it cannot be accessed directly in the case of ABAP for Cloud Development like in the case of Standard ABAP. Therefore, it cannot be used as a data source for selection.
- The second one is a database table from the ABAP cheat sheet GitHub repository. If you have imported the repository into the system, you can use it as a data source.
- The CDS view is released and can be accessed in the restricted ABAP language scope.
- Although the source code provides an invalid data source, the dynamic ABAP SQL statement does not produce a syntax error during compilation. However, it would result in a runtime error because you cannot select from that data source. You can check the validity of dynamic specifications using the `cl_abap_dyn_prg` class, which supports dynamic programming.
Expand Down Expand Up @@ -130,7 +133,7 @@ It provides references to more detailed information on the topic.
ENDCLASS.
```
2) If available to you, you have accessed an on-premise ABAP system using ADT. It is assumed that the latest ABAP release is available.
2) If available to you, you have accessed a system supporting classic ABAP using ADT. It is assumed that the latest ABAP release is available.
a) Checking API status information
- Choose `CTRL + SHIFT + A` to open the search in ADT. Search the class `CL_ABAP_RANDOM_INT`. Once you have opened the class, check the *Properties* tab and find the API status information.
Expand All @@ -141,7 +144,7 @@ It provides references to more detailed information on the topic.
![Standard ABAP](./files/standard.png)
- If you have not imported the ABAP cheat sheet GitHub repository, remove the lines of code using artifacts from that repository, i.e. remove the statements using objects starting with `Z...`. You should not see any syntax errors. Activate the class.
- Run the class with *F9*. The code should have been processed up to the `BREAK-POINT` statement and the debugger should have started. You may want to check the content of the variables in the debugger. Choose *Terminate* to exit the debugger.
- So, unlike in the case of ABAP Cloud above, you should be able to activate and run the code (which does not represent a meaningful code example).
- So, unlike in the case of ABAP for Cloud Development above, you should be able to activate and run the code (which does not represent a meaningful code example).
c) Verifying cloud-readiness of your code in classic ABAP
- You have walked through b), created a class, inserted the code from above, and activated the class. The *ABAP Language Version* is maintained as *Standard ABAP* in the *Properties* tab.
Expand All @@ -152,7 +155,7 @@ It provides references to more detailed information on the topic.
d) Cloud-ready development in classic ABAP
- You have walked through b), created a class, inserted the code from above, and activated the class. The *ABAP Language Version* is maintained as *Standard ABAP* in the *Properties* tab under *General*.
- Suppose you want to do cloud-ready development and use ABAP for Cloud Development, i.e. the restricted ABAP language version, in classic ABAP (e.g. an on-premise ABAP system that allows the unrestricted ABAP language version).
- Imagine you are aiming for cloud-ready development and want to utilize ABAP for Cloud Development, the restricted version of the ABAP language, within a system that supports classic ABAP.
- Open the *Properties* tab and choose *General* for this purpose.
- Choose the *Edit...* button to the right of the *ABAP Language Version* property.
- Select *ABAP for Cloud Development* in the pop-up window and choose *Ok*.
Expand Down Expand Up @@ -189,4 +192,4 @@ It provides references to more detailed information on the topic.
> - does not focus - unlike other ABAP cheat sheet examples - on ABAP syntax as such (the other non-Standard-ABAP cheat sheet examples focus on ABAP syntax available in ABAP for Cloud Development), but rather emphasizes released APIs and libraries that provide predefined functionality and can be used in ABAP for Cloud Development. In particular, the Extension Components Library (XCO) is used.
> - covers an arbitrary selection for you to explore. For more detailed information and code snippets, see the SAP Help Portal documentation [here](https://help.sap.com/docs/btp/sap-business-technology-platform/sap-business-technology-platform?version=Cloud) and [here about XCO](https://help.sap.com/docs/btp/sap-business-technology-platform/xco-library?version=Cloud). In most cases, the example covers a selection of classes and methods for retrieving information about repository objects. It is more of a "playground" for exploring the APIs with a few snippets of code, and should be seen as an invitation to more in-depth exploration.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
Loading

0 comments on commit deef64a

Please sign in to comment.