cancel
Showing results for 
Search instead for 
Did you mean: 

Processing a SAVE event in CL_HRESS_PER_DETAIL

Former Member
0 Kudos

Hi All,

Great source of knowledge on here, but was wondering if someone could please help me since I'm fairly new to FPM.   We're implementing ESS/MSS  FPM EHP5.  Currently got a requirement to send an email to an individual when they change their bank details.  Now I can get this to action by creating a post exit on the method IF_FPM_GUIBB_FORM~PROCESS_EVENT as below...

The code contained looks for a SAVE event then triggers a bespoke function module which sends the user an email.  All good so far...

The only problem is when there is an error with data, the email is still sent because it appears that the validation and save process is triggered after the PROCESS_EVENT event.

Was wondering if you guys could please assist me in the best way of getting this exit to trigger after the save, so that when an error occurs no email is sent.  I've read that it is possible to trigger a save within the feeder class, but not entirely sure how or whether this would be good practice.

Anyone got a solution, please.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member219762
Contributor
0 Kudos

Hi Stephen,

Check where data saved logic and it implemented IF_FPM_TRANSACTION interface. If implemented this interface write your mail logic in  AFTER_COMMIT method of that interface.

Regards,

Sreenivas.

Former Member
0 Kudos

Hi thanks for that, Sreenivas.

Just looking at the class CL_HRESS_PER_DETAIL in more detail.

I cannot see the interface IF_FPM_TRANSACTION in the the available interfaces.  What I can see being called is the class CL_FPM_BOL_TRANSACTION and the method SAVE (Transactional Save) within there.  It is called from the  method CL_HRESS_TRANSACTION->PROCESS_TRANSACTIONAL_EVENT.

I suppose I could put an exit in here, but should I be doing this?  Isn't this used for generic processing, too?  Is this the best way to do this, or is there any other, more localised methods?

Thanks again.