Skip to Content
avatar image
Former Member

Royalty Calculation in SD Billing

Dear All,

We have a scenario to calculate Royalty in the Billing document where the base value of the Royalty on which a percentage needs to be applied is on the entire months Billing value of a Condition Type say PR00.

Business has two or four Billing Cycles in a month (fortnightly and weekly) where only the end of month Billing needs to calculate Royalty for the total value of PR00 in the entire month. I have tried this through Condition base value where I am populating the PR00 value in subtotal KOMP-KZWI3 and putting a condition base value against Royalty calculation but I am unable to read the PR00 value for the previous Billing documents for the entire month.

The selection criteria to search for the entire month for such Billing is Billing type; Billing Date and the Payer.

Kindly suggest a Userexit where I can read the previous months Billing value of PR00 Condition or the VOFM Routine.

We will restrict the Royalty condition type only for the end of month Billing through a Requirment Routine.

Please help and provide your valuable suggestion on the above.

Regards,

Sumit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 29, 2010 at 06:54 AM

    Why dont you explore the functionality of "Condition Update" in V/06 ??. You can search in help dot sap where there is a detailed documentation on this.

    thanks

    G. Lakshmipathi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 29, 2010 at 08:23 AM

    Hi,

    You can populate the amount of this condition in one field (KZWI3 as you are doing). So, you can populate your own SIS (create it and populate with month frequency) and read with a SELECT the total amounts for each month. So, you can create a condition for royalty, and with a substitution, read in the before month and calculate it. For instance, if you have cycles in billing, surely you do invoices in the last day of the month. You can know it with the function module RP_LAST_DAY_OF_MONTHS.

    I hope this helps you

    REgards

    Eduardo

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Lakshmipathi

      Thanks for your valuable suggestion. Could you please let me know if the Condition update needs to be maintained for the Royalty Condition Type is yes how will I get the Monthly Value of PR00 Condition. Could you please help or fwd some useful documents on the same.

      Hi Edurado,

      Thanks for your feedback. I am passing the PR00 value in KZWI3 based on which I can calculate the Royalty by applying a Condition Base Value Routine 7 on which Royalty is getting calculated. Now I want the base value to be for the month based on Payer, Billing Type. Could you please help me how to achieve because KZWI3 is in KOMP structure which is read at line item but I want to apply the Royalty on the Total Value of PR00 condition of the full month at a total level.

      Regards,

      Sumit