Callback Functions The functions that can be called in the CAD desktop call pre- and post-events (in one case also AUX). The functions each have the same parameters, but the tables have a different significance for the different functions. SAP provides the following callback functions:
C_DESK_CALL_EX_PRE
C_DESK_CALL_EX_AUX
C_DESK_CALL_EX_POST
FUNCTION_CODE: Returns the active function
RETURN: Can be used to return an error.
PLM_DOCUMENTS
PLM_DOCUMENTS_ADD (structure PLM_DOCUMENT)
Tables with document or original information. The first table contains the selected document, the second contains related documents.
The following errors can occur during the execution of a function:
Before the first callback
These errors are displayed. The callback does not include the documents that have errors.
In a callback
The callback selects the relevant documents with MESSAGE_TYPE and MESSAGE. The CAD desktop displays the errors and subsequently deletes from the list.
Between the callbacks
The CAD desktop indicates the documents as having errors, so that the documents are included in the second callback. This lets the second callback execute functions like the repeated renaming of files, and so on.
In the RETURN parameters, if the callback sets an error of type E or A, processing is immediately terminated.