<?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: assign date value to a variable using mask in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965063#M1603238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you used the below syntax and missing 'edit' is a typo. What are the possible values in datemask of the config_table or mention atleast the one which didnt work?&lt;/P&gt;&lt;P&gt;&amp;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; WRITE SY-DATUM TO vFinalvar USING EDIT MASK wa_something-datemask.
&amp;gt; &lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try that too but i only get the mask write in the vFinalvar &lt;/P&gt;&lt;P&gt;( vFinalVar ='YYYYMMDD )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2011 20:53:39 GMT</pubDate>
    <dc:creator>edgar_almonte</dc:creator>
    <dc:date>2011-06-02T20:53:39Z</dc:date>
    <item>
      <title>assign date value to a variable using mask</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965061#M1603236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am doing a program that read some file but the name of the file is dynamic base in a config table where i put the path, some prefix and subfix and a date mask&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want convert any give date to the date format ( date mask ) that i get when i fetch the data form the config table something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single * from config_table wa_something 
where key1 = something

write sy-datum using mask wa_something-datemask to vFinalvar.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that not work , not sure if i explain right...  but i will thanks any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 20:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965061#M1603236</guid>
      <dc:creator>edgar_almonte</dc:creator>
      <dc:date>2011-06-02T20:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: assign date value to a variable using mask</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965062#M1603237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope you used the below syntax and missing 'edit' is a typo. What are the possible values in datemask of the config_table or mention atleast the one which didnt work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
WRITE SY-DATUM TO vFinalvar USING EDIT MASK wa_something-datemask.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 20:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965062#M1603237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-02T20:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: assign date value to a variable using mask</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965063#M1603238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you used the below syntax and missing 'edit' is a typo. What are the possible values in datemask of the config_table or mention atleast the one which didnt work?&lt;/P&gt;&lt;P&gt;&amp;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; WRITE SY-DATUM TO vFinalvar USING EDIT MASK wa_something-datemask.
&amp;gt; &lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try that too but i only get the mask write in the vFinalvar &lt;/P&gt;&lt;P&gt;( vFinalVar ='YYYYMMDD )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 20:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965063#M1603238</guid>
      <dc:creator>edgar_almonte</dc:creator>
      <dc:date>2011-06-02T20:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: assign date value to a variable using mask</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965064#M1603239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have mistaken the usage of EDIT MASK. Plese refer to the below link...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e3d35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e3d35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of now I can only think of the below solution for your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Case wa_something-datemask.
  When 'DD/MM/YY'.
     WRITE SY-DATUM DD/MM/YYYY TO vFinalvar.
  When 'MM/DD/YY'.
     WRITE SY-DATUM MM/DD/YY TO vFinalvar.
* Similarly below formats....
....DD/MM/YYYY
....MM/DD/YYYY
....DDMMYY
....MMDDYY
....YYMMDD
Endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or you may have to write your own logic to format the date into vFinalvar for the formats which are not supported by standard write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suman Jagu on Jun 2, 2011 5:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 20:59:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-date-value-to-a-variable-using-mask/m-p/7965064#M1603239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-02T20:59:28Z</dc:date>
    </item>
  </channel>
</rss>

