08-16-2007 8:26 AM
Hello,
in PA30, our HR admin team want me to write an Infotype 19 record when a user amends or creates an Infotype 24 record.
I spent all day yesterday trying to find a solution to this.
Can anyone please tell me:
1) Do dynamic actions work for IT0024? - our HR admin suggest that they don't as there is no 'subtype'.
2) Should user exit PBAS0001 (function EXIT_SAPFP50M_002) work for IT0024? I have tried putting in a test display which should appear on save of IT0024 and this does not appear to work.
3) Will BADI HRPAD00INFTY work? If so, does anyone have an example of code that tests the 'old' IT0024 record before modification - the documentation does not help too much with a good example. I'm planning to use this as a last resort due to the need for an access key.
Many thanks in advance,
Keiron.
08-17-2007 4:30 PM
The BADI is probably the best way to go. You should not need an access key - you do not put your code in the BADI, but instead create an implementation of it in a Z name range. Go to SE18 for the BADI and display it, and select menu option implementation--->create. Give a Z name and then you will have a place to put your code. You can double click on the methods shown in your implementation to get to the ABAP code editor.
Exit PBAS0001 should also work - put a breakpoint in it to see if it is called.
Both the BADI and Exit are called at almost the same point in the SAP PA30 code - however the BADI is called in some cases when the exit is not. It is outside an additional IF test in the SAP code.
Andrew
08-20-2007 10:39 AM
Many thanks for the reply Andrew - I'll take a look at writing the BADI.
I did try a breakpoint in Exit PBAS0001 but it wasn't reached - works fine for other infotypes.
I was a little concerned that IT0024 may require 'special' consideration (and functions?) due to it's complexity.
Do you have any example BADI code for referencing 'before' and 'after' values on infotype changes?
Thanks again,
Keiron.
10-18-2007 2:50 PM
Hello again Andrew - I've just revisited this problem and wondered whether you had time to confirm that the BADI HRPAD00INFTY works for IT0024.
I just can't get it to work at all.
I've put a breakpoint in all events of my implementation but they are reached for all other infotypes and not 0024 - same problem with the user exit.
Hope you can advise,
Keiron.