Hi Maithali,
Please use statement with Keyword Condense.
Example illustrated below:
CONDENSE string.
DATA: VAR(10) VALUE ' ABC '.
CONDENSE VAR. "Removes SPACES both sides of a String.
WRITE: VAR. "output = ABC
VAR = ' A B C '.
CONDENSE VAR. "Removes all SPACES of a String.
WRITE: VAR. "output = ABC
Please validate the same at your end and act accordingly, please come back if any inputs are required.
BR/Thanks
Pranav Agrawal