cancel
Showing results for 
Search instead for 
Did you mean: 

How to update more than a single business partner in a contract through BAPI?

Former Member
0 Kudos

Dear Experts,

We have a scenario wherein we have multiple partners assignned to a single contract. I want to use the function module - BAPI_RE_CN_CHANGE to append the business partners in a contract after it has been created.

The problem is although the BAPI is giving a success message the contract is not getting updated with the business partner. Please provide some help on the same.

Regards,

Ayan Mukherjee

Accepted Solutions (0)

Answers (2)

Answers (2)

yeong-chul_jeong
Active Participant
0 Kudos

Dear Ayan,

a) If you previously want to test this function,

    - Goto SE37 :

              1) Select from Menu : Function Module -> Execute -> Test Sequences

              2) Enter the functions as BAPI_RE_CN_CHANGE and BAPI_TRANSACTION_COMMIT

              3) Execute.

b) Finally, If you want to apply this function on the customizing program or enhancement spot ,

    you can call the function BAPI_TRANSACTION_COMMIT

Regards,

Jeong, Yeong-Chul.

Former Member
0 Kudos

hi Jeong,

Thanks for your guidance. Yes I have tried in the way you have mentioned. However I have still not achieved the same.

My objective is once a contract has been created with a single business partner, I want to append further business partners in the same.

Alternative methods if any would really be helpful.

Regards,

Ayan

Former Member
0 Kudos

Hi Ayan,

My other possible guess would be the configuration associated with the business partner and contract type. If you have set the cardinality as '1' for a role and to the contract type, then it would not allow you to add more than one business partner of the same partner role.

Navigation: recacust->business partner->relevant settings....-> BP roles-> assignment of roles to RE applications.

Check that as well..

Thanks,

Muttu

yeong-chul_jeong
Active Participant
0 Kudos

Dear Ayan.

If you want to assign the multiple partners in the contract and apply to function module

(i.e. BAPI_RE_CN_CHANGE) in your business process, you must firstly consider 4-options

as below.

Multiple Partners - It mean for the Same Role or Not ?

    For this requirement, you must firstly check the "Make Settings for Roles per Object Type"

    such as below configuration display.

     - Go to RECACUST :

                         > Business Partner > Relevant Settings for Business Partner in RE Context >

                           > Assignment of Role Categories to Real Estate Applications >

                             > Make Settings for Roles per Object Type

     1) Contract Type

     2) Role Type of each contract type.

     3) Cardinality of a role assignment to an object :

           _Blank is for any number of business partners

     4) Multiple Role Assignment (MultA) : Multiple or Not (Unique)

Regards,

Jeong, Yeong-Chul.

Former Member
0 Kudos

Hi Yeong

Configuration has been done already for multiple partner and contracts have been created manually and posted also.

But suppose if I want to upload contract through create BAPI and by using that BAPI we are also able to created contracts successfully for one partner.

but for uploading contract having multiple partner he is unable to upload contract through same BAPI therefore now he is trying following scenario:

1. first contract will be uploaded through BAPI contract create.

2.then through change BAPI he wants to add few more partner. (config. has already done)

But my question is that whether can be use "create BAPI Contract" for uploading contracts having multiple partner.

Regards

shantanu


yeong-chul_jeong
Active Participant
0 Kudos

Dear shantanu.

I understand what you want it to know. but the function as "BAPI_RE_CN_CREATE" already has

the table parameters for assigning multiple partner as below ;

BAPI_RE_CN_CREATE :

1) Table Parameter :

     - PARTNER  :  BAPI_RE_PARTNER_DAT (Partner)

     - TERM_PAYMENT : BAPI_RE_TERM_PY_DAT (Posting Terms)

   So, when you want to assign the multiple partner, you firstly define the "PARTNER parameter"

   to the PARTNER field and assign this partner in the "TERM_Payment" parameter.

   TERM_PAYMENT parameter also has a field for the "Business Partner Number".

Regards

Jeong, Yeong-Chul.

Former Member
0 Kudos

Hi Ayan,

Please see if you are running it in the simulate mode.

Thanks,

Muttu

Former Member
0 Kudos

Hi Muttanna,

Thanks for your reply. To clarify your query the program was not executed in simulation mode. I have also tried updating through the function module - API_RE_CN_CHANGE and it also did not update the same.

Regards,

Ayan

Former Member
0 Kudos

Did you had a look at the return table of function BAPI_RE_CN_CHANGE? Normally all protocol messages will be saved there.

Regards
Michael

franz_posch
Active Contributor
0 Kudos

Hi Ayan,

did you perform a COMMIT WORK after BAPI_RE_CN_CHANGE to update the changes on the database?

You can use function BAPI_TRANSACTION_COMMIT for this purpose.

Regards, Franz

Former Member
0 Kudos

Hi Franz,

No for BAPI_RE_CN_Change, I did not use the COMMIT work. Hpowever for the BAPI, API_RE_CN_CHANGE, I executed the COMMIT WORK. However for that also it did not update the data.

Regards,

Ayan