- January 6, 2026
- Admin
- 0
Apply additional Sales deal number when there are multiple Sales deal condition records maintained
Steps : Create a new Pricing routine
Go to VOFM Transaction
Select Requirements from Menu
Create a Pricing routine ex: 901
Code inside the routine:
-- Get the VBAP data to check whether manual sales deal is entered or not
-- Activate the sales deal manual condition only when sales deal manual entered
--Sales Order
ASSIGN ('(SAPMV45A)VBAP') TO <lfs_vbap>.
IF <lfs_vbap> IS ASSIGNED.
IF <lfs_vbap>-zz1_salesdeal_mnl_sdi IS INITIAL.
lv_subrc = 4.
ENDIF.
IF <lfs_vbap> IS ASSIGNED AND -zz1_salesdeal_mnl_sdi IS NOT INITIAL.
komp-knuma_ag = <lfs_vbap>-zz1_salesdeal_mnl_sdi.
ENDIF.
ELSE.
*--Invoice
ASSIGN ('(SAPMV60A)VBRP') TO <lfs_vbrp>.
IF <lfs_vbrp> IS NOT ASSIGNED.
ASSIGN ('(SAPLV60A)VBRP') TO <lfs_vbrp>. "Flow from Fiori
ENDIF.
IF <lfs_vbrp>IS ASSIGNED AND <lfs_vbrp>-zz1_salesdeal_mnl_bdi IS INITIAL.
lv_subrc = 4.
ENDIF.
IF <lfs_vbrp>IS ASSIGNED AND <lfs_vbrp>-zz1_salesdeal_mnl_bdi IS NOT INITIAL.
komp-knuma_ag = -zz1_salesdeal_mnl_bdi.
ENDIF.
ENDIF.
sy-subrc = lv_subrc.






