<?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 Looking for function module to get current budget in PS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-function-module-to-get-current-budget-in-ps/m-p/7096255#M1507834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am on a development project, and I am looking for a function module or BAPI or a class that returns the current budget for a given project.  In other words, I'd like to find something that more-or-less replicates the functionality of CJ30 in code -- pass in a WBS, return a current budget amount.  Even as I type this, I realize how crazy this sounds.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does such a thing exist or am I going to have to write my own function module from scratch?  I've searched our system with all the search strings I can think of but cannot find any BAPIs, function modules, or classes that do what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ECC6&lt;/P&gt;&lt;P&gt;Netweaver 7.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jul 2010 13:47:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-22T13:47:03Z</dc:date>
    <item>
      <title>Looking for function module to get current budget in PS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-function-module-to-get-current-budget-in-ps/m-p/7096255#M1507834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am on a development project, and I am looking for a function module or BAPI or a class that returns the current budget for a given project.  In other words, I'd like to find something that more-or-less replicates the functionality of CJ30 in code -- pass in a WBS, return a current budget amount.  Even as I type this, I realize how crazy this sounds.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does such a thing exist or am I going to have to write my own function module from scratch?  I've searched our system with all the search strings I can think of but cannot find any BAPIs, function modules, or classes that do what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ECC6&lt;/P&gt;&lt;P&gt;Netweaver 7.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 13:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-function-module-to-get-current-budget-in-ps/m-p/7096255#M1507834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-22T13:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for function module to get current budget in PS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-function-module-to-get-current-budget-in-ps/m-p/7096256#M1507835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was how I solved it. I made my own BAPI.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION z_get_budget.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"&amp;nbsp; IMPORTING
*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(Z_WBS) TYPE&amp;nbsp; PRPS-POSID
*"&amp;nbsp; EXPORTING
*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(Z_BUDGET) TYPE&amp;nbsp; BPGE-WTGES
*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(Z_ERROR) TYPE&amp;nbsp; I
*"----------------------------------------------------------------------

&amp;nbsp; DATA: it_rpsco TYPE TABLE OF rpsco,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wa_rpsco TYPE rpsco,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; my_pspnr TYPE fmdt_any,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; my_objnr TYPE prps-objnr,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum_budget type rpsco-wlp00.

&amp;nbsp; DATA: my_wbs TYPE fmdt_any.
&amp;nbsp; MOVE z_wbs TO my_wbs.
* Convert the WBS element name to an object number
&amp;nbsp; CALL FUNCTION 'CONVERSION_EXIT_ABPSP_INPUT'
&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = my_wbs
&amp;nbsp;&amp;nbsp;&amp;nbsp; IMPORTING
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output&amp;nbsp;&amp;nbsp;&amp;nbsp; = my_objnr
&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTIONS
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not_found = 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHERS&amp;nbsp;&amp;nbsp;&amp;nbsp; = 2.
&amp;nbsp; IF sy-subrc &amp;lt;&amp;gt; 0.
&amp;nbsp;&amp;nbsp;&amp;nbsp; MOVE sy-subrc TO z_error.
&amp;nbsp; ELSE.
*&amp;nbsp; MOVE my_pspnr TO my_objnr.
&amp;nbsp;&amp;nbsp;&amp;nbsp; CONCATENATE 'PR' my_objnr INTO my_objnr.
&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * FROM rpsco INTO TABLE it_rpsco WHERE objnr = my_objnr
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND wrttp = '41'.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clear sum_budget.
&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOP AT it_rpsco INTO wa_rpsco.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum_budget = wa_rpsco-wlp00 + sum_budget.

*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDLOOP.
MOVE sum_budget TO z_budget.
&amp;nbsp;&amp;nbsp;&amp;nbsp; move 0 to z_error.
&amp;nbsp; ENDIF.


ENDFUNCTION.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 15:38:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looking-for-function-module-to-get-current-budget-in-ps/m-p/7096256#M1507835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-20T15:38:54Z</dc:date>
    </item>
  </channel>
</rss>

