<?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 regarding initilization logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158094#M1194885</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 have one requirement to add  in below select statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~mstav EQ 'S0'.(its a hard coaded value)&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;SELECT mara~matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~beskz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~webaz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~plifz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~wzeit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~dzeit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~ekgrp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~dispo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~strgr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mara~meins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~disls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~mrppp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~zz_ext_del&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~zz_ext_mod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO TABLE itb_art&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM ( mara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN marc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ON mara&lt;SUB&gt;matnr = marc&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE mara~matnr IN s_matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND marc~werks EQ p_werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~mtart IN s_mtart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~lvorm EQ ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND marc~lvorm EQ ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND marc~beskz NE ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~mstav EQ 'E0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;this is the suggestion given by my client instaead of hardcoading follow these steps..&lt;/P&gt;&lt;P&gt; so how to i will write the code????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why donu2019t you propose to have a new selection criteria field for MARA-MMSTAV and then initialize the values u201CE0u201D &amp;amp; u201CS0u201D?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you use the same screen variables in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use a RANGES option in the program and then append both the values in the range and then use the range in select query instead of writing separately as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MARA~MMSTAV = u2018E0u2019&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MARA~MMSTAV = u2018S0u2019 in the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHAT TO DO????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;navketan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2009 13:38:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-23T13:38:05Z</dc:date>
    <item>
      <title>regarding initilization logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158094#M1194885</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 have one requirement to add  in below select statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~mstav EQ 'S0'.(its a hard coaded value)&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;SELECT mara~matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~beskz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~webaz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~plifz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~wzeit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~dzeit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~ekgrp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~dispo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~strgr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mara~meins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~disls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~mrppp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~zz_ext_del&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marc~zz_ext_mod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO TABLE itb_art&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM ( mara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN marc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ON mara&lt;SUB&gt;matnr = marc&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE mara~matnr IN s_matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND marc~werks EQ p_werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~mtart IN s_mtart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~lvorm EQ ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND marc~lvorm EQ ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND marc~beskz NE ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND mara~mstav EQ 'E0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;this is the suggestion given by my client instaead of hardcoading follow these steps..&lt;/P&gt;&lt;P&gt; so how to i will write the code????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why donu2019t you propose to have a new selection criteria field for MARA-MMSTAV and then initialize the values u201CE0u201D &amp;amp; u201CS0u201D?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you use the same screen variables in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use a RANGES option in the program and then append both the values in the range and then use the range in select query instead of writing separately as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MARA~MMSTAV = u2018E0u2019&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MARA~MMSTAV = u2018S0u2019 in the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHAT TO DO????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;navketan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 13:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158094#M1194885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T13:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: regarding initilization logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158095#M1194886</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;Depends on what your customer requires. If he/she is sure that it doesn't have to be parametrized (only these two hardcoded values will be used) you can simply inlcude them both in one select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MARA~MMSTAV in ( u2018E0u2019, 'S0' ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course setting this field as a selection screen parameter is much more flexible way of handling the values. No one has to ever use it as long as you initialize values yourself, but in case such need arises they can easily change required values. Your descibred method is then 100% correct and you should convince your customer to this approach.&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>Mon, 23 Feb 2009 14:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158095#M1194886</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-02-23T14:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: regarding initilization logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158096#M1194887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anybody tell what the below logic tells???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: : r_mstav for mara-mstav.&lt;/P&gt;&lt;P&gt;data : w_mstav like line of r_mstav.&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;build the range&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_mstav-sign = 'I'.&lt;/P&gt;&lt;P&gt;w_mstav-option = 'EQ'.&lt;/P&gt;&lt;P&gt;w_mstav-low = 'E0'.&lt;/P&gt;&lt;P&gt;append w_mstav to r_mstav.&lt;/P&gt;&lt;P&gt;w_mstav-low = 'S0'.&lt;/P&gt;&lt;P&gt;append w_mstav to r_mstav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 14:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158096#M1194887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T14:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: regarding initilization logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158097#M1194888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all: if you want this parameter be visible in selection screen instead of &lt;STRONG&gt;ranges&lt;/STRONG&gt; use &lt;STRONG&gt;select-options&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options r_mstav for mara-mstav.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now as it already created table with header line you can append this two entries without work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the meaning:&lt;/P&gt;&lt;P&gt;1) first record says: restrict the selection with all values (for field &lt;STRONG&gt;mstav&lt;/STRONG&gt; ) where are equal to 'EQ'         &lt;/P&gt;&lt;P&gt;( &lt;EM&gt;r_mstav-option = 'EQ'.&lt;/EM&gt; ) including the result found ( &lt;EM&gt;r_mstav-sign = 'I'.&lt;/EM&gt; ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) secod row does excactly the same but the values for field &lt;STRONG&gt;mstav&lt;/STRONG&gt; has to be equal to 'S0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally when creating select-option parameter or ranges table, &lt;STRONG&gt;sing&lt;/STRONG&gt; can be &lt;STRONG&gt;I&lt;/STRONG&gt; which stands for u201Cinclusiveu201D (inclusion criterion) or &lt;STRONG&gt;E&lt;/STRONG&gt; which stands for u201Cexclusiveu201D (exclusion criterion)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;option&lt;/STRONG&gt; there are several entries possible &lt;STRONG&gt;EQ, NE, GT, LE, LT, CP, NP&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more explanation please read [this|http://help.sap.com/erp2005_ehp_04/helpdata/EN/9f/dba71f35c111d1829f0000e829fbfe/frameset.htm]&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>Mon, 23 Feb 2009 15:08:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-initilization-logic/m-p/5158097#M1194888</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-02-23T15:08:07Z</dc:date>
    </item>
  </channel>
</rss>

