<?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: Facing problem in smartforms. ( Getting Values from Internal Table) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584482#M1434875</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 declared mytable in program Line. Text feild not called in program line data declaration type.&lt;/P&gt;&lt;P&gt;First u declared mytable in Global defination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types: begin of Wa_table,&lt;/P&gt;&lt;P&gt;            ktart type pa2006-ktart,&lt;/P&gt;&lt;P&gt;            anzhl type pa2006-anzhl,&lt;/P&gt;&lt;P&gt;            kverb type pa2006-kverb,&lt;/P&gt;&lt;P&gt;            balance type pa2006-kverb,&lt;/P&gt;&lt;P&gt;           ktext type t556b-ktext,&lt;/P&gt;&lt;P&gt;           designation type c length 40,&lt;/P&gt;&lt;P&gt;           end of Wa_table,&lt;/P&gt;&lt;P&gt;        TA_table TYPE TABLE OF Wa_tablel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global Data:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mytable type TA_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass the mytable (Input parameters &amp;amp; Output parameters) both in Program line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Rahul Ghosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Feb 2010 08:12:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-14T08:12:57Z</dc:date>
    <item>
      <title>Facing problem in smartforms. ( Getting Values from Internal Table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584479#M1434872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear gurus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a code in smartform using flowlogic -&amp;gt; program lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of mytable occurs 0,
    ktart type pa2006-ktart,
    anzhl type pa2006-anzhl,
    kverb type pa2006-kverb,
    balance type pa2006-kverb,
    ktext type t556b-ktext,
    designation type c length 40,
    end of mytable.&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;PRE&gt;&lt;CODE&gt;year = wa_employee-key-begda+0(4).


  call function 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
    exporting
      i_gjahr     = year
      i_periv     = 'C1'
    importing
      e_first_day = fday
      e_last_day  = lday.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select *
    from pa2006 into corresponding fields of table mytable
    where pernr eq wa_employee-key-personnel_number
    and begda between fday and lday."date-low AND date-high.



  loop at mytable.
    select  ktext
     from t556b into mytable-ktext
     where ktart eq mytable-ktart
     and sprsl eq 'EN'
     and mozko eq 90.
    endselect.
    mytable-balance = mytable-anzhl - mytable-kverb.
    mytable-designation = desig.
    modify mytable.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem im facing is that  i want to fetch balances of leaves&lt;/P&gt;&lt;P&gt;1) Annual &lt;/P&gt;&lt;P&gt;2) Casual&lt;/P&gt;&lt;P&gt;3) Medical&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;having ktart 91 , 92 , 93 respectively. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to display these leaves in text field . when i write &amp;amp;mytable-balance&amp;amp; it gives error. saying mytable is not defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please guide me &lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saad Nisar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Feb 2010 06:43:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584479#M1434872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-14T06:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Facing problem in smartforms. ( Getting Values from Internal Table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584480#M1434873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give mytable in the Input parameters of the program lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Reshma R on Feb 14, 2010 12:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Feb 2010 07:01:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584480#M1434873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-14T07:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Facing problem in smartforms. ( Getting Values from Internal Table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584481#M1434874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it gives the following error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field " MYTABLE" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Feb 2010 07:36:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584481#M1434874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-14T07:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Facing problem in smartforms. ( Getting Values from Internal Table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584482#M1434875</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 declared mytable in program Line. Text feild not called in program line data declaration type.&lt;/P&gt;&lt;P&gt;First u declared mytable in Global defination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types: begin of Wa_table,&lt;/P&gt;&lt;P&gt;            ktart type pa2006-ktart,&lt;/P&gt;&lt;P&gt;            anzhl type pa2006-anzhl,&lt;/P&gt;&lt;P&gt;            kverb type pa2006-kverb,&lt;/P&gt;&lt;P&gt;            balance type pa2006-kverb,&lt;/P&gt;&lt;P&gt;           ktext type t556b-ktext,&lt;/P&gt;&lt;P&gt;           designation type c length 40,&lt;/P&gt;&lt;P&gt;           end of Wa_table,&lt;/P&gt;&lt;P&gt;        TA_table TYPE TABLE OF Wa_tablel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global Data:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mytable type TA_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass the mytable (Input parameters &amp;amp; Output parameters) both in Program line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Rahul Ghosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Feb 2010 08:12:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584482#M1434875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-14T08:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Facing problem in smartforms. ( Getting Values from Internal Table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584483#M1434876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saad Nisar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am glad that you have got your query answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a little note on your code for a good programming practice.&lt;/P&gt;&lt;P&gt;for these lines of your code below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select *
    from pa2006 into corresponding fields of table mytable
    where pernr eq wa_employee-key-personnel_number
    and begda between fday and lday."date-low AND date-high.
 
 
 
  loop at mytable.
    select  ktext
     from t556b into mytable-ktext
     where ktart eq mytable-ktart
     and sprsl eq 'EN'
     and mozko eq 90.
    endselect.
    mytable-balance = mytable-anzhl - mytable-kverb.
    mytable-designation = desig.
    modify mytable.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Avoid using Select *&lt;/P&gt;&lt;P&gt;2. &lt;STRONG&gt;DO NOT USE select inside loop&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;    Instead do a select into an internal table outside the loop , then use read table inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SuryaD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Feb 2010 15:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/facing-problem-in-smartforms-getting-values-from-internal-table/m-p/6584483#M1434876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-14T15:42:34Z</dc:date>
    </item>
  </channel>
</rss>

