Skip to Content
author's profile photo Former Member
Former Member

CRM Badi

Hi Guys,

I have a small doubt.

If we write a code in ORDER_SAVE BADI Implmentation, where it will come into our CRM Picture(Presentation->BOL->Genil->API->Database).

Regards,

Suresh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Posted on Jan 03, 2014 at 02:34 PM

    Hello Suresh,

    Order_Save BadI is executed at save of a transaction. There are three methods :--

    change_before_update

    prepare

    check_before_save

    API that calls the BadI, is below the genil.

    Note:-- we should never use BOL programming in BadI.

    Thanks,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 02:37 PM

    Hi,

    I think It will come into picture at Genil, as BADIs are called in the Genil Classes defined for the Business Objects.

    Thanks

    Kumar.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 02:45 PM

    when you write BOL code:-

    .
    IF lo_tx->check_save_needed( ) EQ abap_true .
    IF lo_tx->check_save_possible( ) EQ abap_true .
    IF lo_tx->save( ) EQ abap_true.
    lo_tx->commit( ).

    EINDIF.

    ENDIF.

    ENDIF.


    it jumps to BADI Order_Save and execute its methods.

    for more information you can debug these BOL code statements by putting debugger in Order_Save BADI, this bol code will take u there in BADI .


    Hope it will help.


    Regards,

    @Harish Kumar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 03:03 PM

    Hi Suresh,

    I think as per the path you want to follow, it will be :

    BOL->Genil->API->Database



    Regards,

    Devashish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 03:38 PM

    Hi Suresh,

    Order BAdi is a part of API, where these APIs are called by GenIL.

    As per my knowledge ORDER_SAVE BAdi is part of API. As this BAdi is called in Function Module or BAPI.

    But, you cannot take this statement as Generic, means it is not a thumb rule that BAdis lies at APIs only. There are few BAdis which are implemented at GenIL as well.

    Regards,

    Devender

    Add a comment
    10|10000 characters needed characters exceeded

    • I'm 100% Confindent that ORDER_SAVE BADI is called at the one-order API layer. Most CRM BADI's for one-order are actually below the BOL level and you can usually tell that a BADI is above the the API layer if it contains UIU or is a "new-style" BADI as opposed to a "old-style" BADI.

      The other comments about not doing BOL programming in the ORDER_SAVE BADI or in any one-order BADI are also correct. You would think someone would have written about some of this stuff already, oh well 😊.

      Take care,

      Stephen


  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 06:26 PM

    API

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 04, 2014 at 12:31 PM

    Hi Suresh,

    API.

    Thanks,

    Faisal

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 04, 2014 at 06:13 PM

    Put a break point in order_save BADI and check this would all speculation. If you are still not sure put a snapshot of the ABAP stack and I will let you know 😊

    ~Kavindra

    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.