Skip to Content
author's profile photo Former Member
Former Member

Need to reprice rebate condition when VBAP-ABFOR / payment card is updated

In our order process we have many materials that are rebate-eligible. I'm an ABAPer and my functional analyst and I are trying to figure out where / how to place code to systematically trigger what is now working correctly as a manual Update process:

When the order in VA01 is placed and the credit card is entered on the header->payment card tab, the VBAP-ABFOR gets updated through current config with a custom indicator (Z2) for credit card. (More correctly, a current, unsaved order probably has this value in XVBAP or YVBAP.

As you may know the field on the item's Billing Document tab for this is Payment Guarantee Indicator (on the lower portion of the tab screen).

What we want to happen, as soon as CC is entered on the header, is to adjust (and trigger?) a custom rebate condition that we have (ZRB1).

We can get the ZRB1 to adjust manually from the item's condition tab, by hitting the Update (Prices) button on the bottom of the condition tab screen.

Manually, we can (for instance) choose Pricing Type B ("Carry Out New Pricing"), and the rebate condition ZRB1 is adjusted correctly. Type B is a bit global however. We want to trigger the custom ZRB1 condition to apply to the items when CC is entered as the payment method.

We thought we might be able to use one of the unused customer Pricing Types (e.g. "X") to only adjust the ZRB1 rebate condition in these circumstances.

We want it to happen systematically, when a Credit Card is entered, and we want it to be available from the Condition tab Update button as well (for manual applications).

I'm an ABAPer and don't have much experience with determining and activating Pricing Types, etc.

My functional analyst and I are trying to figure out :

1) how to assign and correctly code one of the unused Pricing Type updates.

2) how to make this trigger systematically, when Credit Card is entered.

We are speculating if USEREXIT_PRICING_RULE in program RV61AFZA is a possibility to contain the code.

I appreciate any help you could provide as to how to accomplish this.

Jeremy H.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2015 at 07:49 PM

    Still need help, here.

    I managed to code an enhancement in RV61AFZA--USEREXIT_PRICING_RULE to append the custom type of X from the pricing types to the STEU internal table for my new rebate condition type of 'ZRB1'.

    Through A LOT of trial and error and debugging, I found that simply adding a check in the include MV45AFZZ:

    FORM userexit_field_modification.

    CASE screen-name.


    READ TABLE xvbap INDEX 1.

    IF sy-subrc = 0.

    IF xvbap-abfor = 'Z2'.

    PERFORM preisfindung(sapfv45p) USING 'X'.




    ...did the trick to reprice when a CC is added to the header in VA01. (The BA also had to add some config to make the custom update type of X work for the ZRB1 condition type; to tie them together.

    So, yay, this is working!

    A followup requirement (there is always one, right?!) :-) is to DEcouple the update type of B (which right now updates ALL pricing when it is chosen) to NOT update the new ZRB1 condition (only X should do this function now, in this followup requirement). Any ideas on where to place restrictions on B? Or if this is even a good idea?

    Hopefully someone has some helpful info here...


    Jeremy H.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.