<?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: Problem with Dispaly data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997225#M708015</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 think you are not refreshing contents of internal table gt_zchbox which is causing the problem. Refresh the table and check again and make sure that all variables and internal tables are refreshed and cleared with each action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 17:19:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-30T17:19:43Z</dc:date>
    <item>
      <title>Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997221#M708011</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 to select records based on date range, if I press 'SELE' button it is working fine and selecting records in the date range. But if I press again it has to deselect the selected records, this is not happening. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In gs_zchbox Chbox is not showing as 'X' in deselect, Am I doing anything wrong. And also the smae output is displaying the number of times(3 times) I press SELE button(3 times). what should I do for proper SELECT/DESELECT button and updated display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 23:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997221#M708011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T23:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997222#M708012</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;Here is a suggestion - you can set a flag F_SELECT = 'X' when user first clicks on button. Now if the flag is set, handle processing for action SELECT.&lt;/P&gt;&lt;P&gt;IF user again clicks on SELECT, reset flag which will indicate that it is now deselected and again for Flag = space you can handle deselect action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 23:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997222#M708012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T23:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997223#M708013</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;Usually, you need to have two buttons for Select and Deselect purposes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you only want to have a single button for dual roles then you can do as Ashish suggested to use a flag. When the Select button press for the first time, set flag = "X' and perform select records. When the Select button press for second time, you can check the flag value. If flag = "X' then perform deselect selected records and initialize the flag at the end.&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>Tue, 30 Oct 2007 01:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997223#M708013</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-30T01:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997224#M708014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish and Ferry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Deselect is not at all working and if I click on 'sele' button 2 times the display data also executing 2 times and output is comming 2 times. Please help me figure out what I am doing wrong here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      NEW-PAGE LINE-SIZE 179.

      r_date-low = sy-datum - 3.
      r_date-high = sy-datum + 3.
      r_date-option = 'BT'.
      r_date-sign = 'I'.
      APPEND r_date.

      LOOP AT gt_zprice INTO gs_zchbox.
      
        IF gs_zchbox-chbox = 'X'.
          gs_zchbox-chbox = ' '.
          
        ELSEIF gs_zchbox-chbox = ' '.
          IF gs_zchbox-crdate &amp;gt;= r_date-low
                AND gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = 'X'.
*          ELSE.
*            gs_zchbox-chbox = ' '.
          ENDIF.
        ENDIF.
        
        APPEND gs_zchbox TO gt_zchbox.
        CLEAR gs_zchbox.
      ENDLOOP.

      WRITE: /01(179) sy-uline.
      PERFORM headings.
      WRITE: /01(179) sy-uline.
      PERFORM displaydata2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:03:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997224#M708014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T17:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997225#M708015</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 think you are not refreshing contents of internal table gt_zchbox which is causing the problem. Refresh the table and check again and make sure that all variables and internal tables are refreshed and cleared with each action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:19:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997225#M708015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T17:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997226#M708016</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 WHEN 'SELE'.
   SET PF-STATUS 'STAT'.
   NEW-PAGE LINE-SIZE 179.
 
   r_date-low = sy-datum - 3.
   r_date-high = sy-datum + 3.
   r_date-option = 'BT'.
   r_date-sign = 'I'.
   APPEND r_date.
 
   IF gs_zchbox[] is initial.
     LOOP AT gt_zprice INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         gs_zchbox-chbox = 'X'.
         APPEND gs_zchbox TO gt_zchbox.
         CLEAR gs_zchbox.
       ENDIF.
     ENDLOOP.
   ELSE.
     LOOP AT gs_zchbox INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         IF gs_zchbox-chbox = 'X'.
           gs_zchbox-chbox = ' '.
         ELSE.
           gs_zchbox-chbox = 'X'.
         ENDIF.
         MODIFY gs_zchbox FROM gt_zchbox TRANSPORTING chbox.
         CLEAR gs_zchbox.
       ENDIF.
     ENDLOOP.
   ENDIF.

   WRITE: /01(179) sy-uline.
   PERFORM headings.
   WRITE: /01(179) sy-uline.
   PERFORM displaydata2.
