cancel
Showing results for 
Search instead for 
Did you mean: 

HCM forms - User Events

nikhilkup
Active Participant
0 Kudos

hi,

I have added a push button in the form. I have written $record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_CHECK", as i wanted to fill up some fields related to a position upon entering the same.

Wanted to know what else should be done, so that when the user enters the postion no and then clicks on this push button it should fill up the related fields.

Thanks,

Nikhil

Accepted Solutions (0)

Answers (3)

Answers (3)

nikhilkup
Active Participant
0 Kudos

i am not sure why any other event which i had defined is not working. then I used the standard user event 'USER_EVENT_CHECK' and it triggers the DO_OPERATONS method. so my issue was resolved.

ChrisSolomon
Active Contributor
0 Kudos

1. configure a User Event in the backend for your specific form scenario and make sure the name of the event matches the name of the event you are sending from your Adobe form (ie. USER_EVENT_CHECK in your case).

2. in the configuration of your event, you will be "grouping" fields together as "field groups" (this name does NOT have to match the field group(s) name used in your backend services).

3. EVERY backend service that uses the fields you selected for your field group will (most likely...depending on how you set it up....init or check) be called. ( and this is where you will be wanting your own custom backend generic service to "fire" most likely)

I have written several blogs and several posts on how user events are actually handled (and my disdain for them) so feel free to search for those....I won't go into it all again here. User Events for HCM P&F are like wrestling an alligator....they will just about kill you, but once you figure out how to get your arms around them, you can do about anything with them.

nikhilkup
Active Participant
0 Kudos

HI Chris,

I had seen your previous blogs nad had done exactly like that, but still it was not working.

In the form i had used 'USER_EVENT_CHECK'. Then in HRASR_DT under 'Other Attributes' i had created an operation 'USER_EVENT_CHECK' and created a new field group FG1. In this field group i assigned one field F1, the field which the user will enter. I kept the processing type here as CHECK. then created another field group FG2 and assigned all the other related fields to the field F1 and kept the processing type as initialise.

I had created a generic service nad written the code for population of other fields under DO_COPERATIONS method. But while debugging on clicking of the button, the code doesnt stop in this method.

I now copied SOC1 form and added all my fields into that standard form. i only kept the Derive data button from the standard form. I removed all the confiuguration done in 'Other Attributes', all the field groups and operations etc whcih i had created as mentioned above. And now its working. On clicking of the button the DO_OPERATIONS method is called.

Not sure what was my mistake. In the above method we are creating opeartions and assigning field groups. ok i understand that but, where do we write the data population code.

Thanks, Nikhil

Former Member
0 Kudos

Check this...

Call this Event to Badi side...


  CASE user_command.
    WHEN 'USER_EVENT_CHECK'.
      READ TABLE special_data INTO ls_special_data
                              WITH KEY fieldname = 'ZPOS_ID'.  <---call from scenario
 g_pos_id = ls_special_data-fieldvalue.
  <---write your code -->
             --
<--at the end-->
      READ TABLE special_data INTO ls_special_data
                              WITH KEY fieldname = 'ZPOS_TEXT'.  <---call from scenario
      ls_special_data-fieldvalue = g_pos_text.
      MODIFY special_data FROM ls_special_data INDEX sy-tabix.
ENDCASE.

nikhilkup
Active Participant
0 Kudos

hi,

Please tell me which BADI is used here.

Thanks,

Nikhil