SAP for Automotive Discussions
Connect with fellow SAP users in discussions to troubleshoot challenges, share best practices, and fuel each other's success. Join a conversation or start your own.
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any Function Module for assigning the relationship between customer and Vehicle

former_member204742
Participant
0 Kudos
239

HI,

  In over project we want to Assign the vehicle toa customer through a program.We will create custmer and Vehicle and we want to upload the list for relationship.

   ANY FM or Badi? for assigning the relationship.

With Regards,

selvam T.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
178

Hi Selvam,

with DBM700 there is vehicle action QACU (Assign Customer (DBM)) available. You can use the standard API to trigger this vehicle action.    

Best regards

Robert

View solution in original post

3 REPLIES 3

Former Member
0 Kudos
179

Hi Selvam,

with DBM700 there is vehicle action QACU (Assign Customer (DBM)) available. You can use the standard API to trigger this vehicle action.    

Best regards

Robert

Former Member
0 Kudos
178

Hi Selvam,

In addition you can use the Function Module : /DBM/VM13_QACU_EXECUTE to assign customer to the vehicle.

Thanks & Regards,

Sajida.

TusharShinde
Active Participant
0 Kudos
178

Hi,

Please find below Code for establishing relation between Vehicle & Customer.

CALL FUNCTION '/DBM/VM13_VEHICUST_ASSIGNMENT'
         EXPORTING
           IV_VGUID            = IV_VGUID    "Vehicle
           IV_KUNNR            = IV_KUNNR
           IV_VKORG            = IV_VKORG
           IV_VTWEG            = IV_VTWEG
        IMPORTING
          ET_BAPIRETURN       = ET_BAPIRETURN
* EXCEPTIONS
*   ERROR_OCCURED       = 1
*   OTHERS              = 2
                 .
       IF SY-SUBRC <> 0.

       else.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

       ENDIF.

The pre-requisite for using this FM is to make sure that the Customer Number that you are passing for assignment also belongs to the same Sales Area to which the Vehicle belongs.

Thank You.

Best Regards

Tushar Shinde