<?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: Month Year format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429586#M205533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are far more flexible if you use a range for the selection; you declare it in the selection screen like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;pre&amp;gt;&lt;/P&gt;&lt;P&gt;TABLES:&lt;/P&gt;&lt;P&gt;  vbak.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  gt_vbak TYPE TABLE of vbak.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;  s_erdat FOR vbak-erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln erdat "an the fields you really need&lt;/P&gt;&lt;P&gt;  FROM vbak&lt;/P&gt;&lt;P&gt;  INTO CORRESPONDING FIELDS OF TABLE gt_vbak&lt;/P&gt;&lt;P&gt;  WHERE erdat IN s_erdat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;... further processing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;lt;/pre&amp;gt;&lt;/P&gt;&lt;P&gt;Note: This database selection will be quite time-cosuming if you do not have an index defined on field erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The big advantage of ranges is that they can be used for a lot of selection conditions including patterns, exclusions and so on. With a range you could for example specify for example specific months and exclude in the same selection specific dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2006 06:50:53 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2006-06-20T06:50:53Z</dc:date>
    <item>
      <title>Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429576#M205523</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've passed the paramaters : year and month i.e. 2005, 06(month). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to select one month for example june 2005, in vbak table erdate. how should write query?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429576#M205523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429577#M205524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: gv_date like sy-datum.&lt;/P&gt;&lt;P&gt;data: gv_out(7),&lt;/P&gt;&lt;P&gt;      gv_yy(4),&lt;/P&gt;&lt;P&gt;      gv_mmm(2) .&lt;/P&gt;&lt;P&gt;select single erdat into gv_date from vbak.&lt;/P&gt;&lt;P&gt;gv_yy = gv_date+0(4).&lt;/P&gt;&lt;P&gt;gv_mmm = gv_date+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE of gv_yy gv_mmm into gv_out seprated by ','.&lt;/P&gt;&lt;P&gt;write : gv_out .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429577#M205524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429578#M205525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using this will give you the month you want.&lt;/P&gt;&lt;P&gt;m = VBAK-ERDAT+4(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE t247 INDEX m.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;mname = month_names-ltx.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Jothi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429578#M205525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429579#M205526</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;What you can do is to concatenate the 01 / 31 to the month and date and then use the BETWEEN clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate year month '01' into w_start_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the starting date, get the last day of the month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use the BETWEEN clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from VBAK where erdat between w_start_date and w_end_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429579#M205526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429580#M205527</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;just check the way in which date is stored in vbak..&lt;/P&gt;&lt;P&gt;pass the date to some string..w_string(200506)&lt;/P&gt;&lt;P&gt;then concatenate w_string '01' to w_first_date.&lt;/P&gt;&lt;P&gt;use this fm to get the last date of the month SG_PS_GET_LAST_DAY_OF_MONTH...pass it w_last_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query at vbak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;where erdate ge w_first_date and erdate le w_last_date..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and manipulate this part accordingly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Gunjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:17:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429580#M205527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429581#M205528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; I wrote this sample program . you will get all documents&lt;/P&gt;&lt;P&gt;for the the entered June month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: IT_VBAK TYPE TABLE OF VBAK  WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:V_DATE_A TYPE SY-DATUM,&lt;/P&gt;&lt;P&gt;     V_DATE_B TYPE SY-DATUM.&lt;/P&gt;&lt;P&gt;PARAMETERS:P_YEAR(4) DEFAULT '2006',&lt;/P&gt;&lt;P&gt;           P_MONTH(2) DEFAULT '06'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    v_date = sy-datum.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*write:/ sy-datum.&lt;/P&gt;&lt;P&gt;CONCATENATE  P_YEAR P_MONTH '01' INTO V_DATE_A.&lt;/P&gt;&lt;P&gt;CONCATENATE  P_YEAR P_MONTH '30' INTO V_DATE_B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM VBAK INTO TABLE IT_VBAK&lt;/P&gt;&lt;P&gt; WHERE ERDAT &amp;gt;= V_DATE_A AND&lt;/P&gt;&lt;P&gt;       ERDAT &amp;lt;= V_DATE_B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE:/ IT_VBAK-VBELN,IT_VBAK-ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pramod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:31:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429581#M205528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429582#M205529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;thanks for u r response.but data not taken&lt;/P&gt;&lt;P&gt;see this query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstd=01032005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  vbeln erdat into (salno, saldate) from vbak where&lt;/P&gt;&lt;P&gt;erdat le firstd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no data display&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:35:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429582#M205529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429583#M205530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I did some modification to my earlier post&lt;/P&gt;&lt;P&gt; Now you can eneter any month or year on the selection-screen and you call get the documents for that perios from VBAk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  YUP_TEST2                               .&lt;/P&gt;&lt;P&gt;DATA: IT_VBAK TYPE TABLE OF VBAK  WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:V_DATE_A TYPE SY-DATUM,&lt;/P&gt;&lt;P&gt;     V_DATE_B TYPE SY-DATUM.&lt;/P&gt;&lt;P&gt;PARAMETERS:P_YEAR(4),&lt;/P&gt;&lt;P&gt;           P_MONTH(2).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    v_date = sy-datum.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*write:/ sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE  P_YEAR P_MONTH '01' INTO V_DATE_A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SG_PS_GET_LAST_DAY_OF_MONTH'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    DAY_IN                  = V_DATE_A&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   LAST_DAY_OF_MONTH       =  V_DATE_B&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   DAY_IN_NOT_VALID        = 1&lt;/P&gt;&lt;P&gt;   OTHERS                  = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM VBAK INTO TABLE IT_VBAK&lt;/P&gt;&lt;P&gt; WHERE ERDAT &amp;gt;= V_DATE_A AND&lt;/P&gt;&lt;P&gt;       ERDAT &amp;lt;= V_DATE_B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_VBAK.&lt;/P&gt;&lt;P&gt;  WRITE:/ IT_VBAK-VBELN,IT_VBAK-ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:36:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429583#M205530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429584#M205531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can try out this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from vbak where erdat like '200508%'.&lt;/P&gt;&lt;P&gt;  write: vbak-erdat.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Sumana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429584#M205531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429585#M205532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthu,&lt;/P&gt;&lt;P&gt; Please check this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab TYPE TABLE OF vbak WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : l_start_date TYPE sy-datum,&lt;/P&gt;&lt;P&gt;       l_end_date TYPE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : l_month(2),&lt;/P&gt;&lt;P&gt;             l_year(4).&lt;/P&gt;&lt;P&gt;CONCATENATE l_year l_month '01' INTO l_start_date.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--- Getting last day of the month --&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    day_in            = l_start_date&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    last_day_of_month = l_end_date&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    day_in_no_date    = 1&lt;/P&gt;&lt;P&gt;    OTHERS            = 2.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM vbak&lt;/P&gt;&lt;P&gt;         INTO TABLE itab&lt;/P&gt;&lt;P&gt;         WHERE erdat GE l_start_date&lt;/P&gt;&lt;P&gt;                   AND&lt;/P&gt;&lt;P&gt;               erdat LT l_end_date.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;P&gt;    WRITE : / itab-erdat, itab-vbeln.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If found helpful, please do reward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 06:09:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429585#M205532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T06:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Month Year format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429586#M205533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are far more flexible if you use a range for the selection; you declare it in the selection screen like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;pre&amp;gt;&lt;/P&gt;&lt;P&gt;TABLES:&lt;/P&gt;&lt;P&gt;  vbak.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  gt_vbak TYPE TABLE of vbak.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;  s_erdat FOR vbak-erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln erdat "an the fields you really need&lt;/P&gt;&lt;P&gt;  FROM vbak&lt;/P&gt;&lt;P&gt;  INTO CORRESPONDING FIELDS OF TABLE gt_vbak&lt;/P&gt;&lt;P&gt;  WHERE erdat IN s_erdat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;... further processing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;lt;/pre&amp;gt;&lt;/P&gt;&lt;P&gt;Note: This database selection will be quite time-cosuming if you do not have an index defined on field erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The big advantage of ranges is that they can be used for a lot of selection conditions including patterns, exclusions and so on. With a range you could for example specify for example specific months and exclude in the same selection specific dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 06:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/month-year-format/m-p/1429586#M205533</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-06-20T06:50:53Z</dc:date>
    </item>
  </channel>
</rss>