&lt;/CODE&gt;&lt;/PRE&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>Tue, 30 Oct 2007 17:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997226#M708016</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-30T17:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997227#M708017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added refresh after display data. Now the display is comming only once, but deselect is still not working. Selecting is working properly in the date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      NEW-PAGE LINE-SIZE 179.

      r_date-low = sy-datum - 3.
      r_date-high = sy-datum + 3.
      r_date-option = 'BT'.
      r_date-sign = 'I'.
      APPEND r_date.

      LOOP AT gt_zprice INTO gs_zchbox.
        IF gs_zchbox-chbox = 'X'.
          gs_zchbox-chbox = ' '.
        ELSEIF gs_zchbox-chbox = ' '.
          IF gs_zchbox-crdate &amp;gt;= r_date-low
                AND gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = 'X'.
*          ELSE.
*            gs_zchbox-chbox = ' '.
          ENDIF.
        ENDIF.
        APPEND gs_zchbox TO gt_zchbox.
        CLEAR gs_zchbox.
      ENDLOOP.

      WRITE: /01(179) sy-uline.
      PERFORM headings.
      WRITE: /01(179) sy-uline.
      PERFORM displaydata2.
        REFRESH gt_zchbox.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:32:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997227#M708017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T17:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997228#M708018</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;Can you debug the code once and see what happens in second action? Please let us know the findings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997228#M708018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T17:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997229#M708019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ferry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the code and it is giving me the short dump, on modify. And the display is containing only the records in the date range selected not all records with checked date range records. Deselect is giving short dump. Please help me with the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You attempted to change, delete or create a line in the                     &lt;/P&gt;&lt;P&gt;internal table "\PROG=ZSD_CREDITMEMO\DATA=GT_ZCHBOX[]", but no valid cursor &lt;/P&gt;&lt;P&gt; exists                                                                     &lt;/P&gt;&lt;P&gt;for the table.                                                              &lt;/P&gt;&lt;P&gt;Possible reasons:                                                           &lt;/P&gt;&lt;P&gt;1. The relevant ABAP/4 statement does not include the addition              &lt;/P&gt;&lt;P&gt;   "...INDEX...", although the statement is not                             &lt;/P&gt;&lt;P&gt;   inside a "LOOP...ENDLOOP" loop processing this table.                    &lt;/P&gt;&lt;P&gt;2. The relevant ABAP/4 statement was called from within a                   &lt;/P&gt;&lt;P&gt;   "LOOP...ENDLOOP" loop after a DELETE                                     &lt;/P&gt;&lt;P&gt; "\PROG=ZSD_CREDITMEMO\DATA=GT_ZCHBOX[]".      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      NEW-PAGE LINE-SIZE 179.

      r_date-low = sy-datum - 3.
      r_date-high = sy-datum + 3.
      r_date-option = 'BT'.
      r_date-sign = 'I'.
      APPEND r_date.

      IF gs_zchbox IS INITIAL.
        LOOP AT gt_zprice INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = 'X'.
            APPEND gs_zchbox TO gt_zchbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT gt_zprice INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = ' '.
*            APPEND gs_zchbox TO gt_zchbox.
            MODIFY gt_zchbox FROM gs_zchbox TRANSPORTING chbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ENDIF.

      WRITE: /01(179) sy-uline.
      PERFORM headings.
      WRITE: /01(179) sy-uline.
      PERFORM displaydata2.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:50:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997229#M708019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T17:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997230#M708020</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;Please try this again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
WHEN 'SELE'.
   SET PF-STATUS 'STAT'.
   NEW-PAGE LINE-SIZE 179.
 
   r_date-low = sy-datum - 3.
   r_date-high = sy-datum + 3.
   r_date-option = 'BT'.
   r_date-sign = 'I'.
   APPEND r_date.
 
   IF gs_zchbox[] is initial.
     LOOP AT gt_zprice INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         gs_zchbox-chbox = 'X'.
       ENDIF.
       APPEND gs_zchbox TO gt_zchbox.
       CLEAR gs_zchbox.
     ENDLOOP.
   ELSE.
     LOOP AT gs_zchbox INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         IF gs_zchbox-chbox = 'X'.
           gs_zchbox-chbox = ' '.
         ELSE.
           gs_zchbox-chbox = 'X'.
         ENDIF.
         MODIFY gs_zchbox FROM gt_zchbox INDEX sy-tabix.
         CLEAR gs_zchbox.
       ENDIF.
     ENDLOOP.
   ENDIF.
 
   WRITE: /01(179) sy-uline.
   PERFORM headings.
   WRITE: /01(179) sy-uline.
   PERFORM displaydata2.
