Giter Site home page Giter Site logo

sap-samples / cloud-abap-rap Goto Github PK

View Code? Open in Web Editor NEW
211.0 34.0 59.0 3.83 MB

This repository contains several examples how to develop with the ABAP RESTful Application Programming Model (RAP) in SAP BTP, ABAP environment.

License: Apache License 2.0

sample sample-code abap abap-environment abap-restful rap odata sap-btp sap-btp-abap

cloud-abap-rap's Issues

Issues when using the option "customizing table"

  1. Changes in generated BDEF code needed

Since unmanaged save is used the BDEF need to use a central BIL.

So the generated code for the BIL has to be changed as follows:

managed implementation in class ZBP_R_Holiday_STP_01 unique;

When the project is generated one currently sees an error message in the BDEF

"Operations need to be implemented for the behavior definition, which means an implementation class needs to be specified."

  1. Behavior for using a customizing transport needs to be checked.

Hint:
In 2022 and SAP BTP ABAP Environment one can already use the new ADT based generator for customizing table UIs:

Create a SAP Fiori based Table Maintenance app with SAP BTP, ABAP Environment | Tutorials for SAP Developers.

Error following RAP generator installation, generator setup

Stuck on step 6. "Run the class zdmo_cl_rap_generator_setup. This class generates the following objects"

I get a message
image

Check the class texts - they appear missing
image

Tried re-pulling the repo a few times with no luck. Can you advise on the class texts I need for ZDMO_CL_RAP_GENERATOR_SETUP?

Error on importing objects on OnPrem 2020 FPS01

Hi @anfisc,
got following errors importing the objects from On-Premise-2020 branch with ababGit
System is S/4HANA On Premise 2020 FPS01:

Object Type not supported

image

Error on activating behavior definition

draft determine action Prepare
{
determination ( always ) createJSONString;
validation ( always ) check_json_string;
validation ( always ) mandatory_fields_check; }

image

Can i help you with more?

Unit Test run error

We receive unit Test errors from the ABAP UNIT RUNNER.

image

One of them is an exception from the xco lib

LTC_RAP_NODE GET_FIELDS_FROM_ABSTRACTENTITY Exception Error <CX_XCO_NEWS_EXCEPTION>

ENDTRY.

