How to calculate the values
Hi Experts,
I have doubt, i have an internal table now i want to calculate the total for every group. How to do that?
value type
5,439.01 ; ZMP0
509.60 ; ZMP0
4,749.26 ; ZMP0
9,053.95- ZPNL
732.70- ZPNL
66.30- ZPNL
18.10- ZS03
63.90 ; ZS03
According to the type i need a total for ZMPO, ZPNL, ZSO3 separately.
how to do that?
5,439.01 ; ZMP0
509.60 ; ZMP0
4,749.26 ; ZMP0
ZMPO total =
9,053.95- ZPNL
732.70- ZPNL
66.30- ZPNL
ZPNL total =
18.10- ZS03
63.90 ; ZS03
ZSO3 total =
Like that i need, can any one help this?
Regards,
Mohana
Hello,
Use the COLLECT.
DATA:
wa LIKE LINE OF itab,
itab_sum LIKE itab.
SORT itab BY key.
LOOP AT itab INTO wa.
COLLECT wa INTO itab_sum.
ENDLOOP.
The itab_sum has the same structure like the itab where is the data to me summarized, and the wa has the line structure of the itab.
Regards.
Similar Messages
-
How to calculate the value of key figure by considering other char or kf
Hi
My requirement is like this:
I have a key figure which gives me the planned issues and receipts but i know that if only from locaton is blank and to loc is filled then that are receipts and if both the from and to location values are filled then it is issues,
can you pls let me know how i 'll put this logic in th reporting bex and how i achieve this by user exit or any other way
thx
rubaneCreate two RKF, restrict first with [ from = '#' ] to get the planned receipts, and restrict the second with [ from <> '#' and to <> '#' ] to get the issues.
-
How to calculate the value from prompt and use the value as filter
Hi everyone,
I am designing a OBI query. I want to write a query and one of it filters comes from the dashboard prompt. Say I want to make a query to pull out the record for 3 consective years and user wants to enter the last year # and omit entering the first 2-year code#.Thanks!Hi,
if i understand your question
you have a prompt for year.. and it's assigned with presentation variable, say: var_year
And you are just entering value for only one year, say 2000.
Then, the request (which is using that prompt value as filter) should display year values 2000, 2000-1 (i.e. 1999), 2000-2 (i.e. 1998).
Is this your requirement?
If then,
Hope you are using edit box as control for year prompt and assign a presentation variable for that prompt.
Now, in report go to filter of year prompt, click on advance > Convert this filter to SQL.
write here... *Times.Year between @{var_year} and @{var_year}-2*
And make sure that your var_year is integer, if not cast it to integer -
How to calculate the mt_bf (optimum blocking factor) in mtio.h?
Hi geniuses,
One of our customers asks our tape driver to support the mt_bf defined as optimum blocking factor in mtget structure in mtio.h. The mt_bf is supported in MTIOCGET ioctl in Solaris native tape driver -- st. I can not find any Solaris document how to calculate the value for Developers. Please help me to figure out if you know the answer.
Thanks in advance!I would have liked this as a homework assignment when I was in college - beats the heck out of "find the range of a given artillery shell..."
good luck with it, looks fun
Lee -
hello everyone,
i'm rai from indonesia
I have a final project about pulse oximetriy, I have some problems,
how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
My program image can be seen below predicament ?
Attachments:
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KB
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KBHi rai,
I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
That being said:
- Your inner while loops each run exactly twice. Replace them with FOR loops!
- Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
- You already calculate some Min/Max values. Ratio is just a division of two values…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How to calculate the unit for RATE?
Hey All,
I am not sure if there is something standard for this or not.
I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
Rate == Value / Quantity
I need to calculate the unit for the rate as below -
Rate unit == Value unit (Currency) / Quantity unit (Base_uom)
(for example -
if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
Could anyone please suggest how to calculate the unit in this case?
Many Thanks!
TanuHi,
Go through the below link it may give some idea
http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
Regards,
Marasa. -
How to calculate the Current APC (Acquisition and Production Cost)
Hi,
Please help me how to calculate the Current APC.
The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line Acquisition Value and column Posted values.
I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic.
Please help me.
Thanks in advance,
SatishHi,
you'll find the logic in fm FI_AA_VALUES_CALCULATE
A. -
How to calculate the Current APC
Hi,
Please help me how to calculate the Current APC.
The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line Acquisition Value and column Posted values.
Thanks in advance,
SatishHi,
I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic where it is being done.
Please help me.
Thanks in advance,
Satish -
How to calculate the variance in PO price history?
hi
i hav standard report ME1P, since i need to do some modifications in this program i copied to Y prgrm,,,'
im getting all the values properly...
but my prblm is im not getting how to calculate the variance? im not getting the logic behid it...
can anybody expln me in breif plz....
Regards
SmithaHi Venu,
there is another way as well, however, you won't be able to see Variance and Variance% as a saperate keyfigure which is not under the period. Thats the reason I didn't mention it earlier.
What you can do is, Drag the period to the columns, Now create a structure that has the two keyfigures std price, moving price. Here if you add Variance and Variance%, Then these CKF's would come under period as well, which you don't need. And the system won't allow you to add these CKF's outside this structure. The reason being because the interpretation of the data then wouldn't make any sense here. You can create a new structure as well with these CKF's but they would become a subpart of your previous structure.
choose the required characteristics in the Rows section. Save it.
Let us know, Sorry man, can't help u much at this problem.
regards,
Sree. -
How to calculate the individual sums of multiple columns in a single query
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
Thanksuser13667036 wrote:
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
ThanksLooks like you want a simple group by.
select
yr
, mnth
, region
, sum(handled_package)
, sum(expected_missing_package)
, sum(actual_missing_package)
from test
group by
yr, mnth, region
order by
yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
CREATE TABLE test
year_month date,
Region VARCHAR2(50),
CITY VARCHAR2(50),
Handled_Package NUMBER,
Expected_Missing_Package NUMBER,
Actual_Missing_Package NUMBER
alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
ERROR at line 1:
ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
Elapsed: 00:00:00.03
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
1 row created.
Elapsed: 00:00:00.01
ME_XE?select
2 to_char(year_month, 'fmYYYY') as year
3 , to_char(year_month, 'fmMonth') as month
4 , Region
5 , CITY
6 , Handled_Package
7 , Expected_Missing_Package
8 , Actual_Missing_Package
9 from test;
YEAR MONTH REGION CITY HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
2012 November Western San Fransisco 200 10 5
1 row selected.
Elapsed: 00:00:00.01
ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
Cheers, -
How to calculate the average inventory in ABAP
Dear All,
Please find the below formula and this formula how to calculate the Average inventory at value.Please let me know the abap base tables and the corresponding fields.
Formula
Inventory Turnover = Cost of Goods Sold (COGS) / Average Inventory at value.
Thanks
Regards,
SaiHi Arivazhagan,
Thanks for your quick response .
The field MBEWH from the table is fulfill the average inventory at value.
For Eg :I want to calculate Inventory Turnover = Cost of Goods Sold (COGS)/
Average Inventory at value.
so shall i take Inventory Turnover = Cost of Goods Sold (COGS)/MBEWH
The above formula will meet my requirement to find the average inventory Turnover.
Thanks
Regards,
Sai -
How to determine the value of a Standard Value in a routing operation
Dear Experts,
Kindly guide me on how to detemine the value of my Standard Value in the operation of my routing, or in the phase of my Master Recipe.
I mean what determines the value that I enter for the Standard Values: Machine and Labor in the phase of my Master Recipe?Hi,
In the Routing / Master Recipe, the standard values are based on the lot size.
For Example, if you have the lot of 100 KG, then in recipe the machine time will be 2 hr and labor time will be 2 hours, it means to make 100 KG we require 2 hrs of machine and 2 hrs of labor.
Normaaly all production manager / supervisor will have the date for the hours. The system will calculate will respect to batch / lot size.
If you have order for 1000 KG, then the system will assign 20 hrs for Machine and 20 hrs for labor.
This will be used for Capacity planning and Costing.
Capacity plan here your requirement is 20 hrs for machine and labor. If you have a reacto which wil run for 24 hrs a day, then the order will be completed in a day.
Costing is concerned, all std. valur key will be assigned with an activity type in work center / Resources and the prices for activity type / cost center will be maintained in KP26.
Based on the cost and hours, the system will allocate cost for the order (it will be planned cost). When you are confirming the order you will enter the actual time for the operation, then that will be your actual cost.
Pl do a sample test scenario in your sand box, and surely you will understand more.
The data for Routing / Recipe will be provided by the production manager of the plant and activity price will be provided by the finance team.
Thanks,
JK -
Hi,
I am having a table of 4 column. First column is varchar2(10), Second column is Number(5), Third column is char(10) and Fourth column is Number(12,2).
Now how to calculate the size of each row. I want to know how much space it will take for each row.
Thanx & Regards,
SwarupFor a complete discussion of storage requirements for different datatypes see the Oracle 8i Concepts manual.
All Oracle documentation is available on-line via the 'Documentation' link on the OTN home page.
Your Col2 NUMBER(5) will take 4 bytes if it holds a 5 digit positive or negative number.
Your Col4 NUMBER(12,2) will take 7 bytes if it holds a number with 12 digits that is positive and will take 8 bytes if it holds a number with 12 digits that is negative.
The following is from the Concepts manual Chapter 12 (Copyright by Oracle)
Built-In Datatypes 12-9
Internal Numeric Format
Oracle stores numeric data in variable-length format. Each value is stored in
scientific notation, with one byte used to store the exponent and up to 20 bytes to
store the mantissa. The resulting value is limited to 38 digits of precision. Oracle
does not store leading and trailing zeros. For example, the number 412 is stored in a
format similar to 4.12 x 10 2 , with one byte used to store the exponent (2) and two
bytes used to store the three significant digits of the mantissa (4, 1, 2). Negative
numbers include the sign in their length.
Taking this into account, the column size in bytes for a particular numeric data
value NUMBER ( p), where p is the precision of a given value, can be calculated
using the following formula:
ROUND((length( p)+ s)/2))+1
where s equals zero if the number is positive and s equals 1 if the number is
negative.
Zero and positive and negative infinity (only generated on import from Version 5
Oracle databases) are stored using unique representations. Zero and negative
infinity each require one byte; positive infinity requires two bytes.
null -
Hi frinds ,how to calculate the totals in smartforms
1)how to calculate the totals in smartforms .
Hi,
To calculate totals and sub totals in sap scripts you can use subroutines.
Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
/: DEFINE &TOT_PRICE&
/: PERFORM F_GET_PRICE IN PROGRAM /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
Then write the variable where ever you want it to be printed (mostly it will be in footer window)
Then create subroutine pool program and you have to write the code.
FORM F_GET_PRICE tables int_cond structure itcsy
outt_cond structure itcsy. data : value type kbert.
statics value1 type kbert.
Read int_cond table index 1.
value = int_cond-value.
value1 = value1 + value.
Read outt_cond table index 1.
outt_cond-value = value1.
Modify outt_cond index 1.
ENDFORM.
regards.. -
How to calculate the frequency of the search string in a row
Hi,
I would like to find the frequency of the number of the occurences of a search string in a row which is of type of xmltype content.
For ex: I would like to find the frequency of the word "oracle" in a row which is of type xmltype content.
Is there any fuction called frequency or freq...
Thanks in advance....Oh!
Then How to calculate the frequency of occurences in a row ?
I hope the Score formula is S=3f(1+log(N/n))
I want to calculate the f value alone, how is it possible.
Thanks in advance.....
Maybe you are looking for
-
How do I cancel an event without deleting it in my calendar
iCal shows sybols "A line through an event's name indicates that it's canceled." -- How do I do that?
-
Skype Subscriptions offers not working. Help ASAP
I'm a new customer whos trying to get the special offer of $4.99 for a skype premiun package but whenever I try to but the product is asking me for $8.99 a month. HELP
-
I need this file "How to Use the Content Conversion Module in JMS Adapter"
Can someone send me this file: "How to Use the Content Conversion Module in JMS Adapter" I am not able to find it. Thanks Antonello
-
[solved] Can grub2-efi chainload a bios target?
Hi, my laptop runs arch in efi-mode which works fine for me for everyday use. However (its summer break) I would like to install windows for some gaming. Since my internal hard drive is occupied by linux and data, I tried to install to an external ha
-
Source table has an xml column that I need to query before splitting into 2 tables.
Hi I have a source table with an xml column that I need to query on the nodes and then depending on what data is in the node then to split it into 2 different tables. I don't think I can use conditional split so I am looking at just a straight Execut