Upon creating or reading a container, your infotype generally will need to modify its contents. To this end, you must first ensure, via the
MODIFY_KEY
method, that the container features the correct key … unless you have recently created the container and you know that it already has that key.
Once you are certain that the container features the correct key, use the following method(s) to populate the container with the corresponding data.
MODIFY_PRIMARY_RECORD
MODIFY_SECONDARY_RECORD
MODIFY_PREF
MODIFY_DATA
MODIFY_TEXT_TAB
Caution
The container will only process methods
MODIFY_PRIMARY_RECORD
,
MODIFY_SECONDARY_RECORD
and
MODIFY_DATA
if the key of the data records agrees with the key reflected in the
Keys for HR Master Data
(PSKEY) field. If these entries do not match, then a short dump will occur. However, a container will not lose text data (when present) if the key, primary record, or secondary record are changed.
Upon modifying the contents of the container, your infotype will encounter a new container; the system never alters the contents of the previous container. For this reason, you do not need to avoid other references to the container, nor do you need to create copies of the container in an effort to protect the buffer.
Once modification is complete, a reference to interface
IF_HRPA_INFOTYPE_CONTAINER
is returned. In the unlikely event that you wish to perform additional processing with the container, then you may wish to typecast it again to class
CL_HRPA_INFOTYPE_CONTAINER
.
Note
In the event that your infotype is to process infotype views, remember to consider how it will process secondary data.