Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
19,649

In SAP S/4HANA Cloud, private edition and SAP S/4HANA on-premise we recommend to follow the ABAP Cloud development guidelines as much as possible and reduce the amount of classic ABAP developments to enforce upgrade stability and clean core for your systems.

The 3-tier extensibility model described in the ABAP Extensibility guide provides you a blueprint how you should setup the new development model in your landscape.


Figure 1: 3-tier extensibility model for SAP S/4HANA Cloud, private edition and SAP S/4HANA on-premise

The most important rule is that the default for all kinds of new developments is Tier 1, where ABAP Cloud including the usage of released SAP APIs is set up by switching the ABAP language version to ABAP for Cloud Development and strictly controlled via the ABAP syntax check. In case of missing released APIs the idea of providing custom wrappers in Tier 2 development overcomes this gap. But there are still quite some use cases where this strict development model controlled via the ABAP language version cannot be applied. Therefore Tier 3 for classic ABAP extensions is there in place. Examples are the extensions of SAP GUI based Dynpro applications or the need to extend an application via a classic extension technique like User Exits or not released BAdIs. Tier 3 is also the place for all kinds of legacy code where an adjustment towards ABAP Cloud is not feasible from the ROI perspective.

As the ABAP for Cloud Development language version cannot be used for Tier 2 and Tier 3 developments we recommend to control the usage of ABAP Cloud via the ABAP test cockpit (ATC) and minimize the usage of classic ABAP code. The basic idea is to check all developments (even the legacy development) with the same ATC variant and use the ATC exemptions to control the usage of ABAP Cloud within your developments.

Technical Setup

Use the remote ATC and set up a central ATC system connected against all development related systems (DEV, Q). Setup the ATC blocking mode in DEV systems for all Priority 1 and Priority 2 findings for transport tasks and transport requests.

Recommendation for the ATC check variant

You should create your own ATC standard variant as a copy of the default ATC variant ABAP_CLOUD_DEVELOPMENT_DEFAULT in ABAP development tools for Eclipse and add the following checks from the ATC category Cloud Readiness to your variant to enforce the cloud-like development:

atc_adopt_variant.png

 Figure 2: Custom ATC check variant to enforce development with ABAP cloud development model

The SAP note 3397285 must be implemented to set the correct default value of the  “Usage of Released APIs” check.

Remark: In case you have not licensed the CVA security checks you have to remove them from your check variant.

PLEASE NOTE: in SAP S/4HANA 2023 FPS02 the report SYCM_3TIER_SETUP_SWC_ATC can be executed to automate the creation of software components and development packages for the 3 tiers and the configuration of the ATC check variant (as described in the SAP Help Documentation Set Up Developer Extensibility). After the execution of the report the ATC check variant ABAP_CLOUD_DEVELOPMENT_3TIER should be used.

Use ATC exemptions to control new classic ABAP developments

As already mentioned we recommend to use ATC exemptions to control the rules of ABAP Cloud for developments within Tier 2 and Tier 3. ATC exemptions can be applied individually for every check message and on the following granularity levels:

Exemption scopeDescription
FindingExemption is valid for a single finding
PackageExemption is valid for all objects of a package
ObjectExemption is valid for a single object


Let’s go through the following use cases to explain the usage of ATC exemptions in more detail:

Use Case 1: Implement a custom wrapper for a missing released API (Tier 2 development)

The recommendation is to use language version “Standard ABAP” for the wrapper object and use the ATC check to apply the syntax of ABAP Cloud (no exemption) and control the usage of not-released APIs via fine granular ATC exemptions for the check “Usage of Released APIs” on a finding level.

Figure 3: Example for implementing a custom wrapper for a missing released API (Tier 2 development)

Use Case 2: Extend an SAP GUI based Dynpro application

The usage of the ABAP for Cloud Development language version is not possible here, so you have to apply for an exemption on object level for the check ABAP Language Version (Syntax) but you can control the usage of released APIs on a fine granular level for the check Usage of released APIs on finding level.