&lt;/CODE&gt;&lt;/PRE&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>Tue, 30 Oct 2007 17:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997230#M708020</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-30T17:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997231#M708021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish and Ferry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This following code worked with Append stmt instead of Modify stmt for both Select and Deselect options, only problem now is instead of all records(40) it is displaying the records with in the date range(12). Please guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      NEW-PAGE LINE-SIZE 179.

      r_date-low = sy-datum - 3.
      r_date-high = sy-datum + 3.
      r_date-option = 'BT'.
      r_date-sign = 'I'.
      APPEND r_date.

      IF gs_zchbox IS INITIAL.
        LOOP AT gt_zprice INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = 'X'.
            APPEND gs_zchbox TO gt_zchbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT gt_zprice INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = ' '.
            APPEND gs_zchbox TO gt_zchbox.
*            MODIFY gt_zchbox FROM gs_zchbox TRANSPORTING chbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ENDIF.

      WRITE: /01(179) sy-uline.
      PERFORM headings.
      WRITE: /01(179) sy-uline.
      PERFORM displaydata2.
      REFRESH gt_zchbox.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:00:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997231#M708021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997232#M708022</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;Instead of using condition in following way -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF gs_zchbox-crdate &amp;gt;= r_date-low AND&lt;/P&gt;&lt;P&gt;             gs_zchbox-crdate &amp;lt;= r_date-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why don't you use this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT GS_ZCHBOX-CRADATE IN R_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also change other condition in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you activate code, i suggest to run in debug mode for records which are not selected. Check the reason, some condition is failing which needs to be corrected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997232#M708022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997233#M708023</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;Instead of using condition in following way -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF gs_zchbox-crdate &amp;gt;= r_date-low AND&lt;/P&gt;&lt;P&gt;             gs_zchbox-crdate &amp;lt;= r_date-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why don't you use this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF GS_ZCHBOX-CRADATE IN R_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also change other condition in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you activate code, i suggest to run in debug mode for records which are not selected. Check the reason, some condition is failing which needs to be corrected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997233#M708023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997234#M708024</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;Are you sure your previous codes are working fine?&lt;/P&gt;&lt;P&gt;If you are then try to change this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      NEW-PAGE LINE-SIZE 179.
 
      r_date-low = sy-datum - 3.
      r_date-high = sy-datum + 3.
      r_date-option = 'BT'.
      r_date-sign = 'I'.
      APPEND r_date.
 
      IF gs_zchbox[] IS INITIAL.
        LOOP AT gt_zprice INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = 'X'.
          ENDIF.                         "Add here
          APPEND gs_zchbox TO gt_zchbox.
          CLEAR gs_zchbox.
*         ENDIF.                         "Commented here 
        ENDLOOP.
      ELSE.
        LOOP AT gt_zprice INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = ' '.
            APPEND gs_zchbox TO gt_zchbox.
*            MODIFY gt_zchbox FROM gs_zchbox TRANSPORTING chbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ENDIF.
 
      WRITE: /01(179) sy-uline.
      PERFORM headings.
      WRITE: /01(179) sy-uline.
      PERFORM displaydata2.
      REFRESH gt_zchbox.

&lt;/CODE&gt;&lt;/PRE&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>Tue, 30 Oct 2007 18:06:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997234#M708024</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-30T18:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997235#M708025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish and Ferry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This following code worked with out any problems. Can you please check if I am doing it properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)gt_zchbox[] = gt_zprice[].&lt;/P&gt;&lt;P&gt;2)LOOP AT gt_zchbox INTO gs_zchbox. looped on gt_zchbox instead of gt_price.&lt;/P&gt;&lt;P&gt;3) MODIFY gt_zchbox FROM gs_zchbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      NEW-PAGE LINE-SIZE 179.

      r_date-low = sy-datum - 3.
      r_date-high = sy-datum + 3.
      r_date-option = 'BT'.
      r_date-sign = 'I'.
      APPEND r_date.

gt_zchbox[] = gt_zprice[].

      IF gs_zchbox IS INITIAL.
        LOOP AT gt_zchbox INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = 'X'.
*            APPEND gs_zchbox TO gt_zchbox.
            MODIFY gt_zchbox FROM gs_zchbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT gt_zchbox INTO gs_zchbox.
          IF gs_zchbox-crdate &amp;gt;= r_date-low AND
             gs_zchbox-crdate &amp;lt;= r_date-high.
            gs_zchbox-chbox = ' '.
*            APPEND gs_zchbox TO gt_zchbox.
            MODIFY gt_zchbox FROM gs_zchbox.
