Hy everyone,
I stumbled upon a problem and I kindly ask for your advice. Here is the context:
- I am inside a BADI implementation
- need to read the 0001 HR infotype for a given PERNR and target TARGETDATE, specifically I need the BTRTL and PERSK fields.
I used to do this in 'normal' ABAP programs with something like:
____________________
INFOTYPES: 0001.
...(some other code)...
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = pernr
infty = '0001'
begdata = TARGETDATE
enddata = TARGETDATE
TABLES infty_tab = p0001.
tempBTRTL = p0001-BTRTL.
tempPERSK = p0001-PERSK.
_____________________
Now using this code is not allowed (INFOTYPES is not allowed in OO context).
Tried to declare DATA: p0001 TYPE TABLE OF p0001 INITIAL SIZE 0. => but then cannot access fields BTRTL or PERSK because p0001 has no header line. (also header line is not allowed in OO context).
Can you help with suggesting how to get the required info?