Ansicht
Dokumentation

Non-standard conversions ( RELNBC_CONV_EXITS )

Non-standard conversions ( RELNBC_CONV_EXITS )

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

Short text

Non-standard conversions

Description

Conversion takes place in accordance with the type when a screen field is transferred from display format to SAP-internal format or vice versa and when a screen field is output with the ABAP WRITE statement. You can only force a different kind of conversion than that determined by the type by specifying the name of the conversion (for example, ALPHA) in the attributes of a field in the Screen Painter or by using the USING EDIT MASK '==ALPHA' addition (for this example) for the WRITE statement. Such a conversion is selected automatically in the case of a field with a dictionary reference if this conversion was specified in its domain.

Non-standard conversions from display format to SAP-internal format and vice versa are implemented with so-called conversion exits. These exits are written in ABAP and stored as function modules. The following two ABAP function modules are assigned to the conversion xxxxx:

CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT

The INPUT module converts from display format to internal format and the OUTPUT module converts from internal format to external format. We recommend that the modules for input and output conversion be combined to form a function group. The documentation of the two function modules should describe the effect of the conversion. If required, new conversions can be implemented; the corresponding function modules merely need to satisfy the naming conventions specified above and the conventions listed below.

Both functions must have precisely two parameters with the names INPUT and OUTPUT for the value to be converted and the converted value. In particular, the INPUT parameter in the INPUT conversion and the OUTPUT parameter in the OUTPUT conversion should not have a reference field since the screen or ABAP field assigned in the call could have a different length than that expected because a matchcode input is expected, for example.

Only A messages are meaningful for the output conversion, but A, E and S messages can be triggered in the input conversion (although S messages are not meaningful here). E messages result in an error dialog. Exceptions are not caught in the call.

All ABAP statements that result in an interrupt are not permitted in conversion exits. They are:

BREAK-POINT,
CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT,
COMMIT WORK, ROLLBACK WORK,
COMMUNICATION RECEIVE,
EXIT FROM STEP-LOOP>,
MESSAGE I, MESSAGE W.

Software/hardware requirements

Installation information

Effects on System Administration

Effects on Customizing

Changes in procedure

Dependent functions

Planning

Further notes

  • If a function module is used as a conversion exit, it cannot be interrupted (that is, you cannot process it with the test tool/debugger). However, you can force a termination by inserting a division by zero into the conversion exit. You can then analyze current content, types, and lengths of fields at the time of termination.
  • The output conversion is also triggered for WRITE and WRITE-TO, so it can be triggered quite frequently for lists; the output conversion should thus be trimmed to the greatest extent possible to improve efficiency.
  • Do not use any external performs in conversion functions. The table work areas of the first main calling program are also used by programs called externally. With conversion exits, this could result in errors that cannot be analyzed because conversion exists are sometimes included in the program flow at unexpected times.





RFUMSV00 - Advance Return for Tax on Sales/Purchases   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 4175 Date: 20240603 Time: 180016     sap01-206 ( 100 ms )