*            MODIFY gt_zchbox FROM gs_zchbox TRANSPORTING chbox.
            CLEAR gs_zchbox.
          ENDIF.
        ENDLOOP.
      ENDIF.

      WRITE: /01(179) sy-uline.
      PERFORM headings.
      WRITE: /01(179) sy-uline.
      PERFORM displaydata2.
      REFRESH gt_zchbox.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:12:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997235#M708025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997236#M708026</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 looks good to me and is it working as per the requirements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997236#M708026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997237#M708027</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;It will not work ... please try my previous codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
WHEN 'SELE'.
   SET PF-STATUS 'STAT'.
   NEW-PAGE LINE-SIZE 179.
 
   r_date-low = sy-datum - 3.
   r_date-high = sy-datum + 3.
   r_date-option = 'BT'.
   r_date-sign = 'I'.
   APPEND r_date.
 
   IF gs_zchbox[] is initial.
     LOOP AT gt_zprice INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         gs_zchbox-chbox = 'X'.
       ENDIF.
       APPEND gs_zchbox TO gt_zchbox.
       CLEAR gs_zchbox.
     ENDLOOP.
   ELSE.
     LOOP AT gs_zchbox INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         IF gs_zchbox-chbox = 'X'.
           gs_zchbox-chbox = ' '.
         ELSE.
           gs_zchbox-chbox = 'X'.
         ENDIF.
         MODIFY gs_zchbox FROM gt_zchbox INDEX sy-tabix.
         CLEAR gs_zchbox.
       ENDIF.
     ENDLOOP.
   ENDIF.
 
   WRITE: /01(179) sy-uline.
   PERFORM headings.
   WRITE: /01(179) sy-uline.
   PERFORM displaydata2.
&lt;/CODE&gt;&lt;/PRE&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>Tue, 30 Oct 2007 18:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997237#M708027</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-30T18:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997238#M708028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ashish and Ferry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appriciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997238#M708028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997239#M708029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ferry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This also worked. So I will keep the following code. Please let me know if it is good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: gt_zprice TYPE TABLE OF zppprice  WITH HEADER LINE,
      gt_zchbox TYPE TABLE OF ty_zchbox WITH HEADER LINE,
      gs_zchbox TYPE ty_zchbox,
      gs_zprice TYPE zppprice.

WHEN 'SELE'.
   SET PF-STATUS 'STAT'.
   NEW-PAGE LINE-SIZE 179.

   r_date-low = sy-datum - 3.
   r_date-high = sy-datum + 3.
   r_date-option = 'BT'.
   r_date-sign = 'I'.
   APPEND r_date.

*   IF gs_zchbox[] is initial.
   IF gs_zchbox is initial.

     LOOP AT gt_zprice INTO gs_zchbox.
       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         gs_zchbox-chbox = 'X'.
       ENDIF.
       APPEND gs_zchbox TO gt_zchbox.
       CLEAR gs_zchbox.
     ENDLOOP.
   ELSE.
*     LOOP AT gs_zchbox INTO gs_zchbox.
     LOOP AT gt_zchbox INTO gs_zchbox.

       IF gs_zchbox-crdate &amp;gt;= r_date-low AND
          gs_zchbox-crdate &amp;lt;= r_date-high.
         IF gs_zchbox-chbox = 'X'.
           gs_zchbox-chbox = ' '.
         ELSE.
           gs_zchbox-chbox = 'X'.
         ENDIF.
*         MODIFY gs_zchbox FROM gt_zchbox INDEX sy-tabix.
         MODIFY gt_zchbox FROM gs_zchbox INDEX sy-tabix.

         CLEAR gs_zchbox.
       ENDIF.
     ENDLOOP.
   ENDIF.

   WRITE: /01(179) sy-uline.
   PERFORM headings.
   WRITE: /01(179) sy-uline.
   PERFORM displaydata2.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 18:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997239#M708029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T18:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dispaly data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997240#M708030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Veni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have small doubt on this line but it works well for you then your codes are fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
 

*  IF gs_zchbox[] is initial.
*  IF gs_zchbox is initial.            

* It should be this, isn't it? gs_zchbox is work area and gt_zchbox is an internal table
   IF gt_zchbox[]  is initial.
  ...
&lt;/CODE&gt;&lt;/PRE&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>Tue, 30 Oct 2007 18:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dispaly-data/m-p/2997240#M708030</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-30T18:44:52Z</dc:date>
    </item>
  </channel>
</rss>

