Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI, User Exit or Dynamic Action for Infotype 24

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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.