on 09-01-2014 9:28 AM
Hi All
I have following requirement. some body can help me.
client maintaining plan data on Month basis. we get data into bw infocube. Now i want to find out per day plan data. req.is
user will enter date, based on that i have to findout plan data for that month. when i am doing this, bex displaying for all other months also.
Assume august plan data is 600, so per day plan data is: 600/31.
User enter date : 14.08.2014. Now i need to find out YTD on plan data. But system will give till august means its YTM.
I want to find out august month plan data till 14th august. Using formula variables, i am finding last date of august and subtracting to 14th.
But in report, its displaying all rows. I need only for date 14.08.2014 row. so that i will achieve for my YTD.
any inputs please. let me know if any further questions anyone have.
Regards
swetha
Hi Swetha,
Sorry I did not undestand well your query..
If user enters 8/14/2014, the query must show the data starting from January 1, 2014 up to August 14, 2014? Is it correct?
If that's correct, just create a variable with customer exit so that the upper limit will be the date entered by the user and the starting date will be the january 1 of the year entered..
If you need help with coding just post here..
Regards,
Loed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But client is maintaining data month wise in source system. It means that, YTD will return complete august month also. I need till 14th only. we can findout per day plan data by dividing with no. of days that month. and also we can find out no. of days between 14th and 31st of august. When i am doing this, report is displaying for all months. I need only for august month.
any further queires.
Hi Swetha,
I didn't get it mate..
So if user enters August 14, 2014, you need to get the plan data from August 1 - August 14 by dividing the plan data with the number of days in a month? You can use the CMOD below to get the number of days in a month using formula variable..Then just divide the plan data using the output of the formula variable..
Make also a replacement path variable to get the number of days entered in user entry..
So using your own example with plan data of 600..We will have 600/formula variable*replacement path variable giving you a 600/31*14..Using this, you will get the plan data for august 1 - 14..
DATA: temp_month type i length 2,
temp_year type i length 4,
temp_day type i length 2.
WHEN 'ZFV_NO_DAYS_MONTH'.
"change ZFV_NO_DAYS_MONTH with name of your customer exit variable
IF I_STEP = 2.
CLEAR L_S_RANGE.
READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = 'zdate1'.
"
change ZDATE1 with name of user entry variable
temp_month = XTAB-LOW+4(2).
temp_year = XTAB-LOW(4).
CALL FUNCTION '/SDF/RBE_GET_DAYS_PER_MONTH'
EXPORTING
PAR_MONTH = temp_month
PAR_YEAR = temp_year
IMPORTING
PAR_DAYS = temp_day
L_S_RANGE-LOW = temp_day.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
***just change the fields based on the fields used in your CMOD..
You can also refer on these posts:
http://scn.sap.com/thread/3378518
http://scn.sap.com/message/15333598
Can you post your desired output report to give us a better view of what you wanted?
Thank you!
Loed
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.