I am new to ABAP programming.
I have requirement where I need to calculate the field ZATTN based on the sales quantity and Invoice date.
The formula required for ZATTN is as follows
ZATTN = (sales qty * no.of days in Invoice Month) / Invoice date (DD)
For example -
Sales Qty = 100 and Invoice date = 2009.06.05
ZATTN = (100* 30) / 5
value 30 is based on the month from Invoice date (2009.06.05), for month 06, no of days = 30.
value 5 is based on the day from Invoice date(2009.06.05), for day DD = 05
Please provide logic for the above.