Application Development 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: 

Condense problem

Former Member
0 Kudos

Hi all

i am facing problem with condense.

here is my requirement i am sending file to the Webmethods server. to send file to webmethods server i have to declare all the fields as Character type only (C)

as per my knowledge we can't delete the spaces in the field of character type.Can any body suggest me the alternative solution. Please keep in mind that we are sending the file to webmethods so the alternative solution should satisfy the webmethods criteria.

regards

sreeni

3 REPLIES 3

Former Member
0 Kudos

Hi Sreenivas,

Try CONDENSE With NO-GAPS option to supprress all spaces in a character field but I dont the impact of this on webmethods.

CONDENSE will shifts the contents of the field to the left, so that each word is separated by exactly one blank.

NO-GAPS will suppresses all blanks from the field.

<b>CONDENSE V_CHAR NO-GAPS.</b>

Check this link for CONDENSE statment

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

Thanks,

Vinay

venkata_ramisetti
Active Contributor
0 Kudos

Hi Sreenivasa Reddy,

It is possible tp delete spaces in a chracter fields using CONDENSE statement with NO-GAPS option.

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.

Thanks,

Ramakrishna

Former Member
0 Kudos

I'm not sure exactly what you're looking for. Maybe this will help:

  data: l_html type swww_t_html_l_tab with header line.
  loop at packed_html.
    l_html-len  = strlen( packed_html-line ).
    l_html-line = packed_html-line.
    append l_html.
  endloop.
  refresh: packed_html.  clear: packed_html.
  call function 'WWW_PACK_TABLE'
       tables
            html_table        = l_html[]
            html_table_packed = packed_html[].

Rob