cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing BADI BBP_CTR_BE_CREATE in SAP SRM to transfer values to ECC system

0 Kudos

Hi Experts,

I want your help in implementing the BADI BBP_CTR_BE_CREATE. This BADI will be called  when we transfer contracts from SRM to ECC. I want to map the field SRC_OBJECT_ID into another field in ECC system. I'm a beginner and I find it a bit confusing.I'm using the method CONTRACT_INTERFACE_FILL. Can you please help me out with the steps?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Arun,

Here is what i have done to transfer Rfx Num & Response Num to ECC Contract (I was not using GoA it was a normal SRM-ECC Contract)

SRM Side

BADI: BBP_CTR_BE_CREATE

Method: CONTRACT_INTERFACE_FILL

I have passed the <rfx-num>/<response-num> to  cs_be_header-duns (since it was unused field for me)

ECC Side: There is a BADI to modify the IDOC data before it get posted

BADI: BBP_CTR

Method: MODIFY_IDOC_DATA_CTR

I had split this field into two fields and mapped it to corresponding IDOC segment.

See if this is helpful.

Thanks

Punit

vinita_kasliwal
Active Contributor
0 Kudos

Hi Arun

My code was a sample for your reference ..

You basically should call the FM BBP_PD_CTR_GETDETAIL OR BBP_PD_CTR_ITEM_GETDETAIL

instead of SC and yes the object type would also automatically change to become BUS2000113....

with your logic in place ..

regards

Vinita

0 Kudos

Hi Vinita,

Thanks again for your response. I think I was not clear in my question. The parameter SRC_OBJECT_ID is already in the importing parameter IS_PDEXT_HEADER. We are using PI to transfer contracts from SRM to ECC. If this BADI is getting called at that time, I want this parameter to be mapped to a field in EKKO table in ECC system.

Can this be done using this BADI in the first place or am I riding the wrong horse?

vinita_kasliwal
Active Contributor
0 Kudos

HI Arun

Yes this should work ..

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.

Check this note I found for you it even has a sample implementation ..

I recommend you to put a breakpoint and change the value in debug mode and then try to see if it works for you

  646903 - Global outline agreement: Tips and tricks

Let me know if it helps !!

Regards

Vinita

vinita_kasliwal
Active Contributor
0 Kudos

Hi

Please check below ..

Basically you have to add value to ls_ctr_txt and then update it to ct_be_text.

I am attaching a sample code as well .. if you do not understand Kindly reach out to a ABAPer should not be that tough ..

SELECT SINGLE object_type INTO obj_type FROM crmd_orderadm_h

    WHERE guid = iv_src_guid.

IF obj_type EQ 'BUS2121'.

    CALL FUNCTION 'BBP_PD_SC_ITEM_GETDETAIL'

      EXPORTING

        i_guid    = iv_src_guid

      TABLES

        e_itm_rel = lt_item_rel.

  ls_ctr_text-object_id = cs_be_header-object_id.

  ls_ctr_text-tdid = 'K17' .

  ls_ctr_text-tdspras = 'EN' .

  ls_ctr_text-tdline = ls_header-/locsrm/cup_num.

  ls_ctr_text-LANGU_ISO = 'EN'.

  APPEND ls_ctr_text TO ct_be_text.

  CLEAR ls_ctr_text.

Regards

Vinita

0 Kudos

Hi Vinita,

Thanks for your response.

But I don't think this will work. We are transferring central contracts from SRM to ECC using PI. I have a field which needs to be mapped to another field in ECC. 'BUS2121' is the type for shopping cart whereas we are transferring contracts whose type is BUS2000113.

'BBP_PD_SC_ITEM_GETDETAIL' is also related to shopping cart. How this is going to help me??