<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: reg :spaces in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281622#M1021457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of Web AS 2.0 we cannot use CONCATENATE statement as it ignores trailing spaces but from release 7.0 this statement can be used with new addition RESPECTING BLANKS to achieve the same. So to accomplish this task in 6.20 we can use the method UCCP of class CL_ABAP_CONV_IN_CE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample code..may be it will help u..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  z_sn_space.


CONSTANTS: c_space TYPE syhex02 VALUE '00a0'. " Value for space

DATA: g_space TYPE string,
             l_pos type i.

TYPES: BEGIN OF ty_data,
        field1(8) TYPE c,
       END OF ty_data.

DATA: wa_data TYPE ty_data.
DATA: i_data TYPE STANDARD TABLE OF ty_data.

* Get the actual value for a space
g_space = cl_abap_conv_in_ce=&amp;gt;uccp( c_space ).

wa_data-field1 = 'Joy'.
L_pos = strlen( wa_data-field1 ).
Do 5 times.

wa_data-field1+l_pos(1) = g_space.
L_pos = l_pos + 1.
Enddo.

APPEND wa_data TO i_data.

CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download
  EXPORTING
    filename                  = 'C:\trailing_space_demo.txt'
  CHANGING
    data_tab                  = i_data
  EXCEPTIONS
    FILE_WRITE_ERROR          = 1
    NO_BATCH                  = 2
    GUI_REFUSE_FILETRANSFER   = 3
    INVALID_TYPE              = 4
    NO_AUTHORITY              = 5
    UNKNOWN_ERROR             = 6
    HEADER_NOT_ALLOWED        = 7
    SEPARATOR_NOT_ALLOWED     = 8
    FILESIZE_NOT_ALLOWED      = 9
    HEADER_TOO_LONG           = 10
    DP_ERROR_CREATE           = 11
    DP_ERROR_SEND             = 12
    DP_ERROR_WRITE            = 13
    UNKNOWN_DP_ERROR          = 14
    ACCESS_DENIED             = 15
    DP_OUT_OF_MEMORY          = 16
    DISK_FULL                 = 17
    DP_TIMEOUT                = 18
    FILE_NOT_FOUND            = 19
    DATAPROVIDER_EXCEPTION    = 20
    CONTROL_FLUSH_ERROR       = 21
    NOT_SUPPORTED_BY_GUI      = 22
    ERROR_NO_GUI              = 23
    others                    = 24
        .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Joyjit Ghosh on Aug 13, 2008 2:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Aug 2008 12:21:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-13T12:21:26Z</dc:date>
    <item>
      <title>reg :spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281619#M1021454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have used concatenate command but the thing is that in output when i see after c_version value there shud be 20 spaces .but it is not happening now .whenevr i give blank spaces to add after all the variables then it is not taking .for ex ... i have below pasted the file output .after 2.0 there shud be 20 spaces but if we press right arrow key it shud not go to the next line after 20 spaces it shud go to the next line .any pointers plz thanx in advance ......&lt;/P&gt;&lt;P&gt;INVSYNSSD  B70SAPAMS0000000005D0000002520200808130556352.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : l_spare TYPE string,&lt;/P&gt;&lt;P&gt;l_sp_size TYPE i VALUE '20'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SHIFT l_spare   RIGHT BY l_sp_size PLACES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE c_msg_type   c_msg_stype l_tr_type&lt;/P&gt;&lt;P&gt;              zsource_site c_sou_appln l_seq_fno&lt;/P&gt;&lt;P&gt;              l_envrn      l_msg_flgth l_stamp&lt;/P&gt;&lt;P&gt;              c_version    l_spare INTO wa_final_header.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 12:15:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281619#M1021454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T12:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: reg :spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281620#M1021455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after concatenate use RESPECTING BLANKS addition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 12:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281620#M1021455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T12:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: reg :spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281621#M1021456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to use &lt;STRONG&gt;RESPECTING BLANKS&lt;/STRONG&gt; addition in concatenate statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;concatenate 'name' '    ' into v_name separeted by ',' RESPECTING BLANKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Boobalan S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 12:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281621#M1021456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T12:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: reg :spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281622#M1021457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of Web AS 2.0 we cannot use CONCATENATE statement as it ignores trailing spaces but from release 7.0 this statement can be used with new addition RESPECTING BLANKS to achieve the same. So to accomplish this task in 6.20 we can use the method UCCP of class CL_ABAP_CONV_IN_CE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample code..may be it will help u..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  z_sn_space.


CONSTANTS: c_space TYPE syhex02 VALUE '00a0'. " Value for space

DATA: g_space TYPE string,
             l_pos type i.

TYPES: BEGIN OF ty_data,
        field1(8) TYPE c,
       END OF ty_data.

DATA: wa_data TYPE ty_data.
DATA: i_data TYPE STANDARD TABLE OF ty_data.

* Get the actual value for a space
g_space = cl_abap_conv_in_ce=&amp;gt;uccp( c_space ).

wa_data-field1 = 'Joy'.
L_pos = strlen( wa_data-field1 ).
Do 5 times.

wa_data-field1+l_pos(1) = g_space.
L_pos = l_pos + 1.
Enddo.

APPEND wa_data TO i_data.

CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download
  EXPORTING
    filename                  = 'C:\trailing_space_demo.txt'
  CHANGING
    data_tab                  = i_data
  EXCEPTIONS
    FILE_WRITE_ERROR          = 1
    NO_BATCH                  = 2
    GUI_REFUSE_FILETRANSFER   = 3
    INVALID_TYPE              = 4
    NO_AUTHORITY              = 5
    UNKNOWN_ERROR             = 6
    HEADER_NOT_ALLOWED        = 7
    SEPARATOR_NOT_ALLOWED     = 8
    FILESIZE_NOT_ALLOWED      = 9
    HEADER_TOO_LONG           = 10
    DP_ERROR_CREATE           = 11
    DP_ERROR_SEND             = 12
    DP_ERROR_WRITE            = 13
    UNKNOWN_DP_ERROR          = 14
    ACCESS_DENIED             = 15
    DP_OUT_OF_MEMORY          = 16
    DISK_FULL                 = 17
    DP_TIMEOUT                = 18
    FILE_NOT_FOUND            = 19
    DATAPROVIDER_EXCEPTION    = 20
    CONTROL_FLUSH_ERROR       = 21
    NOT_SUPPORTED_BY_GUI      = 22
    ERROR_NO_GUI              = 23
    others                    = 24
        .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Joyjit Ghosh on Aug 13, 2008 2:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 12:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281622#M1021457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T12:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: reg :spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281623#M1021458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,ITS NOT WORKING FOR ME CAN YOU BRIEF ME AGAIN WITH A PIECE OF SAMPLE CODE .THANX IN ADVANCE ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 12:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-spaces/m-p/4281623#M1021458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T12:43:42Z</dc:date>
    </item>
  </channel>
</rss>

