Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > SAP Forum > SAP ABAP HR Forum


Additional field in adhoc query


Reply
Views: 2572  
Thread Tools Rate Thread
  #1  
Old 05-31-2010, 01:52 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,566
Default 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.

__________________
Future Story here
Reply With Quote
Reply

New topics in SAP ABAP HR Forum





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)