Figure 4: Example for extending an SAP GUI based Dynpro application

Use Case 3: Implement a non-released BAdI

The usage of released APIs is not possible here so you have to apply an exemption on object level for the check Usage of released APIs. But the syntax of the BAdI implementation should be compliant to the rules of ABAP Cloud and therefore no exemption should be applied for the check ABAP Language Version (Syntax) in this case.


Figure 5: Example for implementing a non-released BAdI

Use ATC Exemption Browser to monitor the usage of standard ABAP

The ATC Exemption Browser (in the SAP GUI transaction ATC) will provide you an overview about the state of your system with regards to clean core. You will get an overview about all exemptions that were created in your system to allow the usage of standard ABAP and not released APIs.
The following ATC Exemption Browser screenshot demonstrates the overview of the exemptions with regard to the exemption use cases described above:

Figure 6: ATC Exemption Browser

The first exemption relates to the Use Case 1: Implement a custom wrapper for a missing released API, the second and third exemptions are valid for the Use Case 2: Extend an SAP GUI based Dynpro application and finally the fourth and fifth exemptions are relevant for the Use Case 3: Implement a non-released BAdI.

The icons in the Object Scope column represent the scope of the exemption respectively:

IconExemption ScopeDescription
FindingExemption is valid for a single finding
PackageExemption is valid for all objects of a package
ObjectExemption is valid for a single object


Use ATC baseline for legacy code

In case you do not start with a greenfield SAP S/4HANA system and you have legacy custom code in place the usage of ATC exemptions is not the best choice to setup the ABAP Cloud development model for your legacy code. We recommend setting up an ATC baseline for all findings in legacy code right before you start with new developments. Just execute an ATC mass run over your legacy code with the ATC checks variant ABAP_CLOUD_READINESS and create a baseline out of the findings of the run. If necessary the findings in the baseline can be anytime displayed and analyzed. For more details about ATC baseline see also the blog Remote Code Analysis in ATC – Working with Baseline to suppress findings in old legacy code. The benefit of creating a baseline is that initially developers are not blocked because all initial findings on legacy objects are exempted via the baseline. Your new developments are controlled from the beginning via ATC and the above-mentioned ATC exemptions handling.

20 Comments
ashaik2
Discoverer
0 Kudos
Dear Olga,

Thank you for writing this blog, Is there any option in ATC exemption browser or ATC check Results/ ATC Problems, where there is a way to differentiate Tier 2 or Tier 3 development findings ? by looking at the results or problem, can we tell this check "Usage of not released application API" defect is for Tier 2 or Tier 3 development ? without reviewing the development ?

 

Eg.

Case 1:I have a released CDS view using a non released table MARA (wrapper)- Tier 2 development.

Case 2: I have R3 program fetching data from table VBAP - Tier 3 development.

In both cases I can see ATC results with similar information but there is no differentiation between these 2 errors.

Please let me know if we can differentiate this with any ATC configuration or by applying any OSS notes ?

Thank you,

Ameen.
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
Hi Ameen,

when you create exemption you can use the "Justification" field to further specify the semantics of the exemption and its relevance for Tier 2 or Tier 3 development.

Kind Regards,

Olga.
MKM
Active Participant
0 Kudos

Hello Olga

Will this ATC variant help in suggesting released ABAP artefacts for the disallowed objects in S4 On-Prem 2022 system?

For example, I am looking for a replacement for the RV60AFZZ user-exit with an extension to the KOMPCV communication structure in it.

 

Thanks

Manoj

 

OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Manoj,

for the not released objects, if the successor is already available, it will be displayed in the ATC results. For user exits it is planned that BAdIs will replace these extensions over time.

Kind Regards,

Olga.
MKM
Active Participant
0 Kudos
Thanks for the quick reply, Olga.

How can it be seen that relevant BADIs exist for the classic user? Will it be shown in the ATC check results screen?

I understand. We have Extensibility Registry to see the list. But if ATC check can give for the objects you are working on it will be helpful
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
Hi Manoj,

