cancel
Showing results for 
Search instead for 
Did you mean: 

Eventing - No Button Click

Former Member
0 Kudos

My EPCM eventing code does not work completely. I have been able to get an event handler to populate an SAP InputField but I cannot get the event handler to execute a click() on a SAP Button in the same iView. I'm using the following code:

EPCM.subscribeEvent("urn:PPM.SAPIntegration.Events", "GetSapEquipment", GetSapEquipment);
function GetSapEquipment(eventObj)
{
	var equipDesc = eventObj.dataObject;
	<%= Form.ID + "." + txtDescription.ClientID %>.value = equipDesc;
	<%= Form.ID + "." + btnGetEquipment.ClientID %>.click();
}

The button works if it is pressed manually. It calls my .NET function btnGetEquipment_Action. I see examples of this type of event handlers so I am confused why my code does not work.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

instead of

<%= Form.ID + "." + btnGetEquipment.ClientID %>.click();

you should call

<%= btnGetEquipment.ClientID %>.click();

Former Member
0 Kudos

This did not work either. Why would removing the Form.ID make this work? Just wondering. I've

added an alert() call before and after the click

and I'm getting both alert pop-ups but the click

action is not happening. Any other suggestions?

Thanks.

Former Member
0 Kudos

Hi,

Make sure both iViews are isolated (i.e. Isolation mode is "URL" not "Embedded").

Regards,

Ofer

Former Member
0 Kudos

We had the same problem, and we solved changing the Button control type from <sap:button.../> to <input type=button name=btnSubmit...> and then using the next code in the javascript:

<%=btnSubmit1.ClientID %>.click();

Former Member
0 Kudos

HI,

I just ran a small sample that works according to the howto in the PDK.NET documentation.

Just make sure you are using URL as isolation level for both iViews

Former Member
0 Kudos

I also ran the PDK example that uses a search field and button to make a google.com

search. That example works. In my case, I'm trying to execute my button code that resides

in my portal component on the server. Therefore my button has the runat=server

option. When the SAP button is pressed, the portal component should be called so

that this c# procedure gets executed:

private void btnGetEquipment_Action(object sender, SAP.Web.UI.Controls.AbstractButton.ActionEventArgs e)

Again I say that if I press the button manually, it works.

Former Member
0 Kudos

Changing the iView Isolation to URL worked! Thank you very much.

Answers (0)