Skip to Content
P D

Modifying the standard BAPI, BAPI_AR_ACC_GETPERIODBALANCES

Hi Experts,

The standard BAPI, BAPI_AR_ACC_GETPERIODBALANCES is for the current fiscal year. If I need to add one more parameter to the interface which will take any given year, how should i proceed. This requirement I am doing for creating a report which is like the S_ALR_87012172 (Customer balances in local currency). So if i am not modifying this BAPI, the other way to achieve this is through the calculations with KNC1,KNC3, BSID and BSAD tables. Which one would be better? With the BAPI or through own manipulation of data through the tables.?

Regards,

Marina.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2013 at 05:50 PM

    Honestly, I'd break open the BAPI to determine how it works (ie. what FM's and forms are called and how) and build my own BAPI. This makes sense, because this BAPI is only for returning data and not for changing data. Otherwise, my answer would be completely different.

    Neal

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2013 at 02:33 AM

    Any other helpful answer.

    REgards,

    Marina.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Neal, I'm extremely sorry for this. i have just half of your experience 😊 but as per my understanding....develop an entire report just to add one more field is not a good idea. changing standard code too is not favorable option so i suggested that option. i'm not sure about experience level of owner of this blog but even if he is just a beginner ...he should learn THIS as well. it will definitely help him in career.

      Again, its just my opinion.

      Rgds

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2013 at 02:59 AM

    as you just need to add one more field in the interface and filter output accordingly enhancing the BAPI would not be the best option. few things you can consider.

    i) copy the BAPI in a Z version, add additional field and just filter the records based on input year on a specific place only (it could be a select query or a FM call). yes, you have to debug the BAPI to get correct place.

    ii) develop whole logic in a Z program or function. but this will be little time consuming which is not in above case.

    i would rather prefer first option as very often we used to get requirements which is very similar to any existing standard object so instead of developing a new better to copy and make desire changes. this saves lot of time and more importantly it will have same look and feel as well as performance as standard transaction has.

    Rgds

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2013 at 06:46 AM

    Hi Marina,

    You Might know standard BAPI will not allow you to customize. So, better you can migrate the BAPI to ZBAPI then add your parameter with corresponding program so that it will be easy to obtain result.

    Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2013 at 05:13 PM

    Hi Marin,

    Using BAPI is Better.

    Try to find the Enhancement spots for that BAPI.
    Source Code Enhancement there u can write Your own logic.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.