Skip to Content

BADI vs Script logic

Dear All

When do we prefer to use BADI from Script logic.

We got to know that every calculation can be done by script logic. Then why BADI/Store procedures being used.

i have read that script logic gets compiled and queries back to DB server and hence time taking and resource utilization making more time.

While BADI/Stored procedures stay in DB itself and hence round time gets reduced with less utilization.

is that the above justification correct? if so, is there any technical preferences to BADI from using SCript logic?

Also I belive that stored procedures, BADI would stay in DB server itself.

While Script logic file stays in Application server on in DB.. [correct me if it the above statement is wrong]

Please let me know.

thanks

Prasad

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 11, 2014 at 06:42 AM

    Hi Prasad,

    You have to use badi in case performance of script logic is not acceptable or in some cases where the limitations of script logic will not allow you to implement business logic.

    But don't mix badi and stored procedure, the last is another story (for BPC MS). Badi is also executed in the same place as script (not on the DB level). Script logic is spending time for code interpretation and generation of abap equivalent. BADI is written on ABAP.

    Vadim

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 11, 2014 at 06:40 AM

    Prasad,

    There are several existing threads on BADI Vs Script Logic. Have you gone through them already?

    We got to know that every calculation can be done by script logic. - Not true, there could be some requirements who simply can't be met by the use of script logic.


    Script Logic calculation executes in application layer and performance may be impacted.


    In general, BADIs are faster than script logic. Please search on SDN forums and you will get numerous threads.


    Regards,

    Ashish

    Add comment
    10|10000 characters needed characters exceeded