Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Pro-rationing

Former Member
0 Likes
375

Hi!

I have a report in which the oilfield CA01 which does not use prorationing as they have daily , monthly and yearly invoicing options. When a contract is created (VA41) there is an option to choose 'Usage' that should choose the pricing for the invoice . If the billing plan is set up for less than a full period of the chosen usage(i.e 20 days with usage set as a month) the invoice will come out pro-rated (20x 1/30th of a month). So this pro-rationing was removed for CA01 so that invoice for full period can be done. Now I have to remove the pro-rationing for CA02 also ,

The following include was used to pro-rate CA01 , my question is to pro-rate do I use the same method to do for CA02 also, as I am not very sure.

2 REPLIES 2
Read only

Former Member
0 Likes
324

This is what has been used for CA01.


*tkomp-anz_tage ".(Number of days in a deadline)
*tkomp-anz_monate. " (Number of months in a deadline)
*tkomp-anz_jahre. " (Number of years in a deadline)
*tkomp-anz_wochen. " (Number of weeks in a deadline)
*Requested to round up to a full month or year.
* This is only for oil field
if tkomk-vkorg = 'CA01'.

  case tkomp-VKAUS .
    when 'Z08'.
      CALL FUNCTION 'ROUND'
        EXPORTING
          DECIMALS = 0
          INPUT    = tkomp-anz_monate
          SIGN     = '+'
        IMPORTING
          OUTPUT   = tkomp-anz_monate
        EXCEPTIONS
          OTHERS   = 1.
    when 'Z09'.
      CALL FUNCTION 'ROUND'
        EXPORTING
          DECIMALS = 0
          INPUT    = tkomp-anz_jahre
          SIGN     = '+'
        IMPORTING
          OUTPUT   = tkomp-anz_jahre
        EXCEPTIONS
          OTHERS   = 1.
  endcase.
endif.

SO do i use the same for CA02 too.

Read only

Former Member
0 Likes
324

.