cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a controller in a javascript

Former Member
0 Kudos

Hi,

I 've lot of doubts listing all of them down.

My requirement is

I need to create a master screen for Po and populate some data in dropdownlistbox with database table values and need to validate form and then save in database using MVC.

I was able to create a BSP and populate it using a model and do validations using javascript .

Now i need to save it in the databas.

I will be calling the same controller as i used initially

to call the BSP

1.How do i call a controller from my BSP in a javascript?

I tried by <bsp call url> but it doesnt seem to work.

2.When does the do_handle_event get triggered

Is it when i write some events and submit the form.

3.What is this Model Data Binding concept?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member196065
Participant
0 Kudos

Hi Swathi,

As per your requirement, you need to submit the page or need to call the other controller.

After your javascript validation call this statement

htmlbSL(this,2,'save:ord1')

here save:ord1 is custom name which will appear in do_handle_event.

By calling this statement the current page will submit and the event can be handled in do_handled_event.

thanks

Uma

athavanraja
Active Contributor
0 Kudos

Hi Welcome to SDN.

1. check out this link for call options

http://help.sap.com/saphelp_erp2005/helpdata/en/8f/3d473ccf20514ee10000000a114084/frameset.htm

2. check out this link on process flow

http://help.sap.com/saphelp_erp2005/helpdata/en/22/d59045f4d1174099260b71d5317908/frameset.htm

3. check out the following weblog on Model Data Binding

/people/sergio.ferrari2/blog/2006/08/28/bsp-in-depth-model-data-binding

Regards

Raja