<?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 checkbox in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073804#M1178664</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 explain more in detail? if you want to read all lines from the basic list or only the current line.i.e., the user selected line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2009 05:05:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-06T05:05:17Z</dc:date>
    <item>
      <title>problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073799#M1178659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi expert,&lt;/P&gt;&lt;P&gt;i create report with check box at begin of write data in tab. after execute, i get report like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;2  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;3  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;4  (checkbox)  xxxxx x xxx xxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when user select check box of desire line and press F8 button system will display only selected line.so i set check box default as 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:
  chk_box          type c value 'X',
  chk_box_val,


write:/1 1tab-xxxxx,
         30 chk_box as checkbox 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;like this all checkbox in report is checked &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i will update field in 1tab to flag that this line is select. if user execute report and don't unmark, all line should display in second execute. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it don't, nothing display. where is incorrect in my code?  for easy to look, this is a relative part of code in my report.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
at line-selection.
    perform selectline.
at pf8.
    perform printnewheader.
    perform printselectline.

form selectline.
  data xnum like rmtab-runno.
  read current line field value chk_box into chk_box_val.
  if chk_box_val is initial.
    chk_box_val = 'X'.
  else.
    chk_box_val = space.
  endif.

  modify current line field value chk_box from chk_box_val.
  if chk_box_val = 'X'.
    xnum = 1tab-runno.
    loop at 1tab where runno = xnum.
      1tab-chk = 'X'.
      modify 1tab.
      clear 1tab.
    endloop.
  else.
    xnum = 1tab-runno.
    loop at 1tab where runno = xnum.
      clear 1tab-chk.
      modify 1tab.
      clear 1tab.
    endloop.
  endif.
endform.             " selectline

form print-doc-select.
  loop at 1tab where chk = 'X'.

   write:/ ................
endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once i arrange code like this, but it's nothing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
*at line-selection.
*    perform selectline.
at pf8.
    perform selectline.
    perform printnewheader.
    perform printselectline.

 (later is as same as above quote)


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you in advance. point for good advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittisak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073799#M1178659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T04:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073800#M1178660</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;First remove the default value 'X'.&lt;/P&gt;&lt;P&gt;Bcoz,it will hold 'X' even if you dont check the chedcdkbox also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After read ,the else condition is not needed.&lt;/P&gt;&lt;P&gt;Clear checkbox after modifying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sreesudha Gullapalli on Feb 6, 2009 5:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:47:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073800#M1178660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T04:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073801#M1178661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First tell if ur first screen should have all check boxes selected or plain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sreesudha Gullapalli on Feb 6, 2009 5:57 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sreesudha Gullapalli on Feb 6, 2009 5:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:48:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073801#M1178661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T04:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073802#M1178662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;First you have to describe the number of lines in list.TO do this&lt;/P&gt;&lt;P&gt;declare like this&lt;/P&gt;&lt;P&gt;And I modified your code. and dont mention the default value for check box.U can select dynamically by using the below code.It gives a good user interface. Based on the below code u can modify your code .Please check it out once...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  w_lines type i,    " number of lines                                    &lt;/P&gt;&lt;P&gt;  w_linno type i.    " line number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at line-selection.&lt;/P&gt;&lt;P&gt;    perform selectline.&lt;/P&gt;&lt;P&gt;at pf8.&lt;/P&gt;&lt;P&gt;    perform printnewheader.&lt;/P&gt;&lt;P&gt;    perform printselectline.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;form selectline.&lt;/P&gt;&lt;P&gt;  data xnum like rmtab-runno.&lt;/P&gt;&lt;P&gt;   describe list number of lines w_lines.&lt;/P&gt;&lt;P&gt;  do w_lines times. &lt;/P&gt;&lt;P&gt;  read current line w_lineno value chk_box into chk_box_val.&lt;/P&gt;&lt;P&gt;  if chk_box_val is initial.&lt;/P&gt;&lt;P&gt;    chk_box_val = 'X'.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    chk_box_val = space.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  modify current line w_linno value chk_box from chk_box_val.&lt;/P&gt;&lt;P&gt;  if chk_box_val = 'X'.&lt;/P&gt;&lt;P&gt;    xnum = 1tab-runno.&lt;/P&gt;&lt;P&gt;    loop at 1tab where runno = xnum.&lt;/P&gt;&lt;P&gt;      1tab-chk = 'X'.&lt;/P&gt;&lt;P&gt;      modify 1tab.&lt;/P&gt;&lt;P&gt;      clear 1tab.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    xnum = 1tab-runno.&lt;/P&gt;&lt;P&gt;    loop at 1tab where runno = xnum.&lt;/P&gt;&lt;P&gt;      clear 1tab-chk.&lt;/P&gt;&lt;P&gt;      modify 1tab.&lt;/P&gt;&lt;P&gt;      clear 1tab.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;clear chk_box .&lt;/P&gt;&lt;P&gt;add 1 to w_linno.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;endform.             " selectline&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;form print-doc-select.&lt;/P&gt;&lt;P&gt;  loop at 1tab where chk = 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   write:/ ................&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kiran Saka on Feb 6, 2009 5:50 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073802#M1178662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T04:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073803#M1178663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;   In this code &lt;/P&gt;&lt;P&gt;  form selectline.&lt;/P&gt;&lt;P&gt;  data xnum like rmtab-runno.&lt;/P&gt;&lt;P&gt;  read current line field value chk_box into chk_box_val.&lt;/P&gt;&lt;P&gt;  if chk_box_val is initial.&lt;/P&gt;&lt;P&gt;    chk_box_val = 'X'.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    chk_box_val = space.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;you are changing the chkbox value to space so thats why its not excuting&lt;/P&gt;&lt;P&gt;if the value by default is X then there is no need to check the value of the checkbox&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Viquar Iqbal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 04:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073803#M1178663</guid>
      <dc:creator>viquar_iqbal</dc:creator>
      <dc:date>2009-02-06T04:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073804#M1178664</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 explain more in detail? if you want to read all lines from the basic list or only the current line.i.e., the user selected line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 05:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073804#M1178664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T05:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073805#M1178665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Kittisak ,&lt;/P&gt;&lt;P&gt;Please  let  me  know  first if  you  unmark  or uncheck  a  few  checkbox  and  then  press F8  what is  happenning ?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 05:07:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073805#M1178665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T05:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073806#M1178666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Can you explain more in detail? if you want to read all lines from the basic list or only the current line.i.e., the user selected line?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to read all line that check box at begin of line is checked , and display only lines that checked in 2nd Execute &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.E.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zreport show 10 lines of data. check box at begin of line 2 , 3 , 4 , 8 is mark as checked by user. when user press execute again.  report will show only line 2 ,3 ,4 , 8.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 05:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073806#M1178666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T05:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073807#M1178667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to Sreesudha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all check box should check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 07:03:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073807#M1178667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T07:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: problem with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073808#M1178668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solve. thank for all of your advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 07:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-checkbox/m-p/5073808#M1178668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T07:44:56Z</dc:date>
    </item>
  </channel>
</rss>

