Hello Gurus!
This is my first post so bear with me. I am trying to update IT207 for Maryland (MD) counties using a custom enhancement in HRPAD00INFTYDB. This is called when an employee changes the MD county in their Permanent Address in ESS. I've done the same thing for IT210 using FM HR_ECM_INSERT_INFOTYPE with success, but when I use the same FM to update IT207 I get an error.
ST22 Info
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
caught in
procedure "ADD_MESSAGES" "(METHOD)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component.
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
The program reads IT207 using FM HR_ECM_READ_INFOTYPE, loops at lt_p0207, updates the begda and taxar (Residence Tax Area), then runs FM HR_ECM_INSERT_INFOTYPE to create the new record. This produces a dump (details above). The message that is being added is from message class PG, 204, and is only a warning.
If I only update the taxar (not the dates) the IT207 record is updated with the incorrect dates.
I am running FMs HR_ECM_INITIALIZE_BUFFER and HR_ECM_ENQUEUE_PERNR prior to reading IT207.
I have done extensive debugging of the enhancement ... I can manually skip the date check and it works fine. After a number of debugging sessions, the update works fine ... but only until I log out and re log in.
Any ideas on how to fix so that ADD_MESSAGES is not called?
Thanks!
Carl