I am using BAPI "BAPI_BUPA_ROLE_ADD_2" to add a Role to Business Partner.
When i try to do that manually using transaction BP, in change mode i select the role to be added and SAVE. The role gets added to the BP.
But when i try the same using BAPI, it does not work. The code is written as below.
-- code ---
DATA IT_BAPIRET2 TYPE TABLE OF BAPIRET2.
CALL FUNCTION 'BAPI_BUPA_ROLE_ADD_2'
BUSINESSPARTNER = '900001'
BUSINESSPARTNERROLE = 'TR0809'
RETURN = IT_BAPIRET2.
IF IT_BAPIRET2 is Initial. "Checking if there are any Error Messages
IT_BAPIRET2 is initial. No messages in IT_BAPIRET2.
After which i go to the Table BUT100, give the Business partner number, No records are found.
Also checked in the Transaction BP, to see if the role is added for te Partner.
It did not happen.
Please give me a solution or an alternative to add role to BP.