<?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: Date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626925#M603714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Processing Sections of Strings &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can address a section of a string in any statement in which non-numeric elementary ABAP types or structures that do not contain internal tables occur using the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f&amp;gt;[+&amp;lt;o&amp;gt;][(&amp;lt;l&amp;gt;)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By specifying an offset &lt;EM&gt;&amp;lt;o&amp;gt; and a length (&amp;lt;l&amp;gt;) directly after the field name &amp;lt;f&amp;gt;, you can address the part of the field starting at position &amp;lt;o&amp;gt;&lt;/EM&gt;1 with length &amp;lt;l&amp;gt; as though it were an independent data object. The data type and length of the string section are as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original field&lt;/P&gt;&lt;P&gt; Section&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Data type&lt;/P&gt;&lt;P&gt; Data type&lt;/P&gt;&lt;P&gt; Length&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt; C&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;N&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;T&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt; X&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;P&gt; C&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not specify the length &amp;lt;l&amp;gt;, you address the section of the field from &amp;lt;o&amp;gt; to the end of the field. If the offset and length combination that you specify leads to an invalid section of the field (for example, exceeding the length of the original field), a syntax or runtime error occurs. You cannot use offset and length to address a literal or a text symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should take particular care when addressing components of structures. To ensure the correct platform-specific alignment of type I and F components, they may contain filler fields, whose lengths you need to consider when calculating the correct offset. Furthermore, SAP plans to convert the internal representation of character types to UNICODE, in which one character will no longer occupy one byte, but instead two or four. Although offset and length specifications can work for character fields (types C, D, N, and T) or for hexadecimal fields (type X), incompatible changes may occur in structures containing a mixture of numeric, character, and hexadecimal fields. SAP therefore recommends that you do not use offset and length to address components of structures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In nearly all cases, you must specify offset &amp;lt;o&amp;gt; and length &amp;lt;l&amp;gt; as numeric literals without a preceding sign. You may specify them dynamically in the following cases: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When assigning values using MOVE or the assignment operator &lt;/P&gt;&lt;P&gt;When assigning values with WRITE TO &lt;/P&gt;&lt;P&gt;When assigning field symbols using ASSIGN. &lt;/P&gt;&lt;P&gt;When passing actual parameters to subroutines in the PERFORM statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TIME TYPE T VALUE '172545'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE TIME.&lt;/P&gt;&lt;P&gt;WRITE / TIME+2(2).&lt;/P&gt;&lt;P&gt;CLEAR TIME+2(4).&lt;/P&gt;&lt;P&gt;WRITE / TIME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;172545&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;170000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the minutes are selected by specifying an offset in the WRITE statement. Then, the minutes and seconds are set to their initial values by specifying an offset in the clear statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset and Length Specifications in the MOVE Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the MOVE statement, the syntax for specifying offset and length is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;f1&amp;gt;[&lt;EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)] TO &amp;lt;f2&amp;gt;[&lt;/EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, when you use the assignment operator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f2&amp;gt;[&lt;EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)] = &amp;lt;f1&amp;gt;[&lt;/EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the part of the field &amp;lt;f1&amp;gt; which begins at position &amp;lt;o1&amp;gt;&lt;EM&gt;1 and has a length of &amp;lt;l1&amp;gt; are assigned to field &amp;lt;f2&amp;gt;, where they overwrite the section which begins at position &amp;lt;o2&amp;gt;&lt;/EM&gt;1 and has a length of &amp;lt;l2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the MOVE statement, all offset and length specifications can be variables. This also applies to statements with the assignment operator, as long as these can also be written as MOVE statements. In statements where no field name is specified after the assignment operator, (for example, in Numeric Operations), all offset and length specifications must be unsigned number literals. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP recommends that you assign values with offset and length specifications only between non-numeric fields. With numeric fields, the results can be meaningless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(8)  VALUE 'ABCDEFGH',&lt;/P&gt;&lt;P&gt;      F2(20) VALUE '12345678901234567890'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F2&lt;EM&gt;6(5) = F1&lt;/EM&gt;3(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the assignment operator functions as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(8) VALUE 'ABCDEFGH',&lt;/P&gt;&lt;P&gt;F2(8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: O TYPE I VALUE 2,&lt;/P&gt;&lt;P&gt;L TYPE I VALUE 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2.      WRITE F2.&lt;/P&gt;&lt;P&gt;MOVE F1+O(L) TO F2.      WRITE / F2.&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2+O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR F2.&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2+O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;MOVE F1&lt;EM&gt;O(L) TO F2&lt;/EM&gt;O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABCDEFGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDABCD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ABCD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CDEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the contents of F1 are assigned to F2 without offset specifications. Then, the same happens for F1 with offset and length specification. The next three MOVE statements overwrite the contents of F2 with offset 2. Note that F2 is filled with spaces on the right, in accordance with the conversion rule for source type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset and Length Specifications in the WRITE TO Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the WRITE TO statement, the syntax for specifying offset and length is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &amp;lt;f1&amp;gt;[&lt;EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)] TO &amp;lt;f2&amp;gt;[&lt;/EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the part of the field &amp;lt;f1&amp;gt; which begins at position &amp;lt;o1&amp;gt;&lt;EM&gt;1 and has a length of &amp;lt;l1&amp;gt; are converted to a character field and assigned to field &amp;lt;f2&amp;gt;, where they overwrite the section which begins at position &amp;lt;o2&amp;gt;&lt;/EM&gt;1 and has a length of &amp;lt;l2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the WRITE TO statement, the offset and length specifications of the target field can be variables. The offset and length of the target field must be numeric literals without a preceding sign. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: STRING(20),&lt;/P&gt;&lt;P&gt;NUMBER(8) TYPE C VALUE '123456',&lt;/P&gt;&lt;P&gt;OFFSET TYPE I VALUE 8,&lt;/P&gt;&lt;P&gt;LENGTH TYPE I VALUE 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER(6) TO STRING+OFFSET(LENGTH) LEFT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER(6) TO STRING+OFFSET(LENGTH) CENTERED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER TO STRING+OFFSET(LENGTH) RIGHT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first six characters of the field NUMBER are written left-justified, centered, and right-justified into the last 12 characters of the field STRING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2007 09:37:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-31T09:37:08Z</dc:date>
    <item>
      <title>Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626915#M603704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;concatenate today&lt;EM&gt;6(2) '.' today&lt;/EM&gt;4(2) '.'&lt;/P&gt;&lt;P&gt;      today+0(4) into today1.&lt;/P&gt;&lt;P&gt;plz do explain wht does 6(2)/4()/0(4) and '.' stand for....wht does it do ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626915#M603704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626916#M603705</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;6(2)/4(2)/0(4) are offset values of the field today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using these offset values values inside today field is divided into date , month, year and these values are concatenating into the field today1 seperated by period '.'.&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;Sankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626916#M603705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626917#M603706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;It is called Offsetting of a field&lt;/P&gt;&lt;P&gt;if a field is having 10 charcters&lt;/P&gt;&lt;P&gt;then field+4(2) gives the 5th and 6th charcters data&lt;/P&gt;&lt;P&gt;similarly field+6(4) gives the 7th, 8th,9th and 10th char data (4 char)&lt;/P&gt;&lt;P&gt;for a date field first char is year and next 2 char(5th and 6th) are month and last 2 char are day fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anji Reddy Vangala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:08:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626917#M603706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626918#M603707</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;Chk this sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in_date = '20070903'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : out_date(10) type c.

