<?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: Finding the NOT null value fields in Work Area in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117371#M1618099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no better way found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2011 20:34:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-31T20:34:04Z</dc:date>
    <item>
      <title>Finding the NOT null value fields in Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117367#M1618095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am selecting the data from COSP table. When processing the data I have to go thourgh the fields from WTG001 to WKF016 (which are 64 fields) and add up all the values into a variable. I was wondering if there is a way to find out the fields which are NOT NULL and directly sum up the values into variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: gt_cosp TYPE STANDARD TABLE OF cosp,
         wa_cosp LIKE LINE OF gt_cosp.

   select * 
         into table gt_cosp 
         from cosp
     where objnr = lv_objnr.

   loop at gt_cosp into wa_cosp.
     lv_value = wa_cosp-WTG001 + wa_cosp-WTG002 + .....wa_cosp-WKF016
      ..........
      ..........
   endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to do is, if there are only 3 fields with values, let's say  WTG004, WTG006, WTG009. Then I want to sum up only these 3 fields into lv_value. Is there anything that can be used to find this out dynamically. I was thinking of using Field Symbols. Nut sure how I can do that though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know. Appreciate your help. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sey ni on Aug 31, 2011 3:16 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 19:16:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117367#M1618095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-31T19:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the NOT null value fields in Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117368#M1618096</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 using SUM statement inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.abapprogramming.net/2007/06/lesson-22-internal-table-operations.html" target="test_blank"&gt;http://www.abapprogramming.net/2007/06/lesson-22-internal-table-operations.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb381a358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb381a358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 19:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117368#M1618096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-31T19:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the NOT null value fields in Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117369#M1618097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know why this is a problem.... those fields are all curr, so will all have zero or non-zero value....a simple addition will get your the results.... you could do the hard way....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_cosp-WTG001 ne 0.&lt;/P&gt;&lt;P&gt;  lv_value = lv_value + wa_cost_WTG001.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if wa_costp-wtg002 ne 0.&lt;/P&gt;&lt;P&gt; lv_value = lv_value + wa-cosp-wtg002.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:11:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117369#M1618097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-31T20:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the NOT null value fields in Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117370#M1618098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it is a little bit of programming and writing a line of code with all these 64 fields in it. But was just wondering if there is a better way of doing this which I am not aware of. Thanks for the responses though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117370#M1618098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-31T20:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the NOT null value fields in Work Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117371#M1618099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no better way found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:34:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-not-null-value-fields-in-work-area/m-p/8117371#M1618099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-31T20:34:04Z</dc:date>
    </item>
  </channel>
</rss>

