Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to remove spaces?

Former Member
0 Likes
963

hi all,

i have a code like this

concatenate '"' i_result1-werks '"' into i_output-werks.

concatenate '"' i_result1-matnr '"' into i_output-matnr.

concatenate '"' i_result1-idnrk '"' into i_output-idnrk.

concatenate '"' i_result1-maktx '"' into i_output-maktx.

the final i_output values comes with spaces like this

" data value 1 ", " data value 2 " instead of

"data value 1 ", "data value 2".

how to remove the spaces?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
929

hi,

Make use of <b>condense</b> statement

refer

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/condense.htm

Regards,

Santosh

5 REPLIES 5
Read only

Former Member
0 Likes
930

hi,

Make use of <b>condense</b> statement

refer

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/condense.htm

Regards,

Santosh

Read only

Former Member
0 Likes
929

try this..

concatenate '"' i_result1-werks '"' into i_output-werks.
condense i_output-werks.
concatenate '"' i_result1-matnr '"' into i_output-matnr.
condense  i_output-matnr.
concatenate '"' i_result1-idnrk '"' into i_output-idnrk.
condense  i_output-idnrk.
concatenate '"' i_result1-maktx '"' into i_output-maktx.
condense i_output-maktx.

Read only

Former Member
0 Likes
929

hi u can also try this.

SHIFT I_OUTPUT-WERKS LEFT DELETING LEADING SPACES.

Cheers,

Sam

Read only

Former Member
0 Likes
929

instead of deleting spaces in every value of the column,can't the spaces be deleted of a particular column at one go?

Read only

Former Member
0 Likes
929

Condense i_output-werks no-gaps.

Condense i_output-matnr no-gaps.

Condense i_output-idnrk no-gaps.

Condense i_output-maktx no-gaps.