*take variables V1, V2, V3.
V3 = in_date+6(2).
V2 = in_date+4(2).
V1 = in_date+0(4).

Concatenate V3 V2 V1 into out_date separated by '.'.



write out_date."03.09.2007&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:10:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626918#M603707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626919#M603708</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;everytime you add m(n) with a string, it means it would select (n) number of numbers from m th position in the given string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626919#M603708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626920#M603709</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;if today contains suppose  20060431 (YYYYMMDD format)  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here today+6(2) is from 6th postion 2 characters ie 3 and 1&lt;/P&gt;&lt;P&gt;today+4(2)  is from 4th postion 2 characters    ie 0 and 4&lt;/P&gt;&lt;P&gt;today+0(4) is first four characaters  2006&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you are concatenating dot(.) in betweeen and making it as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;31.07.2006  is format you are trying to see&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;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626920#M603709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626921#M603710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in sap   the  values  of data is as follows .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"  YYYYMMDD&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; " 6(2)-&amp;gt; From 6th position to 6+2 = Upto 8TH Position  is DD.
" 4(2)-&amp;gt; From 4th position to 4+2 = Upto 6TH Position  is MM.
" And 0(4)-&amp;gt; From 0th position to 0+4 = Upto 4TH Position  is YYYY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;' concatenate today+6(2) '.' today+4(2) '.' today+0(4) into today1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" . "&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  is an  string  concatenated  with your data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward  points if it is usefull ...&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626921#M603710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626922#M603711</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;   today+6(2) means it takes 2 digits from 7th position where the postion starts from 0.&lt;/P&gt;&lt;P&gt;today+4(2) means 2 digits from 5th position &lt;/P&gt;&lt;P&gt;today+0(4) means 4 digits from starting value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it concatenates all these along with fullstop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sandhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626922#M603711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626923#M603712</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;6(2) means after 6th position it will take next 2 characters(i.e. 7th and 8th position values).&lt;/P&gt;&lt;P&gt;4(2) means it will take 5th and 6th position values.&lt;/P&gt;&lt;P&gt;0(4) means it will take first 4 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex. today date is 20070731.&lt;/P&gt;&lt;P&gt;6(2) = 31.&lt;/P&gt;&lt;P&gt;4(2) = 07.&lt;/P&gt;&lt;P&gt;0(4) = 2007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then today1 = 31.07.2007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626923#M603712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626924#M603713</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;plz do explain wht does 6(2)/4()/0(4) and '.' stand for....wht does it do .... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;  it means you have a date field today Format YYYYMMDD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in today+6(2), you are capturing DD 2 digits after 6th digit.&lt;/P&gt;&lt;P&gt;in today+4(2), you are capturing MM 2 digits after 4th digit.&lt;/P&gt;&lt;P&gt;in today+0(4), you are capturing YYYY 4 digits after 0 digit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you are saving these value in other field today1 saperated by '.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the format will be for display now as 'YYYY.MM.DD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward, if helpful,&lt;/P&gt;&lt;P&gt;Sandeep Kaushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:35:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626924#M603713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626925#M603714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Processing Sections of Strings &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can address a section of a string in any statement in which non-numeric elementary ABAP types or structures that do not contain internal tables occur using the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f&amp;gt;[+&amp;lt;o&amp;gt;][(&amp;lt;l&amp;gt;)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By specifying an offset &lt;EM&gt;&amp;lt;o&amp;gt; and a length (&amp;lt;l&amp;gt;) directly after the field name &amp;lt;f&amp;gt;, you can address the part of the field starting at position &amp;lt;o&amp;gt;&lt;/EM&gt;1 with length &amp;lt;l&amp;gt; as though it were an independent data object. The data type and length of the string section are as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original field&lt;/P&gt;&lt;P&gt; Section&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Data type&lt;/P&gt;&lt;P&gt; Data type&lt;/P&gt;&lt;P&gt; Length&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt; C&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;N&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;T&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt; X&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;P&gt; C&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not specify the length &amp;lt;l&amp;gt;, you address the section of the field from &amp;lt;o&amp;gt; to the end of the field. If the offset and length combination that you specify leads to an invalid section of the field (for example, exceeding the length of the original field), a syntax or runtime error occurs. You cannot use offset and length to address a literal or a text symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should take particular care when addressing components of structures. To ensure the correct platform-specific alignment of type I and F components, they may contain filler fields, whose lengths you need to consider when calculating the correct offset. Furthermore, SAP plans to convert the internal representation of character types to UNICODE, in which one character will no longer occupy one byte, but instead two or four. Although offset and length specifications can work for character fields (types C, D, N, and T) or for hexadecimal fields (type X), incompatible changes may occur in structures containing a mixture of numeric, character, and hexadecimal fields. SAP therefore recommends that you do not use offset and length to address components of structures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In nearly all cases, you must specify offset &amp;lt;o&amp;gt; and length &amp;lt;l&amp;gt; as numeric literals without a preceding sign. You may specify them dynamically in the following cases: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When assigning values using MOVE or the assignment operator &lt;/P&gt;&lt;P&gt;When assigning values with WRITE TO &lt;/P&gt;&lt;P&gt;When assigning field symbols using ASSIGN. &lt;/P&gt;&lt;P&gt;When passing actual parameters to subroutines in the PERFORM statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TIME TYPE T VALUE '172545'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE TIME.&lt;/P&gt;&lt;P&gt;WRITE / TIME+2(2).&lt;/P&gt;&lt;P&gt;CLEAR TIME+2(4).&lt;/P&gt;&lt;P&gt;WRITE / TIME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;172545&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;170000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the minutes are selected by specifying an offset in the WRITE statement. Then, the minutes and seconds are set to their initial values by specifying an offset in the clear statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset and Length Specifications in the MOVE Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the MOVE statement, the syntax for specifying offset and length is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;f1&amp;gt;[&lt;EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)] TO &amp;lt;f2&amp;gt;[&lt;/EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, when you use the assignment operator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f2&amp;gt;[&lt;EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)] = &amp;lt;f1&amp;gt;[&lt;/EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the part of the field &amp;lt;f1&amp;gt; which begins at position &amp;lt;o1&amp;gt;&lt;EM&gt;1 and has a length of &amp;lt;l1&amp;gt; are assigned to field &amp;lt;f2&amp;gt;, where they overwrite the section which begins at position &amp;lt;o2&amp;gt;&lt;/EM&gt;1 and has a length of &amp;lt;l2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the MOVE statement, all offset and length specifications can be variables. This also applies to statements with the assignment operator, as long as these can also be written as MOVE statements. In statements where no field name is specified after the assignment operator, (for example, in Numeric Operations), all offset and length specifications must be unsigned number literals. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP recommends that you assign values with offset and length specifications only between non-numeric fields. With numeric fields, the results can be meaningless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(8)  VALUE 'ABCDEFGH',&lt;/P&gt;&lt;P&gt;      F2(20) VALUE '12345678901234567890'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F2&lt;EM&gt;6(5) = F1&lt;/EM&gt;3(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the assignment operator functions as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(8) VALUE 'ABCDEFGH',&lt;/P&gt;&lt;P&gt;F2(8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: O TYPE I VALUE 2,&lt;/P&gt;&lt;P&gt;L TYPE I VALUE 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2.      WRITE F2.&lt;/P&gt;&lt;P&gt;MOVE F1+O(L) TO F2.      WRITE / F2.&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2+O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR F2.&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2+O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;MOVE F1&lt;EM&gt;O(L) TO F2&lt;/EM&gt;O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABCDEFGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDABCD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ABCD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CDEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the contents of F1 are assigned to F2 without offset specifications. Then, the same happens for F1 with offset and length specification. The next three MOVE statements overwrite the contents of F2 with offset 2. Note that F2 is filled with spaces on the right, in accordance with the conversion rule for source type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset and Length Specifications in the WRITE TO Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the WRITE TO statement, the syntax for specifying offset and length is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &amp;lt;f1&amp;gt;[&lt;EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)] TO &amp;lt;f2&amp;gt;[&lt;/EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the part of the field &amp;lt;f1&amp;gt; which begins at position &amp;lt;o1&amp;gt;&lt;EM&gt;1 and has a length of &amp;lt;l1&amp;gt; are converted to a character field and assigned to field &amp;lt;f2&amp;gt;, where they overwrite the section which begins at position &amp;lt;o2&amp;gt;&lt;/EM&gt;1 and has a length of &amp;lt;l2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the WRITE TO statement, the offset and length specifications of the target field can be variables. The offset and length of the target field must be numeric literals without a preceding sign. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: STRING(20),&lt;/P&gt;&lt;P&gt;NUMBER(8) TYPE C VALUE '123456',&lt;/P&gt;&lt;P&gt;OFFSET TYPE I VALUE 8,&lt;/P&gt;&lt;P&gt;LENGTH TYPE I VALUE 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER(6) TO STRING+OFFSET(LENGTH) LEFT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER(6) TO STRING+OFFSET(LENGTH) CENTERED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER TO STRING+OFFSET(LENGTH) RIGHT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first six characters of the field NUMBER are written left-justified, centered, and right-justified into the last 12 characters of the field STRING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:37:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626925#M603714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626926#M603715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Processing Sections of Strings &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can address a section of a string in any statement in which non-numeric elementary ABAP types or structures that do not contain internal tables occur using the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f&amp;gt;[+&amp;lt;o&amp;gt;][(&amp;lt;l&amp;gt;)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By specifying an offset &lt;EM&gt;&amp;lt;o&amp;gt; and a length (&amp;lt;l&amp;gt;) directly after the field name &amp;lt;f&amp;gt;, you can address the part of the field starting at position &amp;lt;o&amp;gt;&lt;/EM&gt;1 with length &amp;lt;l&amp;gt; as though it were an independent data object. The data type and length of the string section are as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original field&lt;/P&gt;&lt;P&gt; Section&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Data type&lt;/P&gt;&lt;P&gt; Data type&lt;/P&gt;&lt;P&gt; Length&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt; C&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;N&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;T&lt;/P&gt;&lt;P&gt; N&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt; X&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;P&gt; C&lt;/P&gt;&lt;P&gt; &amp;lt;l&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not specify the length &amp;lt;l&amp;gt;, you address the section of the field from &amp;lt;o&amp;gt; to the end of the field. If the offset and length combination that you specify leads to an invalid section of the field (for example, exceeding the length of the original field), a syntax or runtime error occurs. You cannot use offset and length to address a literal or a text symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should take particular care when addressing components of structures. To ensure the correct platform-specific alignment of type I and F components, they may contain filler fields, whose lengths you need to consider when calculating the correct offset. Furthermore, SAP plans to convert the internal representation of character types to UNICODE, in which one character will no longer occupy one byte, but instead two or four. Although offset and length specifications can work for character fields (types C, D, N, and T) or for hexadecimal fields (type X), incompatible changes may occur in structures containing a mixture of numeric, character, and hexadecimal fields. SAP therefore recommends that you do not use offset and length to address components of structures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In nearly all cases, you must specify offset &amp;lt;o&amp;gt; and length &amp;lt;l&amp;gt; as numeric literals without a preceding sign. You may specify them dynamically in the following cases: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When assigning values using MOVE or the assignment operator &lt;/P&gt;&lt;P&gt;When assigning values with WRITE TO &lt;/P&gt;&lt;P&gt;When assigning field symbols using ASSIGN. &lt;/P&gt;&lt;P&gt;When passing actual parameters to subroutines in the PERFORM statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TIME TYPE T VALUE '172545'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE TIME.&lt;/P&gt;&lt;P&gt;WRITE / TIME+2(2).&lt;/P&gt;&lt;P&gt;CLEAR TIME+2(4).&lt;/P&gt;&lt;P&gt;WRITE / TIME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;172545&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;170000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the minutes are selected by specifying an offset in the WRITE statement. Then, the minutes and seconds are set to their initial values by specifying an offset in the clear statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset and Length Specifications in the MOVE Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the MOVE statement, the syntax for specifying offset and length is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;f1&amp;gt;[&lt;EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)] TO &amp;lt;f2&amp;gt;[&lt;/EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, when you use the assignment operator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f2&amp;gt;[&lt;EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)] = &amp;lt;f1&amp;gt;[&lt;/EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the part of the field &amp;lt;f1&amp;gt; which begins at position &amp;lt;o1&amp;gt;&lt;EM&gt;1 and has a length of &amp;lt;l1&amp;gt; are assigned to field &amp;lt;f2&amp;gt;, where they overwrite the section which begins at position &amp;lt;o2&amp;gt;&lt;/EM&gt;1 and has a length of &amp;lt;l2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the MOVE statement, all offset and length specifications can be variables. This also applies to statements with the assignment operator, as long as these can also be written as MOVE statements. In statements where no field name is specified after the assignment operator, (for example, in Numeric Operations), all offset and length specifications must be unsigned number literals. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP recommends that you assign values with offset and length specifications only between non-numeric fields. With numeric fields, the results can be meaningless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(8)  VALUE 'ABCDEFGH',&lt;/P&gt;&lt;P&gt;      F2(20) VALUE '12345678901234567890'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F2&lt;EM&gt;6(5) = F1&lt;/EM&gt;3(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the assignment operator functions as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(8) VALUE 'ABCDEFGH',&lt;/P&gt;&lt;P&gt;F2(8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: O TYPE I VALUE 2,&lt;/P&gt;&lt;P&gt;L TYPE I VALUE 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2.      WRITE F2.&lt;/P&gt;&lt;P&gt;MOVE F1+O(L) TO F2.      WRITE / F2.&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2+O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR F2.&lt;/P&gt;&lt;P&gt;MOVE F1 TO F2+O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;MOVE F1&lt;EM&gt;O(L) TO F2&lt;/EM&gt;O(L). WRITE / F2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABCDEFGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDABCD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ABCD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CDEF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the contents of F1 are assigned to F2 without offset specifications. Then, the same happens for F1 with offset and length specification. The next three MOVE statements overwrite the contents of F2 with offset 2. Note that F2 is filled with spaces on the right, in accordance with the conversion rule for source type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offset and Length Specifications in the WRITE TO Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the WRITE TO statement, the syntax for specifying offset and length is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &amp;lt;f1&amp;gt;[&lt;EM&gt;&amp;lt;o1&amp;gt;][(&amp;lt;l1&amp;gt;)] TO &amp;lt;f2&amp;gt;[&lt;/EM&gt;&amp;lt;o2&amp;gt;][(&amp;lt;l2&amp;gt;)].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the part of the field &amp;lt;f1&amp;gt; which begins at position &amp;lt;o1&amp;gt;&lt;EM&gt;1 and has a length of &amp;lt;l1&amp;gt; are converted to a character field and assigned to field &amp;lt;f2&amp;gt;, where they overwrite the section which begins at position &amp;lt;o2&amp;gt;&lt;/EM&gt;1 and has a length of &amp;lt;l2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the WRITE TO statement, the offset and length specifications of the target field can be variables. The offset and length of the target field must be numeric literals without a preceding sign. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: STRING(20),&lt;/P&gt;&lt;P&gt;NUMBER(8) TYPE C VALUE '123456',&lt;/P&gt;&lt;P&gt;OFFSET TYPE I VALUE 8,&lt;/P&gt;&lt;P&gt;LENGTH TYPE I VALUE 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER(6) TO STRING+OFFSET(LENGTH) LEFT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER(6) TO STRING+OFFSET(LENGTH) CENTERED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE NUMBER TO STRING+OFFSET(LENGTH) RIGHT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / STRING.&lt;/P&gt;&lt;P&gt;CLEAR STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              123456&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first six characters of the field NUMBER are written left-justified, centered, and right-justified into the last 12 characters of the field STRING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:37:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626926#M603715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626927#M603716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;It's the same of&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data date(10).
write today to date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, after the instruction:&lt;/P&gt;&lt;P&gt;today: 20070119&lt;/P&gt;&lt;P&gt;date: 19.01.2007&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 10:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626927#M603716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T10:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626928#M603717</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;totdate will be in dd.mm.yyyy format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6(2) refers to date field consists of  6 characters.out of which only first two characters are chosen for displaying dd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4(2) after dd we have month ie... mm so we are pointing to fourth position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4 will give the year value. yyyy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 10:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626928#M603717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T10:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626929#M603718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It feels like I'm missing out on something if I do not reply to this thread, so here goes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi S K,&lt;/P&gt;&lt;P&gt;Word! The concatenate command in this case is building a date in the format DD.MM.YYYY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if theres any left?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 14:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626929#M603718</guid>
      <dc:creator>former_member378318</dc:creator>
      <dc:date>2007-07-31T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626930#M603719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;    if we write 6(2) means it will select the 2 charcters from the selected string.i.e., the number which is specified in the bracket will givens length to be selected &amp;amp; number before bracket gives the starting poisition.&lt;/P&gt;&lt;P&gt;     concatenates means it will merge or joins all the specified fields with seperated by '.' in ur example.&lt;/P&gt;&lt;P&gt;    In sap the date is stored in the yyyy.mm.dd formate. so in your query it will displays todays date in the formate dd.mm.yyyy.&lt;/P&gt;&lt;P&gt;when 6(2) is written it will select the date &amp;amp; 4(2) is taken it will select the month &amp;amp; 0(4) is written year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 06:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date/m-p/2626930#M603719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T06:05:09Z</dc:date>
    </item>
  </channel>
</rss>

