<?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: fetching Date between Atnew loops in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177840#M998655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at w_cdpos into ws_cdpos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2008 09:58:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-17T09:58:41Z</dc:date>
    <item>
      <title>fetching Date between Atnew loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177837#M998652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;check the following code and help me to fetch the record with the particular date.&lt;/P&gt;&lt;P&gt;As u see in my code i have used ATNEW endat statement ,its difficult for me to fetch the dates within this atnew statement.&lt;/P&gt;&lt;P&gt;how to fetch the date inside this atnew loop.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  SINGLE * FROM cdhdr WHERE objectclas = 'KRED'&lt;/P&gt;&lt;P&gt;                          AND objectid    = w_lfa1-lifnr&lt;/P&gt;&lt;P&gt;                          AND udate IN c_date.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT  * FROM cdpos INTO TABLE w_cdpos&lt;/P&gt;&lt;P&gt;            WHERE objectclas = 'KRED'&lt;/P&gt;&lt;P&gt;             AND objectid    = w_lfa1-lifnr&lt;/P&gt;&lt;P&gt;             AND tabname = 'LFBK'&lt;/P&gt;&lt;P&gt;            AND chngind EQ 'I'   .&lt;/P&gt;&lt;P&gt;      IF sy-dbcnt GT 1 .&lt;/P&gt;&lt;P&gt;        SORT w_cdpos BY changenr ASCENDING .&lt;/P&gt;&lt;P&gt;        CLEAR w_result .&lt;/P&gt;&lt;P&gt;        w_result-lifnr =  w_lfa1-lifnr .&lt;/P&gt;&lt;P&gt;        w_result-fname = 'BANK' .&lt;/P&gt;&lt;P&gt;        w_result-ddtext = text-001 .&lt;/P&gt;&lt;P&gt;        LOOP AT w_cdpos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          ws_cdpos = w_cdpos .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;AT NEW  changenr  .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;IF w_result-value_old IS INITIAL .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;w_result-value_old = ws_cdpos-tabkey+13(57) .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;ELSE .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;w_result-value_new = ws_cdpos-tabkey+13(57) .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;ENDIF .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;ENDAT .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;AT END OF changenr  .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;IF    w_result-value_old IS NOT INITIAL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;AND w_result-value_new IS NOT INITIAL .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  selecting CDHDR with the key only to find the udate&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              SELECT  SINGLE * FROM cdhdr WHERE objectclas = 'KRED'&lt;/P&gt;&lt;P&gt;                                       AND objectid    = w_lfa1-lifnr&lt;/P&gt;&lt;P&gt;                                       AND changenr = ws_cdpos-changenr&lt;/P&gt;&lt;P&gt;                                       AND udate IN c_date.&lt;/P&gt;&lt;P&gt;              w_result-udate = cdhdr-udate .&lt;/P&gt;&lt;P&gt;              APPEND  w_result .&lt;/P&gt;&lt;P&gt;              w_result-value_old = w_result-value_new .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              CLEAR w_result-value_new  .&lt;/P&gt;&lt;P&gt;            ENDIF .&lt;/P&gt;&lt;P&gt;          ENDAT .&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;      ENDIF .&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 08:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177837#M998652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T08:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: fetching Date between Atnew loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177838#M998653</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;Since you are copying the workarea content to another as below&lt;/P&gt;&lt;P&gt;ws_cdpos = w_cdpos ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use WS_CDPOS contents to check with in the AT NEW statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Hema&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177838#M998653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: fetching Date between Atnew loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177839#M998654</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;use like this....&lt;/P&gt;&lt;P&gt;delcrae another workarea ws_cdpos1 same as ws_cdpos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT w_cdpos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_cdpos1  = w_cdpos .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT NEW changenr .&lt;/P&gt;&lt;P&gt;IF w_result-value_old IS INITIAL .&lt;/P&gt;&lt;P&gt;w_result-value_old = ws_cdpos1-tabkey+13(57) .&lt;/P&gt;&lt;P&gt;ELSE .&lt;/P&gt;&lt;P&gt;w_result-value_new = ws_cdpos1-tabkey+13(57) .&lt;/P&gt;&lt;P&gt;ENDIF .&lt;/P&gt;&lt;P&gt;ENDAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will solve your problem....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:55:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177839#M998654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: fetching Date between Atnew loops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177840#M998655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at w_cdpos into ws_cdpos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 09:58:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-date-between-atnew-loops/m-p/4177840#M998655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T09:58:41Z</dc:date>
    </item>
  </channel>
</rss>

