Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Populating partners through BAPI_CONTRACT_CREATEFROMDATA

0 Kudos
170

Hi All,

I am creating contracts using the FM BAPI_CONTRACT_CREATEFROMDATA .

When I gave a partner number as 0 or Blank, it was not populating that partner in the contract.

But when i am creating the Contract Manually, it was creating partners with 0 as partner number.

Is it possible to add partners with Partner number 0 through BAPI_CONTRACT_CREATEFROMDATA ?

If so, please let me know the procedure.

Regards,

Sreekanth.G

1 REPLY 1

0 Kudos
86

Hello Sreekanth,

When you are creating contracts using BAPI_CONTRACT_CREATEFROMDATA, you must had 3 function partenrs to create the contract.

Try:

DO 3 TIMES.

       CASE syst-index.

         WHEN 1. wa_contract_partners-partn_role = 'PH'.

         WHEN 2. wa_contract_partners-partn_role = 'WE'.

         WHEN 3. wa_contract_partners-partn_role = 'AG'.

       ENDCASE.

       wa_contract_partners-partn_numb = ls_header_data-value_0006.

       APPEND wa_contract_partners TO bapi-contract_partners.

       FREE wa_contract_partners.

     ENDDO.