If you meet a business case that you need to redetermine pricing procedure during create billing document in SAP via tcode VF01. You need to create some enhancement in RV60AFZZ on subroutine USEREXIT_PRICING_PREPARE_TKOMK and create enhancement implementation in include LV60ATOP to add one global variable that you need to prevent infinite looping. Here the source code.
IF SY-TCODE = 'VF01'.
IF VBRK-FKART = 'Z8LP'.
IF GV_AVOID IS INITIAL.
IF XVBRP IS NOT INITIAL.
GV_AVOID = 'X'.
PERFORM preisfindung_gesamt USING 'C'.
Note : In my requirement is to do redetermine pricing procedure to C ( Copy manual pricing elements and redetermine the others ) only for Billing Type Z8LP . You can modify based on your own requirement.
In this user exit you need to run subroutine preisfindung_gesamt. Variable GV_AVOID is to prevent infinite loop, this variable is located in LV60ATOP, and the last checking is you need to create condition which it’s exit only run when internal table XVBRP is populated to keep consistency.
DATA : GV_AVOID TYPE CHAR1.
The effect of this enhancement is you don’t need to redetermine manually again, this enhancement will run when you create billing document automatically. this is best solution because you can forget redetermine if manually.
Incoming search terms:
- abap enhancement
- sap how to determine princing procedure oil
- sap lookup abap enhancements
- ABAP VF01 FM
- enhancement in sap abap tutorial
- sap abap enhance rffori06
- enhancement for field validation VF01 in sap abap
- sap redetermine program
- sap copy manual conditions and redetermine others
- sap run mass redetermine pricing on billing