cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning the standard relationship flag to the contact person of the BP

Former Member
0 Kudos

Hi,

I have a requirement where I have to assign the standard relationship flag to the contact person of the Dealer BP and make it as the Primary Contact Person of the Dealer BP.

Please see the code below and let me know where I am going wrong.

          CALL FUNCTION 'BAPI_BUPA_RELATIONSHIPS_GET'
          EXPORTING
            businesspartner = lw_dealer-dealer
          TABLES
            relationships   = lt_rel
            return          = gt_return.

        CLEAR gt_return.

        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = lw_dealer-prim_cont
          IMPORTING
            output = lw_dealer-prim_cont.

        READ TABLE lt_rel INTO ls_rel WITH KEY relationshipcategory = 'BUR001'
                                               partner2             = lw_dealer-prim_cont.
        IF sy-subrc = 0.

          CALL FUNCTION 'BUPR_RELATIONSHIP_CHANGE'
            EXPORTING
              iv_partner_1    = lw_dealer-dealer
              iv_partner_2    = lw_dealer-prim_cont
              iv_relationship = 'BUR001'
              iv_date_from    = ls_rel-validfromdate
              iv_date_to      = ls_rel-validuntildate
              iv_x_save       = 'X'
              iv_xdfrel       = 'X'
              iv_xdfrel_x     = 'X'
            TABLES
              et_return       = gt_return.

        ENDIF.

Thank You.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Guna,

were you able to solve this issue,

I have a similar kind of requirement...need some insight.

Regards

Rohan