|
Additional field in adhoc query |
Views: 2572
|
Thread Tools | Rate Thread |
#1
|
|||
|
|||
Additional field in adhoc query
Questions:
Hi all, I need to be able to report on the IT105 subtype 0001 system ID for employees who are withdrawn from the company, however, when someone leaves their IT105 record is delimited so adhoc query will not output anything. Has anyone coded an additional field that will look at the latest record regardless of the date? If you have, please can you share the code with me!? Answers: Please find the code below. It is designed for additional structure z105_last which is bassed on P0105 type. data l_it_p0105 type standard table of p0105. clear: l_it_p0105, z105_last. call function 'HR_READ_SUBTYPE' exporting tclas = 'A' pernr = peras-pernr infty = '0105' subty = '0001' begda = '18000101' endda = pn-endda tables infty_tab = l_it_p0105 exceptions others = 1. if sy-subrc = 0. describe table l_it_p0105. read table l_it_p0105 into z105_last index sy-tfill. endif. |