SAP Function Modules

Share |

ABL_MOVE_REQUIRED_LENGTH SAP Function module - Required length for MOVE to a type C target field


ABL_MOVE_REQUIRED_LENGTH is a standard SAP function module that performs Required length for MOVE to a type C target field functionality. This is available within standard R/3 SAP systems depending on version and release level.

Below are the pattern details for this FM showing its interface including any import, export and tables parameters. There is also a list of Exceptions and for your convenience any standard documentation available. All this information and more can also be viewed if you enter the function module name ABL_MOVE_REQUIRED_LENGTH into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Within the comments section below there is also an opportunity for you to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ABL_MOVE_REQUIRED_LENGTH or its description.

Pattern for FM ABL_MOVE_REQUIRED_LENGTH - ABL MOVE REQUIRED LENGTH
Associated Function Group: SABL
Released Date: Not Released
CALL FUNCTION 'ABL_MOVE_REQUIRED_LENGTH' "Required length for MOVE to a type C target field
  EXPORTING
    srctype =                   " rsex2in-type  ABAP/4 type of source field
*   srclen =                    " rsex2in-length  Internal length of source field
*   srcdecs = 0                 " rsex2in-decimals  Number of decimal places (type P only)
  IMPORTING
    destlen =                   " rsex2in-length  Safe length for a type C target field
  EXCEPTIONS
    ILLEGAL_TYPE = 1            "               Invalid or inconvertible type
    ILLEGAL_LEN = 2             "               Invalid length
    ILLEGAL_DECS = 3            "               Invalid number of decimal places
    .  "  ABL_MOVE_REQUIRED_LENGTH

SAP Documentation for FM ABL_MOVE_REQUIRED_LENGTH


FUNCTIONALITY

If you want to use a MOVE statement to move data from a source field to a type C field, this function module calculates the required length of the target field so that no data is lost. If the type C field is then reassigned to the source field, the contents of the source field do not change.

EXAMPLE
Applied to the source field type F (float point number), the function module returns 24 as the required length because a floating point number can include 1 leading sign, up to 17 valid digits, 1 decimal point, the letter "E", 1 exponential sign and up to 3 exponential places.

HINTS
The module does not check each time whether the combination of input values makes sense.
If you use this function module to calculate the "safe" target field length for WRITE TO or the output length for WRITE, you should be aware of the following:

  • The maximum output length for WRITE is 255, whereas the target field length for WRITE TO is unrestricted.

  • This function module ignores formatting characters with WRITE or WRITE TO.
  • Documentation extract taken from SAP system, Copyright (c) SAP AG




    comments powered by Disqus