cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP programming model for Fiori with legacy apis

Mattias
Active Participant

Hi,

I've completed some tutorials on ABAP programming model for Fiori and made a crud application with CDS view and BOPF inspired by the examples at help.sap.com

However since I'm still on Netweaver 7.5 and not S/4, like most customers, I still need to relate to legacy apis to crud my objects.

I'm trying to create a Fiori app to work with BusinessPartners (CRM), reading is fine, but how do I use the legacy APIs for my crud operations? Do I need to create a Gateway-service referencing my CDS to be able to implement custom crud-logic, or can I somehow extend the examples I've done already?

Regards

Mattias

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor

Hi Mattias,

Even in standard S4 hana apps that's I've checked, they all do it by referencing the CDS view to the odata service manually..

If your CDs is linked to a bopf, the crud operations will still trigger the bopf methods..

**From my observations**

ABAP programming model for fiori for transactional apps, works best with draft enabled solution. For non draft, it doesn't support that many functions.

BR, Mahesh

pokrakam
Active Contributor
0 Kudos

Curious, what functions don't work without draft? (Other than draft, obviously)

maheshpalavalli
Active Contributor

Hi Mike Pokraka,

Like, if you are creating a new record which is having parent and child tables.. in the object page, you can only enter the parent data, after saving the parent data only, you can create the child data. Same goes in edit mode, you cannot edit parent and child at the same time.

And this is a major setback atleast for me. So non draft is a not a full fledged solution by sap.. (I can understand the limitations are there due to many reasons and one of them is due to the UI5 odata model). But yeah it is a half backed compared to draft supported app..

Many others:

Field control at the time of data entry

Validations at the time of data entry

Context depended search helps at the time of data entry and many more.

And the worst thing I couldn't find it in the abap programming model for fiori documentation (I hope I didn't miss it 😛 )

After frustrated with the first point where I was not able to create/edit child and parent in one page, I had to debug the standard ui5 code to understand that the sap is not supporting it.

My bad luck, I found the documentation at a different place later after some days, if found earlier it could have saved my day 😄

https://ui5.sap.com/#/topic/a90c55840b144f2ebc2d836adbc1a54f

Thanks for asking and I am also planning to write a blog on this draft vs non draft, it might give an idea to others.

Best Regards,

Mahesh

Answers (2)

Answers (2)

pokrakam
Active Contributor

Hi Mahesh,

(posting as answer because this <censored> platform doesn't allow me to respond to your comment!)

Thanks for taking the time to detail your findings. I was curious, because I have not had any issues with BOPF "not supporting many functions". But from your explanations, I would conclude this is an issue in the Fiori or Gateway side, because all of the functions you describe work perfectly fine when handling BOPF programatically. Also, BOPF has been around for years, but draft mode has only very recently been added to BOPF.

The documentation you're after is here - (7.52 - just type the title into whatever version you're running, SAP's search actually works for this).

Regards,

Mike

maheshpalavalli
Active Contributor

Haha 😄 Actually, you need to comment directly on the answer itself. Not sure why they removed the reply to comment feature.

Yeah, I already knew that documentation, what I meant is that they showed the list report app using the non draft in that documentation but never written what is possible and what is not.

You are right that BOPF wont change much for draft or non draft, the issues are with the generated app, which cannot utilize the features of the so called "ABAP programming model for fiori" to the fullest.

But anyways, with draft the life will be more easier and there is no point of going to Non draft.

BR,

Mahesh

Mattias
Active Participant
0 Kudos

Hi,

Great to know, I don't have access to S/4 so I haven't been able to check the standard solutions, but then I'll focus on references instead.

Regards

Mattias