SAP CONVERT_WITH_OVERFLOW_CHECK Function Module for Transfer value to a field (with check for field overflow)









CONVERT_WITH_OVERFLOW_CHECK is a standard convert with overflow check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Transfer value to a field (with check for field overflow) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for convert with overflow check FM, simply by entering the name CONVERT_WITH_OVERFLOW_CHECK into the relevant SAP transaction such as SE37 or SE38.

Function Group: C006
Program Name: SAPLC006
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CONVERT_WITH_OVERFLOW_CHECK pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CONVERT_WITH_OVERFLOW_CHECK'"Transfer value to a field (with check for field overflow)
EXPORTING
I_VALUE = "
* I_UNIT = ' ' "
* I_KRUND = ' ' "

IMPORTING
E_VALUE = "
E_UNIT = "
E_FLG_OVERFLOW = "Overflow when filling a packed field

EXCEPTIONS
UNIT_CONVERSION_ERROR = 1 WRONG_E_VALUE_TYPE = 2
.



IMPORTING Parameters details for CONVERT_WITH_OVERFLOW_CHECK

I_VALUE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

I_UNIT -

Data type: T006-MSEHI
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KRUND -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CONVERT_WITH_OVERFLOW_CHECK

E_VALUE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

E_UNIT -

Data type: T006-MSEHI
Optional: No
Call by Reference: No ( called with pass by value option)

E_FLG_OVERFLOW - Overflow when filling a packed field

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

UNIT_CONVERSION_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_E_VALUE_TYPE - Invalid category of the ExpParameter E_VALUE

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CONVERT_WITH_OVERFLOW_CHECK Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_e_value  TYPE STRING, "   
lv_i_value  TYPE STRING, "   
lv_unit_conversion_error  TYPE STRING, "   
lv_e_unit  TYPE T006-MSEHI, "   
lv_i_unit  TYPE T006-MSEHI, "   SPACE
lv_wrong_e_value_type  TYPE T006, "   
lv_i_krund  TYPE T006, "   SPACE
lv_e_flg_overflow  TYPE T006. "   

  CALL FUNCTION 'CONVERT_WITH_OVERFLOW_CHECK'  "Transfer value to a field (with check for field overflow)
    EXPORTING
         I_VALUE = lv_i_value
         I_UNIT = lv_i_unit
         I_KRUND = lv_i_krund
    IMPORTING
         E_VALUE = lv_e_value
         E_UNIT = lv_e_unit
         E_FLG_OVERFLOW = lv_e_flg_overflow
    EXCEPTIONS
        UNIT_CONVERSION_ERROR = 1
        WRONG_E_VALUE_TYPE = 2
. " CONVERT_WITH_OVERFLOW_CHECK




ABAP code using 7.40 inline data declarations to call FM CONVERT_WITH_OVERFLOW_CHECK

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
"SELECT single MSEHI FROM T006 INTO @DATA(ld_e_unit).
 
"SELECT single MSEHI FROM T006 INTO @DATA(ld_i_unit).
DATA(ld_i_unit) = ' '.
 
 
DATA(ld_i_krund) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!