Key figure issue
I am loading some data from a flat file to a cube. The file does not supply base unit of measure and currency as a field. And I have that in my info source , because of that when I run the query I am seeing the symbol "ERR" next to the key figures.
So I thought of writting a routine for the individual key figures in the update rules and the routine is :
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
DATA: IN TYPE F,
OUT TYPE F,
DENOM TYPE F,
NUMER TYPE F.
DATA: DEB_CRED(2) TYPE C VALUE 'HK'.
DATA: QUOT(1) TYPE C VALUE 'B'.
constants: c_msgty_e value 'E'.
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CSZSD_SALHIST_HDR
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/VZSD_C03T-SUBTOT_2S
UNIT LIKE /BIC/VZSD_C03T-STAT_CURR
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
<b>* result value of the routine
RESULT = COMM_STRUCTURE-SUBTOT_2S.
result value of the unit
UNIT = 'USD'.</b>* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
But now when I am loading the data , it is takin very long. I want move this code to the start routine. I have the same code for the key figures also.
I know I can get rid of the error using "NO DIM " function in BEX but I do not want the users to do that .
Thanks
Hi Jimmy,
You may in transfer rules just assign your currency to 'USD' constant. You can assign a constant to unit too (if you know it) - or assign a routine if you know the logic of the unit determination.
Best regards,
Eugene
Similar Messages
-
Calculated Key Figures Issue!
Hello Experts -
I'm getting error messages for the calculated key figures. The message says that the key figure is not defined correctly. Therefore, I started breaking down the calculated key figures and use them in the eventual calculated key figure. I have included all the calculated key figures. And I've hidden the ones that I dont need to show in my query result. I'm in BI 7.0. Also, I had to remodel my multi-provider after making the initial query. Do I have to start fresh?
I have the following calculated key figure:
1. Price = (Price > 0) * Price + (Vendor Price - (Vendor Price * (Cust Discount + Vendor Discount)))
This is supposed to be an if calculation. If Price is greater than 0, then Price else the calculation.
Cust Discount and Vendor Discount are CKFs.
What am I doing wrong?Thanks Ajay!
I added a couple of NODIMs and the query is now working!
I have couple more questions:
1. Is there a way to say Not Null in Bex? In my if condition, I want to say if Price is not equal to NULL instead of greater than 0.
2. The above requirement leads me to another question: how do I account for the negative values. I mean I need to add them but I cannot suppress them? I hope it makes sense! -
Hi
In my querry am trying to drag my Keygiures into columns.but its not draging into columns.wht could be the problem.
advance thanks
Nikitha RaoReally, just now you mention you do not have KF in rows, and then you say you have 3 of them in rows.
Please make up your mind first - do you or do you not have KFs in rows? -
Reporting Agent - Print Layout - Issue in Displaying Key Figures in Rows
Hi,
We have issue while printing reports using Reporting Agent. As part of Query Definition we have Structure of key figures in Rows. But while creating Reporting Agent , in Print Layout option Under Table Rows we are not able to drag Structure of key fig.
What could be the solution to this issue. How can we use key figures in rows?
Thanks in advance.
SamirHi,
putting product in the rows will slove the issues as the unit cost depends upon the prdoduct and therefore it will uniquely identify each of the material and then it will get multiplies with the qty and therefore you will get the correct result.
this kind of issue you will always face when you are going to multiply cost with the Qty and as the cost differ with the individual material.
Also putting material into the rows will cause the no. of rows to increase as all the materials will show up in the individual rows for the particular month.
Also you can make a claculated key fgure for the multiplication and use before aggregation.
But for that your both the key figures should be in the same cube i.e. in the same rows or the before aggregation will not work you will not even get an option of before aggregation in the CKF if the key figures belong to two different cubes.
Since your qty and cost are coming from two different cubes before aggreagtion will not work here.
And if you do before aggregation then you report will become quite slow as it will do all the multiplication anf then will bring the result.
So it depends on your requirement and your design how to proceed.
Hope it helps
Thanks -
Issue with Bex report - key Figures not populating correctly.
Hi Experts,
I am facing an issue with a Bex report. There are three key figures of data type DATE having "Dec - Counter or amount field with comma and sign" datatype. After executing the query, in the report, for some sales documents the key figure fields are coming as 'X' and rest others are coming correctly in the date format as mm\dd\yyyy.
When i check in the cube, these key figures shows values in decimal format and not in date format. The conversion is happening during execution.
Pleas show me some light on how to identify the cause of getting 'X' for some Sales documents in the report eventhough some are coming correctly.
Thanks,
Anamika
Edited by: Anamika Soni on Mar 12, 2010 10:48 AMHi,
The infobject has been defined with datatype "DATE" only. It has also been mapped from datasource to infocube correctly as these key figures are populating correctly for some of the sales documents in the report. It is not like that for all the sales documents the key figures are not converting properly.
Some Sales documents are not converting into the date fields but for some conversion happens properly in the BEx report. This is the issue.
Please guide accordingly.
Many thanks,
Anamika -
Very Very Urgent Issue: Restricted Key Figure does not return any data
Hi all,
Please help me solving this urgent issue.
created customer exit variable on characterstics version and also
other customer exit variable on Value type.
I coded that in variable exit. Problem is when I include these in
restrickted keyfigure My query does not return me any data.
But if I remove from restrickted key firgure and put it as normal
charaterstics I see the variable is getting populated.
Also in RSRT the SQl generated when these are included in RKF is not
correct.
I debugged and know they are getting populated. As when included in RKF
I can also see the values of customer exit variables from information
tab.
I also know that there is data in cube for those restrictions.
I posted one OSS Notes regarding this urgent issue. But got no reply from SAP.
FYI: We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11
Thanks
SAP BW
**Please do not post the same question twice: Very Urgent Issue: Restricted Key Figure does not return any dataHi,
Everyone out there this is very urgent. If someone can help me solving this problem.
We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11.
I posted one oss notes also regarding this issue. But got no reply from SAP.
So, Please help me solving this issue.
Thanks
SAP BW -
Description of key figure for multi language support issue.
Hi Experts,
Have a good day ahead!!
Custom key figure description multi for the language support issue
The key figure is created in English language and description also in English.
When I have logged in to English language and checked the report in Bex ,description of key figure is available.
But when I log in to other language(German, Spanish Portuguese and etc) environment the description in Bex rport of key figure is showing blank
In rsa1 in both English and other(German, Spanish Portuguese and etc) environments key figure description is okay and correctly displaying.
Please post me your inputs on the same.
Thanks in advance!!
Regards
Priya.Hi Prasanth,
This are the key figures XPRECIO: Transactional Price and XPRECLIST: Price list, its maintained in RSA1 tcode at info object level .
These two KF descriptions are maintained in English, its working fine when I login into SAP Bex analyzer with English language and its not showing the description for the languages (German, Spanish, Portuguese and etc).
Its need to be displayed in when login into SAP Bex analyzer with language German, Spanish, Portuguese and etc.
Regards
Priya -
Building a new Cube Vs Restricted Key figure in Query - Performance issue
Hi,
I have a requirement to create a OPEX restricted key figure in Query. The problem is that the key figure should be restricted to about 30 GL Accounts and almost 300 Cost centers.
I do not know if this might cause performance issue in the query. At the moment, I am thinking of creating a new OPEX cube and load only those 30 GL Accounts, 300 cost centers and Amount. and include OPEX in multiprovider in order to get OPEX
amount in the report.
whats the best solution - creating OPEX restricted key figure or OPEX cube ?
thanks,
BhatI think you should go for cube as all the restrcited key figure are calculated at OLAP runtime so it will definitely affect the query performance.There are a lot of costcenter for which you have to restrict it so definitely during the runtime of query it will take a lot of time to fetch tha data from infoprovider.Its better that you create a cube with the restrictions and include it in MP.It will definitely save a lot of time during query execution
Edited by: shyam agarwal on Feb 29, 2012 10:26 AM -
Hi
I have an infoset based on 3 master data infoobject.Im facing the folloing problem in one of the queries based on the infoset.
In the main infoobject, i have 2 key figures, amount and wage type number.The record for one employee for e.g has values 2 in both amount as well as wage type number.
in the report i see that the value for wage type number shows 4 instead of 2. I checked all possible settings in BeX as well as at infoobject level.couldnt find the reason for such a behavior.
please advise
Regards
JPHi JP,
When you are creating query on an InfoSet, you will get the values multiplied by no of combinations. You have do devide with that no(you will get in infoset, no.of records i think). Than you will get right value.
Check once again. I am sure.
Check these out ...
http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb455f455611d189710000e8322d00/frameset.htm
Srini -
Issue with Virtual Key Figures Using BADI
Hi,
We are populating values for a few virtual key figures in a query over a multiprovider through a BADI implementation(RSR_OLAP_BADI). On execution the VKF fields appear blank in the report.
We tried debugging the methods of BADI by adding Break-Points in specific points. On doing so, we found that the values are properly updated in the 'Field-Symbols' used in the Compute method, but the same values do not appear in the report result and the fields are blank.
Kindly provide any pointers or suggestions.
Thanks.First check in <b>Technical Information</b> in <b>RSRT</b> , whether the
<b>Virtual Char/Key</b> Fig is<b> Y</b> or <b>N</b>. -
Query key figures calculation issue
Dear Sap Gurus,
I would like to calculate the sum of one key figure on the month m-3 m-2 and m-1
I have created 3 restricted key figures filtered by month m-3, m-2 and m-1
i have created a key figures one which one I sum these 3 key figures but the result per month is not egal to the summation but to the value per month
on the example below
one this field is what i have D- Sum Other Requirements
one this field is what i would like to have Sum Other Requirement Past
Thanks for your answer
Calendar Year/Month janv-07 FEB 2007 mars-07
D- Other Requirements month-6 69,888 PC
D- Other Requirements month-5 281,385 PC
D- Other Requirements month-4 19,854 PC
D- Sum Other Requirements 69,888 PC 281,385 PC 19,854 PC
Sum Other Requirement Past 69,888 PC 351,273 PC 371,127 PCHi,
Create one RKF based on your key figure,
go t property of RKF and mark constant selection.
now in this field you can see the sum of key figure field.
and you can use it for formula.
Hope it help you.
Regards
Suneet -
Calculated Key figure and formula variable issue - Urgent
Hi,
I have created a formula variable on dates. When I run this locally it returns results. Now I have created a calculated key figure on this formula variable. It is not returning any results. Any idea on why this is happening.
Thanks,
KalHi Kal,
Can you paste your Formula & Calculated Keyfigure calculation.
If possible give information on ur formula variable ( processing by , charactesristic , replace variable with ( if it is replacement path ) , Dimension id )
Regards,
SRIKANTH -
Open sales orders key figure in APO
HI Gurus,
Can anyone please throw some light as to where i need to be looking in this scenario. Our BW resource extracts open sales order quantity from ECC and loads into APO DP. The issue that i'm seeing is the open sales order quantity key figure is not getting updated properly in APO. For example to begin with we have a quantity of 800 EA in the period of 12/2014 (we go by fiscal period and in this case 12 would represent September 2014), 01/2015(October 2014), 02/2015(November 2014). The customer service group has deleted the quantity completely from period 12/2014 (September 2014) in ECC. But when i look in the planning book in APO, i can still see the quantities in the periods of 12/2014, 01/2015 and 02/2015. I was expecting the quantity from the period of 12/2014 to not showup in APO as it has been deleted in ECC. Our BW resource also confirms that he has loaded it properly in APO. Where can i start looking to resolve this issue.
Thanks
RaviDear Subhash, Thanks for your reply and i apologize as APO DP is new to me and i'm picking up things, can you please guide me to which tcode should i be going and checking this. Also reloading the planning area can you xplain a little more please
Okay i have checked in the tcode /SAPAPO/TSCUBE and this is setup in the process chain for us which runs once a month on the opening day of the period. I hope this is what you were referring to?
Under the key figure assignment in TSCUBE tcode, i see that the 'Add data" check box is not checked under Target area. -
KEY FIGURE: Effective purchase order value & K.F "No. of Purch.Orders"
Yo my fellow Gurus,
Got a problem, when executing listcube on the Info-Cube 0PUR_C01 - I see the data/amounts in the column for "Effective purchase order value" / 0ORDER_VAL. But when running the query with the Key Figure I just get "0"
I tried the option of adding the Process Keys not allocated in the Routine list of keys, yet still nothing has popped in the query, and heres the routine after additonal keys added:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
INCLUDE RS_BCT_MM_UPDATE_RULES.
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/V0PUR_C04T-ORDER_VAL
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
IF ( COMM_STRUCTURE-PROCESSKEY = '001' or "Bestellung
COMM_STRUCTURE-PROCESSKEY = '011' or
*change of keys
COMM_STRUCTURE-PROCESSKEY = '015' or
COMM_STRUCTURE-PROCESSKEY = '005' or
COMM_STRUCTURE-PROCESSKEY = '025' or
COMM_STRUCTURE-PROCESSKEY = '041' or
COMM_STRUCTURE-PROCESSKEY = '051' or
COMM_STRUCTURE-PROCESSKEY = '061' or
*change of keys
COMM_STRUCTURE-PROCESSKEY = '021' or
COMM_STRUCTURE-PROCESSKEY = '004' or "LP
COMM_STRUCTURE-PROCESSKEY = '014' or
COMM_STRUCTURE-PROCESSKEY = '024' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-ORDER_VAL <> 0.
perFORM LOC_CURR_CONVERT
USING COMM_STRUCTURE-ORDER_VAL
COMM_STRUCTURE-DOC_DATE
COMM_STRUCTURE-ORDER_CURR
COMM_STRUCTURE-LOC_CURRCY
COMM_STRUCTURE-EXCHG_RATE
CHANGING RESULT.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
if abort is not equal zero, the update process will be canceled
This seems to be also the issue with my other Key Figure "No. of Purch. Orders" except here it the just comes up blank / 0 . This is to some the number of pos per plant for the month. So it's not storing anything but running via an interface and then with the aid of the routine loading the count into the cube:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS2LIS_02_HDR
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BI0/V0PUR_C04T-NO_PUR_ORD
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
if COMM_STRUCTURE-HDRPROCESS = '01' "Bestellung
AND COMM_STRUCTURE-no_hdr <> 0.
result value of the routine
RESULT = COMM_STRUCTURE-no_hdr.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Please advise the way forward.
Thanks,
Ishaamwhat do u want?
-
Problem in Calculated Key Figure in BEx 7.0
Hi All,
In Bex 7.0
We have a requirement where we need to display a key figure which is having unit price of an Article. In our InfoProvider we have Article, Store and Date and the report is based on Article. As we have to display only the latest price we have created a RKF by putting a restrcition of the latest date in the date range on the the unit price key figure. But still unit price is getting aggregated over stores.
For example if there are 10 stores and the unit price of an article is 5, then data displayed is 50 and not 5.
We tried to create a Calculated Key Figure using the above RKF and an exception aggregation Average of all detailed value that are not zero, null or error on reference characteristic 0PLANT. Its working fine when the query is restricted to one or two Articles. But for all the articles it gives the following error messages.
1. Error while reading data; navigation is possible.
2. Error occurred during parallel processing of query 17; RC3
3. Error executing physical plan: AttributeEngine: no 6952
4. Error reading the data of infoprovider ZXMSC01$X
5. Amount of data that is to be read from the BIA server is too large
6. The following error 6952 occurred in BIA server
7. Error executing physical plan: AttributeEngine: not enough memory;BwPopMerge pop1(setIsLastMerge(1)),in executor::Executor in cube: p03_zxmsc01
Can anyone tell me the solution for the above error. Or if there is a workaround to our requirement.
Regards,
SachinHi,
Could be a memory issue.
One of your cube in on BIA which is causing the Problem.
So executing the query in RSRT by selecting Do not use BIA index option.
If the query is executed with out any issue then take the cube out of BIA and push it back.
Hope it helps.
Regards,
Raghu
P.S : Also please let us know if this query is live and it is an issue that you are facing after executing it properly for few days.
Or this is a new query created and testing now and in the process got this error?
Edited by: Raghu tej harish reddy on Sep 24, 2009 5:53 AM
Maybe you are looking for
-
I've tried Windows Media Player, and Windows Movie Maker on Windows. On Mac, I've tried a few different things including Burn. For some reason i dont have iDVD. In my "About this Mac" it says that my optical drive can burn DVDs. It always goes throug
-
Content Guide won't display...
Hi I'm using Quicktime 7.1.6 with iTunes 7.1.1.5. Quicktime is set to display the Content Guide at startup and was doing so until 05/27. Now, on startup, it seems to begin to show the Guide and then disappear off the screen. The program still shows o
-
Hi There, After my last post about this subject I have been browsing the web for an awnser which would enable me to get this done, but without any success. What I'd like is a method (javascript or php would be fine) to get a remote xml feed from flic
-
I was told that I need Flash for my web page since it works across platforms. I have been making small flash video for my web site both directly from Premiere CS3 and using the CS3 Flash Encoder. When Ii insert the video using Dreamweaver, it works f
-
Syncing documents between computers?
When I had MobileMe, I used my iDisk to move files back and forth between my home and work computers. I've just "upgraded" to iCloud, and based on what I'm reading, it looks like iCloud only lets you keep documents in sync if they're produced in App