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: 
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
The content of this blog post has been deleted and I am referring to the readme document on GitHub.

Originally it contained steps that were needed in SAP S/4HANA 2020 systems.

I have however removed support for this platform since the downport to this version was to cumbersome for me.

How to use the RAP Generator (how to on github)

The basic difference on premise is the installation part, since on premise you have to use the report ZABAPGIT to upload the source to your SAP S/4HANA system.

 

 
30 Comments
SyambabuAllu
Contributor
0 Kudos
Hi Andre,

Thanks for sharing.

Thank you,

Syam
taranam
Contributor
0 Kudos
Thanks Andre for sharing
kuniharu_suzuki
Explorer
0 Kudos
Hi Andre,

Thank you for sharing.

An error occurred on line 166 of /DMO/CL_RAP_GENERATOR due to the lack of the method TRAVERSE.

The environment is S / 4 2020 (SAP_BASIS 755 SP000).
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Suzuki,

sorry, but you are right. You have to have at least FSP1 of SAP S/4HANA 2020 installed.

This is because the traverse method has not yet been delivered with SAP S/4HANA 2020 FSP00.

Kind regards,

Andre
kuniharu_suzuki
Explorer
0 Kudos
Hi Andre,

thank you for your answer.

I understand that it is an environmental problem.
mac24nz
Explorer
Hello,

I'm really excited to try what you've ported.

I created  package $ZRAP_GENERATOR and set the language version to ABAP for Cloud Development. I've tried to install it via ABAP Git - but when I want to import the repository I'm getting the following error.

"Namespace /DMO/ does not exist. Create it in transaction SE03". How can I import Code in this namespace?



Thanks in advance


Martin
mac24nz
Explorer

So I tried reading the sap and abapGit documentation...always a good place to start.

Between the two documentations I was able to create the namespace /DMO/ but it still wasn't modifable.

To make the namespace modifiable, I used SE03, set system change option. Again more documentation.

Next problem - importing name space development, can't be done from a $package - so I need to replace $ZRAP_GENERATOR with ZRAP_GENERATOR. Done.

Unfortunately I still can't import the code. I'm getting errors like these. Can anyone give me a hint?

Object CLAS /DMO/CL_RAP_GENERATOR cannot be assigned to package ZRAP_GENERATOR Import of object /DMO/CL_RAP_GENERATOR failed

Just a final thought - would it be possible to refactor these classes from /DMO/ to Z classes? That would make installation much simpler. I have in mind there might be some open source tools that can help here - although I can't name the project right now. I see that ABAP Git distributes its internal Z-Classes and interfaces as local classes/interfaces via abapMerge. Perhaps that could be a solution? Internally use /DMO/ classes and distribute as local classes?

shais
Participant
Hi,

I guess you should first create a package with /DMO/ namespace (e.g. /DMO/RAP_GENERATOR) and assign the class to it.
mac24nz
Explorer

Hi,

 

creating a package /DMO/RAP_GENERATOR did allow ABAPGit to import the project.

I used the language version standard for this package.

However there seem to be some restrictions on the usage of these classes outside of /DMO/.

I get error messages like: Use of Class /DMO/CL_RAP_XCO_ON_PREM_LIB is not permitted.

