<?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: what is difference between DEFAULT and INITIALIZATION in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148665#M453474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;DEFAULT is used to set default values for the screen fields.&lt;/P&gt;&lt;P&gt;But INITIALIZATION is used to initialize the selection screen apart from setting default values&lt;/P&gt;&lt;P&gt;to the input fields..Confused?? Well,Suppose You want to display current date - 7 in the &lt;/P&gt;&lt;P&gt;selection screen input field..You cannot do so direcly using default alone..You need to do the&lt;/P&gt;&lt;P&gt;validation on the INITIALIZATION event.&lt;/P&gt;&lt;P&gt;something like sy-datum = sy-datum - 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2007 20:39:25 GMT</pubDate>
    <dc:creator>abdul_hakim</dc:creator>
    <dc:date>2007-04-13T20:39:25Z</dc:date>
    <item>
      <title>what is difference between DEFAULT and INITIALIZATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148663#M453472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is difference between DEFAULT and INITIALIZATION?&lt;/P&gt;&lt;P&gt; give simple example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 20:19:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148663#M453472</guid>
      <dc:creator>sudhakar196</dc:creator>
      <dc:date>2007-04-13T20:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: what is difference between DEFAULT and INITIALIZATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148664#M453473</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;Initialization is the section where the initialization of internal tables, variables, select-option fields, parameters etc takes place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;True, that you can default the values too for parameters/select-option fields in selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event is invoked directly after LOAD-OF-PROGRAM and before the selection screen processing of any existing standard selection screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives you the one-time opportunity to initialize the input fields of the selection screen, including those defined in the logical database linked with the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When run in background, values initialized in initialization event are considered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg: if you want to initialize like this:&lt;/P&gt;&lt;P&gt;carrid-sign = 'I'. &lt;/P&gt;&lt;P&gt;carrid-option = 'EQ'. &lt;/P&gt;&lt;P&gt;carrid-low = 'AA'. &lt;/P&gt;&lt;P&gt;carrid-high = 'LH'. &lt;/P&gt;&lt;P&gt;APPEND carrid TO carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot achieve this by giving 'default' or 'value' at selection-screen.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 20:30:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148664#M453473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T20:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: what is difference between DEFAULT and INITIALIZATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148665#M453474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;DEFAULT is used to set default values for the screen fields.&lt;/P&gt;&lt;P&gt;But INITIALIZATION is used to initialize the selection screen apart from setting default values&lt;/P&gt;&lt;P&gt;to the input fields..Confused?? Well,Suppose You want to display current date - 7 in the &lt;/P&gt;&lt;P&gt;selection screen input field..You cannot do so direcly using default alone..You need to do the&lt;/P&gt;&lt;P&gt;validation on the INITIALIZATION event.&lt;/P&gt;&lt;P&gt;something like sy-datum = sy-datum - 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 20:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148665#M453474</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2007-04-13T20:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: what is difference between DEFAULT and INITIALIZATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148666#M453475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Using default u can set the default value without any Conditions. But if u want to have default value based upon some conditions then u can use INITIALIZATION event. There is one more way of having  default values and that is using SAP MEMORY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Apr 2007 03:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148666#M453475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-14T03:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: what is difference between DEFAULT and INITIALIZATION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148667#M453476</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;This event is triggered when you execute your program for the first time i.e., before selection screen is displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg : 1&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;if p_date is initial.&lt;/P&gt;&lt;P&gt;p_date = sy-datum + 7.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-option : fldate1 for sflight-fldate.&lt;/P&gt;&lt;P&gt;eg2 : INITIALIZATION.&lt;/P&gt;&lt;P&gt;       Data : date1 like sy-datum.&lt;/P&gt;&lt;P&gt;date1 = sy-datum - 30.&lt;/P&gt;&lt;P&gt;fldate1-low = date1.&lt;/P&gt;&lt;P&gt;fldate1-high = sy-datum.&lt;/P&gt;&lt;P&gt;append fldate1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Default :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to display DEFAULT VALUES for the selection criteria before your screen is displayed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg : select-option : s_matnr for mara-matnr defaut '000098' to  '76809067'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Apr 2007 04:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-default-and-initialization/m-p/2148667#M453476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-14T04:26:46Z</dc:date>
    </item>
  </channel>
</rss>

