<?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: Assign and increment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320824#M1226408</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;try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_total = w_total + : st_linerec-wog001,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog002,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog003,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog004,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog005,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog006,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog007,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog008,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog009,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog010,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog011,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog012,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog013,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog014 ,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog015,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog016 .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Mar 2009 14:31:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-19T14:31:43Z</dc:date>
    <item>
      <title>Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320822#M1226406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a code that add the amount from period 1 up to period 16 to get the total&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"determines what periods have been requested and sums them accordingly
LOOP AT s_perio INTO wa_perio.
    IF wa_perio+6(3) = space.
      w_low = wa_perio+3(3).
      w_high = wa_perio+3(3).
    ELSE.
      w_low = wa_perio+3(3).
      IF wa_perio+6(3) = 12.
        w_high = 16.
      ELSE.
        w_high = wa_perio+6(3).
      ENDIF.
    ENDIF.
  ENDLOOP.

  wa_times-sign = c_sign.
  wa_times-option = c_option_bt.
  wa_times-low = w_low.
  wa_times-high = w_high.
  APPEND wa_times TO times.


  ADD st_linerec-wog001 THEN st_linerec-wog002 UNTIL st_linerec-wog016
         GIVING w_total ACCORDING TO times.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to change the code from add then until... to ASSIGN and INCREMENT (since the first one is not used in classes, an obsolete statement).  Am i supposed to use field symbol? and i'm not sure how to use INCREMENT for it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:06:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320822#M1226406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T14:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320823#M1226407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
v_int = times-low.
do.
 concatenate 'ST_LINEREC-WOG' v_int into v_field.
 condense v_field no-gaps.
 assign (v_field) to &amp;lt;fs&amp;gt;
 w_total = w_total + &amp;lt;fs&amp;gt;.
 if times-high eq v_int.
    exit.
 endif.
 v_int = v_int + 1.
enddo. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320823#M1226407</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-03-19T14:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320824#M1226408</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;try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_total = w_total + : st_linerec-wog001,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog002,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog003,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog004,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog005,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog006,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog007,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog008,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog009,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog010,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog011,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog012,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog013,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog014 ,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog015,&lt;/P&gt;&lt;P&gt;                               st_linerec-wog016 .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:31:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320824#M1226408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T14:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320825#M1226409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sreesudha , thank you for your suggestion but your code will always sum all period no matter what the period the user enter on selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320825#M1226409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T14:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320826#M1226410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi a®s, when i tried your code. It says times is not a table with header line. This is how i declare times&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: times TYPE RANGE OF index,
      wa_times LIKE LINE OF times.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320826#M1226410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T14:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320827#M1226411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
read table times into wa_times index 1.
v_int = wa_times-low.
do.
 concatenate 'ST_LINEREC-WOG' v_int into v_field.
 condense v_field no-gaps.
 assign (v_field) to &amp;lt;fs&amp;gt;
 w_total = w_total + &amp;lt;fs&amp;gt;.
 if wa_times-high eq v_int.
    exit.
 endif.
 v_int = v_int + 1.
enddo. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320827#M1226411</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-03-19T14:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320828#M1226412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It gaves msg "Field symbol is not assigned" ,a®s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how i applied your code in mine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE ANY.
DATA v_int(3) type c.
DATA v_field(17) type C.
 read table times into wa_times index 1.
 v_int = wa_times-low.
do.
 concatenate 'ST_LINEREC-WOG' v_int into v_field.
 condense v_field no-gaps.
 assign (v_field) to &amp;lt;fs&amp;gt;.
 w_total = w_total + &amp;lt;fs&amp;gt;.
 if wa_times-high eq v_int.
    exit.
 endif.
 v_int = v_int + 1.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe the problem comes from the declaration part?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 15:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320828#M1226412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320829#M1226413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think v_field not getting proper values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ST_LINEREC-WOG003 i think it getting as ST_LINEREC-WOG3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to change this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols &amp;lt;fs&amp;gt; type any.
data v_int type i.   "&amp;lt;&amp;lt;
data : v_cint(3) type c.   "&amp;lt;&amp;lt;
data v_field(17) type c.
data: times type range of index,
      wa_times like line of times.

read table times into wa_times index 1.
v_int = wa_times-low.
do.
  unpack v_int to v_cint..  "&amp;lt;&amp;lt;
  concatenate 'ST_LINEREC-WOG' v_cint into v_field.
  condense v_field no-gaps.
  assign (v_field) to &amp;lt;fs&amp;gt;.
  w_total = w_total + &amp;lt;fs&amp;gt;.
  if wa_times-high eq v_int.
    exit.
  endif.
  v_int = v_int + 1.
enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 16:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320829#M1226413</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-03-19T16:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Assign and increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320830#M1226414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;awesome, it works!. Thanks a lot a®s !.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 17:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-and-increment/m-p/5320830#M1226414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T17:02:22Z</dc:date>
    </item>
  </channel>
</rss>