TRY.
    mo_cut->set_is_root_node(  ).
    mo_cut->set_implementation_type( zdmo_cl_rap_node=>implementation_type-unmanaged_semantic ).
    mo_cut->set_data_source_type( zdmo_cl_rap_node=>data_source_types-cds_view ).
    mo_cut->set_entity_name(  gc_root_entity_name ).
    mo_cut->set_object_id( CONV #( gc_abstract_entity_object_id ) ).
    mo_cut->set_field_name_etag_master( gc_abstract_entity_etag_master ).
    "ZDMO_agency
      **mo_cut->set_cds_view( CONV #( lv_view_name ) ).**
    mo_cut->get_fields( ).
    DATA(lt_fields) = mo_cut->lt_fields.
    "cl_abap_unit_assert=>fail( msg = 'Exception ZDMO_cx_rap_generator=>root_cause_exception not raised' ).
    cl_abap_unit_assert=>assert_not_initial(

METHOD if_xco_dtel_read_accessensure_existence.
IF if_xco_ad_read_access
exists( ) EQ abap_false.
RAISE EXCEPTION TYPE cx_xco_news_exception
MESSAGE e282(sxco) WITH ms_target-object_name.

ENDIF.

ro_me = me.

ENDMETHOD.

Message is:
Data element TRKORR does not exist for the provided read state and origin.
Test 'LTC_RAP_NODE->GET_FIELDS_FROM_ABSTRACTENTITY' in Main Program 'ZDMO_CL_RAP_NODE==============CP'

View in Question is
gc_abstract_entity_name TYPE string VALUE 'D_SELECTCUSTOMIZINGTRANSPTREQP ',

It seems that the data type TRKORR is not accessible through the library - maybe because feature toggle A4C_OLD_REPOSITORY_APIS has not status released

Kind regards,
Christian

zdmo_cl_rap_generator_setup code error in on-premise 2020

The code in CREATE_SERVICE_BINDING in zdmo_cl_rap_generator_setup on-premise 2020 is commented out.
So, if I uncomment and activate the code, an error occurs in the code below.
DATA(specification_srvb) = mo_srvb_put_operation->for-srvb->add_object( service_binding_name )->set_package( package_name_of_rap_generator )->create_form_specification( ).
Error Text
"FOR" is not a reference variable.

When I looked at TS_API among the variable definitions of IF_XCO_GEN_O_MASS_PUT, it was as follows.
BEGIN OF ts_api, bdef TYPE REF TO if_xco_gen_bdef_o_m_put_sctn, clas TYPE REF TO if_xco_gen_clas_o_m_put_sctn, ddls TYPE REF TO if_xco_gen_ddls_o_m_put_sctn, ddlx TYPE REF TO if_xco_gen_ddlx_o_m_put_sctn, doma TYPE REF TO if_xco_gen_doma_o_m_put_sctn, dtel TYPE REF TO if_xco_gen_dtel_o_m_put_sctn, intf TYPE REF TO if_xco_gen_intf_o_m_put_sctn, srvd TYPE REF TO if_xco_gen_srvd_o_m_put_sctn, tabl TYPE ts_tabl, ttyp TYPE REF TO if_xco_gen_ttyp_o_m_put_sctn, END OF ts_api.

zdmo_cl_rap_generator_setup doesn't exist

I pulled the project to SAP S/4HANA Cloud but after that I check the class zdmo_cl_rap_generator_setup doesn't exist in branch abap-enviroment.

How should I proceed?

2022 branch - Table is inactive

I'm trying to create a new project, in a package defined as "ABAP for Cloud Development" but it fails because it determines that the table is not active
image

The table is active, but XCO determines the table doesn't exist
image

This is because XCO is applying a filter to check if the table is released
image

2021 on Premise Class Name mismatch?

Hello,

This generator was of great help in BTP ABAP environment. I am trying to use this for a 2021 on premise and noticed that one of the filenames references a different class.

I could get it to work after changing the name. ZDMO_CL_RAP_GEN_ENV_ON_PREM ===> zdmo_cl_rap_xco_on_prem_lib

image

Also noticed that 2021 did not support keyword "transactional_interface" in Proj view ZDMO_I_RAPG_ProjectTP .

image

This is an FYI post because fixing these made it work.

Augmented Texts for Customizing Tables

Hello Andre,
I am using Your generator to generate customizing tables in Fiori successfully. Thanks for Your efforts. I saw more arrived in terms of functionality, and would like to put here another new feature request :). This is about the augmentation feature. My use case is simple, I would like to edit language dependent texts, like it is happenning in SM30 on the user logon language on top of a maintenance view (constructed from a basic and a text table assigned).

So we have code-text pairs, like in SM30, and the text can be edited on the user logon language, for example English

  • InPr - In Process
  • Fin - Finished

So when the user logs on in German to the system we want to maintain the texts in German and be saved it to the text table

  • InPr - In Prozess
  • Fin - Fertig

I assume the augmentation feature could become here handy, to solve this. Implementing all the time the same in the augment method in the behaviour definition is time consuming.
I would like to save that effort :).

What do You think, makes that sense ?

Thank you
Attila

Records are not getting saved in Custom TR.

I created the project with Customizing record button checked.
When i am trying to create the entry in the table, the select transport button is visible, it is even fetching all the custom TR but once i select a TR and create the record, then the record is not getting captured in that Custom TR. However the record is getting created in the database table but it is not recorded in the TR.

N.B.: Application is created on On-Prem 21

While trying to preview the generated Travel v4 odata service an error appears on the browser

After generating the RAP artifacts in the eclipse ABAP cloud project and publishing ODATA V4/V2 services when you click the preview for Travel v4 odata service, the Fiori app preview is supposed to load but actually, the following error appears on the browser:

Application could not be started due to technical issues.Prop. 'DISTANCE' has unit amount conver. and EDM type 'Int32' without decimals

More information and possible ideas on how to fix in the following thread:
https://answers.sap.com/questions/13750416/sap-abap-cloud-trial.html

Syntax errors in zdmo_cl_fe_travel_generator

The class zdmo_cl_fe_travel_generator contains several 'typo' errors in the name of the following attribute:
mo_draft_tabl_put_operation

In several places, it is written as:
mo_draft_tabl_put_opertion
(without the letter 'a' instead of operAtion)

The problem is in all of the 3 branches:
abap-environment
on-prem-2021
on-prem-2022

Got error in Managed Scenario with extensibility: no

Hello,

I have a issue in the managed scenario with extensibility set to no.

These are my Implementation details
image

Whenever I click on the create Button, this error pops up:
image

The Extensibility is set to "No". These are the details:
image

I filled every Field properly but still get this error.

Thanks in Regard.

Read me file: Link Correction

Hi Andre, thanks for your amazing rap generator. I noticed a little mistake. These links not work,

Not 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"

Correct:

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-2021

Property 'TimeStamp' has invalid value '20240427044960 '

Service Information

Service Namespace /SAP/
Service Name ZDMO_UI_RAPG_PROJECT_O2
Service Version 0001
Group ID
Service Repository
Destination

Error Context

–ERROR_CONTEXT
ERROR_INFO Property 'TimeStamp' has invalid value '20240427044960 '
–ERROR_RESOLUTION
SAP_NOTE See SAP Note 1797736 for error analysis
LINK_TO_SAP_NOTE https://service.sap.com/sap/support/notes/1797736
BATCH_SAP_NOTE See SAP Note 1869434 for details about working with $batch
LINK_TO_BATCH_SAP_NOTE https://service.sap.com/sap/support/notes/1869434

Fiori Preview Issue

Hi,

I haven't used the RAP generator for a while and it used to work fine.

I can still start the app via Fiori Preview and it shows me the existing projects, but i can no longer navigate to the Object Page of the projects. When I click on a record then nothing happens. I can't see any related errors in the console. I'm using chrome and I also tried a different browser. Any idea?
I have this issue on two different BTP ABAP Environments instances.

Thanks,

Nicolas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.