Skip to Content
avatar image
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 ( neelesh_iisc@yahoo.co.in)

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?

Regards

Neelesh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 07, 2007 at 08:43 AM

    Hi

    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>

    <b>BADI - BBP_DETERMINE_LOGSYS</b>

    
    ____________________________________________________
    
    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.
    
    
    Contracts
    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.
    Example
    
    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.
    
    Contract:
    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:
    -> DETERMINE_LOGSYS
    -> CONTRACT_LOGSYS_DETERMINE
    
    Activities
    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>

    method IF_EX_BBP_DETERMINE_LOGSYS~DETERMINE_LOGSYS.
    
      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.
              CALL FUNCTION 'Z_RE_ACCT_ASSGN'
                   EXPORTING
                        ACC_STR    = <waAcct>-ACC_STR
                        BUKRS      = <waItem>-BE_CO_CODE
                   IMPORTING
                        RE_OBJ     = RE_OBJ
                        IMKEY      = IMKEY
                   TABLES
                        BBP_RETURN = w_et_messages.
            endif.
    
            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>.
    
            endif.
          endloop.
        endloop.
      endif.
    endmethod.

    ----


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

    <u><b>BBP_CTR_BE_CREATE</b></u>

    ____________________________________________________
    
    Short Text
    Create Contract in Backend System
    
    Use
    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.
    
    
    Requirements
    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:
    -> CONTRACT_INTERFACE_FILL
    -> CONTRACT_PROCESS_TYPE_FILL
    
    Activities
    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.

    Regards

    - Atul

    Add comment
    10|10000 characters needed characters exceeded