Application Development and Automation 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: 
Read only

BAPI_BUPA_CREATE_FROM_DATA

Former Member
0 Likes
2,673

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 .

2 REPLIES 2
Read only

Former Member
0 Likes
1,220

Hi,

Did you call the FM transaction commit after executing the create function module.

Read only

Former Member
0 Likes
1,220

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