<?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: shift satetment problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177515#M124686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sanjeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I tried the same at my end.&lt;/P&gt;&lt;P&gt;   I was also confused, but now&lt;/P&gt;&lt;P&gt;   i understood what is happening actually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Its not an error.&lt;/P&gt;&lt;P&gt;   Its the way how the ABAP syntax behaves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In your same program (taken from F1 help)&lt;/P&gt;&lt;P&gt;    i have added EXTENSIONS&lt;/P&gt;&lt;P&gt;    which will make clear &lt;/P&gt;&lt;P&gt;    -how this behaves&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If we take the literal meaning of the words,&lt;/P&gt;&lt;P&gt;   RIGHT = moves the charcters right&lt;/P&gt;&lt;P&gt;   DELETING = Deletes something&lt;/P&gt;&lt;P&gt;   TRAILING = deletes something from right only&lt;/P&gt;&lt;P&gt;   mw       = delete M2 if it is in right only (not in left)&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;5. Try this code to get a taste of it( just copy paste)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. &lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: alphabet(15) VALUE ' ABCDEFGHIJ',&lt;/P&gt;&lt;P&gt;m1(4) VALUE 'ABCD',&lt;/P&gt;&lt;P&gt;m2(6) VALUE 'BJJCA '.&lt;/P&gt;&lt;P&gt;SHIFT alphabet LEFT DELETING LEADING m1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*the field alphabet is unchanged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT alphabet LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*the field alphabet now contains 'ABCDEFGHIJ ' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*the field alphabet now contains 'ABCDEFGHI'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; EXETENSIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alphabet = 'ABCDEFGHIJ'.&lt;/P&gt;&lt;P&gt;m2 = 'IJ'.&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2.&lt;/P&gt;&lt;P&gt;*alphabet is 'ABCDEFGH' 'IJ' Deleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alphabet = 'ABCDEFGHIJ'.&lt;/P&gt;&lt;P&gt;m2 = 'HIJ'.&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2.&lt;/P&gt;&lt;P&gt;*alphabet is 'ABCDEFG' 'HIJ' Deleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alphabet = 'ABCDEFGHIJ'.&lt;/P&gt;&lt;P&gt;m2 = 'GHIJ'.&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2.&lt;/P&gt;&lt;P&gt;*alphabet is 'ABCDEF' 'GHIJ' Deleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break-point.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jan 2006 05:00:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-04T05:00:32Z</dc:date>
    <item>
      <title>shift satetment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177513#M124684</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 not understanding the output of he last one why the out put is 'abcdefghi'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT ALPHABET RIGHT DELETING TRAILING M2.&lt;/P&gt;&lt;P&gt;t&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ALPHABET(15) VALUE '     ABCDEFGHIJ',&lt;/P&gt;&lt;P&gt;      M1(4)        VALUE 'ABCD',&lt;/P&gt;&lt;P&gt;      M2(6)        VALUE 'BJJCA '.&lt;/P&gt;&lt;P&gt;SHIFT ALPHABET LEFT DELETING LEADING M1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field ALPHABET is unchanged. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT ALPHABET LEFT DELETING LEADING SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field ALPHABET now contains 'ABCDEFGHIJ ' . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT ALPHABET RIGHT DELETING TRAILING M2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field ALPHABET now contains ' ABCDEFGHI'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2006 02:19:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177513#M124684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-04T02:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: shift satetment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177514#M124685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the descriptoin in help for shift is as follows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT &amp;lt;c&amp;gt; LEFT DELETING LEADING &amp;lt;str&amp;gt;.&lt;/P&gt;&lt;P&gt;SHIFT &amp;lt;c&amp;gt; RIGHT DELETING TRAILING &amp;lt;str&amp;gt;.&lt;/P&gt;&lt;P&gt;This statement shifts the field &amp;lt;c&amp;gt; to the left or to the right, provided the first character on the left or the last character on the right occur in &amp;lt;str&amp;gt;. The right or left of the field is then padded with blanks. &amp;lt;str&amp;gt; can be a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in your example the 1st shift statement does nothing because the first character is a space so it does not delete anything. 2nd shift deletes all the spaces in front...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the third shift statement looks at the last character in ALPHABET and tries to match it with a character in M2. Only 'J' is available and once it is removed form right...there are no more characters from ALPAHBET to be removed from the right with chars in M2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Renjith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2006 02:49:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177514#M124685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-04T02:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: shift satetment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177515#M124686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sanjeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I tried the same at my end.&lt;/P&gt;&lt;P&gt;   I was also confused, but now&lt;/P&gt;&lt;P&gt;   i understood what is happening actually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Its not an error.&lt;/P&gt;&lt;P&gt;   Its the way how the ABAP syntax behaves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In your same program (taken from F1 help)&lt;/P&gt;&lt;P&gt;    i have added EXTENSIONS&lt;/P&gt;&lt;P&gt;    which will make clear &lt;/P&gt;&lt;P&gt;    -how this behaves&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If we take the literal meaning of the words,&lt;/P&gt;&lt;P&gt;   RIGHT = moves the charcters right&lt;/P&gt;&lt;P&gt;   DELETING = Deletes something&lt;/P&gt;&lt;P&gt;   TRAILING = deletes something from right only&lt;/P&gt;&lt;P&gt;   mw       = delete M2 if it is in right only (not in left)&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;5. Try this code to get a taste of it( just copy paste)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. &lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: alphabet(15) VALUE ' ABCDEFGHIJ',&lt;/P&gt;&lt;P&gt;m1(4) VALUE 'ABCD',&lt;/P&gt;&lt;P&gt;m2(6) VALUE 'BJJCA '.&lt;/P&gt;&lt;P&gt;SHIFT alphabet LEFT DELETING LEADING m1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*the field alphabet is unchanged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT alphabet LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*the field alphabet now contains 'ABCDEFGHIJ ' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*the field alphabet now contains 'ABCDEFGHI'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; EXETENSIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alphabet = 'ABCDEFGHIJ'.&lt;/P&gt;&lt;P&gt;m2 = 'IJ'.&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2.&lt;/P&gt;&lt;P&gt;*alphabet is 'ABCDEFGH' 'IJ' Deleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alphabet = 'ABCDEFGHIJ'.&lt;/P&gt;&lt;P&gt;m2 = 'HIJ'.&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2.&lt;/P&gt;&lt;P&gt;*alphabet is 'ABCDEFG' 'HIJ' Deleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alphabet = 'ABCDEFGHIJ'.&lt;/P&gt;&lt;P&gt;m2 = 'GHIJ'.&lt;/P&gt;&lt;P&gt;SHIFT alphabet RIGHT DELETING TRAILING m2.&lt;/P&gt;&lt;P&gt;*alphabet is 'ABCDEF' 'GHIJ' Deleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break-point.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2006 05:00:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shift-satetment-problem/m-p/1177515#M124686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-04T05:00:32Z</dc:date>
    </item>
  </channel>
</rss>

