<?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: Moving a string in a variable field. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384638#M1042901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Else try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types : begin of t1,
        field1(10) type c,
        field2(10) type c,
        field3(10) type c.
types : end of t1.

data  : wa_t1 type t1.

move 'User id' to wa_t1-field1.
move 'zxxxxxx' to wa_t1-field3.

move wa_t1 to objtxt.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2008 19:07:04 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2008-08-18T19:07:04Z</dc:date>
    <item>
      <title>Moving a string in a variable field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384635#M1042898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have defined:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: objtxt like solisti1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to concatenate two words with like ten spaces in between and move it to obtxt. How cam I do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usserid......................z998iis &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I use concatenate even with spaces in between it concatnates the two words. I can I maintains spaces between these words when concatenating and moving in the field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 18:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384635#M1042898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T18:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a string in a variable field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384636#M1042899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this instead of the concatenate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
objtxt+0(20) = 'User ID'.
objtxt+20(12) = 'z998iis'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 18:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384636#M1042899</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-18T18:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a string in a variable field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384637#M1042900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data: objtxt like solisti1 occurs 0 with header line.

CONCATENATE 'Userid' '##########' 'z998iis' into objtxt.
replace '##########' in objtxt with space.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you might want to also look into using HTML to format the output of your email.  It would be easier than trying to line all this up.  Here is an example of using HTML in your email body.  In  your case, you can use a &amp;lt;table&amp;gt; tag to set up some columns with the appropriate spacing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zrich_0002.

data: maildata   like sodocchgi1.
data: mailtxt    like solisti1 occurs 10 with header line.
data: mailrec    like somlrec90 occurs 0  with header line.

start-of-selection.

  clear:    maildata, mailtxt,  mailrec.
  refresh:  mailtxt, mailrec.

  maildata-obj_name = 'TEST'.
  maildata-obj_descr = 'Test Subject'.


  mailtxt  = '&amp;lt;html&amp;gt;'.
  append mailtxt.


  mailtxt  = '&amp;lt;body&amp;gt;'.
  append mailtxt.

  mailtxt
   = '&amp;lt;a href="http:\\www.sap.com" target="_blank"&amp;gt;SAP Hyperlink&amp;lt;/a&amp;gt; '.
  append mailtxt.

  mailtxt  = '&amp;lt;/body&amp;gt;'.
  append mailtxt.

  mailtxt  = '&amp;lt;/html&amp;gt;'.
  append mailtxt.


  mailrec-receiver = 'putyourmailaddresshere'.
  mailrec-rec_type  = 'U'.
  append mailrec.

  call function 'SO_NEW_DOCUMENT_SEND_API1'
       exporting
            document_data              = maildata
            document_type              = 'HTM'
            put_in_outbox              = 'X'
       tables
            object_header              = mailtxt
            object_content             = mailtxt
            receivers                  = mailrec
       exceptions
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5

            x_error                    = 6
            enqueue_error              = 7
            others                     = 8.
  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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 19:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384637#M1042900</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-08-18T19:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a string in a variable field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384638#M1042901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Else try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types : begin of t1,
        field1(10) type c,
        field2(10) type c,
        field3(10) type c.
types : end of t1.

data  : wa_t1 type t1.

move 'User id' to wa_t1-field1.
move 'zxxxxxx' to wa_t1-field3.

move wa_t1 to objtxt.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 19:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384638#M1042901</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-08-18T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a string in a variable field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384639#M1042902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Rich, suggested you can use the HTML to display your data in the Table format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check my answer in this post for how to dispaly data in proper table format.&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="995702"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 19:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384639#M1042902</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-18T19:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a string in a variable field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384640#M1042903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;else try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : field(30) type c.
concatenate 'test     '  'test1' into field respecting blanks.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 19:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-a-string-in-a-variable-field/m-p/4384640#M1042903</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-08-18T19:16:45Z</dc:date>
    </item>
  </channel>
</rss>

