<?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 logic for WBS ELEMENT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644990#M1093290</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 an issue in the report, the problem is &lt;/P&gt;&lt;P&gt;in the selection screen i have an WBS ELEMENT as an select option(there is no belnr in selection scrren)&lt;/P&gt;&lt;P&gt;for eg- if i enter &lt;/P&gt;&lt;P&gt;COMP CODE = 0010&lt;/P&gt;&lt;P&gt;WBS ELEMNT = 23456&lt;/P&gt;&lt;P&gt;YEAR = 2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the above details there are 2 line items in table for that particular belnr as&lt;/P&gt;&lt;P&gt;BUKRS BELNR YEAR BUZEI WBSELT SHKZG &lt;/P&gt;&lt;P&gt;0010 40000050 2008 001 23456 S&lt;/P&gt;&lt;P&gt;0010 40000050 2008 002 00000 H &lt;/P&gt;&lt;P&gt;there is only one line item for WBS ELEMENT IN BSEG TABLE.&lt;/P&gt;&lt;P&gt;So i am getting debit(SHKZG-S) value but i am not getting credit value if i write the select query as below.&lt;/P&gt;&lt;P&gt;SELECT bukrs&lt;/P&gt;&lt;P&gt;belnr&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;buzei&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;kostl&lt;/P&gt;&lt;P&gt;aufnr&lt;/P&gt;&lt;P&gt;lifnr&lt;/P&gt;&lt;P&gt;ebeln&lt;/P&gt;&lt;P&gt;projk&lt;/P&gt;&lt;P&gt;FROM bseg&lt;/P&gt;&lt;P&gt;into table gt_bseg&lt;/P&gt;&lt;P&gt;for all entries in i_get&lt;/P&gt;&lt;P&gt;where bukrs eq i_get-bukrs&lt;/P&gt;&lt;P&gt;and belnr eq i_get-belnr&lt;/P&gt;&lt;P&gt;and gjahr eq i_get-ryear&lt;/P&gt;&lt;P&gt;and buzei eq i_get-buzei&lt;/P&gt;&lt;P&gt;and projk in s_projk.&lt;/P&gt;&lt;P&gt;please help how to get both values.help with code&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one of the friend from SDN gave the following solution to my problem&lt;/P&gt;&lt;P&gt;but here he kept KOART = D, WHEREAS FOR MY CODE OTHERLINEITEM MISSED WOULD BE CREDIT OR DEBIT ONCE IT MAY BE MISSED THE CREDIT LINEITEM OR DEBIT ONE.&lt;/P&gt;&lt;P&gt;LOOP AT GT_BSEG.&lt;/P&gt;&lt;P&gt;select single BELNR KOART WRBTR PROJK FROM BSEG INTO wa_bseg WHERE BELNR = BSEG-BELNR AND KOART = 'D'.&lt;/P&gt;&lt;P&gt;append the values of wa_bseg to it_bseg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have faced same problem if u observe the table BSEG if KOART value is D , in that line item you cant get the PROJK value so&lt;/P&gt;&lt;P&gt;from above select statemnt u can retrieve that value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally in it_bseg u can get the lineitems which are emitted by your select query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLEASE HELP ME&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2008 07:21:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-20T07:21:03Z</dc:date>
    <item>
      <title>logic for WBS ELEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644990#M1093290</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 an issue in the report, the problem is &lt;/P&gt;&lt;P&gt;in the selection screen i have an WBS ELEMENT as an select option(there is no belnr in selection scrren)&lt;/P&gt;&lt;P&gt;for eg- if i enter &lt;/P&gt;&lt;P&gt;COMP CODE = 0010&lt;/P&gt;&lt;P&gt;WBS ELEMNT = 23456&lt;/P&gt;&lt;P&gt;YEAR = 2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the above details there are 2 line items in table for that particular belnr as&lt;/P&gt;&lt;P&gt;BUKRS BELNR YEAR BUZEI WBSELT SHKZG &lt;/P&gt;&lt;P&gt;0010 40000050 2008 001 23456 S&lt;/P&gt;&lt;P&gt;0010 40000050 2008 002 00000 H &lt;/P&gt;&lt;P&gt;there is only one line item for WBS ELEMENT IN BSEG TABLE.&lt;/P&gt;&lt;P&gt;So i am getting debit(SHKZG-S) value but i am not getting credit value if i write the select query as below.&lt;/P&gt;&lt;P&gt;SELECT bukrs&lt;/P&gt;&lt;P&gt;belnr&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;buzei&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;kostl&lt;/P&gt;&lt;P&gt;aufnr&lt;/P&gt;&lt;P&gt;lifnr&lt;/P&gt;&lt;P&gt;ebeln&lt;/P&gt;&lt;P&gt;projk&lt;/P&gt;&lt;P&gt;FROM bseg&lt;/P&gt;&lt;P&gt;into table gt_bseg&lt;/P&gt;&lt;P&gt;for all entries in i_get&lt;/P&gt;&lt;P&gt;where bukrs eq i_get-bukrs&lt;/P&gt;&lt;P&gt;and belnr eq i_get-belnr&lt;/P&gt;&lt;P&gt;and gjahr eq i_get-ryear&lt;/P&gt;&lt;P&gt;and buzei eq i_get-buzei&lt;/P&gt;&lt;P&gt;and projk in s_projk.&lt;/P&gt;&lt;P&gt;please help how to get both values.help with code&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one of the friend from SDN gave the following solution to my problem&lt;/P&gt;&lt;P&gt;but here he kept KOART = D, WHEREAS FOR MY CODE OTHERLINEITEM MISSED WOULD BE CREDIT OR DEBIT ONCE IT MAY BE MISSED THE CREDIT LINEITEM OR DEBIT ONE.&lt;/P&gt;&lt;P&gt;LOOP AT GT_BSEG.&lt;/P&gt;&lt;P&gt;select single BELNR KOART WRBTR PROJK FROM BSEG INTO wa_bseg WHERE BELNR = BSEG-BELNR AND KOART = 'D'.&lt;/P&gt;&lt;P&gt;append the values of wa_bseg to it_bseg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have faced same problem if u observe the table BSEG if KOART value is D , in that line item you cant get the PROJK value so&lt;/P&gt;&lt;P&gt;from above select statemnt u can retrieve that value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally in it_bseg u can get the lineitems which are emitted by your select query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLEASE HELP ME&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 07:21:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644990#M1093290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T07:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: logic for WBS ELEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644991#M1093291</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 don't need to put all the conditions mentioned by you in the Query, it would be sufficient to put only the primary key fields of BSEG, so the Query should be like....&lt;/P&gt;&lt;P&gt;SELECT bukrs&lt;/P&gt;&lt;P&gt;belnr&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;buzei&lt;/P&gt;&lt;P&gt;SHKZG&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;kostl&lt;/P&gt;&lt;P&gt;aufnr&lt;/P&gt;&lt;P&gt;lifnr&lt;/P&gt;&lt;P&gt;ebeln&lt;/P&gt;&lt;P&gt;projk&lt;/P&gt;&lt;P&gt;FROM bseg&lt;/P&gt;&lt;P&gt;into table gt_bseg&lt;/P&gt;&lt;P&gt;for all entries in i_get&lt;/P&gt;&lt;P&gt;where bukrs eq i_get-bukrs&lt;/P&gt;&lt;P&gt;and belnr eq i_get-belnr&lt;/P&gt;&lt;P&gt;and gjahr eq i_get-ryear&lt;/P&gt;&lt;P&gt;and buzei eq i_get-buzei.&lt;/P&gt;&lt;P&gt;(****include only PK fields in where condition)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 09:22:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644991#M1093291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T09:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: logic for WBS ELEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644992#M1093292</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; i have an issue in the report, the problem is &lt;/P&gt;&lt;P&gt;&amp;gt; in the selection screen i have an WBS ELEMENT as an select option(there is no belnr in selection scrren)&lt;/P&gt;&lt;P&gt;&amp;gt; for eg- if i enter &lt;/P&gt;&lt;P&gt;&amp;gt; COMP CODE = 0010&lt;/P&gt;&lt;P&gt;&amp;gt; WBS ELEMNT = 23456&lt;/P&gt;&lt;P&gt;&amp;gt; YEAR = 2008.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you're trying to select from BSEG using only these selection criteria, then your query is likely to be very, very slow.  Since BSEG is a cluster table and therefore only the key is used for the query, you need to specifiy at least BUKRS and BELNR to get any sort of decent performance.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I wanted to select using WBS element (or any controlling object) my starting point would be the Controlling tables COEP and COBK, or COVP which is a view of the two; after all, the Controlling tables were set up specifically to deal with this sort of query. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you've picked up the line you want with your WBS element selection, you can get any of the other lines on the document by selecting from BSEG using the reference document fields held in the Controlling tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 09:39:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-wbs-element/m-p/4644992#M1093292</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-10-20T09:39:17Z</dc:date>
    </item>
  </channel>
</rss>

