Yes, you heard it right shades or different versions of ABAP. With changing deployment options and the way, we can enhance business solutions in addition to the classical extensibility, leads to different versions of ABAP currently.
So, we will be discussing these different versions of ABAP in this blog and see different constrains in versions of ABAP language. Let’s start …
Versions of ABAP language
|ABAP VERSION||Meaning||Version ID|
|Standard ABAP (Unicode)||This is the universal version of ABAP which has all ABAP elements in scope in a UNICODE system. Unicode checks are performed in programs of this type.||X|
|ABAP for Key Users||This version is designed for key users to do the enhancement implementations in secure manner. The rules of standard ABAP apply but very restricted set of ABAP language elements are allowed with restriction on access to external repository objects. It is used in web editor inside In-App extensibility tools(custom fields and logic, custom business object etc.)||2|
|Static ABAP with restricted object use||In this version, rules of Standard ABAP(Unicode) apply, with restriction on access to external repository objects. Dynamic data declaration and dynamic program creation is not allowed .||3|
|Standard ABAP with restricted object use||In this version of ABAP, the rules for Standard ABAP (Unicode) apply, with restrictions on access to external repository objects. Dynamic language elements are not forbidden in this version||4|
|ABAP for SAP Cloud Platform||This version is designed for development in SAP Cloud platform with restricted set of ABAP language elements.||5|
|Obsolete ABAP (Non-Unicode)||This version is obsolete and is no longer supported. Version ID is blank in this case||–|
Every ABAP program has an attribute “ABAP Language version” and by default “Standard ABAP (Unicode)” is selected on the program creation dialog box. But if we check the value help, we can see and can select from all the available versions as shown below.
So, now when you know the different ABAP version and know that there are different constraints with versions other than Standard ABAP (Unicode) version, you must be curious to know what all language element we can use with all these different versions and how we can find all these details… right?? So, let’s see how we can find that.
SAP has provided standard report “ABAP_DOCU_VERSION_WHITELIST” to list all language elements, which are allowed, based on language version. For e.g. to check the available elements list for “ABAP for key users”. Select language version 2 on selection screen and execute and we have the list of whitelisted objects for version 2 as shown below.
Alternatively, you can check the CDS view “ARS_APIS_RELEASED_FOR_C1” to get the same list.
Similarly, you can see the whitelisted objects for other versions using report “ABAP_DOCU_VERSION_WHITELIST”.
For “ABAP for SCP” you can alternatively use CDS view “ARS_APIS_RELEASED_FOR_C1_SCP”
As we can see below, only 33 whitelisted object type are available in “ABAP on SCP” version as of now and we must see increase in this number with future releases.
|Object Type||Object Name||State|
Okay, with this we have seen how to find out the whitelisted objects list for different ABAP versions.
Another important standard program that SAP has provided is “DEMO_ABAP_VERSIONS”. This program can be used to do the code syntax check for different ABAP versions.
And on checking the source code you will see if the syntax is allowed in the selected language version or now. For e.g. in ABAP for key users, direct select from transparent tables is not permitted, so if we try to do the same, we will get the syntax error message as shown below. The complete list of allowed ABAP statements for Key User extensions are listed here.
But, if we check the same with “Standard ABAP version”, we get no error as all ABAP language elements are allowed there.
Another way to do the syntax check for your custom code readiness for cloud is by using ATC check variant “SAP_CP_READINESS_REMOTE”. Check this wonderful blog here to know more on this.
With this I will stop here and hope that you will find it useful. Thanks!!
Reference: Standard SAP documentation here.