<?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: SELECTION-SCREEN in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715486#M894440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from FM's you get a date back which is also of length 8 (date type). To compare the date use&lt;/P&gt;&lt;P&gt;if vbak-audat between lv_date1 and lv_date2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REMARK: LV_DATE1 AND LV_DATE2  ARE WITHIN THE SELECTION. So audat is not really BETWEEN but, start and enddate are part of the range.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2008 15:18:41 GMT</pubDate>
    <dc:creator>Sm1tje</dc:creator>
    <dc:date>2008-04-29T15:18:41Z</dc:date>
    <item>
      <title>SELECTION-SCREEN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715484#M894438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my selection screen i want :-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;period (range)-mandatory as YYYYMM to YYYYMM&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;note:---&lt;/STRONG&gt; the given field is vbak-audat..&lt;/P&gt;&lt;P&gt;but audat is of 8 in length. so how can i validate it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus when i enter the period from -&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt; to -&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;and after calling the function modules &lt;/P&gt;&lt;P&gt;'FIRST_DAY_IN_PERIOD_GET' and 'LAST_DAY_IN_PERIOD_GET'.&lt;/P&gt;&lt;P&gt;I should get the first and last date of the given period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how can i code this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the below code works but i havent used the period as range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************&lt;/P&gt;&lt;P&gt;parameter: period(6) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: date1 like sy-datum.&lt;/P&gt;&lt;P&gt;data: date2 like sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: YEAr type T009B-BDATJ.&lt;/P&gt;&lt;P&gt;data: per(2) type c .&lt;/P&gt;&lt;P&gt;data : fp like  T009B-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: perod type T009B-POPER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year = period+0(4).&lt;/P&gt;&lt;P&gt;per = period+4(2).&lt;/P&gt;&lt;P&gt;concatenate '0' per into perod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select PERIV from  T009B into fp where poper = perod.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   i_gjahr              = year&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_MONMIT             = 00&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   i_periv              = fp&lt;/P&gt;&lt;P&gt;   i_poper              = perod&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   E_DATE               = date1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INPUT_FALSE          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  T009_NOTFOUND        = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  T009B_NOTFOUND       = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS               = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         .&lt;/P&gt;&lt;P&gt;IF sy-subrc  0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ date1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   i_gjahr              = year&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_MONMIT             = 00&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   i_periv              = fp&lt;/P&gt;&lt;P&gt;   i_poper              = perod&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   E_DATE               = date2&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INPUT_FALSE          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  T009_NOTFOUND        = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  T009B_NOTFOUND       = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS               = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         .&lt;/P&gt;&lt;P&gt;IF sy-subrc  0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ date2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 15:10:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715484#M894438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T15:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTION-SCREEN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715485#M894439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will need to declare a select-options for period range say... s_period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then if you want to retrieve the first day in the period and last day of period you can use the code you posted but follow this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your lowest period values are in s_period-low - this has YYYYMM&lt;/P&gt;&lt;P&gt;retrieve the year and use funtion first_day_in_perido&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your highest perid is in s_period-high - again retrieve year and use last_day_in_period function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can get these two dates in to variables and then proceed with those dates for futher logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 15:16:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715485#M894439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T15:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTION-SCREEN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715486#M894440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from FM's you get a date back which is also of length 8 (date type). To compare the date use&lt;/P&gt;&lt;P&gt;if vbak-audat between lv_date1 and lv_date2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REMARK: LV_DATE1 AND LV_DATE2  ARE WITHIN THE SELECTION. So audat is not really BETWEEN but, start and enddate are part of the range.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 15:18:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715486#M894440</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-29T15:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTION-SCREEN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715487#M894441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually in my selection screen in need &lt;/P&gt;&lt;P&gt;vbak-audat as select-option and in format yyyymm to yyyymm.&lt;/P&gt;&lt;P&gt;but audat is of 8 in length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after that i need to call 2 fm 'first_date_dispaly' and last_date.....&lt;/P&gt;&lt;P&gt;to get the first and last date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cld u plz write down how to step this....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 15:21:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715487#M894441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T15:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTION-SCREEN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715488#M894442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So why use VBAK-AUDAT? What you need is a range of type SCAL-WEEK (yyyymm) and forget about VBAK-AUDAT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 15:34:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/3715488#M894442</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-29T15:34:26Z</dc:date>
    </item>
  </channel>
</rss>

