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: 
AlexanderRother
Product and Topic Expert
Product and Topic Expert
6,508

In May 2023 we released the last major update regarding ABAP Cloud and SAP S/4HANA Extensibility. One important part of these updates are the Cloud API Enablement guidelines. Meanwhile we also have a tutorial for Cloud API Enablement. 

In this blog post I will summarize frequently asked questions regarding the Cloud API Enablement guidelines that we received in the last months. I will update this post over time to reflect incoming Q&A. 

Questions



 

 

 

 

 

 

 

 

 

 

 

 

 



Answers


How can I enable existing SM30 customizing in Tier 1 coding?

Create a CDS view wrapper on top of the customizing table. General guidance regarding the development of business configurations in the context of ABAP Cloud is provided in the Extensibility Guide in chapter 4.6.

Can I enable DDIC search helps for the usage in ABAP Cloud?

DDIC search helps are not and will not be part of ABAP Cloud. DDIC search helps are tightly integrated into Dynpro programming and SAP Gui UIs. With the change towards CDS, RAP and Fiori in ABAP Cloud these search helps cannot be used out of the box anymore. Instead, DDIC search helps shall be replaced by CDS based search helps. If a coding-based search help shall be reused, the coding needs to be encapsulated and can be wrapped. Summary:

    • Table/View based DDIC search help: wrap the table with a CDS view, build the search help CDS view in tier 1 based on the wrapper CDS.

 

    • code-based search help: wrap the function module executing the search help by a wrapper class, build a custom entity as search help in tier 1.



Can I use tier 2 also to mitigate missing remote APIs?

Tier 2 is suited for local API enablement. Custom remote APIs shall be developed in tier 1 using ABAP Cloud. In case a local SAP API is missing for your implementation, you can mitigate this using tier 2.

I get error TR461 ("Package must be assigned to the software component HOME") when trying to create Z-packages in a software component for tier 2. What’s wrong?

Caused by a bug, solution in SAP Note 3319469

What shall I do if a released CDS view does not contain all fields that I need?

General guidance is given in the blog post Custom Fields in S/4HANA: Key User versus Developer Extensibility. If the field is required in existing SAP applications and processes, use key-user extensibility. If the field is required in developer extensions (custom apps, services, etc.):

    • If the CDS view is enabled for extensibility (C0 release): Create an extension in tier 1.

 

    • If it is not enabled for extensibility: Create a wrapper CDS view in tier 2 over the required table. Create a custom CDS view in tier 1 that joins the released view with the wrapper view to combine fields of both views.

Please also have a look at this tutorial: Extend Released Data Sources... 



Can I wrap a conversion exit to be used in ABAP Cloud?

No. In ABAP Cloud only ALPHA and ISOLA can be used. Conversion exits are problematic in general, more information is provided here.

Can I use a BAPI wrapper also for a new Fiori UI?

BAPIs with validation/simulation flavor can be used in Fiori UIs and Web APIs. The validate flavor shall be executed in the validation phase of the RAP BO, the productive flavor in the save. BAPIs without a validation/simulation flavor are not recommended to be used in Fiori UIs. Reason: The authorization checks and validations are only executed in the late save phase, where there is no possibility anymore for a controlled rollback to the UI. More information is given here.

Are wrappers in tier 2 considered Clean Core?

On-Stack extensions developed in tier 1 using ABAP Cloud follow Clean Core principles. Wrappers developed in tier 2 help you to do your development in tier 1 by leveraging existing classic APIs. Tier 2 is not an alternative development layer. Details of when a wrapper in tier 2 itself is considered Clean Core are currently under investigation. More information will be provided soon.

Can I combine several BAPIs (Create, Update, Delete) for the same business object in one wrapper?

Technically it is possible to combine multiple classic APIs within one wrapper. The challenge you face when combining multiple classic APIs in one wrapper is that if a released API is provided for only one of the classic APIs, you will not be able to retire the wrapper, since it still makes use of other classic APIs. Moreover, there is the danger to mix up different functionalities in your wrapper leading to loss of clarity. Hence, combining classic APIs in wrappers is not recommended in general and should be done with caution. For the special case of multiple BAPIs for different operations on the same business object (like create, update, delete), however, it is acceptable to combine them in a single wrapper to save multiple declarations of types and to reduce the pure number of wrapper objects.

