cancel
Showing results for 
Search instead for 
Did you mean: 

BSP Routes to controller actions

Former Member
0 Kudos

Hello,

I'm pretty new to the BSP technology and in an attempt to create an MVC application (BSP application with controller), I was wondering if it was possible to have the routes respond to specific actions of a controller like in Ruby on Rails?

For example, if my controller's named task_controller, I'd like to have the task_controller/create route mapped to the create method of my controller.

Thanks,

Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Paul,

I did not understand your question as I don't know Ruby on Rails. But you can go through the below link to know about how to create MVC based BSPs.

[Model View Controller Tutorial|http://help.sap.com/saphelp_47x200/helpdata/en/1d/20693c4b1c6646e10000000a11402f/content.htm]

It's a quite old link but still works

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

Thanks for the link but I've been through many sap documentation about BSP MVC without really finding a solution to my problem.

To be honnest I think this would not really be part of the BSP layer but more the ICF layer but still...

FYI "The Rails router recognizes URLs and dispatches them to a controlleru2019s action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views."

Thanks,

Paul

Former Member
0 Kudos

Hi Paul,

From your explanation about Rails, I think of one thing RESTful Web services in abap, where you can write a Handler class and in which you can analyse the URLs and do the necessary action.

Build a bsp page which actually consumes the web service you created.

You can find the info on RESTful web services in the following links

[Real Web Services with REST and ICF|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ea8db790-0201-0010-af98-de15b6c1ee1a?quicklink=index&overridelayout=true]

Or you can directly access SAP from Ruby

[PHP and Ruby Blag's Examples|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6316] [original link is broken] [original link is broken] [original link is broken];

Regards,

Ravi