CONDENSE (ABAP Keyword) introduction & details
CONDENSE
Basic
form
CONDENSE c.
Addition
...
NO-GAPS
Effect
Shifts the contents of the field c to the left, so
that each word is separated by exactly one blank.
Example
DATA:
BEGIN OF NAME,
TITLE(8), VALUE 'Dr.',
FIRST_NAME(10), VALUE
'Michael',
SURNAME(10), VALUE 'Hofmann',
END OF NAME.
CONDENSE
NAME.
WRITE NAME.
produces the output:
Dr. Michael
Hofmann
Addition
... NO-GAPS
Effect
Suppresses all blanks
from the field c
Example
DATA: BEGIN OF NAME,
TITLE(8), VALUE
'Dr.',
FIRST_NAME(10), VALUE 'Michael',
SURNAME(10), VALUE
'Hofmann',
END OF NAME.
CONDENSE NAME NO-GAPS.
The contents of
NAME is now " Dr.MichaelHofmann ".
Since the field string NAME is
interpreted and handled like a type C field, the CONDENSE statement treats it as
a whole and ignores any sub-fields. The contents of the component field would
therefore now be as follows:
NAME-TITLE = 'Dr.Micha'
NAME-FIRST_NAME =
'elHofmann '
NAME-SURNAME = ' '
Note
Do not use CONDENSE to
manipulate field strings that include fields not of type C. This could result in
these component fields containing characters of a different (i.e. incorrect)
type.
Related SHIFT , CONCATENATE , REPLACE ,
SPLIT
Note
Performance
The runtime required to condense three
fields is about 20 msn (standardized micooseconds). The variant ... NO-GAPS
needs about 12 msn.
Related 10 ABAP Syntax Tutorials
Most readed SAP Tutorials
- WRITE - Output to a list ( SAP ABAP Keyword)
WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - List of SAP HR TABLES and Infotypes tables
Detailed full list of tables and infotypes used in SAP HR module. - List of SAP MM Transaction codes
This documentation covers the details of SAP MM Transaction codes - SELECT-OPTIONS ( SAP ABAP Keyword)
SELECT-OPTIONS is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - FI Accounts Receivable and Accounts Payable | SAP FI PDF manual
The following topics are an introduction to the Accounts Receivable and Accounts Payable application components. - SELECT clause ( SAP ABAP Keyword)
SELECT clause is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - SAP MM Process Flow
The typical procurement cycle for a service or material consists of the following phases:
Latest Added SAP documents
- 9KE9 Transaction code
Details about SAP transaction code 9KE9 - 9KE8 Transaction code
Details about SAP transaction code 9KE8 - 9KE7 Transaction code
Details about SAP transaction code 9KE7 - 9KE6 Transaction code
Details about SAP transaction code 9KE6 - 9KE5 Transaction code
Details about SAP transaction code 9KE5 - 9KE4 Transaction code
Details about SAP transaction code 9KE4 - 9KE3 Transaction code
Details about SAP transaction code 9KE3 - 9KE2 Transaction code
Details about SAP transaction code 9KE2 - 9KE1 Transaction code
Details about SAP transaction code 9KE1 - 9KE0 Transaction code
Details about SAP transaction code 9KE0