sapdev logo background
sapdev logo sapdev logo
Comments

SAP CONDENSE FUNCTIONS documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

condense - Condense Function

Syntax
... condense( [val =] text [del = del] [from = from] [to = to] ) ...

Effect
This function returns the content of
text , condensed as follows:
  • All leading and trailing characters specified in del are removed from the string in text . If del is an empty string, no characters are removed.

  • In the character string from text , all subsequences that are compiled from the characters in from are replaced by the first character in the character string specified in to . If from

  • is an empty string, no characters are replaced. If to an empty string, the characters specified in from are removed from the character string.
    The default values for del , from , and to are blank in each case. If del , from , and to are not specified, val = can also be omitted.
    del , from , and to are character-like expression positions . If they have a fixed length, trailing blanks are ignored.
    The return code has the type string .

    Notes
  • When the standard values for del , from , and to are specified, the condense function works in the same way as the CONDENSE statement without the NO-GAPS

  • addition.
  • By entering an empty string for from , the leading and trailing blanks can be removed without affecting the character string.


  • Example
    The return codes of the following functions are "abc_def" ,
    "abc___def" and "abcXdef" (where "_" stands for a blank).
    result = condense( val = ` abc def ` ).

    result = condense( val = ` abc def ` from = `` ).

    result = condense( val = `XXabcXXXdefXX`
    del = 'X' from = 'X' to = 'X' ).

    Example
    The return code of the following function call is "Rock'n'Roll" .
    result = condense( val = ` Rock'xxx'Roller`
    del = `re `
    from = `x` to = `n` ).
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    CONCRETE_GLOSRY
    CONDENSE_FUNCTION_GLOSRY




    comments powered by Disqus