Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modifying the standard BAPI, BAPI_AR_ACC_GETPERIODBALANCES

former_member207873
Participant
0 Likes
1,787

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.

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.

9 REPLIES 9
Read only

Former Member
0 Likes
1,703

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

Read only

former_member207873
Participant
0 Likes
1,703

Any other helpful answer.

REgards,

Marina.

Read only

0 Likes
1,703

What those below say is true.  Hacking it will quickly produce an answer and it will likely meet all specs.  However, if I treated my projects that way, I would not now have the career that I have.

My perspective says, "You learn nothing from hacking code.  But dis-assembly and reassembly gets your the greatest gain for the future."

Neal

Read only

0 Likes
1,703

is this hacking? if yes, we must learn it in more n more efficient way. moreover this portal is for professionals to fulfill client requirements not for college students to learn ABAP basics. though its just my view still i think we all should focus on smart work rather than hard work all the time specially when we are working with a technology which already given us everything with great flexibility of Customization.

Rgds

Read only

0 Likes
1,703

Ok,  Your superior knowledge has completely invalidated my 15 years of ABAP experience.  I surrender.

Read only

0 Likes
1,703

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

Read only

Former Member
0 Likes
1,703

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

Read only

Former Member
0 Likes
1,703

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.

Read only

hiriyappa_myageri
Participant
0 Likes
1,703

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.