<?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: SAPCE AFTER CHARACTERS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570659#M1078533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First imp thing is that you can not add spaces after the last character of string. These sapces will be deleted automatically. One thing you can do is add spaces before the actual string using 'shift right'. But in this case, your field will be right alligned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna Gaikwad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Sep 2008 12:24:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-22T12:24:06Z</dc:date>
    <item>
      <title>SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570652#M1078526</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;I am downloading a txt file for E payment but i am having one query...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i download a txt file in header data i have one query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in header my last field is 20 character long but it has  4 character 'ABCD' (FOR EXAMPLE )&lt;/P&gt;&lt;P&gt;                          So now i want other 16 character should be space&lt;/P&gt;&lt;P&gt;I had done&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA : SRC_CD(20).

  SHIFT  SRC_CD RIGHT DELETING TRAILING SPACE.
  TRANSLATE SRC_CD USING '* '.

  WA_HEADER-SRC_CD = SRC_CD.

  TRANSLATE WA_HEADER-SRC_CD USING '* '.

  APPEND WA_HEADER TO IT_HEADER.
  CLEAR WA_HEADER.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But when i open the txt file it does not put last 16 space&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 09:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570652#M1078526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T09:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570653#M1078527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;
&amp;gt;   SHIFT  SRC_CD RIGHT DELETING TRAILING SPACE.
&amp;gt;   TRANSLATE SRC_CD USING '* '.
&amp;gt; &lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi avoid using deleting trailing space and try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 09:45:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570653#M1078527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T09:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570654#M1078528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi karthik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried &lt;/P&gt;&lt;P&gt;and i hv removed all that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i thought if its length is 20 C then automatically it should take up&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but its not taking&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 09:51:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570654#M1078528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T09:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570655#M1078529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZTEST_SOURAV23
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ztest_sourav23.


DATA: table TYPE STANDARD TABLE OF char100,
      line TYPE char100,
      blank_char TYPE string,
      length TYPE i,
      filename TYPE string,
      req_spaces type string.

PARAMETERS: p_fname TYPE localfile OBLIGATORY.

CALL METHOD cl_abap_char_utilities=&amp;gt;get_simple_spaces_for_cur_cp
  RECEIVING
    s_str = blank_char.

*Move first field
line = 'ABCD'.
length = STRLEN( line ).
length = 20 - length.
DO length TIMES.
  CONCATENATE blank_char+0(1) req_spaces INTO req_spaces.
ENDDO.
*Move second field
CONCATENATE line '343434' INTO line SEPARATED BY req_spaces.

APPEND line TO table.

filename = p_fname.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
*   BIN_FILESIZE                    =
    filename                        = filename
*   FILETYPE                        = 'ASC'
*   APPEND                          = ' '
*   WRITE_FIELD_SEPARATOR           = ' '
*   HEADER                          = '00'
*   TRUNC_TRAILING_BLANKS           = ' '
*   WRITE_LF                        = 'X'
*   COL_SELECT                      = ' '
*   COL_SELECT_MASK                 = ' '
*   DAT_MODE                        = ' '
*   CONFIRM_OVERWRITE               = ' '
*   NO_AUTH_CHECK                   = ' '
*   CODEPAGE                        = ' '
*   IGNORE_CERR                     = ABAP_TRUE
*   REPLACEMENT                     = '#'
*   WRITE_BOM                       = ' '
*   TRUNC_TRAILING_BLANKS_EOL       = 'X'
*   WK1_N_FORMAT                    = ' '
*   WK1_N_SIZE                      = ' '
*   WK1_T_FORMAT                    = ' '
*   WK1_T_SIZE                      = ' '
*   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
*   SHOW_TRANSFER_STATUS            = ABAP_TRUE
* IMPORTING
*   FILELENGTH                      =
  TABLES
    data_tab                        = table
*   FIELDNAMES                      =
 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
   OTHERS                          = 22
          .
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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 10:22:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570655#M1078529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T10:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570656#M1078530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sourav ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanxs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i dont want 3456 at the end&lt;/P&gt;&lt;P&gt;my problem is i want space only after first 4 characters ...that means 16 space&lt;/P&gt;&lt;P&gt;but after downloading it is not happening&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnxs &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 10:36:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570656#M1078530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T10:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570657#M1078531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rajan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are sure to have space after the text i have a turnaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data lv_text(20) TYPE C VALUE 'ABCD'.

data : begin of itab OCCURS 0,
  lv_text(21),
  count,
  end of itab.

BREAK-POINT.
CONCATENATE lv_text '.' INTO itab-lv_text RESPECTING BLANKS.
itab-count = '1'.
APPEND itab.

CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'c:\hello.txt'
          filetype                = 'DAT'
          write_lf                = 'X'
        TABLES
          data_tab                = itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i have increased the length of the variable to 21 and added a . (Dot) in 21st position. so download it as usual and after down load open it in notepad , Edit -&amp;gt; Replace, in that Find . (dot) and replace with '' (no space between quotes) and press Replace all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need any clarification revert back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 11:16:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570657#M1078531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T11:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570658#M1078532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dude&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are thats not  possible&lt;/P&gt;&lt;P&gt;here for an example i m using gui_download actualy i m downloding and saving this flat file to application server tan i pacle to portal application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so thats not the correcty way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u hv any other way &lt;/P&gt;&lt;P&gt;do tell me&lt;/P&gt;&lt;P&gt;thanxs by the way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 12:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570658#M1078532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T12:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570659#M1078533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First imp thing is that you can not add spaces after the last character of string. These sapces will be deleted automatically. One thing you can do is add spaces before the actual string using 'shift right'. But in this case, your field will be right alligned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna Gaikwad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 12:24:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570659#M1078533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T12:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570660#M1078534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;aparna&lt;/P&gt;&lt;P&gt;i know i can add space before but as i m downloading this flat file and using as an e payment with bank&lt;/P&gt;&lt;P&gt;so bank ppl are saying that they need space if the variable is 20 C and its coming 5 C ..&lt;/P&gt;&lt;P&gt;15 spaces shoulld be there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hv to do it anyhow...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 12:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570660#M1078534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T12:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570661#M1078535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in gui_download function module use    *WRITE_FIELD_SEPARATOR           = ' X'. *&lt;/P&gt;&lt;P&gt;it will separates column by column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 12:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570661#M1078535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T12:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570662#M1078536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are dudde&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read the above answers then reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2008 13:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570662#M1078536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-22T13:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAPCE AFTER CHARACTERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570663#M1078537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its done&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;rajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 07:02:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapce-after-characters/m-p/4570663#M1078537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T07:02:26Z</dc:date>
    </item>
  </channel>
</rss>

