Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 05, 2016 at 08:05 AM

    Hi Guna,

    were you able to solve this issue,

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

    Regards

    Rohan

    Add comment
    10|10000 characters needed characters exceeded