‎2007 Feb 05 10:42 AM
i want to create a BP in crm .
iam getting the output when the address data is blank .
if i pass the address data it is giving a error message in return parameter . and Bp no is generated . but the Bp no is not there in the Bp table BUT000.
error message is like this : Address handle invalid: ##1
Kindly sugessst me a good idea .
‎2007 Feb 05 10:57 AM
Hi,
Did you call the FM transaction commit after executing the create function module.
‎2007 Feb 05 11:03 AM
Hi
What is the exact requirement ? Please elaborate.
Here is a sample code.
data: TPgroup type BAPIBUS1006_HEAD-PARTN_GRP,
wa_tb001 type tb001.
*********************************************************************
* The following constant is to define partnercategory '2' which
* indicates it is for TP organization.
*********************************************************************
constants: GC_TYPE_ORGAN value '2'.
*********************************************************************
* The following table select is to find out the partner group that
* externally assigned numbers are allowed.
*********************************************************************
clear wa_tb001.
select BU_GROUP from tb001 into wa_tb001-bu_group
where XEXST = 'X' .
tpgroup = wa_tb001-bu_group.
endselect.
*********************************************************************
*The following function creates a default business partner
*********************************************************************
CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'
EXPORTING
BUSINESSPARTNEREXTERN = tpheader-BPARTNER
PARTNERCATEGORY = GC_TYPE_ORGAN
PARTNERGROUP = tpgroup
CENTRALDATA = TPCENTRAL
* CENTRALDATAPERSON =
CENTRALDATAORGANIZATION = TPCENTRALORG
* CENTRALDATAGROUP =
ADDRESSDATA = TPADDRESS
IMPORTING
BUSINESSPARTNER = TPRETURNID
TABLES
* TELEFONDATA =
* FAXDATA =
* TELETEXDATA =
* TELEXDATA =
* E_MAILDATA =
* RMLADDRESSDATA =
* X400ADDRESSDATA =
* RFCADDRESSDATA =
* PRTADDRESSDATA =
* SSFADDRESSDATA = SSFADDRESSDATA
* URIADDRESSDATA = URIADDRESSDATA
* PAGADDRESSDATA =
* ADDRESSNOTES =
* COMMUNICATIONNOTES =
RETURN = RETURN.Also, it's mandatory to do a BAPI_TRANSACTION_COMMIT.
Hope this will help.
Please reward suitable points.
Regards
- Atul