cancel
Showing results for 
Search instead for 
Did you mean: 

Need to get last 13 months data in report + last day of every month

Former Member
0 Kudos

Hi All,

I have a requirement to show last 13 months data in the report and it should show last day of every month for the last 13 months from the system date. There is no user entry variable. I know that we can do I_STEP =1, but can anyone give me a psuodo code so that it can be really helpful. I also tried offsetting but it is not catering the requirement..I saw in the communities that we have to do 13 customer exits. But that is not advised as per client.

If user executes report today, the report should be as follows.

                      Stock in transit           Blocked stock

jan 2014           1000                             2000

feb   2014           4000                             2000

mar 2014           30000                             5000

.

.

.

.

Jan 2015 (today)         9000                                   7000

Thanks,

Karthik

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182997
Contributor
0 Kudos

Could you please try customer exit variable.
this is well possible with the customer exit at query level.


thanks

Former Member
0 Kudos

Hi sap bi,

Yeah, I know we can do customer exit variable I_STEP = 1 as per sy-datum . But any psuodo code would be appriciated. I can do if the requirement is only for last 13 months, but as it includes also last day of those 13 months, i was unable work on.

Thanks,

Krishna

former_member202718
Active Contributor
0 Kudos

Hi Krishna,

You can use the Calday to get the Current Calmonth and use -1 to get the Previous Month...then further use the Function Module T_ZBWF_LAST_DAY_PREV_MONTH_GET/SLS_MISC_GET_LAST_DAY_OF_MONTH to get the last day of the Previous Month in the CMOD and populate it back i to the Query using the Calday varaible.

rgds

SVU

Former Member
0 Kudos

Hi SVU,

Thanks for the response.

As i said in my requirement, there is no user entry and when user executes the report today, he has to get the data from today's date (sys date) to last 13 months and every month should have data only for last day of the month and i am implementing inventory.

Can u provide a pseuodo code if possible.

Thanks,

Krishna