Skip to Content
0
Former Member
Apr 30, 2008 at 10:58 AM

BAPI FOR BUSINESS PARTNER

101 Views

hi experts

i am able to business partner (contract partner) with bapi function . code is below

DATA: BPC LIKE BAPIBUS1006_HEAD-PARTN_CAT,

CNTDATA LIKE BAPIBUS1006_CENTRAL OCCURS 0 WITH HEADER LINE,

BP LIKE BAPIBUS1006_HEAD-BPARTNER.

DATA:

gs_centraldata TYPE bapibus1006_central,

gs_centraldataorganization TYPE bapibus1006_central_organ,

gs_addressdata TYPE bapibus1006_address,

it_return TYPE TABLE OF bapiret2,

lv_customer TYPE bu_partner,

GS_PERSON TYPE BAPIBUS1006_CENTRAL_PERSON,

GS_CAT TYPE BAPIBUS1006_HEAD-BPARTNER.

move:

'PRADEEP' TO GS_PERSON-FIRSTNAME,

'SHARMA' TO GS_PERSON-LASTNAME,

'EN' TO GS_PERSON-CORRESPONDLANGUAGE,

'EN' TO gs_centraldata-PARTNERLANGUAGE,

'0001' TO gs_centraldata-TITLE_KEY,

'Siva B Kumar' TO gs_centraldataorganization-name1,

'XYZ' TO gs_centraldataorganization-name2,

'01' TO gs_addressdata-EXTADDRESSNUMBER,

'X' TO gs_addressdata-standardaddress,

'3000' TO gs_addressdata-postl_cod1,

'Melbourne' TO gs_addressdata-city,

'Street' TO gs_addressdata-street,

'246' TO gs_addressdata-house_no,

'GB' TO gs_addressdata-country,

'VIC' TO gs_addressdata-region,

'EN' TO gs_addressdata-langu.

BPC = '1'.

CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'

EXPORTING

BUSINESSPARTNEREXTERN = GS_CAT

PARTNERCATEGORY = BPC

  • PARTNERGROUP =

CENTRALDATA = gs_centraldata

CENTRALDATAPERSON = GS_PERSON

  • CENTRALDATAORGANIZATION = gs_centraldataorganization

  • CENTRALDATAGROUP =

  • ADDRESSDATA = gs_addressdata

  • DUPLICATE_MESSAGE_TYPE =

  • ACCEPT_ERROR = ' '

IMPORTING

BUSINESSPARTNER = BP

  • TABLES

  • TELEFONDATA =

  • FAXDATA =

  • TELETEXDATA =

  • TELEXDATA =

  • E_MAILDATA =

  • RMLADDRESSDATA =

  • X400ADDRESSDATA =

  • RFCADDRESSDATA =

  • PRTADDRESSDATA =

  • SSFADDRESSDATA =

  • URIADDRESSDATA =

  • PAGADDRESSDATA =

  • ADDRESSNOTES =

  • COMMUNICATIONNOTES =

  • COMMUNICATIONUSAGE =

  • TELEFONDATANONADDRESS =

  • FAXDATANONADDRESS =

  • TELETEXDATANONADDRESS =

  • TELEXDATANONADDRESS =

  • E_MAILDATANONADDRESS =

  • RMLADDRESSDATANONADDRESS =

  • X400ADDRESSDATANONADDRESS =

  • RFCADDRESSDATANONADDRESS =

  • PRTADDRESSDATANONADDRESS =

  • SSFADDRESSDATANONADDRESS =

  • URIADDRESSDATANONADDRESS =

  • PAGADDRESSDATANONADDRESS =

  • COMMUNICATIONNOTESNONADDRESS =

  • COMMUNICATIONUSAGENONADDRESS =

  • RETURN =

  • ADDRESSDUPLICATES =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

  • IMPORTING

  • RETURN =

.

WRITE BP.