cancel
Showing results for 
Search instead for 
Did you mean: 

User exit to modify pricing header condition

Former Member
0 Kudos

Hi all,

I have a header pricing condition which we can manually enter a discount value in VA01.

I would like to use some sort of user exit to calculate the discount in the background, and put the value into the header condition.

Can this be done with userexit_pricing_prepare_tkomk? I am testing with this but not sure how to make it work. If someone has an example or can give me some advice it would help a lot.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes, the below mentioned user exit could be considered for header condition.

Alternatively, you may also want to consider using the tcode VOFM to write a routine (condition value formula) to fulfill your requirement. Thereafter, you may create a header condition, say ZDISC and then assign the routine in the Calculation Type for the system to carry out the calculation in background, providing the conditions implied in the formula are met.

Hope the above helps.

Thanks.

Former Member
0 Kudos

Hi,

I'm trying to understand the method you suggested..

- Can you elaborate a bit more on what the routine in VOFM will include and what is its purpose?

- Once the calculations are done in the background, will it automatically populate the header condition?

Thanks for the response,

Former Member
0 Kudos

Hi,

The same can be achieved using both the methods.

1) MV45AFZZ USEREXIT_PRICING_PREPARE_TKOMK - Ask the ABAPer to write the logic of calculating the discount condition type, if it is based on some other condition or a flat % discount.

2) The same can be done by creating a Alt Calculation type routine through VOFM and writng the logic in the routine, which will then be assigned to the pricing procedure in the condition type which will automatically calculate the condition.

[VOFM Routines|http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf]

[VOFM Requirements|http://saptechsolutions.com/pdf/VOFMRequirementRoutines.pdf]

Regards,

Amit

Former Member
0 Kudos

Hi,

Transaction VOFM is a tool that was developed in R/3 to facilitate the definition of both SAP delivered as well as customer defined routines/rules used in the system during various business processes. VOFM routines are ABAP code written in Forms to deliver the intended results in various business processes as required.

VOFM is divided up into four main areas. These include copying requirements, data transfer, requirements, and formulas. Formulas are routines that define how a value should be calculated or determined in the R/3 system.

In the ABAP codes for example, you can define and "tell" the system that the formula to calculate a particular condition (say ZDISC) should be x + y - z..

These calculations, where defined correctly in the routine by the written ABAP codes, will deliver the intended results and populate the intended values in the condition (whether it is Header or Item condition) where this routine is assigned to. Definition of whether a condition is Header or Item can be done in the condition type configuration in Pricing.

For assignment of the routine to the condition, this is done in the configuration under Pricing Procedure definition in SD.

Hope the above provides a better clarity on the function and purpose of the routine and how it can be used.

Thanks.

Answers (0)