cancel
Showing results for 
Search instead for 
Did you mean: 

Create PA-Infotype 0027 after create Infotype 1018 with Badi HRBAS00INFTY

daniela_asmussen
Explorer
0 Kudos

Hello,

we would like to automatically create Infotype 0027 subty 02 when creating an infotype 1018 in ppome or wherever.

Therefore we are using BADI HRBAS00INFTY method in_update. Parameter new_image holds the new values. Now we want to use the new values as initial value for the dialog creating infotype 0027.

First I thought it is possible to read table hrt1018 with new_image-vdata as tabnr, but new_image-vdata holds only the value $00000000000000000001. I have no idea to get the new values (percent).

Maybe someone in here has an idea, how to get the new values for percent.

Thanks a lot in advance.

Best Regards

Daniela

Accepted Solutions (1)

Accepted Solutions (1)

kmoore007
Active Contributor
0 Kudos

That is a bit weird how that data is stored. You can use function 'HR_COSTDISTRIBUTION_SCREEN_PUT' to get the Prozt field.

Example code:

call function 'HR_COSTDISTRIBUTION_SCREEN_PUT'

EXPORTING

i_mode = 'D'

i_type = '1'

i_data = '1999051799991231'

i_rhcost_om = '01S 600020461'

TABLES

i_costdistribution = gt_distribution.

Answers (3)

Answers (3)

daniela_asmussen
Explorer
0 Kudos

Thank you very much for your response. I've tried to use the function module, but I get the following dump:

In the function "HR_COSTDISTRIBUTION_SCREEN_PUT", the STRUCTURE parameter

"I_RHCOST_OM" is typed in such a way

that only actual parameters are allowed, which are compatible in Unicode

with respect to the fragment view. However, the specified actual

parameter "'01S 70003361'" has an incompatible fragment view.

The coding looks like this (just for testing):

call function 'HR_COSTDISTRIBUTION_SCREEN_PUT'

EXPORTING

i_mode = 'D'

i_type = '1'

i_data = '2009090199991231'

i_rhcost_om = '01S 70003361'

TABLES

i_costdistribution = gt_distribution.

I don't know what to do.

Can anybody help me?

Regards,

Daniela

daniela_asmussen
Explorer
0 Kudos

I've solved the problem with the dump by deactivating the unicode check.

But the function module delivers no results. gt_distribution is empty and I don't know why.

has anybody an idea?

Regards,

Daniela

daniela_asmussen
Explorer
0 Kudos

Now I've noticed, that the funktion modules delivers results when I confirm my changes in ppome with enter (in debug Mode). In that case gt_distribution is filled with the right values.

But I need these values when I save these changes. But when I save my changes in debug mode gt_distribution is empty.

Can anybody explain that?

Regards,

Daniela

Former Member
0 Kudos

Hi,

Try this:

field-symbols: <p1001_vdata> type hrip1001.

assign plog_tab[1]-vdata to <p1001_vdata> casting.

The new value of PROZT is in <p1001_vdata>-PROZT

Regards,

Patrice

daniela_asmussen
Explorer
0 Kudos

Hi Patrice,

thank you for your information, but I get always the same value for <p1001_vdata>-prozt. It is always 202.02.

What am I doing wrong?

Best regards,

Daniela

sikindar_a
Active Contributor
0 Kudos

might be useful

IT0027 and 1018 deals with Cost distribution

both are same screens but we can maintian the infotype either form OM side thru PP01 1018 or Pa side from PA0027

but here the question comes with the percentage even though if u made the Percentage feild as automatic why do u want to do that wht in case if the critera changes form person to perison

daniela_asmussen
Explorer
0 Kudos

Hello Sikindar,

sorry, I don't really understand.

We maintain the cost distribution für Positions in PPOME (IT1018). This cost distributions works only for salary. But we need also the cost distribution for travel expenses. Therefor we need to maintain IT0027 subty 0002. That's why we want to propose IT0027 with initial values in dialogue after saving changes for cost distribution in PPOME.

I thougt tb_plog_tab-TDATA helps me to find the new percentage values, but I can't find them anywhere in the method IN_UPDATE.

Maybe I'm on the wrong way.

I hope, someone can help me.

Best Regards,

Daniela

daniela_asmussen
Explorer
0 Kudos

Hello,

has nobody an idea how to get the values "prozt" of the new values?

Thanks.

Regards,

Daniela