cancel
Showing results for 
Search instead for 
Did you mean: 

Using Business Content Query Elements

Former Member
0 Kudos

Hello,

I am currently working on some BW reports and want to use the "Current calendar month" variable (0CMONTH). I searched for it and activated it in BC and even found it in the MetaData Repository - but I have no idea how to use it in my query. In my InfoCube I got some time-related InfoObjects, e.g. 0CalQuart1 etc...some help would be highly appreciated

Thanks in advance,

Manuel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Manuel,

You need to include that in ur infocube too. go to the maintainence of the cube and add the said time char to ur cube, then the time char is reflected in ur query too.

Hope it helps.

Mav.

Former Member
0 Kudos

Mav,

thansk for your reply, sorry to say that it didnt really help me out The problem is that 0CMONTH is a Variable and not an InfoObject, thats why I cannot add it to the cube...

I somehow have to use it in the BEx Query Designer in combination with an SAP Exit, but I have no idea how - anyone else?

Manuel

Former Member
0 Kudos

Hi Manuel,

I apologize for not reading ur question properly.

OK, u say that u activated the SAP exit(0CMONTH) but it isnt availiable in the variable list when u r trying to restrict the time char calmonth with the current month variable(OCMONTH). Is this the problem? Lemme know.

Mav.

Former Member
0 Kudos

Hi Manuel,

0CMONTH is linked to 0CALMONTH infoobject !

You have to add this object in your cube and then use it in your query by restricting it with your std variable...

Hope now is clearer...

Bye,

Roberto

Former Member
0 Kudos

Mav,

that's exactly the point - I did not know that 0CMONTH is linked to 0CALMONTH, so now I figured it out. But that's only half the way to go...I now need an User Exit which does the same like 0CMONTH for 0CALQUART1 - any idea?

TIA,

Manuel

Former Member
0 Kudos

Thanks for your help as well, Roberto! But I hope you can also help me out with the User Exit mentioned in my posting above. Until now, I never worked with user exits, so it would be great if someone could describe a solution.

TIA,

Manuel

Former Member
0 Kudos

Hi Manuel,

You'll find useful documents on BW exits in the following link:

http://service.sap.com/bw

In the <b>SAP BW InfoIndex</b> folder (section).

Regards,

Andreu

Former Member
0 Kudos

Hi Manuel,

let me know what do you need in more details so I can give you some sample code....

Bye,

Roberto

Former Member
0 Kudos

Roberto,

in fact I need the following: I got data for various months in my cube and want to get month-related, quarter-related and year-to-date related reports. Every data set in my cube has a month, quarter and year characteristic. The problem that I am facing is that BEx does not "know" the month/quarter for which I want to generate reports for.

Let me explain this with an example: the last data upload to the cube contains data from august 2004, thus it has a "08" as month, a "4" as quarter and a "2004" as year. Besides this data there are data sets from all previous months in the cube. When opening a report I want to display results for the current month (which must be august, even if I start the report in december) and aggregated data for the quarter 03 (the quarter before the current quarter) as well as for the months 01-08.

I cannot work with variables like 0CMONTH because they contain the current month (system date). Instead I need a routine or something like that which checks the data in my cube and identifies the last month/quarter/year for which data has been uploaded.

I hope this clarifies my problem and would highly appreciate any help on this issue.

Thanks in advance,

Manuel

Former Member
0 Kudos

Hi Manuel,

there's a BC variable which does nearly the same. You might want to have a look on function module RSVAREXIT_0P_DBHV2 (BC variable 0P_DBHV2) to get an idea about a possible coding solution.

Heike

Former Member
0 Kudos

Heike,

thanks for your help. I have installed the BC variable, but I am not familiar at all with function modules. So if anyone could point out where I have to look for the code of this module I would be thankful...:)

I am glad that there are only stupid answers, but never stupid questions - at least they say so

TIA,

Manuel

Former Member
0 Kudos

Manuel,

Go to SE37 transaction which takes you to function module.

Anjali

Former Member
0 Kudos

Anjali,

thank you for your help. I'm not an ABAP guy, but I think our programmer will be able to customize this function call for me

Thank you all for your help!

Regards,

Manuel

Answers (0)