thank you for your feedback. It is planned in our development backlog for ATC.

Kind Regards,

Olga.
Gilmour213
Explorer
0 Kudos
Hello Olga,

what is necessary to switch on the "Cloudification Repository Check". As far as we knew this needs a connection to the GitHub to get always the newest Whitelist, which is only stored there.

Here in your Blog you didn't xwitch on this check. So my Question : When it is necessary to use this check, or can we use the other checks to reach our Goal of Cloud Readyness in out On-Premise System ?

Best regards

Mario
ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Mario,

the checks above are using the information of released APIs in the system. This is perfect for the ABAP Cloud adoption in your S/4HANA 2022 system. The cloudification repo provides you in addition a forecast on upcoming APIs with the next releases.

So this might be an additional source for the ABAP Cloud adoption.

Regards,

Thomas.
Gilmour213
Explorer
0 Kudos
Hello Thomas,

we have now Set Up the Cloudification Ready Check in our Central ATC System. After Input of the mentioned URl as Parameter for this Check :
https://raw.githubusercontent.com/SAP/abap-atc-cr-cv-s4hc/main/src/objectReleaseInfoLatest.json

we start a Test from our Sandbox which is connected to the Central ATC System, but nothing was found as a Result of the Check. We therefore have written a Test Program which contains some not released APIs to Test it. But the result (without any Tool Errors) is 0 Errors.

After that we tried to Debug the whole Cloudification Check and we came to a point where
e_client->receive Methos delivers a http_communication_failure and after that the JSON File on GitHub was not loaded and therefore we have no Errors.

Do you have any Idea how this problem can be deeper analyzed or fixed by our colleagues ?

Best Regards

Mario
ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Mario,

can there be some restrictions on your ATC system concerning outbound communication with external resources? Best is to create an ticket and post me the ticket number via email.

Regards,

Thomas.
cordialsarthak
Explorer
0 Kudos
Hello olga.dolinskaja ,

I am working on a S/4HANA OP 2021 Greenfield implementation project. This is regarding following two ATC checks under Cloud Readiness section:

  1. Test for Restricted Language Scope (ABAP Language Version)

  2. Check for Allowed Object Types in ABAP for Cloud Development


 

Question related to “Test for Restricted Language Scope (ABAP Language Version)”

This check informs about the ABAP statements and statement variants that are not allowed in the restricted ABAP language version. But it does not suggest the alternatives to use. Can you please help me where can I find complete mapping between prohibited language elements and their substitutes. For example, table under section ‘Available Quick Fixes for ABAP Language Version 5 (Cloud)’ in your blog Semi-automatic custom code adaptation for SAP BTP ABAP Environment.

 

Question related to “Check for Allowed Object Types in ABAP for Cloud Development”

Like above question, where can I find mapping between unsupported object types and their substitutes.

Thanks a lot.

 

BR,
Sarthak Gupta
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
Hi Sarthak,

there are the lists of supported ABAP language statements and supported object types and released APIs in the ABAP Platform for cloud development in the documentation: https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrestricted_abap_elemen... and https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_apis.htm

It is not possible to provide tables with mapping, because in many cases the "substitutes" would mean to develop in other way, for example there is no replacement for transactions or reports, or instead of Dynpros the SAP Fiori UI must be used. If your objective is to develop cloud-ready in the S/4HANA 2021 system, I would recommend to check your code on regular base using Cloudification Repository and Custom Code Migration app. See also the blog https://blogs.sap.com/2023/03/19/how-to-check-your-custom-code-for-abap-cloud/

Kind Regards,

Olga.
cordialsarthak
Explorer
0 Kudos

Hello olga.dolinskaja ,

Greeting!
Sorry I could not find the list of un/supported objected types. The first link for language elements seems to be for ABAP statements (code) and the second link is for released APIs.

