Hi Aditya,
As venkat mentioned, we need to trigger some custom message to user inside badi after comparing the Actual Quantity with Sales Order quantity.
Kindly check whether the following BADI is triggering when creating/changing the sales order in VA01.
BADI: BADI_SD_SALES_ITEM
Method: ITEM_CHANGE_BUSINESS_DATA.
ITEM_CHANGE
Use BAPI BAPI_MATERIAL_AVAILABILITY to get the Actual quantity for the appropriate material
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
plant = l_plant
material = l_matnr
unit = l_unit
IMPORTING
av_qty_plt = l_av_plant
TABLES
wmdvsx = l_wmdvsx
wmdvex = l_wmdvex.
Regards
Rajkumar Narasimman