cancel
Showing results for 
Search instead for 
Did you mean: 

Reading the IT0021 records which have been just created in the program.

Former Member
0 Kudos
77

HI-

I am creating Dependent records (in IT0021) for an employee in my program.

After this particular statement the IT0021 is actually getting updated (I am running my program in debugging mode and after this particlular statement which creates the records; going into PA20 and seeing the IT0021 records for that particular employee).

After this I am trying to read IT0021 using HR_READ_INFOTYPE; but the internal table is not getting poupulated.

I am wondering that it is something related to the records getting commited or not when HR_READ_INFOTYPE is trying to fetch records; but then again the records are visible in PA20 for IT0021.

So I am not sure of what is happening.

Any Ideas will be greatly appreciated and rewarded.

Thanks.

Ramesh.

View Entire Topic
Former Member
0 Kudos

Make sure that you are passing the correct data in the exporting parameters for HR_READ_INFOTYPE. Your dates need to be in 'YYYYMMDD' format and the infotype should be '0021'. Also make sure that the pernr field you are passing is filled. I hope this helps.

- April King

Former Member
0 Kudos

Hi Ramesh,

Just wanted to know how are you creating the record in 21 in your program

using some BAPI , function module or BDC ?

Rgds,

Darshan

Former Member
0 Kudos

Hi Darshan-

I am using HR_MAINTAIN_MASTERDATA to update the Infotype 21.

Thanks.

Ramesh.

Former Member
0 Kudos

Dear Ramesh,

What is the value of sy-subrc for HR_READ_INFOTYPE ?

I hope it is not 4 or 12.

4 Some infotype records are not returned by the FM because

authorizations are missing.

12 The FM does not return any infotype records because

authorizations are missing.

Hope this helps.

Kindly reward in case useful.

Regards & Thanks,

Darshan Mulmule

Former Member
0 Kudos

Hi Darshan-

No. It is returning 0 to sy-subrc after the HR_READ_INFOTYPE.

Actually I have inserted "COMMIT WORK" statement also after loading the Infotype 21 and before calling the FM "HR_READ_INFOTYPE".

But still it is not getting the records from 21.

Any suggestions??

Thanks.

Ramesh.

suresh_datti
Active Contributor
0 Kudos

In the function call to HR_READ_INFOTYPE, pass the parameter BYPASS_BUFFER = 'X' & try it.

~Suresh

Former Member
0 Kudos

Hi Suresh-

That did help.

Thank you.

Also thanks to all who have contibuted.

Ramesh.