Can I wrap non-released BAdIs in tier 2?

No, nothing to be done in tier 2 for BAdIs. Released BAdIs are implemented in tier 1 using ABAP Cloud, non-released BAdIs are implemented in tier 3 using classic ABAP.

Shall I wrap dictionary artefacts in tier 2?

No. For usage in ABAP Code use local type declarations in wrapper interfaces and classes to decouple from dictionary artefacts. For usage in custom dictionary artefacts in tier 1, use the released SAP artefacts or create own ones.

An SAP data element that I need for my development in ABAP Cloud is not released. What shall I do?

Guidelines regarding data elements are documented in SAP Note 3365744.

I declared a local type in my wrapper interface based on an SAP structure. When accessing components of this type in my ABAP Cloud code, I receive a syntax warning that the usage of this element is not permitted. What's wrong?

The warning is a false-positive. More information and correction in SAP Note 3362119.

When releasing my wrapper class I get the warning "Instance creation of class XYZ should be private". Why?

With this warning we want to enforce Clean ABAP development guidelines for instance creation of your wrapper classes/interfaces via factory methods or factory classes.

7 Comments
Srdjan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you Alexander for this detailed and very helpful summary. 

Is there an update regarding "when a wrapper in tier 2 itself is considered Clean Core", or which channel to check for upcoming update? 

fgfgfg3r43456534
Explorer
0 Kudos

Hi @AlexanderRother thanks for your sharings,


We have a scenario where we need to update supplier withholding taxes, but the Business Partner BO interface does not offer the functionality yet (on premise), so we've considered creating a wrapper for the classic BAPI. But on the other hand we've noticed that API_BUSINESS_PARTNER can perform the tax update as well, so consuming it internally would work too. Is the approach of consuming internally a standard API valid for Tier 1 scenarios or we should always prioritize RAP BO interfaces / BAPI wrappers?

Thanks

OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @fgfgfg3r43456534 ,

for ABAP Cloud ready tier 1 developments you must always used released APIs, if you use standard API, which is not released, then your code will not be tier 1 compliant. Therefore the clear recommendation is to wrap unreleased BAPI in tier 2 instead of using standard unreleased API.

We recommend using wrapper generator instead of developing it manually: https://community.sap.com/t5/technology-blogs-by-sap/how-to-generate-a-wrapper-for-function-modules-... 

Kind Regards,
Olga.

cesar_gr
Participant
0 Kudos



Hi @OlgaDolinskaja 

I have a requierement where i need to create a clearring journal entry . I tried to use an internal API i_journalentrytp , but I can't use this because i need to create a custom RAP application, but the BO documentation says that the clearing functionality is only available in S/4HANA Public edition. I am developing on an Abap Cloud embedded with S/4HANA Cloud private edition 2023 SP01. 

In the Clean Core context, what is the recomendation for developing this application?
the JournalEntryBulkClearingRequest_In webservice seems be usefull but this needs to create an external connection because it is a remote api and not local API.

is there a way to consume the webservice API locally or is it better to create a wrapper class at Tier-2 to meet the requirement?

Best Regards



peter_peng
Product and Topic Expert
Product and Topic Expert
0 Kudos

@cesar_gr 

I searched in API Hub and found i_journalentrytp is available in Private edition, too.

SAP Business Accelerator Hub

cesar_gr
Participant
0 Kudos

Hi @peter_peng  

yes, the i_journalentrytp is available in Private edition too, but "the BO documentation says that the clearing functionality is only available in S/4HANA Public edition" . so, in clean core context, what is the api recomended for developing on an Abap Cloud embedded with S/4HANA Cloud private edition 2023 SP01 ?. seems there is no sense to expose a webservice (remote API) to consume for the same abap embeded.

Regards!

OlgaDolinskaja
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @cesar_gr ,

in the S/4HANA Public Cloud Edition the BO documentation is the same:

https://api.sap.com/bointerface/I_JOURNALENTRYTP 

OlgaDolinskaja_0-1729326183582.png

This sounds strange. I would propose to open a ticket to the corresponding SAP application component to clarify what is possible and how to proceed.

Kind Regards,
Olga.