Skip to Content
0

failed to create business partner in HCM enhancement however commit is used

Nov 09, 2016 at 08:53 AM

21

avatar image

Hello experts,

I use function 'BUPA_CREATE_FROM_DATA' to create Business Partner. The strange thing is it worked when this function is used in programm but failed when used in enhancement PBAS0001: EXIT_SAPFP50M_002.

There is an nummer of partner returned but this Partner is not really created. In Transaction BP is this returned nummber not to be found.

Could someone explain how could it happen? Thanks.

Following are the coding in EXIT_SAPFP50M_002.

FIELD-SYMBOLS <i0021> TYPE p0021.
DATA lv_partner TYPE bu_partner.
DATA lt_return  TYPE bapiret2_t.
DATA ls_return TYPE bapiret2.

CASE innnn-infty.
  WHEN '0021'
    ASSIGN innnn TO <i0021> CASTING.

* data mapping from <i0021> 
ls_data = ...
ls_data_person = ...
* call function
    CALL FUNCTION 'BUPA_CREATE_FROM_DATA'
      EXPORTING
        iv_category    = '1' "Person
        is_data        = ls_data
        is_data_person = ls_data_person
        iv_testrun     = ' '
        iv_x_save      = 'X'
      IMPORTING
        ev_partner     = lv_partner
      TABLES
        et_return      = lt_return. 
* commit
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait   = 'X'
      IMPORTING
        return = ls_return.
ENDCASE.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Thomas Steger
Nov 18, 2016 at 09:48 AM
0

Dear Rujing,

I am afraid this question can only be answered by analyzing the program on your system directly. maybe you can open a support ticket for this problem, as this needs to be debugged?

Best regards

Thomas

Share
10 |10000 characters needed characters left characters exceeded