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

Code needed for contract BADI's

We have SRM40 with classic scenario. We are trying implementing BADI's BBP_DETERMINE_LOGSYS and BBP_CTR_BE_CREATE, so that we can create contract in backend system as follow on documents after accepting winning bid.

But problem is, we don't have code for these BADI's , If anybody is using these BADI's, could you please send me the code of all methods of these BADI's at my yahoo id (

I think, we have to implement method "BBPV_CONTRACT_CREATE" in backend system also, that finally creates contract in backend system. Do you have this method code also?



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2007 at 08:43 AM


    We have used these BADI long back in of our SRM Implementations.

    <u>Incase you have not read the BADI Documentation, here it is.</u>


    You can use the Business Add-In BBP_DETERMINE_LOGSYS to define your own criteria for determining the backend system / company code. You use this BAdI to determine the source system for
    Shopping cart items
    In the standard system, the backend system is determined using the product category Define Backend Systems. The backend System is placed in the field ITEM_DATA-LOGICAL_SYSTEM. Then the system calls the Business Add-In BBP_DETERMINE_LOGSYS.
    The company code is put in the field ITEM_DATA-BC_CO_CODE. Then the system calls the Business Add-In BBP_DETERMINE_LOGSYS.
    In the standard system, the system creates contracts locally from Sourcing and SAP Bidding Engine You can use this BAdI to determine a backend system.
    Shopping Cart:
    Backend system A is determined for product category OFFICEMATERIAL. You also want to consider the vendor and purchasing organization fields during determination of the backend system. The purchase order is to be created in backend system B for the vendor OFFICE1 and purchasing organization 0001. You overwrite the field ITEM_DATA-LOGICAL_SYSTEM with B.
    The local system used by the standard system to create contracts is XYZ4711. In the field CV_LOGSYS, you enter the logical system ABC0815 that links to a backend system. In this way, contracts are created in the backend system.
    Standard settings
    The BAdI provides the following methods:
    Implement this BAdI if you want to define a target system that is different from the standard system.


    <u><b>Sample code for BBP_DETERMINE_LOGSYS BADI</b></u>

      data: w_acct_data type enriched_acct_data.
      data: w_acct_icom type BBP_PDS_ACC_ICOM.
      data: w_et_messages type BBP_TMESSAGES_BADI.
      data: re_obj(40).
      data: imkey(8).
       field-symbols: <waItem> type bbp_oci_enritem.
       field-symbols: <waAcct> type bbp_oci_enracct.
       field-symbols: <f1> type any.
      if not acct_data[] is initial.
        loop at item_data assigning <waItem>.
          loop at acct_data assigning <waAcct> where line = <waitem>-line.
            check <waAcct>-acc_cat = 'RE'.
            if not <waAcct>-acc_str is initial.
                        ACC_STR    = <waAcct>-ACC_STR
                        BUKRS      = <waItem>-BE_CO_CODE
                        RE_OBJ     = RE_OBJ
                        IMKEY      = IMKEY
                        BBP_RETURN = w_et_messages.
            if not imkey is initial and w_et_messages[] is initial.
              move imkey  to <waAcct>-rl_esk_key.
              move re_obj to <waAcct>-acc_str.
              modify acct_data from <waAcct>.


    <u>Documentation of the BADI - <b>BBP_CTR_BE_CREATE</b></u>


    Short Text
    Create Contract in Backend System
    With Business Add-In BBP_CTR_BE_CREATE, you can replace or supplement existing contract data in SAP Enterprise Buyer with your own backend structures and tables.
    Enterprise Buyer calls this BAdI before it makes the RFC to the backend system to create a contract.
    You use the method CONTRACT_LOGSYS_DETERMINE of the BAdI Determine Backend System/Company Code. Only in connection with this, can you use BBP_CTR_BE_CREATE.
    Standard settings
    The BAdI provides the following methods:
    Implement and activate the BAdI if you wish to create contracts in the backend system and replace or supplement contract data.

    Hope this will help.

    Please reward suitable points, incase it suits your requirements.


    - Atul

    Add comment
    10|10000 characters needed characters exceeded