Ansicht
Dokumentation

UTI_EVENT_2647 - FI-CA Event 2647: Utilities Preparation for Actions

UTI_EVENT_2647 - FI-CA Event 2647: Utilities Preparation for Actions

PERFORM Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

The function modules called at event 2647 allow you to trigger additional action when an invoicing document is posted in Contract Accounts Receivable and Payable. You can also check the invoicing document (including its environment) here for the last time before it is updated.

The invoicing document and all posting documents to be created - with the exception of their document numbers - are available in this event.

Dependencies

If the additional action also requires knowing the document numbers, these can be determined using a function module at event 2648.

Two events are required, since once the document number has been assigned, the corresponding number range is locked and is therefore unavailable to other users. This lock remains in place until the document is posted. You should try to ensure that the duration of the lock, and the resulting hindrance to other users, is kept as short as possible. This is achieved if no time-consuming actions take place between the assignment of the document number and posting of the document.

Since all kinds of additional actions can be initiated at event 2647, and the action may be time-consuming, this event is processed prior to document number assignment. At this event you can carry out all preparations for updating further data and have this data recorded in internal tables. At event 2648, the only data that is normally added to these internal tables is the document number.

If internal tables are created at event 2647, and these tables form the basis for database operations (DELETE, INSERT, UPDATE) that are triggered by PERFORMON COMMIT, you have to ensure, using a PERFORM ON ROLLBACK, that a REFRESH of these tables takes place in the case of a ROLLBACK WORK.

Programming Restrictions

To ensure the consistency of the system, note that you must not use the following language elements in events, unless they were explicitly declared to be allowed for the given event:

  • ,,COMMIT WORK
  • ,,ROLLBACK WORK
  • ,,CALL FUNCTION 'DEQUEUE ALL'
  • ,,Deletion of locks that you have not set yourself
  • ,,Implicit database commits triggered by RFC calls or by a WAIT statement

If you update additional data in an event and use the construction PERFORM commit routine ON COMMIT, note that:

  • ,,At the end of the commit routine, all internal tables from which data was updated must be initialized again to prevent a duplicate update in the next call.

  • ,,A PERFORM rollback routine ON ROLLBACK must also be called.
    In the rollback routine, initialize the same data that is initialized at the end of the commit routine.

If you want to carry out checks in an event, when you issue messages, note that warning messages cause background processing of the process to terminate. You should therefore avoid issuing warning messages if possible. At the most, issue warning messages if the value of SY-BATCH is initial.

Also avoid messages of type A (termination). In the course of background processing, such messages can be captured and processing can continue. However, at the same time the message triggers an implicit ROLLBACK WORK, which can cause data inconsistencies.

To ensure the consistency of your system, only use the information (such as variables and tables) in events that are made available on the interfaces of the events.

Changes that do not conform to these rules can lead to serious errors that violate the basic principles of accounting.

Parameters

  • I_INV_UNIT_PUBLIC
  • C_INVDOC

Function Group

  • FKKINV_EVENT





Parameters

C_INVDOC
I_INV_UNIT_PUBLIC

Exceptions

Function Group

UTI_INV

CPI1466 during Backup   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 4386 Date: 20240523 Time: 122533     sap01-206 ( 85 ms )