Ansicht
Dokumentation

ISU_SAMPLE_REVS_STAT_0070_AR - Reverse Stat. Surcharge at Partial Pymt Reversal, for New Recalculation

ISU_SAMPLE_REVS_STAT_0070_AR - Reverse Stat. Surcharge at Partial Pymt Reversal, for New Recalculation

ABAP Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

The function module called for event 0070 allows you to prevent the reversal of a document. You can use the following data to check whether or not reversal is permissible:

  • Document header data I_FKKKO
  • Requested reversal date I_STODT
  • Document type I_BLART
  • Clearing reason I_AUGRD
  • Check voiding reason I_VOIDR
  • Reversal trigger ID I_CALLR

Example

An application requires that a bill generated by you can only be reversed using a special transaction in which other data is updated at the same time that the document is reversed. Using the HERKF (source) field in the document header or using industry-specific additional fields, a check function module for event 0070 can determine whether a special reversal transaction is permissible for the document in question. If this is the case, the system checks whether the calling program of the reversal can be identified as "authorized" by the value in I_CALLR.

Dependencies

Event 0070 is only necessary for applications that reverse a document at the same time as performing other activities. The bill reversal is executed by one of the following function calls:

  • FKK_REVERSE_DOC
  • FKK_REVERSE_DOC_MASS

Both of these function modules offer parameter I_CALLR which can be used to identify the calling program. The identification type is freely definable but it must correspond with the check for event 0070.

Therefore, the name of the calling program can be copied to I_CALLR for example.

The transferred parameter is then passed on to the check function modules processed for event 0070 by the two function modules mentioned above. The check function modules can then determine whether reversal is executed in the relevant transaction or the relevant program.

Programming Restrictions

To ensure the consistency of the system, note that you must not use the following language elements in events:

  • COMMIT WORK
  • ROLLBACK WORK
  • CALL FUNCTION 'DEQUEUE ALL'
  • Deletion of locks that you have not set yourself

If you update the additional information in an event and use the construction PERFORM commitroutine ON COMMIT to do this, note that:

  • At the end of the commitroutine, all internal tables from which data was updated must be initialized again to prevent a duplicate updatein the next call
  • A PERFORM rollbacktroutine ON ROLLBACK must also be called. In the rollbackroutine, initialize the same data that is initialized at the end of the commitroutine

If you want to carry out checks in an event, note that background processing of the process terminates with warning messages. You should therefore avoid issuing warning messages if possible. However, you should always issue a warning message if the value of SY-BATCH is initial.

Notes

Further information





Parameters

I_CALLR
I_FKKKO

Exceptions

Function Group

EKTS

rdisp/max_wprun_time - Maximum work process run time   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 3753 Date: 20240523 Time: 151238     sap01-206 ( 63 ms )