<?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 Screen painter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667185#M1288808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudeer, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below code in PBO.&lt;/P&gt;&lt;P&gt;say screen field name as G_F_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITHIN module pool declare a field of tyep sy-dtum&lt;/P&gt;&lt;P&gt;as g_f_date1 like sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;witin the flow logic ...try below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module pbo_init.&lt;/P&gt;&lt;P&gt;g_f_date1 = sy-datum.&lt;/P&gt;&lt;P&gt;g_f_date = g_f_date1.&lt;/P&gt;&lt;P&gt;endModule &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2009 05:00:35 GMT</pubDate>
    <dc:creator>shishupalreddy</dc:creator>
    <dc:date>2009-06-12T05:00:35Z</dc:date>
    <item>
      <title>Date in Screen painter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667184#M1288807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have designed a simple screen in which i have a date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want the date field(current date) to be displayed automatically when i execute the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have used sy-datum in PBO. but i am not able to get it in to the screen automatically when i execute it.&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;Regards,&lt;/P&gt;&lt;P&gt;Sudhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 04:49:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667184#M1288807</guid>
      <dc:creator>sudhir_uppalapati</dc:creator>
      <dc:date>2009-06-12T04:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Screen painter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667185#M1288808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudeer, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below code in PBO.&lt;/P&gt;&lt;P&gt;say screen field name as G_F_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITHIN module pool declare a field of tyep sy-dtum&lt;/P&gt;&lt;P&gt;as g_f_date1 like sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;witin the flow logic ...try below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module pbo_init.&lt;/P&gt;&lt;P&gt;g_f_date1 = sy-datum.&lt;/P&gt;&lt;P&gt;g_f_date = g_f_date1.&lt;/P&gt;&lt;P&gt;endModule &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 05:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667185#M1288808</guid>
      <dc:creator>shishupalreddy</dc:creator>
      <dc:date>2009-06-12T05:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Screen painter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667186#M1288809</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;Its better if you take the reference from a dictionary field for the date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example : VBAP-ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in PBO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbap-erdat = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or else you can declare a field of type date and can achieve the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 05:45:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667186#M1288809</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-06-12T05:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Screen painter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667187#M1288810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhir,&lt;/P&gt;&lt;P&gt;   If you Give in the PBO it will surely come just say whether your date field is standard database field or internal table field if it is internal table field just append it and see whether it is coming i think it is clearing at some stage just check in debug mode you will have a better idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 06:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667187#M1288810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-12T06:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Screen painter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667188#M1288811</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;First of all you need a field on screen which either refers to some DDIC date field or is explicitly typed D.&lt;/P&gt;&lt;P&gt;- add your field and name it &lt;EM&gt;my_date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;- go to attributes of field and choose from &lt;EM&gt;format&lt;/EM&gt; - &lt;STRONG&gt;DATS&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;- in program declare &lt;EM&gt;data my_date type d.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have used sy-datum in PBO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As for the default value you should use INITIALIZATION instead of PBO. This is beacuse if you change your date in screen field it will keep changing back to default one after dialog step is conculded (next PBO will be reached and you field will receive again default date). So you need to do it here.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INITIALIZATION.
my_date = sy-datum.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It will ensure that only once your field is set to default (today date) and next time user make any input it will overwrite the default one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 07:03:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-in-screen-painter/m-p/5667188#M1288811</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-12T07:03:15Z</dc:date>
    </item>
  </channel>
</rss>