My current work around is the create the generator class zcl_test_rap_gen_002 in the /DMO/ package as /dmo/zcl_test_rap_gen_002 (okay - the z isn't really required anymore). Great so...the program activates!

However the /dmo/cl_rap_gererator has syntax errors. In ABAP Git I changed the branch from master (head) to On-Premise-2020, and the syntax errors went away!

Finally I'm able to generate RAP objects. Awesome.

I was hoping to generate the RAP objects from the SAP Fiori Elements course - but there seem to be too many missing features in onPrem / and the class /dmo/cl_fe_travel_generator is much more complicated (many associations to other cds views, etc) than the sample here.

I managed to complete the manual steps 1-3 - but when I try to create the service binding from the service definition it gives the me the errror "Usage fo ZRAP_INVENTORY_AF00 not permitted". This error message when away when I change the package back to a ABAP standard package

mintert
Explorer
0 Kudos

andre.fischer will you update the OnPrem-Branch for S/4HANA 2021, so that we're able to use the Business Configuration Registration and the transportrequest-attribute ?

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
Yes, that is planned.

I even have created a SAP Fiori UI 😉

 
mintert
Explorer
0 Kudos

Great news, andre.fischer !

can you share a timeline with us? I can not wait to give it a try!

Is there a chance to test it (beta version)?

LuisBecker1
Explorer
0 Kudos
Hi andre.fischer

" In principle it would also be possible to generate code in the language version Standard. But this would require to change the code of the RAP Generator class. But I did not want to make it to easy to leave the path of future proof cloud compatible development"

This SAP obsession with cloud-based and reinventing the wheel all the time drives me crazy. Tried the RAP Generator, but with the cloud restriction can't use data elements. Without data elements we loose so many good features like automated search helps with UI5 Smartfields.

Honestly, is SAP ever going to delete or rename BUKRS  or LIFNR? Of course not. So let people use it and make developers life easier. Otherwise they'll stick to old technologies like Table Maintenance Generator...
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Luis,

sorry that was meant as a (bad) joke.

The new version of my generator simply takes the language version of the package that you provide.

So it will generate code in abap language version "standard" if you want.

We will not rename BUKRS or LIFNR.

In SAP S/4HANA we have started to provide released API's for the various scenarios with released data elements.

Kind regards,

Andre

 
shavneet1
Participant
0 Kudos
Hello Andre ,

I have already posted my query at other places , but since this is a urgency to me, for some demo purposes , so i am posting i here  again for a faster reply.

In our sandbox S/4 hana on premise System , Generate RAP objects is coming as disabled.

My ADT version is
Version: 2022-06 (4.24.0)
Build id: 20220609-1112

So i assume it is the latest.

Any feedback, how to fix this ?

 

Our system release is :

S4HANA ON PREMISE 2021 01 (02/2022) FP sap.com SAP S/4HANA 2021

 

So its not a cloud but Onpremise release.

Does RAP generation objects through wizards does not works on onpremise system ?

 

Regards ,

Shavneet Singh
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
Hi Shavneet,

You wrote "I have already posted my query at other places". Here I only found two comments to an already answered question that you posted today.

The likelyhood that somebody monitors comments to already answered questions is not that big.

If you seek for faster answers I would suggest to publish your request as a separate answer next time.

Nevertheless the answer for your question is (unfortunately) simply, namely that the ADT based generator (which is part of SAP standard delievery) is not supported for SAP S/4HANA 2021.

This blog post refers to my open source project "The RAP Generator" which has a branch for 2021.

SAP-samples/cloud-abap-rap at on-premise-2021 (github.com)

Kind regards,

Andre

 
shavneet1
Participant
0 Kudos
Thanks Andre ,

Thanks for the prompt reply.

Surely i will make sure its a new request from next time.

so ADT based generator is not supported for SAP S/4HANA 2021, So for which on premise release it is supported as of today  or it has to used as explained in this blog above ?

 

Thanks and Regards ,

Shavneet Singh

 
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
It is planned to have a support for the ADT based generator as of SAP S/4HANA 2022. So this means later this year only.

If you want to generate RAP objects in an SAP S/4HANA 2021 release you will have to use my open source based generator.

Kind regards,

Andre

 
shavneet1
Participant
0 Kudos
Thank You so much

 

Regards ,

Shavneet Singh
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
I just updated my blog post because this blog post did not yet referred to the new SAP Fiori Elements UI of my openSource RAP Generator.

Hope it works for you.

If not, post a question in the community.
shavneet1
Participant
0 Kudos
Hello Andre ,

Would you please help me with the Step 3 (Create an offline repository or an online repository with the package and with the URL of the RAP Generator repo )

What URL we mean here  for both

  • SAP S/4HANA 2020 and

  • SAP S/4HANA 2021


Links given under download and installation section , does not seems to work.

And for on premise systems you have to use the appropriate branch on-premise-2020 https://github.com/SAP-samples/cloud-abap-rap/tree/On-Premise-2020 or on-premise-2021 https://github.com/SAP-samples/cloud-abap-rap/tree/On-Premise-2020

 

Thanks and Best Regards ,

Shavneet Singh
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
shavneet1
Participant
0 Kudos
Thank You Andre,

Still while creating a online repo , it throws an error resource not found check url.


I know its getting extended , everything worked smoothly while i was in trial account. Still Everything is working fine in our development system. Its just that generator makes the life simpler , when we actually start developing the real apps.

Thanks and Regards ,

Shavneet Singh

Generator Error

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
You can enter the root URL

https://github.com/SAP-samples/cloud-abap-rap/

and then use the F4 help to select the correct branch.
shavneet1
Participant
0 Kudos
Thank You,

Works like a charm !!

 

Cant wait for ADT generator for on premise releases, later this year

 

Thanks again ,

Regards ,

Shavneet
shavneet1
Participant
0 Kudos
Hello Andre ,

Whenever I am trying to create RAP object with data source as Table , it gives me the error, table does not contains key field , even though it contains it.

I had tried it using

Customer table and airport table.

This is my Airport table code :

@EndUserText.label : 'Flight Reference Scenario: Airport'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table zairport {
key client : abap.clnt not null;
key airport_id : /dmo/airport_id not null;
name : /dmo/airport_name;
city : /dmo/city;
country : land1;
local_created_by : abp_creation_user;
local_created_at : abp_creation_tstmpl;
local_last_changed_by : abp_locinst_lastchange_user;
local_last_changed_at : abp_locinst_lastchange_tstmpl;
last_changed_at : abp_lastchange_tstmpl;

}


 

What am I missing here ?

 

Thanks and Regards ,

Shavneet Singh

Key field Error

shavneet1
Participant
0 Kudos
Hello Andre ,

Got the answer for my last query  , so table must contain a UUID field  , which was missing.

Thanks ,

Shavneet Singh
Micha_Reisner
Explorer
0 Kudos
Hello Andre

I am confused. In the requirement section of the GIT project SAP S/4 Hana 2020 is not mentioned, only 2021 and 2022. But here you state "You have to have at least FSP1 of SAP S/4HANA 2020 installed."  Since this blog is already from 2021, I'm afraid that 2020 is no longer supported.
Or is it?

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
Good catch!

You are right. I had to stop the support for 2020 since it required a lot of additional work for me that I was not able to handle.

What might be an option for you is if you have a test system at hand with a newer SAP S/4 HANA version. There you could run the generater and transport the generated source code to an SAP S/4HANA 2020 system.
Vivek1982
Explorer
0 Kudos

Hi Andre,

I am using SAP S/4HANA 2023 Onprem system and created a DB table in ABAP on cloud SW version package . I am trying to create RAP objects using RAP generator by right clicking on DB table and selecting Generate ABAP repository objects options but its giving me an error - SAP object DDLS R_AONLINESHOP_VIC cannot be assigned to package ZXXX_CLOUD(package created with SW language version as ABAP on Cloud) .

Could you please help??

 

Thanks,

Vivek