Regarding table, I am looking for a high-level one only. For example, Dynpro => Fiori. As we are doing Greenfield implementation, we strictly want to avoid new development of objects which are unsupported in Cloud. But if we activate these checks in our development system, immediate question from the team will be on SAP’s recommendation for that unsupported object. As the functionality has to be delivered, simply deleting the object won’t help.

Questions such as following may arise:

  1. Why a View (VIEW) / View Cluster (VCLS) is not allowed and using which allowed object type can I achieve a similar functionality?
  2. Why statements like CALL FUNCTION STARTING NEW TASK or CALL FUNCTION IN BACKGROUND TASK are not allowed and how should we re-design it?

 

What is the point of early diagnosing if one does not know how to fix it? Hence I think these checks in S/4HANA OP system will be more beneficial if SAP provides some recommendation, either in individual ATC result or a consolidated resource (Webpage, PDF, etc.).

 

Thanks and regards,
Sarthak Gupta

OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sarthak,

sorry for providing you the incomplete information. Here is the list of supported object types: https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/released-abap-object-types. The list of supported object types is also in the guide (on page 46) ABAP Cloud - Technical Use Cases and Recommended Technologies. I also recommend using this guide as a reference for your new developments with ABAP Cloud. The successor information (as far as it is available) is provided in the ATC check results and in the check results of the Custom Code Migration app using Cloudification Repository (see the blogs). Therefore in most cases you get information about how to fix the code for compatibility with ABAP Cloud.

Kind Regards,

Olga.

cordialsarthak
Explorer
0 Kudos
Dear olga.dolinskaja ,

In the screenshot of ATC check variant ‘ZATC_CUSTOMER_VARIANT’, I can see additional ATC checks (For example: checks for KTD, ABAP RESTful Programming Model, etc.) when compared to an S/4HANA 2021 OP system. If they are available in higher/cloud version, is there any way to down port these to S/4HANA 2021 OP system like we have SAP note 3284711 to down port 'Cloudification repository' check to S/4HANA OP systems.

Thanks and regards,
Sarthak Gupta
OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Sarthak,

these checks should be available in S/4HANA 2021. If you looked for them in SAP GUI, then please look in the ABAP development tools for Eclipse. The checks, which were created using ABAP development tools for Eclipse editor (like these checks) cannot be displayed in SAP GUI.

Kind Regards,

Olga.

AnuragSri
Explorer
0 Kudos

Hi Olga,

Thanks for the blog!

Could you please let me know which ATC Variant and how can we execute that for development done directly in BTP ABAP Environment to make sure we are compatible for Clean Core. We have few RAP developments where we have created Behavior implementations in which we are calling some unreleased BAPI's from on-prem system through Cloud destinations but the ATC variant - ABAP_CLOUD_DEVELOPMENT_DEFAULT but its not giving error saying Usage of unreleased BAPI.

Thanks,

Anurag

OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @AnuragSri ,

this blog is dedicated to the ABAP Cloud developments in S/4HANA Private Cloud Edition and S/4HANA on-premise. The relevant blog for ATC setup in SAP BTP ABAP Environment is Usage of ABAP Test Cockpit (ATC) for developments in SAP BTP ABAP Environment. The error message is valid, you can use only released objects in SAP BTP ABAP Environment. If you want to consume the unreleased BAPI from the on-premise system in SAP BTP ABAP Environment you need to wrap it using Tier 2 development guidelines in on-premise system, release the wrapper for ABAP Cloud development and finally consume this wrapper in SAP BTP ABAP Environment.

Kind Regards,
Olga.

crayabharam
Explorer
0 Kudos

Hi Olga,

We are in S/4 Hana 2022 system wherein we are trying to create a new ATC variant using ADT as described in the blog. The intention is to check Cloud readiness for the objects for our objects. When we try to create and activate the variant we are getting the error "The implementing class CL_CI_TEST_EXTENDED_CHECK_SEC is marked as internal". Can you please help us with this error. 

OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @crayabharam ,

will be happy to help you.Could you please drop me an email with screenshots and step-by-step description when it happens?

Thanks & Regards,
Olga.