Application Development 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: 

what are the differences

Former Member
0 Kudos

Hi Friends,

Can any one tell me the differences between

Report Using BAPI Function module and

Report using normal select statements

which one u prefer ?

Thanks and Regards

Vijaya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

well it depends what you are doing and what is the scope of what you are doing. Don't just create a function module for the sake of it . in any case if you have to extract data from database, you will need to write some select statements, either in the report or the function modules. If you think you need these select statements repeatedly in your project or they are a candidate for a scenario which might be reusable at other places, then go ahead creating a function module. If it is a one time affair, try writing selects in the program itself. you can still modularize it using subroutines.

there is enough memory overhead attached to a function module call as the entire function group needs to be loaded in the memory. so make your choice depending on the scope of your work.

regards,

Priyank

5 REPLIES 5

Former Member
0 Kudos

BPAI is prefareble because it is SAP standard. So less chance of erroe.

Former Member
0 Kudos

Hi friends, can any give me some more reasons

0 Kudos

FM or BAPI are reuseable code and like black box where the actual functionality is already implemented and tested. So we dont have to concentrate the underlying logic. Like, blackbox we can just pass the required logic and get the result.

But in report, if u wanna implement that functionality of your own by select query of some other commands, you have to spend some effort for that. So when there is a standard code available to you for a functionality, why should you waste time do invent the logic again. You can use the FM or BAPI to get ur job done. Isn't it??

Former Member
0 Kudos

Hi Frends, any more clear explainations ?

Former Member
0 Kudos

well it depends what you are doing and what is the scope of what you are doing. Don't just create a function module for the sake of it . in any case if you have to extract data from database, you will need to write some select statements, either in the report or the function modules. If you think you need these select statements repeatedly in your project or they are a candidate for a scenario which might be reusable at other places, then go ahead creating a function module. If it is a one time affair, try writing selects in the program itself. you can still modularize it using subroutines.

there is enough memory overhead attached to a function module call as the entire function group needs to be loaded in the memory. so make your choice depending on the scope of your work.

regards,

Priyank