<?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 How to use Bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000250#M708774</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;How to use bapis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_COMPANYCODE_GET_PERIOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_CCODE_GET_FIRSTDAY_PERIOD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_GL_ACC_GETPERIODBALANCES'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Nov 2007 08:58:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-13T08:58:46Z</dc:date>
    <item>
      <title>How to use Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000250#M708774</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;How to use bapis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_COMPANYCODE_GET_PERIOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_CCODE_GET_FIRSTDAY_PERIOD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_GL_ACC_GETPERIODBALANCES'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 08:58:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000250#M708774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T08:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000251#M708775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BAPI_COMPANYCODE_GET_PERIOD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To retrieve the fiscal year variant for a given date u can use the following function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Retrieve fiscal year and period &lt;/P&gt;&lt;P&gt;The below code shows how to use function modules BAPI_COMPANYCODE_GET_PERIOD and &lt;/P&gt;&lt;P&gt;DETERMINE_PERIOD to retrieve fiscal year and fiscal period for a specific date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*.......................................................................&lt;/P&gt;&lt;P&gt;*: Report: ZFISCALYR :&lt;/P&gt;&lt;P&gt;*: :&lt;/P&gt;&lt;P&gt;*: Author: &lt;A href="https://community.sap.com/www.SAPdev.co.uk" target="test_blank"&gt;www.SAPdev.co.uk&lt;/A&gt; :&lt;/P&gt;&lt;P&gt;*: :&lt;/P&gt;&lt;P&gt;*: Date : 2004 :&lt;/P&gt;&lt;P&gt;*: :&lt;/P&gt;&lt;P&gt;*: Description: Demonstrates how to return the corresponding fiscal :&lt;/P&gt;&lt;P&gt;*: year and posting period for a company code and posting :&lt;/P&gt;&lt;P&gt;*: date or posting date and fiscal year variant. :&lt;/P&gt;&lt;P&gt;*:.....................................................................:&lt;/P&gt;&lt;P&gt;REPORT zfiscalyr NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_bukrs TYPE ekko-bukrs,&lt;/P&gt;&lt;P&gt;p_bedat TYPE ekko-bedat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gd_fiscalyr TYPE bapi0002_4-fiscal_year,&lt;/P&gt;&lt;P&gt;gd_fiscalp TYPE bapi0002_4-fiscal_period.&lt;/P&gt;&lt;P&gt;DATA: gd_fiscalyr2 TYPE T009B-BDATJ,&lt;/P&gt;&lt;P&gt;gd_fiscalp2 TYPE bapi0002_4-fiscal_period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gd_periv TYPE t009-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get fiscal year and period - (requires date and company code)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;companycodeid = p_bukrs&lt;/P&gt;&lt;P&gt;posting_date = p_bedat&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;fiscal_year = gd_fiscalyr&lt;/P&gt;&lt;P&gt;fiscal_period = gd_fiscalp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Alternative fiscal year function module&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- (requires date and fiscal year variant code from T009 table)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gets first entry in fiscal year variant table (will need to choose&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;correct one from table rather than just using first entry)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE periv&lt;/P&gt;&lt;P&gt;FROM t009&lt;/P&gt;&lt;P&gt;INTO gd_periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get fiscal year and period&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'DETERMINE_PERIOD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;date = p_bedat&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PERIOD_IN = '000'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;version = gd_periv&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;period = gd_fiscalp2&lt;/P&gt;&lt;P&gt;year = gd_fiscalyr2&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;period_in_not_valid = 1&lt;/P&gt;&lt;P&gt;period_not_assigned = 2&lt;/P&gt;&lt;P&gt;version_undefined = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4.************************************************************************&lt;/P&gt;&lt;P&gt;*END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',&lt;/P&gt;&lt;P&gt;/ 'Fiscal year is:', gd_fiscalyr,&lt;/P&gt;&lt;P&gt;/ 'Fiscal period is:', gd_fiscalp.&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ 'From function module: DETERMINE_PERIOD',&lt;/P&gt;&lt;P&gt;/ 'Fiscal year is:', gd_fiscalyr2,&lt;/P&gt;&lt;P&gt;/ 'Fiscal period is:', gd_fiscalp2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="422729"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_CCODE_GET_FIRSTDAY_PERIOD:&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_CCODE_GET_FIRSTDAY_PERIOD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;companycodeid = v_bukrs&lt;/P&gt;&lt;P&gt;fiscal_period = marv-lfmon&lt;/P&gt;&lt;P&gt;fiscal_year = marv-lfgja&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;first_day_of_period = v_postdate&lt;/P&gt;&lt;P&gt;return = i_return1.&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="248166"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="424213"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_GL_ACC_GETPERIODBALANCES:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="427317"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me reward point...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 09:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000251#M708775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T09:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000252#M708776</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;&amp;lt;b&amp;gt;BAPI_COMPANYCODE_GET_PERIOD&amp;lt;/b&amp;gt; For Company Code: Posting Date -&amp;gt; Period, Fiscal Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Functionality&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;This method returns the corresponding fiscal year and posting period to a company code and posting date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;COMPANYCODEID&lt;/P&gt;&lt;P&gt;POSTING_DATE&lt;/P&gt;&lt;P&gt;FISCAL_YEAR&lt;/P&gt;&lt;P&gt;FISCAL_PERIOD&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BAPI_CCODE_GET_FIRSTDAY_PERIOD&amp;lt;/b&amp;gt; For Company Code: First Day of Period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Functionality&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;For a company code, a fiscal year, and a period, this method returns the first day of the period as a complete date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;COMPANYCODEID&lt;/P&gt;&lt;P&gt;FISCAL_PERIOD&lt;/P&gt;&lt;P&gt;FISCAL_YEAR&lt;/P&gt;&lt;P&gt;FIRST_DAY_OF_PERIOD&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BAPI_GL_ACC_GETPERIODBALANCES&amp;lt;/b&amp;gt; Posting period balances for each G/L account&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note!: The GetPeriodBalances method will no longer be supported. The functions will be replaced by the GetPeriodBalances method in object type BUS1028 of the general ledger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have previously used this method, change the usage to that of the new method in object type BUS1028.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the method in object type BUS1028 the next time you use this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Functionality&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;This method returns the G/L account balances per posting period for a given fiscal year.&lt;/P&gt;&lt;P&gt;The user can choose whether a balance is returned in the transaction or company code currency except for G/L accounts managed in different transaction currencies. Only the company code currency is returned for such accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The balance as determined by the system and the currency are returned with any problems appearing in the form of a return code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Notes&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;The same authorization checks are carried out as take place when displaying information within an R/3 transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system does not convert the input parameter COMPANYCODE, meaning that leading blank characters within this parameter are not cleared. Likewise, no conversion is carried out for the parameter GLACCT. G/L account numbers must therefore be entered with the leading zeros (e.g. 0000113100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Messages are displayed in the RETURN parameter the documentation for which contains the return values and their meaning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Parameters&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;COMPANYCODE&lt;/P&gt;&lt;P&gt;GLACCT&lt;/P&gt;&lt;P&gt;FISCALYEAR&lt;/P&gt;&lt;P&gt;CURRENCYTYPE&lt;/P&gt;&lt;P&gt;BALANCE_CARRIED_FORWARD&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;ACCOUNT_BALANCES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if usefull&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 09:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/3000252#M708776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T09:11:47Z</dc:date>
    </item>
  </channel>
</rss>

