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: 

Update wagetype amount on Infotype 0008 via user-exit

Former Member
0 Kudos

Hi,

I'm trying to update the wagetype amount on Infotype 8 during PAI using EXIT_SAPFP50M_002. I'm successfully changing the value of I0008-betxx but the value is not reflected on the screen. The corresponding screen field is Q0008-betrg.

Structure Q0008 does not exist as a parameter to this function module so how should this field be updated?

Another post suggested to use FM FC_SET_DYNPRO_SET_VALUES to update the screen values but shouldn't this be handled by the SAP standard module pool?

Any examples will be appreciated.

Kind regards

Liza-Marie

7 REPLIES 7

Former Member
0 Kudos

Do you want to display changed value on the screen then you should be doing it in PBO rather than PAI? There is an example in LXPADF01 for using this exit, probably that will help you.

0 Kudos

Hi,

Yes, the changed vale should be displayed on the screen after the the user has changed the value of P0008-TRFGR. However, the PBO is not called again after the PAI. I tested this with a break-point in the PBO.

Regards

Liza-Marie

Former Member
0 Kudos

use set parameter id for the field in the screen

0 Kudos

Hi,

Problem solved - update field I0008-ANSAL with the Annual Salary. The system will automatically calculate the Basic Salary (I0008-BETnn) if this field is populated. The system will determine the value of the wage type

on the screen via indirect evaluation from the value of ANSAL.

Note that this is only true if the values are entered directly on the screen. Calculate the values of I0008-BETnn and I0008-ANSAL explicitly in the user-exit. If export parameter SHOW_DATA_AGAIN (FM EXIT_SAPFP50M_002) is not set to X, then the updated values are not displayed on the screen after user input. This is why I initially thought these fields cannot be updated in the user-exit (development on ECC 6.00). I've added the following code in the user-exit for infotype 0008:

if sy-ucomm ne 'UPD' and sy-ucomm ne 'UPDL'.

show_data_again = 'X'.

endif.

IF show_data_again is set to X then the current screen is "refreshed". This check should not be set when SAVING otherwise processing does not continue.

Kind regards

Liza-Marie

Message was edited by:

Liza-Marie Erasmus

0 Kudos

>

> Hi,

>

> Problem solved - update field I0008-ANSAL with the Annual Salary. The system will automatically calculate the Basic Salary (I0008-BETnn) if this field is populated. The system will determine the value of the wage type

> on the screen via indirect evaluation from the value of ANSAL.

>

> Note that this is only true if the values are entered directly on the screen. Calculate the values of I0008-BETnn and I0008-ANSAL explicitly in the user-exit. If export parameter SHOW_DATA_AGAIN (FM EXIT_SAPFP50M_002) is not set to X, then the updated values are not displayed on the screen after user input. This is why I initially thought these fields cannot be updated in the user-exit (development on ECC 6.00). I've added the following code in the user-exit for infotype 0008:

>

> if sy-ucomm ne 'UPD' and sy-ucomm ne 'UPDL'.

> show_data_again = 'X'.

> endif.

>

> IF show_data_again is set to X then the current screen is "refreshed". This check should not be set when SAVING otherwise processing does not continue.

>

>

> Kind regards

> Liza-Marie

>

> Message was edited by:

> Liza-Marie Erasmus

How did you resolve the fact of the looping issue when used PA41 transaction. This method works great via PA30 to create and maintain P0008. However, when you do PA41 to retro correct infotypes and it touches P0008, you are stucked in endless loop...

0 Kudos

Does show_data_again work fine when there is a record already existing in IT0008 for an employee...coz as far as I know...when there is a record in the system ZXPADU01 doesnt really get triggered...the reason being the variable PSYST-IINIT which is checked in the module pool of IT0008

0 Kudos

Hi ,

I am facing the same prroblem.

calculated all values but in display mode it is not reflecting the calculated value ..

i m trying to use your code :

>     if sy-ucomm ne 'UPD' and sy-ucomm ne 'UPDL'.

>       show_data_again = 'X'.

>     endif.

but still not getting..

need to display

1spl wage type(bet06) and total amount (sumbb)

please guide....