2008 Mar 06 3:33 AM
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
2015 Jan 05 3:08 PM
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.