Hi There,
Is it possible to do calculations on the total values computed in the table in Narrative view.
Iis there anyother way.
Regards
Ashish
Is it possible to do calculations on the total values computed in the table in Narrative view.
Iis there anyother way.
Regards
Ashish
A sleek and lightweight Mac OS X application that brings the latest stock market values on your me. Nov 30th 2016, 09:55 GMT. PoolMonitor 1.2 Build 97. ISystatus 1.2 is a third party application that provides additional functionality to OS X system and enjoys a popularity among Mac users. However, instead of installing it by dragging its icon to the Application folder, uninstalling iSystatus 1.2 may need you to do more than a simple drag-and-drop to the Trash. ADDITIONAL PRODUCT INFO: An office necessity in a variety of tab cuts for every filing needEach folder is scored to expand 3/4' and provides a perfect solution for everyday filing needsGreat for everyday use! Made of 11 point sturdy paper stockIncludes 100 letter size (11-5/8' W x 9-1/2' H) colored folders with assorted position 1/3-cut tabsProudly made in the USA. 1 (866) 345-4576 Now Anyone Can Trade Like a Wall St. Advanced traders hit the ground running with powerful trading tools and more New traders learn to trade instantly. Powerful scans, custom-built with penny-stock traders in mind.
![Stocktab Stocktab](https://manula.s3.amazonaws.com/user/12398/img/items-stock.png)
Hi,
You told that you need to do manipulation on grand total so,add dummy columns and put grand total calculations on them and do manipulations on them to get manipulated value.
Do you want to show manipulated values in narrative view?
Regards,
Srikanth
You told that you need to do manipulation on grand total so,add dummy columns and put grand total calculations on them and do manipulations on them to get manipulated value.
Do you want to show manipulated values in narrative view?
Regards,
Srikanth
Similar Messages
- hi experts.
What is the difference between Parent total and Parent adj total in value dimension? can you explain with a simple example.
Your comments will be appreciated
Thanks
SarathHi Sarath,
Hope the below can help you.
Parent Totals: when you save data, financial management automatically calculates totals for the parent members of the dimension hierarchy.
ex : if you enter and save data for the hotel and meals members, a total is calculated for their parent total expenses. ; here the data does not aggregate to parent members until consolidation occurs.
Parent Adjustment : If entities roll up to more than one parent, you can create parent adjustment. Parent adjustments enables you to apply an adjustment for a child to a selected parent, rather than to all parents.
Parent adjustments are available only for parent entities for which the AllowAdjFromchildren application setting is selected.
thank you
Regards,
Mahe - Can you please explain the what is the parent total and parent currency total ..
please correct me if this wrong
parent total is the total of the previous level plus any adjustments applying to the specified parent
the parent curr total is the total of the translated value plus any adjustments applying to all parentsParent Currency is the default currency set in the metadata attribute for the Parent Entity, for Example
Parent: Australia Consolidated (USD)
Child: Australia (AUD)
Child: Indonesia (IDR)
The parent currency is USD
If you allow adjustments in Australia Consolidated then you can book an entry in Parent Adjs and so your parent Currency Total would show the consolidated number in USD for Australia consolidated plus the adjustments made at the parent. - The form is like this:
col 1
col 2
col 3
col 4
col 5
Row 1
amount
amount
amount
line total
Row 2
amount
amount
amount
line total
Row 3
amount
amount
amount
line total
Row 4
amount
amount
amount
line total
Row 5
colum total
colum total
colum total
colum total
The problem is that even though the calculation seems to be right, the final total, colum totals and some of the line totals don't update. The sum remains zero.
Could there be a wrong tab order? Could somebody tell me the right order? I've tried several variations, but I just can't get it work . Could somebody help me please?
Thanks in advance!It's most likely an incorrect field calculation order, which is not at all related to the tab order. In case you don't know how to set it, select 'Forms > Add or Edit Fields' to go into form editing mode, and then select 'Forms > Edit > Set Field Calculation Order'.
Arrange the order so it makes sense, which looks like it should be:
col 2 total
col 3 total
col 4 total
Row 1 total
Row 2 total
Row 3 total
Row 4 total
Row 5 total
Other arrangements might be just a correct, but it's important that the row totals are in that order. You should also check it again when you have the form ready to distribute to make sure it hasn't changed as you've done further editing. - Hi i am using alv grid report to display the sales order and purchase order totals by productline(profit center)
Now i have to call standard transactions from first list to display the totals of sales order and purchase order.I have to display these transctions for specfic orders and their specfic lineitems only.
in VA05n transaction it is allowing me to enter only the document numer but not item.
Can any one help to find the standard transaction to display the totals for only specific orders and line specific line itemsHi Polite,
The transaction CRMD_ORDER is the superset for all the transactions mentioned by you. So it is better to remember just one transaction instead of remembring the subsets . Once you use the transaction CRMD_ORDER and then Follow the menu Business transaction -> Create (F5) you will get the list of transactions you can create this is nothing but the the transactions you have mentioned.
If you know the transaction no. you can directly open that in transaction CRMD_ORDER. The other opetion is to use the SAP Menu instead of transactions.
<b>Reward points if it helps!!</b>
Best regards,
Vikash. - Hello,
I need to show current week group total and total year to date of the same group. My columns are Model, Department, Issue. Currently, the report is grouped on Model, Department and Issue with a filter for date. Can this be done? Thank youCreate a formula field, say {@Current Week Amount} as (basic syntax):
if datepart('ww', {datefield}) = datepart('ww', CurrentDate) then
formula = {amount}
else
formula = 0
end if
You can then sum() this, or place it in a detail line, or whatever. It will only have a (non-zero) value when the date field is in the current week.
HTH,
Carl - Hi Friends,
I came across an issue of finding item wise total using hierarchical ALV. I am getting header wise total by setting the field catalog. May you help me in finding Item wise total.
Regards
Nikhil.hi,
you must use 'w_fieldcat-do_sum = 'X' and change your layout like :
w_sort-fieldname = 'FIELD'.
w_sort-tabname = 'TABNEME'.
w_sort-up = 'X'.
w_sort-subtot = 'X'.
APPEND w_sort TO i_sort.
CLEAR w_sort.
you can use detailed code from http://wiki.sdn.sap.com/wiki/display/Snippets/Subtotalsinhirarchial+report.
regards,
orhan
Edited by: goktasor on Jun 1, 2010 11:03 AM (need points : ) ) - We are using Captivate 4 and the Sum Total LMS. Our course consists of 2 lessons which are not scored and an assessment which is scored. The settings for the lessons are Slide Views Only so the lessons have the Topic Status Complete or Incomplete on the Sum Total LMS Learning Activity Progress Detail page, with the Score % blank. The assessment also has Topic Status Complete or Incomplete, and also a Score % (80% required to pass). The Topic Status and Score % values are correct for the lessons and the assessment, however the Total Score is not correct. When the user completes the 2 lessons and the assessment with a score of 100%, the Total Score shows as only 33%. So it seems that Sum Total is including the lessons in the Total Score, and calculating the Total Score by (100+0=0)/3 = 33%, i.e. assigning 0% to the lessons even though the Score % is blank for the lessons.
Is there a way to have the Total Score be just for the assessment? If the user scores 100% on the assessment we would like the Total Score to be 100%.Hi,
Can you make your question more clear, it is not clear what is you requirement exactly.
'.Total stock not issued from gate in stock.' : Yuou mean to say GR made with 103 but 105 not done for that
or Total stock in store but not issued yet ) : there is no GI with any movemen type ??
regards,
zafar - Hi Gurus,
Can you please help me with narrative views in OBIEE (11.1.1.5)?
I have a table that lists customer sales., e.g.
Customer Sales($mn) Rank
Cust1 800 1
Cust2 450 2
Cust3 350 3
Cust4 300 4
Cust5 40 5
Cust6 30 6
Cust7 20 7
Cust8 10 8
Total 2000
The requirement is to build a narrative view that uses different columns and totals. In this case, the narrative view should say:
Top *3* customers provide *80%* of the revenue.
(n = 3)
(80% = sum(sales) where rank in top n / total sales) = (800+450+350)/2000*100
I can't find a way to incorporate formulas. I can call the sales column (@2) but not able to put the calculation in the narrative view. Has anyone done such a thing before or knows how to do it?
Thank you!!Thank you, HM.. that worked great!!
I have another quick follow up - is there a way to refer to individual values in the result set in a narrative? For example, based on the same table:
Customer $mn Rank
Cust1 800 1
Cust2 450 2
Cust3 350 3
Cust4 300 4
Cust5 40 5
Cust6 30 6
Cust7 20 7
Cust8 10 8
Total 2000
I want to create another narrative that is the ratio of sales of the first and third ranked customer; i.e., the narrative I am trying to build is:
No. 3 has to increase sales by *2.28* times to equal No. 1.
(2.28 = 800/350)
Is that possible, given that my table is sorted by rank? - I used HTML and java-script codes in narrative view to solve the issue of 'linking different reports on selecting values from a drop-down'. A new issue has cropped up due to that implementation. The issue is that i can't attach a dashboard prompt to such a report. This means, when i put this report on a dashboard page with a dashboard prompt to help filter the report, the report does not gets filtered (it does not seems to be connected to the dashboard prompt).
Has anyone faced this issue before? If yes, please let me know how to tackle it at the earliest.
Regards,
RamilHi,
sorry , i could not solve the problem. the below case statement i put in the formula of a date column but i got some syntax error.One more thing is case statement is appearing in the select query not in where condition. Do u mean to say if i will put the same column as is prompted then it will come in where condition.
Could u plz help me where i am doing wrong .
case when '@{Period}'='Weekly' then Alerts.'Creation Date and Time' between '@{PStartDate -7}' and '@{PStartDate}' end
[nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <between>: Syntax error [nQSError: 26012] . (HY000)
SQL Issued: SELECT Alerts.'Business Domain(s)', Alerts.'Closing Action Type', Alerts.Closer, case when '='Weekly' then Alerts.'Creation Date and Time' between ' and ' end FROM 'Common Productivity Reports for Alerts' - Below is a report created using SSRS. I want to be able to calculate the percentage(%) total to add up to 100 % in the Total column. For some reason my averages are not working as you can see from the table. The idea is to calculate the averages of opportunities
as well as Sold. But from my calculation, things are not adding up as I supposed. This report is not grouped by parent. How do I make this to work as it should? Thank you.
(NB: Please zoom in to view the image)
ZionliteHi,
According to the description, I doubt you may manually add Total and Averages columns. Did you manually add Local and International or they were in a column group?
You can use the following expression for the Opportunity Cost(averages) column in the total row:
=Sum(Fields!opportunitycost.Value)/2
How did you calculate the percentage column? If it is Sold value divided by Opportunity Cost value, use:
=Sum(Fields!sold.Value)/Sum(Fields!opportunitycost.Value)
Also try to define the scope in the expression and see if it make difference.
If there is no progress, please capture the screenshot of your design tab.(Click on the report and capture the image of your report structure)
Also, tell us the expression of the text box which in problem.
Thanks.
Tracy Cai
TechNet Community Support - How can I create a sub total for each section and grand total for using my query like this. your help is appreciated. I am working with 9g
WITH BidItemsInformation AS
( SELECT DISTINCT q.iplineno 'Line Number', q.section 'Section Number',
i.item 'Item Number',
initcap(i.idescr) 'Description' ,
i.iunits 'Unit',
q.qty 'Quantity' ,q.price 'Engineers Unit Price',
(q.price * q.qty) 'Engineers Estimate'
FROM letprop l,
proposal p,
propitem q,
bidlet b,
bidtabs c,
itemlist i,
vendor v,
bidders d
WHERE(l.letting = b.letting
And b.letting = c.letting
And p.cspecyr = i.ispecyr)
AND q.prpitem = i.item
AND p.contid = l.lcontid
AND q.contid = p.contid
AND c.vendor = l.avendor
AND l.CALL = c.CALL
AND q.lineflag = c.lineflag
AND q.iplineno = c.iplineno
AND l.letting = d.letting
AND c.letting = l.letting
AND c.CALL = d.CALL
AND v.vendor = d.vendor
-- AND AND l.letstat = 'A'
AND c.lineflag = 'L'
AND l.letting ='&letting'
AND l.CALL = '&call'
), BiddersInformation AS
-- This is where you make your changes for vendor name and vendor number Do not touch the above code
-- It is always the same for any call number and letting date
( SELECT IPLINENO 'BLine Number',
MAX(CASE WHEN VENDOR='K020' THEN bidprice ELSE NULL END) 'K020:: Unit Price',
MAX(CASE WHEN VENDOR='K020' THEN bidprice ELSE NULL END) K,
MAX(CASE WHEN VENDOR='H438' THEN bidprice ELSE NULL END) 'H438:: Unit Price',
MAX(CASE WHEN VENDOR='H438' THEN bidprice ELSE NULL END) H,
MAX(CASE WHEN VENDOR='U010' THEN bidprice ELSE NULL END) 'U010:: Unit Price',
MAX(CASE WHEN VENDOR='U010' THEN bidprice ELSE NULL END) U,
MAX(CASE WHEN VENDOR='G110' THEN bidprice ELSE NULL END) 'G110:: Unit Price',
MAX(CASE WHEN VENDOR='G110' THEN bidprice ELSE NULL END) G,
MAX(CASE WHEN VENDOR='H530' THEN bidprice ELSE NULL END) 'H530:: Unit Price',
MAX(CASE WHEN VENDOR='H530' THEN bidprice ELSE NULL END) H1
FROM BIDTABS
WHERE LETTING='&letting'
AND CALL='&call'
AND BIDPRICE <> 0
GROUP BY IPLINENO
SELECT BidItemsInformation.'Line Number',
BidItemsInformation.'Section Number',
BidItemsInformation.'Item Number',
BidItemsInformation.'Description',
BidItemsInformation.'Unit',
BidItemsInformation.'Quantity',
BidItemsInformation.'Engineers Unit Price',
BidItemsInformation.'Engineers Estimate',
BiddersInformation.'K020:: Unit Price',
(BidItemsInformation.'Quantity' * K) 'KGM CONTRACTORS INC',
BiddersInformation.'H438:: Unit Price',
(BidItemsInformation.'Quantity' * H) 'HOFFMAN CONSTRUCTION COMPAN',
BiddersInformation.'U010:: Unit Price',
(BidItemsInformation.'Quantity' * U) 'ULLAND BROTHERS INC',
BiddersInformation.'G110:: Unit Price',
(BidItemsInformation.'Quantity' * G) 'GLADEN CONSTRUCTION INC',
BiddersInformation.'H530:: Unit Price',
(BidItemsInformation.'Quantity' * H1) 'HOOVER CONSTRUCTION CO'
FROM BidItemsInformation,BiddersInformation
WHERE BidItemsInformation.'Line Number' = BiddersInformation.'BLine Number';
Line Number Section Number Item Number Description Unit Quantity Engineers Unit Price Engineers Estimate K020:: Unit Price
0010 0001 2011601/00003 Construction Surveying LS 1 143,000 143,000 75,000 75,000 67,080 67,080
0013 0001 2013601/00010 Survey Equipment LS 1 25,000 25,000 25,000 25,000 30,000 30,000
0020 0001 2015601/00030 Blast Monitor/Survey LS 1 50,000 50,000 30,000 30,000 35,000 35,000
0030 0001 2021501/00010 Mobilization LS 1 382,250 382,250 809,000 809,000 704,000 704,000
0040 0001 2021602/00010 Well Survey EACH 60 500 30,000 2,150 129,000 1,600 96,000
0050 0001 2031501/00040 Field Office Type D EACH 1 6,367 6,367 4,000 4,000 25,000 25,000
sub total:
1610 0002 2401501/01143 Structural Concrete (1a43) C Y 46 350 16,100 408 18,768 400 18,400
1620 0002 2401501/01362 Structural Concrete (1c62) C Y 68 200 13,600 204 13,872 200 13,600
1630 0002 2401501/03643 Structural Concrete (3y43) C Y 60 600 36,000 592 35,520 580 34,800
1640 0002 2401512/03633 Bridge Slab Concrete (3y33) S F 1,876 24 45,024 28 51,778 27 50,652
1650 0002 2401521/00030 Structure Excavation Class R C Y 17 125 2,125 1,000 17,000 500 8,500
1660 0002 2401541/00010 Reinforcement Bars LB 2,490 2 3,735 1 3,312 1 3,237
1670 0002 2401541/00011 Reinforcement Bars (Epoxy Coated) LB 12,380 2 18,570 1 17,703 1 17,332
1680 0002 2401601/00010 Structure Excavation LS 1 2,500 2,500 2,000 2,000 5,000 5,000
1690 0002 2402583/00020 Ornamental Metal Railing Type Special L F 284 150 42,600 194 55,096 190 53,960
sub total
1820 0003 2401513/00346 Type Curb Railing Concrete (3y46) L F 135 25 3,375 16 2,093 15 2,025
1830 0003 2401513/07447 Type Mod P-4 (Tl-4) Railing Conc (3y46) L F 302 85 25,670 72 21,593 70 21,140
1840 0003 2401541/00010 Reinforcement Bars LB 14,780 1 18,475 1 13,598 1 13,302
1850 0003 2401541/00011 Reinforcement Bars (Epoxy Coated) LB 76,720 1 103,572 1 85,926 1 84,392
1860 0003 2401601/00010 Structure Excavation LS 1 10,000 10,000 116,000 116,000 115,000 115,000
1870 0003 2402583/00020 Ornamental Metal Railing Type Special L F 132 150 19,800 184 24,288 180 23,760
sub total
totalYou can accomplish that using decode with the grouping function. It returns 1 when that column passed as argument was grouped (or is in some total) and 0 otherwise.
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> with t as
2 (select 'New York' city, 'US' country, 1 num from dual
3 union all select 'Los Angeles' city, 'US' country, 2 num from dual
4 union all select 'London' city, 'GB' country, 2 num from dual
5 union all select 'London' city, 'GB' country, 2 num from dual
6 union all select 'London' city, 'GB' country, 7 num from dual)
7 select decode(grouping(country), 0, country, 'GRAND TOTAL') country,
8 decode(grouping(city), 0, city, decode(grouping(country), 0, 'SUBTOTAL')) city,
9 sum(num) num_total
10 from t
11 group by rollup(country, city)
12 /
COUNTRY CITY NUM_TOTAL
GB London 11
GB SUBTOTAL 11
US New York 1
US Los Angeles 2
US SUBTOTAL 3
GRAND TOTAL 14
6 linhas selecionadas.
SQL> - How to Calculate the Sub-totals and Grand totals in ABAP Programs.Hi Bhaskar,
In my opinion this can be acheived in two ways:
1. Using ALV GRID DISPLAY
2. Using AT NEW , ON CHANGE OF , etc events.
1. In the ALV field catalogue u create entries for all the fileds to b
displayed in the output list.
Here, we need to put DO_SUM = 'X' .
eg
****************fieldcatalog*********************
data:anytab type slis_t_fieldcat_alv with header line.
**************pgm name**********************
data:anypgnm type sy-repid.
**************events*************************
anytab-fieldname = 'MATNR'.
anytab-seltext_m = 'Material Number'.
anytab-col_pos = 0.
anytab-outputlen = 20.
anytab-emphasize = 'X'.
anytab-do_sum = 'X' . <----
here it is.
append anytab to anytab .
clear anytab .
Now wen u call the fm REUSE_ALV_GRID_DISPLAY , plz pass anytab ie fieldcatalog and the tabel with records to b displayed .
this would sum the fields at the end.
2. Alternately ..for SUb-totals ;
Sort itab in an ascending manner.
Data : wa_itab like line of itab,
wa_subtotal type i.
' fieldname1 in itab is the key field
' fieldname2 is the value field
LOOP at itab into wa_itab .
wa_subtotal = wa-subtotal + itab-<fieldname2>.
AT END OF <fieldname1> .
' your programming logic for subtotal
Write :/ wa_itab-fieldname1 , wa_subtotal.
Clear wa_subtotal.
ENDAT.
' write :/ ..if u need to write any lofgic values ..
ENDLOOP .
Note : plz sc if a field in itab that is left of fieldname1 changes
the AT END OF event is triggered.
Therefoe , see that pur key fields towards left in itab.
FYI : u can try ON CHANGE OF..ENDON..
AT NEW ...ENDAT
AT LAST..ENDAT
AT FIRST ...ENDAT events for ur own understanding
i hope this helps u.
Regards
panakj - Hi Friens.how to calculate sub total and grand total in smart forms.How to print them in smart forms..Also kindly explain how to handle events in smart forms.Thanks in advanceRe: Subtotal with Table Node in smartforms
- Hi,
I am trying to calculate the totals of netwr and fkimg in a report but the following coding cannot giv me the right answer so if there is anyone with the solution for this problem may you please help me out and how can i display the date on my report...here is my coding:
REPORT Z_DAILY_STOCK_NEW.
TYPE-POOLS: SLIS.
TABLES
TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
ALV FIELDS
DATA: it_fieldcat TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: w_cnt LIKE sy-tabix.
total ref to data.
t_alv LIKE TABLE OF s_error WITH HEADER LINE.
DATA: gr_layout TYPE slis_layout_alv,
gr_tab_group TYPE slis_t_sp_group_alv,
gr_repid LIKE sy-repid,
gr_events TYPE slis_t_event,
gr_print TYPE slis_print_alv,
gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
SELECTION SCREEN
SELECT-OPTIONS:
s_werks FOR vbrp-werks,
s_auart FOR vbak-auart.
DEFINITION OF AN INTERNAL TABLE
DATA: begin of i_stocktab occurs 0,
kunag LIKE vbrk-kunag,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
inco1 LIKE vbrk-inco1,
vkgrp LIKE vbrp-vkgrp,
fkimg LIKE vbrp-fkimg,
netwr LIKE vbrk-netwr,
end of i_stocktab.
START OF SELECTION
SELECT vbrkkunag kna1name1 kna1ort01 vbrkinco1 vbrp~vkgrp
vbrpfkimg vbrknetwr
FROM kna1 inner join vbrk on kna1kunnr EQ vbrkkunrg
inner join vbak on kna1kunnr EQ vbakkunnr
inner join vbrp on vbrkvbeln EQ vbrpvbeln
INTO i_stocktab
WHERE vbrp~werks IN s_werks
AND vbak~auart IN s_auart.
APPEND i_stocktab.
ENDSELECT.
*DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_event.
PERFORM build_print.
PERFORM calc_total.
PERFORM display_alv_report.
FORM build_fieldcatalog.
w_cnt = 1.
it_fieldcat-fieldname = 'KUNAG'.
it_fieldcat-seltext_m = 'Soldtp'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
it_fieldcat-key = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NAME1'.
it_fieldcat-seltext_m = 'Name'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'ORT01'.
it_fieldcat-seltext_m = 'City'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'INC01'.
it_fieldcat-seltext_m = 'Incoterms'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'VKGRP'.
it_fieldcat-seltext_m = 'Sales Group'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'FKIMG'.
it_fieldcat-seltext_m = 'Invoiced Qty'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
*it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NETWR'.
it_fieldcat-seltext_m = 'Invoiced Value'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
ENDFORM.
FORM build_layout.
gr_layout-no_input = 'X'.
gr_layout-colwidth_optimize = 'X'.
gr_layout-totals_text = 'Totals: '(201).
gr_layout-detail_popup = 'X'.
ENDFORM.
FORM build_event.
DATA i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gr_events[].
READ TABLE gr_events WITH KEY name = slis_ev_user_command
INTO i_event.
if sy-subrc = 0.
MOVE gr_user TO i_event-form.
APPEND i_event TO gr_events.
endif.
ENDFORM.
*FORM calc_total.
LOOP AT it_fieldcat into wa_fieldcat
WHERE fieldname EQ 'FKIMG' OR
fieldname EQ 'NETWR'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-datatype = 'QUAT'.
modify it_fieldcat from wa_fieldcat.
ENDLOOP.
*ENDFORM.
FORM build_print.
gr_print-reserve_lines = '2'.
gr_print-no_coverpage = 'X'.
ENDFORM.
FORM calc_total.
DATA: total type ref to data,
subtotal1 type ref to data.
field-symbols <fkimg> like sflight.
field-symbols <netwr> like sflight.
call method grid1-> get_subtotals
importing
ep_collect00 = subtotal
ep_collect01 = total.
assign total to <fkimg>.
assign total to <netwr>.
ENDFORM.
*& FUNCTION ALV DISPLAY
FORM display_alv_report.
gr_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = gr_repid
I_CALLBACK_USER_COMMAND = slis_ev_user_command
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE' ' see FORM
IS_LAYOUT = gr_layout
IT_FIELDCAT = it_fieldcat[]
IT_SPECIAL_GROUPS = gr_tab_group
I_SAVE = 'X'
IT_EVENTS = gr_events
IS_PRINT = gr_print
TABLES
t_outtab = i_stocktab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM top-of-page.
*ALV Header deaclarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc TYPE c.
*Title
wa_header-typ = 'H'.
wa_header-info = 'Report for daily Stock Returns'.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Total No. Records Selected
DESCRIBE TABLE i_stocktab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected:' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM. Copy clip 2 9 5 – clipboard manager duties.Try This
REPORT z_daily_stock_new.
TYPE-POOLS: slis.
* TABLES
TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
* ALV FIELDS
DATA: it_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: w_cnt LIKE sy-tabix.
* total ref to data.
* t_alv LIKE TABLE OF s_error WITH HEADER LINE.
DATA: gr_layout TYPE slis_layout_alv,
gr_tab_group TYPE slis_t_sp_group_alv,
gr_repid LIKE sy-repid,
gr_events TYPE slis_t_event,
gr_print TYPE slis_print_alv,
gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
* SELECTION SCREEN
SELECT-OPTIONS:
s_werks FOR vbrp-werks,
s_auart FOR vbak-auart.
* DEFINITION OF AN INTERNAL TABLE
DATA: BEGIN OF i_stocktab OCCURS 0,
kunag LIKE vbrk-kunag,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
inco1 LIKE vbrk-inco1,
vkgrp LIKE vbrp-vkgrp,
fkimg LIKE vbrp-fkimg,
netwr LIKE vbrk-netwr,
END OF i_stocktab.
* START OF SELECTION
SELECT vbrk~kunag kna1~name1 kna1~ort01 vbrk~inco1 vbrp~vkgrp
vbrp~fkimg vbrk~netwr
FROM kna1 INNER JOIN vbrk ON kna1~kunnr EQ vbrk~kunrg
INNER JOIN vbak ON kna1~kunnr EQ vbak~kunnr
INNER JOIN vbrp ON vbrk~vbeln EQ vbrp~vbeln
INTO i_stocktab
WHERE vbrp~werks IN s_werks
AND vbak~auart IN s_auart.
APPEND i_stocktab.
ENDSELECT.
*DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_event.
PERFORM build_print.
PERFORM calc_total.
PERFORM display_alv_report.
* FORM build_fieldcatalog *
FORM build_fieldcatalog.
w_cnt = 1.
it_fieldcat-fieldname = 'KUNAG'.
it_fieldcat-seltext_m = 'Soldtp'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-key = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NAME1'.
it_fieldcat-seltext_m = 'Name'.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'ORT01'.
it_fieldcat-seltext_m = 'City'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
* w_cnt = w_cnt + 1.
* it_fieldcat-fieldname = 'INC01'.
* it_fieldcat-seltext_m = 'Incoterms'.
* it_fieldcat-emphasize = 'X'.
* APPEND it_fieldcat TO it_fieldcat.
* CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'VKGRP'.
it_fieldcat-seltext_m = 'Sales Group'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'FKIMG'.
it_fieldcat-seltext_m = 'Invoiced Qty'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-ref_tabname = 'VBRP' .
it_fieldcat-ref_fieldname = 'FKIMG' .
it_fieldcat-do_sum = 'X' .
* *it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
clear it_fieldcat .
it_fieldcat-fieldname = 'NETWR'.
it_fieldcat-seltext_m = 'Invoiced Value'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-ref_tabname = 'VBRP' .
it_fieldcat-ref_fieldname = 'NETWR' .
it_fieldcat-do_sum = 'X' .
* it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
ENDFORM.
* FORM build_layout *
FORM build_layout.
gr_layout-no_input = 'X'.
gr_layout-colwidth_optimize = 'X'.
gr_layout-totals_text = 'Totals: '(201).
gr_layout-detail_popup = 'X'.
ENDFORM.
* FORM build_event *
FORM build_event.
DATA i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gr_events[].
READ TABLE gr_events WITH KEY name = slis_ev_user_command
INTO i_event.
IF sy-subrc = 0.
MOVE gr_user TO i_event-form.
APPEND i_event TO gr_events.
ENDIF.
ENDFORM.
*FORM calc_total.
* LOOP AT it_fieldcat into wa_fieldcat
* WHERE fieldname EQ 'FKIMG' OR
* fieldname EQ 'NETWR'.
* wa_fieldcat-do_sum = 'X'.
* wa_fieldcat-datatype = 'QUAT'.
* modify it_fieldcat from wa_fieldcat.
* ENDLOOP.
*ENDFORM.
FORM build_print.
gr_print-reserve_lines = '2'.
gr_print-no_coverpage = 'X'.
ENDFORM.
* FORM calc_total *
FORM calc_total.
DATA: total TYPE REF TO data,
subtotal1 TYPE REF TO data.
* FIELD-SYMBOLS <fkimg> LIKE sflight.
* FIELD-SYMBOLS <netwr> LIKE sflight.
* CALL METHOD grid1-> get_subtotals
* IMPORTING
* ep_collect00 = subtotal
* ep_collect01 = total.
* ASSIGN total TO <fkimg>.
* ASSIGN total TO <netwr>.
ENDFORM.
*& FUNCTION ALV DISPLAY
FORM display_alv_report.
gr_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gr_repid
i_callback_user_command = slis_ev_user_command
i_callback_top_of_page = 'TOP-OF-PAGE' ' see FORM
is_layout = gr_layout
it_fieldcat = it_fieldcat[]
it_special_groups = gr_tab_group
i_save = 'X'
it_events = gr_events
is_print = gr_print
TABLES
t_outtab = i_stocktab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
* FORM top-of-page *
FORM top-of-page.
*ALV Header deaclarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc TYPE c.
*Title
wa_header-typ = 'H'.
wa_header-info = 'Report for daily Stock Returns'.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Total No. Records Selected
DESCRIBE TABLE i_stocktab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected:' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM.
Stock Tab 1 25
Maybe you are looking for
Stock Tab 1 20
- I was shocked when I was trying to do my reports yesterday, after upgrading to Win 8.1 and finding the driver for my OJ 8500 WILL NOT WORK in printing off ADOBE which lead to me trying to open the HP Solution Center and it just pops up a box that say
- MUSE would be great if we could copy /paste /delete pages and / or group pages Regards
- Hi All, Can you tell me what has to be done for IT 0001 during Separation action? IT0001 is in copy mode in V_T588D for separation . The thing is, when i am trying to separate the employee, the position is defaulted to 99999999 but Org Unit and Job
- Hello All, A transfer order has single item. It has got confirmed at the item level for the full quantity. The confirmation switchbox at item level is checked in by the system automatically. But in header level the switch box is not checked in. Wh
- I don't have any problems with my Playbook, but I do have a question. I would like to get a portable keyboard because the one in the Playbook is not very good for serious document typing. Is it possible to buy a regular portable wireless keyboard a