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 for Buisiness Partner

Former Member
0 Likes
1,543

Hi Exprts,

I am searcching BAPI's to create Buisiness Partner(Organization ) and i want to add Company code to that .

please help me .

6 REPLIES 6
Read only

Former Member
0 Likes
804

Check this BAPI it is used to created the partner.

BAPI_BUPA_CREATE_FROM_DATA

it is well documented read it properly.

you need to mention the Partner Category as Organization

Business Partner Category

 Description

     Category into which business partners are classified.

     A differentiation is made between the following business partner
     categories:

     o   Organization

     o   Natural person

     o   Group of natural persons or organizations

 Value range
     1           Natural person
     2           Organization
     3           Group

Read only

Former Member
0 Likes
804

hi,

yes , i entered proper category (2) .but it is giving the error BP category 2 does not fit the data in category 1

Read only

0 Likes
804

can you post your code here..

where you are getting that error.

Read only

0 Likes
804

It is working for me very well. Check it properly.

Check the small code.

REPORT  ztest_partner.

DATA: partnercategory TYPE bapibus1006_head-partn_cat,
      centraldata TYPE bapibus1006_central,
       businesspartner TYPE bapibus1006_head-bpartner.
data: RETURN type table of BAPIRET2 .


partnercategory = '2'.
centraldata-searchterm1 = '1212'.
centraldata-searchterm2 = '123213'.
centraldata-partnerlanguage = 'E'.
centraldata-partnerlanguageiso = 'EN'.
centraldata-titleletter = 'test2e32'.

CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'
  EXPORTING
    partnercategory = partnercategory
    centraldata     = centraldata
  IMPORTING
    businesspartner = businesspartner
  tables
   return  =  return.
IF businesspartner IS NOT INITIAL.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
BREAK-POINT.

Read only

Former Member
0 Likes
804

Thanks ,

i solved thet problem .then i need BAPI to link the comapny code with buisiness partner.

please help me.

Read only

0 Likes
804

Check this function..

BAPI_BUPA_ROLES_GET_2

To add the roles to the Business partner. You can add the Role for Company code.

I am not sure this is the correct one for your requirement. check it once.