Hi Melissa,
In fact the infotype 0041 doesn't really have subtypes because all "his subtypes" are stored on the same record. If you see the record through SE16 or the table definition via SE11. You'll that the subtypes are stored like:
- DAR01 the first subtype and DAT01 for the date related to it
- DAR02 the second subtype and DAT02 for the date related to it
- ...
So witin the adhoc query, the system if checking for your subtype 50 through the different "colomns" and find it (for example) in the 5th position so your data would be DAR05 (subtype) and DAT05 (date). But the code is retrieving the year, month, day on the corresponding record, it should also take the corresponding subtype... And sometimes it just take the first DAR01/DAT01 in place of the corresponding DAR05/DAT05 that the adhoc query found a match.
Best regards,
Jonathan