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.
Showing results for 
Search instead for 
Did you mean: 

Change dbm order via code

Former Member
0 Kudos


I want to modify the LGORT of a vehicle in a DBM order

Somebody know a FM, method to do it?




Former Member
0 Kudos


Check any action available for LGORT change for vehicle, then use that action and call do action FM to change the values.

before that get details of vehicle & pass same again to aviod the overwriting the existing values of vehicle.

get ABAPer's help to achive this.


Rajesh V

Former Member
0 Kudos

Hi Mariano,

to change a vehicle's LGORT (or any other vehicle attribute), you should trigger a vehicle action instead of directly updating a vehicle database table.

In note 1105899 you find a cookbook describing the DBM order engine. Chapter 2.10 contains information about vehicle integration.

Changing the LGORT should typically be done using a goods movement action. Either you trigger the goods movement of the vehicle directly by the DBM order engine (and you just update the vehicle) or you trigger a vehicle action which does a goods movement and updates the vehicle.

In the first case, please look at action QGIS which does something like that in case of the vehicle goods receipt. FM /DBM/VM13_QGIS_EXECUTE contains the vehicle action coding.

In the latter case, action STOL (FMs VELO17_STOL_EXECUTE and VELO17_STOL_PREPARE) does something similar. STOL is written for VMS, not DBM though. So it might not work in DBM and is perhaps just an example.

Note: When the vehicle is on stock, the system expects VLCVEHICLE-LGORT to be filled with the storage location in which the vehicle is. If the vehicle is not on stock (pre goods receipt and post goods issue), the system expects VLCVEHICLE-LGORT to be empty.

If you nevertheless just want to update the LGORT field in vehicle master from the DBM order w/o posting a material document, then it might be sufficient to call FM /DBM/VM01_VEHICLE_SET to read the vehicle from the buffer, change the LGORT and put the updated vehicle back into the buffer via /DBM/VM01_VEHICLE_SET.

Make sure that a vehicle action is triggered on saving the DBM order (see cookbook mentioned above).

Depending on what action is executed (QMOD if you don't put anything special), then you might have to add LGORT to in customizing transaction OVELO4 to the action you're about to execute.

Kind regards,