cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive Form for HCM Processes & Forms: Custom Event not firing ?

ChrisSolomon
Active Contributor
0 Kudos

ECC6

EP7

Adobe Reader: 8.1.2

I am currently developing several Adobe interactive forms as part of an HCM Processes and Forms process. I have started to try to utilize custom form events. Following the documentation, I defined a custom event on the backend...lets say "USER_EVENT_S1". I assigned it a field group of fields and gave it the operation for "check". On the form side, I defined a pushbutton and changed it's "mousedown" FormCalc code to:

//Set ISR_EVENT for BAdI processing in backend

$record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_S1"

I then activated the form and went to test it. When clicking the button tied to this event, it does absolutly nothing. I have external breakpoints set on the backend to my custom service that should fire for those fields that are part of the field group. The breakpoints trigger correctly as the form itself loads and hits the "initialize" and "F4 value help" methods. However, it is not doing anything when I press the assigned button to trigger my own user event.

Any help ?!?!? I see only one implementation from SAP in their standard content and their own user event is not even implemented in the form! (form scenario S_HRPA_DE_REHIRE_1). That's not very reassuring or helpful. haha

Accepted Solutions (1)

Accepted Solutions (1)

former_member365727
Active Contributor
0 Kudos

Hi,

Can you test the same button by keeping the default event like below :

//Set ISR_EVENT for BAdI processing in backend
$record.CONTROL_PARAM.ISR_EVENT = "*USER_EVENT_CHECK*"

If the break point is still not triggered with this then the code is not executed while BADI processing.

Regards

Srikanth KV.

Answers (1)

Answers (1)

ChrisSolomon
Active Contributor
0 Kudos

I figured it out this morning. It seems I was using the wrong (older?) button control.

The one that did NOT work had the following for the "click" event....


//Trigger call to backend for BAdI user command processing
app.eval("event.target.SAPSubmit();");

However, the one that DOES work has this:


//Trigger call to backend for BAdI user command processing
ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");

Both are called an "ISR_FormEventButton" however, I guess mine was from an older "library". Anyways...works great now! Back to development....

(points to the reply for trying to help at least! Thanks!)

former_member365727
Active Contributor
0 Kudos

Hi Chris,

For HCM forms we need to use specifc UI elements from SAP.

Download the UI elements from SAP notes - 973170 & 947633.

Always use HRAdmin UI controls, if the UI element is not available in this library then go for ISR Native(ZCI).

HRAdmin UI controls are having some special script which will come in handy if you are on EhP2.

Regards

Srikanth KV

ChrisSolomon
Active Contributor
0 Kudos

Thanks....yes, I had those (hence finding the button that did work!)...but for the others, it was older version from the library. Fixed now and works soooooo nicely!