cancel
Showing results for 
Search instead for 
Did you mean: 

Event Scription causes 500 internal error

Former Member
0 Kudos

All PCR's that have an exit event scripted including the standard

delivered PCR's (for example Change PErsonnel Area and Subarea). There

is an exit event scripted in an Adobe PCR form with the following code

(as exists in the standard PCR forms).

<event activity="exit">

<script contentType="application/x-javascript">// If the

display value is used in the data DOM,

// re-assign the corresponding data value

if (this.rawValue != "" ) {

if (this.boundItem(this.rawValue) != "") {

this.rawValue = this.boundItem(this.rawValue);

}

}

// START OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE

xfa.record.CONTROL_PARAM.ISR_EVENT.value = "CHECK";

app.eval("event.target.SAPSubmit(false);");

// END OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE

</script>

</event>

When a user clicks the "To Review Form" button on the Web Dynpro while

this field with the code has the screen focus an Internal 500 error is

generated.

Log Message:

From the log file we can see the error message on the J2EE engine:

Caused by:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: <b>Cant add

more than one action event.</b>at

com.sap.tc.webdynpro.services.event.EventQueue.addActionEvent

(EventQueue.java:124)

at

com.sap.tc.webdynpro.services.event.EventQueue.addEvent

(EventQueue.java:47)

at

com.sap.tc.webdynpro.clientimpl.html.uielements.adaptbase.AbstractAdapter.fireAction(AbstractAdapter.java:319)

at

com.sap.tc.webdynpro.clientimpl.html.uielements.uradapter.InteractiveFormAdapter.doFireEvent(InteractiveFormAdapter.java:156)

at

com.sap.tc.webdynpro.clientimpl.html.uielib.activecomp.uradapter.AbstractActiveComponentAdapter.onACFFIREEVENT

(AbstractActiveComponentAdapter.java:552)

... 27 more

I have opened a OSS note on this issue. SAP has responded with the solution of placing a new button on the screen to create a round trip back to SAP and to take the script off.

Thanks;

Pat

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Add a setFocus command <u>before</u> the event is called.

<b>xfa.host.setFocus("SOME_OTHER_FIELD_NAME");</b>

xfa.record.CONTROL_PARAM.ISR_EVENT.value = "CHECK";

app.eval("event.target.SAPSubmit(false);");

Former Member
0 Kudos

Amit;

Could you please explain how you -

"So instead of clicking directly on "Review form" button, first we remove the focus from the field and then click on the "Review form" button. "

Did you physically click on another area of the screen before you hit the Review form button?

Thanks

Former Member
0 Kudos

yes, we clicked on different area of the screen.

Regards,

Amit

Former Member
0 Kudos

Hi Pat,

We are also facing the same issue so please let me know if your problem has been resolved. Waiting for your reply.

Regards,

Ali

Former Member
0 Kudos

Hi Pat,

We were also facing the same problem in our project.

In our case, we have assigned an event to the field, if the screen focus is on field and we click on the "Review form" button, we were getting this error. So instead of clicking directly on "Review form" button, first we remove the focus from the field and then click on the "Review form" button.

Regards,

Amit

Message was edited by:

Amit

Message was edited by:

Amit