cancel
Showing results for 
Search instead for 
Did you mean: 

HR: creating IT "0015 - Additional Payments" item

Former Member
0 Kudos

Hi!

Is there a better way than CALL TRANSACTION (perhaps BAPI) to create a record in IT "0015 - Additional Payments"? I couldn't find anything. The nearest is BAPI_WAGE_COMP_EXT_CREATE, but it creates a record in IT "0579 - External Wage Components" and that's not what I need. I'd like to create subtype '1650 - Deductions for Buss.Trip" int IT 0015.

Thanks!

Kind regards,

Igor Barbaric

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

I am trying to use this function to create a IT0267, and I am getting an error 'Make an entry in all required fields'. I believe the only things that are required are lgart, betrg, waers, begda, ocrsn. I have tried entering data into fields that aren't required, but nothing seems to work. Any ideas??

nablan_umar
Active Contributor
0 Kudos

Hi Monica,

Please cut and paste your code when calling this function here.

nablan_umar
Active Contributor
0 Kudos

Hi Igor,

When executing HR_INFOTYPE_GETDETAIL, you need to enter Infotype, Employee Number, and the exact ValidityBegin and End date of one of the record. The purpose of using the function is just to see how to populate the RECORD parameter when you call HR_INFOTYPE_OPERATION.

ssimsekler
Active Contributor
0 Kudos

Hi Igor

Just some addition to Colin's and Nablan's explanations here is a small code illustrating the usage of the function module.

<b>DATA ls_data LIKE p0015 .

DATA ls_return LIKE bapireturn1 .

<i>*--Fill "ls_data" as required here

*- Be careful about the checks that will be done during

  • execution of the function module. The checks it will

*do, will be more or less like when you insert the

*record using the tcode "PA30". e.g. you must fill

*obligatory fields</i>

CALL FUNCTION 'ENQUEUE_EPPRELE'

EXPORTING

mode_prel = 'E'

mandt = sy-mandt

pernr = ls_data-pernr

infty = '0015'

subty = '1650'

endda = ls_data-endda

begda = ls_data-begda

_scope = '1'

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3.

IF sy-subrc NE 0 .

*...

EXIT.

ENDIF.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0015'

number = ls_data-pernr

subtype = ls_data-subty

validityend = ls_data-endda

validitybegin = ls_data-begda

record = ls_data

operation = 'INS'

tclas = 'A'

nocommit = space

IMPORTING

return = ls_return .

CALL FUNCTION 'DEQUEUE_EPPRELE'

EXPORTING

mode_prel = 'E'

mandt = sy-mandt

pernr = ls_data-pernr

infty = '0015'

subty = '1650'

endda = ls_data-endda

begda = ls_data-begda.</b>

<u><b>Some Basics:</b></u>

<b>i.</b> You may wonder why I locked the personel but as far as I remember, there is a problem in the FM "HR_INFOTYPE_OPERATION" about this. Locking the personel overcomes the problem. But it may have been solved. So, if you want first try without locking.

<b>ii.</b> The FM calls the dialog module for the program MPXXXX00 (XXXX: Infotype number, here MP001500) of the infotype.

<b>iii.</b> "ls_data" which is passed to the parameter "record" should be type "PXXXX" <i>(here P0015)</i>.

<b>iv.</b> If the infotype has subtypes, pass the subtype you want ( in your case 1650) to the parameter "subtype" .

<b>v.</b> You must give the validity period to the parameters "validityend" and "validitybegin".

<b>vi.</b> The operation type you need is "INS" since you want to insert an infotype record. You can see other values from the fixed values of the domain of the parameter "operation".

<b>vii.</b> Since some infotypes are common for both employee an applicants data, you should pass 'A' to the parameter "tclas". This way the record is inserted to the table PAXXXX. In case of 'B', it behaves your record as to be an applicant data.

<b>viii.</b> You have the option to force the FM not to commit at the end.

<b>ix.</b> The exporting parameter "return" of the FM is of type "BAPIRETURN1". That is, it can be used like other BAPI returns. You can analyze the result of the execution from this table.

Hope this addition helps

*--Serdar

Former Member
0 Kudos

Can you please make sure I get the points on this one ?

Thanks Igor.

Kind regards

Colin

Former Member
0 Kudos

Hi, Guys!

I can't make HR_INFOTYPE_OPERATION work, because I can't fill RECORD parameter properly. It'll take a lot of debugging to see what's HR_INFOTYPE_GETDETAIL doing.

As for points, I'm very glad that you asked this question, Colin, because up to now I didn't quite understand how the whole system works. Now I see these little stars by answers. I didn't see any explanation at all for the pointing system (who grants them to whom?). Maybe there is one, but it's not obvious to me. I thought foolishly that it's moderators who grant points. I think that SDN guys believe that it's all that much intuitive, but it's not. It would be very good to put some basic rules there.

Ofcourse that you deserve points for this one, both of you, but I'm waiting to see it finally work, so that I can grant you "problem solved" (I don't know can I grant "very usefull answer" and increase it later). If not, I'll grant "very usefull answer". But please be patient untill I return from vacation (in one week).

Kind regards,

Igor Barbaric

P.S.

Many times up to now I said "thanks", and people probably thought how ungratefull I was for not granting points. I appologize for this and I'll try to correct it.

Former Member
0 Kudos

Hi Igor,

The easiest way to find out how to fill the RECORD structure is run transaction PA30 and see the required fields needed to create a record.

The structure of the record will need to be of TYPE P0015

Also, i would advise you of a problem using this function.

If your infotype uses the Concurrent Employment framework (CE) you may encounter a short dump. To fix this refer to OSS note 716914 and apply the code to your own program.

Any questions, let me know.

Cheers

Colin.

Former Member
0 Kudos

Hi Igor,

Hope you enjoyed your vacation.

The best judge of how useful the replies are is you, so you should grant the points.

- Yes, you can mark them now and change them later.

- You can assign 1 10 pt, (which marks it as answered)

- 2 6s,

- and lots of 2s.

Click on the yellow Star icon per reply to assign them.

Check out Mark's Weblog:

</people/mark.finnern/blog/2004/08/10/spread-the-love for directions. There's also an FAQ in the lower left corner of the SDN homepage.

If it's still not clear, please let me know!

Cheers,

Joan (and Mark Finnern)

nablan_umar
Active Contributor
0 Kudos

Hello Igor,

Collin is correct. You can use function module HR_INFOTYPE_OPERATION. You can try executing function module HR_INFOTYPE_GETDETAIL to be familiarize with what data needed to pass to HR_INFOTYPE_OPERATION.

Former Member
0 Kudos

Hi Igor,

This is a long shot but could you use HR_INFOTYPE_OPERATION with the operation set to 'INS' ??

Worth a try.......

Kind regards

Colin.