SAP CONDENSE ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID CONDENSE
• CONDENSE ABAP Statement
• NO-GAPS CONDENSE

CONDENSE
Short Reference

ABAP_SYNTAX
CONDENSE text $[NO-GAPS$].

What does it do?
The CONDENSE statement removes any leading and trailing blanks from the variable text and handles blanks within the remaining character string as follows:
Without the optional NO-GAPS addition, all substrings of the remaining character string that contain nothing but blanks are replaced by exactly one blank.
With the optional NO-GAPS addition, all substrings of the remaining character string that contain nothing but blanks are removed completely.
The data object text must be character-like. If the data object has a fixed length, the space created by condensing is padded with blanks on the right. If the data object is of the type string, its length is adapted to the result of the condensing.



Latest notes:

A character string can also be condensed in an operand position using a condense function that includes the functionality of the statement CONDENSE.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The flat structure sentence contains only character-like components and can therefore be assigned to the string text. After the condensing using the statement CONDENSE, text contains She feeds you tea and oranges . Before condensing, the words in text are 30 places apart from one another.
ABEXA 00143
ABAP_EXAMPLE_END

Return to menu