cancel
Showing results for 
Search instead for 
Did you mean: 

Wave 1 apps extending OData with a Badi

Former Member
0 Kudos

Hello Experts,

     Recently, I got the standard My Spend app to work on a clients landscape. It works great. They are happy with the launchpad and the App. They just need one small change.

     My client is in the public sector and they track budget by storing it in a different table than the private sector would, COSP vs FMBDT.  They each hold a range of total budget values. For My Spend to work for this client the OData simply needs a different SQL statement.

     However this is one of the first 25 apps that were made before Service Builder. Lindsay Stanger wrote a great post about this issue here. http://scn.sap.com/community/mobile/blog/2013/11/08/were-the-fiori-apps-designed-to-be-extended-here... I tried using Service Builder. It didn't work.

Thanks to the link above, I understand that instead of using Service Builder, OData must be extended using a BAdi. While searching found this link Fiori apps Badi http://scn.sap.com/docs/DOC-48765 However, there are no enhancement Spots for the My Spend app listed in that post. Is there a guide to creating a Badi for OData?

There is a document that discusses BAdis and OData, “Adding custom fields to SAP Fiori apps in 3 steps. OData fields extensibility” When I tried applying those steps to se80 package P_SRA012 there wasn’t any header information and it wouldn’t let me Append Structure.

Any guidance would be appreciated,

Suess Shelton

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190010
Contributor

Hi Suess,

If you are interested on the BADIs available for the Fiori application "My Spend", I would recommend taking a look at the following link:

App Extensibility: My Spend - SAP Fiori principal apps 1.0 for SAP ERP - SAP Library

In the case there is no standard badi for that app that applies with the changes you desire to do, I think the only solution you have is to modify the standard odata service to include the SQL statement you need.

Best Regards,

Emanuel

Former Member
0 Kudos

Emanuel,

There isn't a standard BAdi for the My Spend app. How do you suggest I 'modify the standard odata service' to refine the SQL?

I've tried adding an enhancement point to the P_SRA012 package but it would only allow me to save it locally.

Please explain what you suggest.

Suess

former_member190010
Contributor
0 Kudos

Suess,

I recommend you to create an implicit Enhancement Point.

You can read about Explicit/Implicit Enhancement points in the following link:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9cd334f3-0a01-0010-d884-f56120039...

When you create an Implicit Enhancement point, you should be asked for a transport order like in the following post:

How To Do Implicit Enhancement - ABAP Development - SCN Wiki

SAP Implicit enhamcement points - ABAP

Could you please follow the steps above, and tell me if you were asked t ointroduce a transport order?

Best Regards,

Emanuel

Former Member
0 Kudos

Emanuel,

I didn't see anything about a transport order.

I tried following the instructions you provided but they didn't apply. I'm trying to add an enhancement point to package P_SRA012. When I try to create an implicit implementation I'm told "Changes to Repository or cross-client Customizing are not permitted."

How do I create a BAdi to adjust the OData?

Could someone please confirm that Service Builder absolutely cannot be used for Wave 1 My Spend? I thought SAP was supposed to be backward compatible.

former_member190010
Contributor
0 Kudos

Suess,

Are you able to open that class from se24 t-code?

Best Regards,

Emanuel

Former Member
0 Kudos

Emanuel,

Yes I can open CL_SRA012_SPENDINGDATA_API. in SE24.

Suess

Former Member
0 Kudos

I can open it in SE24 and SE80.

Suess

former_member190010
Contributor
0 Kudos

Did you try to make an implicit enhancement point though t-code se24?

What happened?

The same as in Service Builder?

Regards,

Emanuel

Former Member
0 Kudos

I created an implicit enhancement point and edited the SQL statement in the get_totals_from_db method in the OData package.

Trouble now is I get a error in the gateway:

RFC Error: User or password is incorrect for target system.

Looking into it now.

Suess

former_member190010
Contributor
0 Kudos

Great to hear that Suess.

How did you solve it?

Did you create the enhancement point in se24 t-code?

If that's the case, please mark the answer as correct so it can help other pepople that has the same problem as you.

Regarding the error you are getting: "User or password is incorrect for target system." I think is related with the password in the backend system.

In case you are using a central hub architecture for the SAP Netweaver gateway, you have to define the same user and password in the Backend/Gateway systems.

Anyway, this topic should be discussed in a new thread.

Regards,

Emanuel

Former Member
0 Kudos

Experts,

Could someone please confirm that Service Builder absolutely cannot be used for My Spend? I thought SAP was backward compatible.

Suess