LIS List Method average the total line
In LIS standard analysis, is it possible to create a list method routine that will show the total line value as an average rather than sum?
In LIS standard analysis, is it possible to create a list method routine that will show the total line value as an average rather than sum?
Similar Messages
-
How to count the total lines of the file (including the file header)
Hi all,
I am working with Idoc to file scenario(FCC).
I need to map one of the field with a recound count ie.., count of the total lines of the file (including the file header).
Eg:Record Count-- mapping area:Total number of records in the file including file header The total line of the file (including the file header).
Can i get a help on this.
Thanks and Regards,
ManojHi !
If there is a tag of your IDOC that occurs the same quantity of times as file lines you have to create in your target file, you could make a Java user defined function in graphical mapping that "caches the entire queue" (use the corresponding option button), that receives as input that field of the IDOC, and returns the "lenght" (.length property value) of that input parameter (it is an array) as output..that should be the file line quantity..you may also add 1 to that count, for the header.
Hope it helps.
Regards,
Matias. -
Having Percentage on the Totals line instead of SUM
Hi,
I have a report with several number columns and several percentage columns. I need to show a totals line with grand totals for the number columns, and overall percentage for the percentage columns - how can I achieve this? I guess there is a more general question about showing any non-SUM summary function on the totals line, such as AVG, COUNT, MIN, MAX etc.
I could do it as a UNION I suppose but then I have the problem of formatting the totals line, and this wouldn't really work for break groups, only a grand total.
Any ideas?
SteveYou might want to look into the CUBE, ROLLUP and GROUPING SETS (OLAP) extensions to the GROUP BY clause in SQL. They generate intermediate subtotals, break totals, grand totals, etc using plain SQL.
Here is a quick example of what I mean
http://htmldb.oracle.com/pls/otn/f?p=24317:190
I have chosen to use SUM(SAL), AVG(COMM) and MAX(SAL) as the aggregates, you can modify this as per your requirements.
The query is
select
empno,ename,job,deptno,
sum(sal) sum_sal,
avg(comm) avg_comm,
max(sal) max_sal
from emp
group by rollup(empno,ename,job,deptno)
having grouping_id(empno,ename,job,deptno) in (0,15)The GROUPING_ID gives a binary "bitmap" of which columns are showing a detail row vs. a aggregate/super-aggregate row. In this case, we want to show the lowest level of detail (0) and the highest grand total (15=binary 1111 or all bits turned on)
Again, you can tweak this to show intermediate subtotals, just take out that HAVING clause to see what you get and modify as needed.
Hope this helps.
Message was edited by:
Vikas -
How to count the total lines of code in Java project in NWDS
Hi,
I have created a simple web application in java using NWDS. For audit purposes, I need to know the total lines of java code in this project.
We use Netweaver Development Studio (NWDS) to build & deploy the Java applications
Is there any tool available in NWDS that cant do this job quickly ?
Thanks in advance.
VikramHi All,
I have found out the solution to this problem.
There is a SAP tool - Jlin thats available in NWDS.
Further reference, see this
http://help.sap.com/saphelp_nw04/helpdata/EN/f7/3d9d3c838436428a154abc3816fd9c/frameset.htm
Cheers
Vikram -
How do you make the sentences you input in a drop down list wrap to the next line?
How do you make the sentences that you input in a drop down list to wrap to the next line?
You can't.
see this thread for more info: Can you set drop down list as multi-line??? -
Merge the total line about header and item in the Hierarchical Seq ALV
Hello guys,
Now i used CL_SALV_HIERSEQ_TABLE to create a Hierarchical Sequential ALV. but there are two total lines, one is to calculate the numerical fields in the header(main) and another is calculate the numerical fields in the item(slave).
my requirement doesn't contain the calculation for header line, so the first line is unuseful and i want to merge these two line.
how i should do with it?
Any clues is appreciated.
Thanks a lotcould anyone help me? i am very urgent!
-
My problem is that in the listing total purchases of songs, i appear that buy 750 songs. However in my list of purchases in my library (purchases on Itunes) appear only 414 songs. How do I move the listing total purchase to my library in Itunes, because it does not let me copy and paste them in any way.
Hi Edi,
Thanks for visiting Apple Support Communities.
If you have more songs in your purchases than in your library, you can redownload the songs that aren't in your library. See this article for more information:
Downloading past purchases from the App Store, iBookstore, and iTunes Store
http://support.apple.com/kb/HT2519
Best,
Jeremy -
What does the trim() method of the String class do in special cases?
Looking here ( String (Java Platform SE 7 ) ), I understand that the trim() method of the String class "returns a copy of the string, with leading and trailing whitespace omitted", but I don't understand what the last special case involving Unicode characters is exactly.
Looking here ( List of Unicode characters - Wikipedia, the free encyclopedia ), I see that U+0020 is a space character, and I also see the characters that follow the space character (such as the exclamation mark character).
So, I decided to write a small code sample to try and replicate the behaviour that I quoted (from the API documentation of the trim method) in the multi-line comment of this same code sample. Here is the code sample.:
public class TrimTester {
public static void main(String[] args) {
* "Otherwise, let k be the index of the first character in the string whose code
* is greater than '\u0020', and let m be the index of the last character in the
* string whose code is greater than '\u0020'. A new String object is created,
* representing the substring of this string that begins with the character at
* index k and ends with the character at index m-that is, the result of
* this.substring(k, m+1)."
String str = "aa!Hello$bb";
System.out.println(str.trim());
However, what is printed is "aa!Hello$bb" (without the quotes) instead of "!Hello$" (without the quotes).
Any input to help me better understand what is going on would be greatly appreciated!That's not what I was thinking; I was thinking about the special case where the are characters in the String whose Unicode codes are greater than \u0020.
In other words, I was trying to trigger what the following quote talks about.:
Otherwise, let k be the index of the first character in the string whose code is greater than '\u0020', and let m be the index of the last character in the string whose code is greater than '\u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k, m+1).
Basically, shouldn't the String returned be the String that is returned by the String class' substring(3,9+1) method (because the '!' and '$' characters have a Unicode code greater than \u0020)?
It seems to not be the case, but why? -
How to See Total line in Alv Table
hi friends,
i write all code for totaling in WDDOINIT() Method of my View , but i can not see the total line .
pls help meHai Shah,
In the settings tab of alv,you will find <b>Calculation</b>, select that tab
in that u select the column for which u want the total.
And u also have one option whethe to display the total at the start of table,
or at the end of table.
inorder ot get that calculation tab in settings ,you need to write the follwing code when instantiating the ALV,
l_value = l_ref_interfacecontroller->get_model(
l_value->if_salv_wd_std_functions~set_aggregation_allowed( ).
Cheers,
Madhu -
Total and non-total lines in ALV grid
Hi all,
Does anyone know if there is any standard SAP functionality for retrieving the non-total/raw item lines that lies beneath a total line in an ALV grid (after the user has selected the total line)?
All helpful answers will be rewarded!
Best regards,
MVTry the ALV event AFTER-LINE-OUTPUT may be it can help u to achieve ur requirement.
Append AFTER-LINE-OUTPUT event to the internal table T_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT.u201CAFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
FORM AFTER_LINE_OUTPUT
USING P_RS_LINEINFO TYPE SLIS_LINEINFO.
Here you have to write the logic to retrieve the 'total' line
ENDFROM.
Now call the alv FM
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = L_REPID "Program Name
IS_LAYOUT = W_LAYOUT "Layout of the Report
IT_FIELDCAT = T_FIELDCAT "Field Catalog for Report
IT_EVENTS = T_EVENT "For setting the events
TABLES
T_OUTTAB = T_OUTPUT "Report data Internal Table
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2. -
Hi,
Can I use a total line in an ALV grid and hide part of the columns, so that only the total line will be presented for some of the columns ?Hi,
Yes u can use a total column in the ALV Grid.
Check the code below:
AT LAST.
WA_ALV_CAT1-FIELDNAME = 'TOTAL'(004).
WA_ALV_CAT1-COL_POS = L_I.
WA_ALV_CAT1-COLTEXT = 'TOTAL'(004).
WA_ALV_CAT1-JUST = C_CENTER. " 'C'.
APPEND WA_ALV_CAT1 TO L_ALV_CAT1_TAB.
CLEAR WA_ALV_CAT1.
ENDAT.
Regards
Kannaiah -
Get the totals in abap with cl_salv_table
Hi people,
i need yor help..
I need to obtain the TOTALS in abap and compare them with another ALV.
The totals is showing in the alv, but i need to see it in my debug or my program in save it in a variable.( lv_total)
DATA: lv_total TYPE REF TO CL_SALV_AGGREGATION.
TRY.
CALL METHOD lr_aggregations->add_aggregation
EXPORTING
columnname = 'DMBTR'
aggregation = if_salv_c_aggregation=>total
RECEIVING
value = lv_total.
CATCH cx_salv_data_error . "#EC NO_HANDLER
CATCH cx_salv_not_found . "#EC NO_HANDLER
CATCH cx_salv_existing . "#EC NO_HANDLER
ENDTRY.
Hope your helps
ThanksFinally i did it, as you said..
i did the calculation itself over the internal table,.
I just wanted to know if the method gives the totals, with no necessary calculation over the internal table..
Regards -
How to remove the last line of SUBTOTAL_TEXT ?
i have used this event but i am totaling displaying at bottom rather than total i am getting another line
that i no need so given a some idea a if possible give some code.
it like as:
saleso item no quan net amt
5063 10 47.23 554.23
5063 20 40.00 665.25
TOTAL 87.23 1219.48
---> iam getting extra line want to delete it give me some solution.
thanks to all,
shabeer ahmed>5063 10 47.23 554.23
>5063 20 40.00 665.25
>TOTAL 87.23 1219.48
>---> iam getting extra line want to delete it give me some solution.
what is that extra line, is it total line..?
if You want to remove the total line
layout-no_totalline = 'X'. -
Hi,
I want to display the total of lines on the subtotal line of my grid.
As I don't have this field on my catalog, I think I would have to edit the total line to set the total of regs above...
Could someone help me?
Tks.
Regards,
Flavio.You can do that using the event SUBTOTAL_TEXT .
REPORT ZTEST_ALV_TEXT .
type-pools : slis.
types : begin of itab_t,
ebeln like ekpo-ebeln,
lifnr like ekko-lifnr,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
werks like ekpo-werks,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
netpr like ekpo-netpr,
d, "Dummy field to fire the Subtotal text event
end of itab_t.
data: itab type table of itab_t.
data: tab type itab_t.
data : itab1 like eket occurs 0 with header line.
data: t_fcat type slis_t_fieldcat_alv,
it_sort type slis_t_sortinfo_alv,
t_events type slis_t_event,
listhead type slis_t_listheader,
ls_layout type slis_layout_alv.
start-of-selection.
select a~ebeln
a~lifnr
a~ekorg
a~ekgrp
b~werks
b~ebelp
b~matnr
b~menge
b~netpr
up to 100 rows
into corresponding fields of table itab
from ekko as a inner join ekpo as b
on a~ebeln = b~ebeln.
end-of-selection.
perform fill_fcat using t_fcat.
perform fill_event using t_events.
perform fill_layout.
perform display.
*& Form fill_fcat
text
-->P_T_FCAT text
form fill_fcat using p_t_fcat type slis_t_fieldcat_alv.
data : lfcat type slis_fieldcat_alv,
colpos type i value '0'.
data : ls_sort type slis_sortinfo_alv.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EBELN'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EBELN'.
lfcat-ref_tabname = 'EKKO'.
lfcat-hotspot = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'LIFNR'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'LIFNR'.
lfcat-ref_tabname = 'EKKO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EKORG'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EKORG'.
lfcat-ref_tabname = 'EKKO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EKGRP'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EKGRP'.
lfcat-ref_tabname = 'EKKO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'WERKS'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'WERKS'.
lfcat-ref_tabname = 'EKPO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EBELP'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EBELP'.
lfcat-ref_tabname = 'EKPO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'MATNR'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'MATNR'.
lfcat-ref_tabname = 'EKPO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'MENGE'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'MENGE'.
lfcat-ref_tabname = 'EKPO'.
lfcat-do_sum = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'NETPR'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'NETPR'.
lfcat-ref_tabname = 'EKPO'.
lfcat-do_sum = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'D'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EBELN'.
lfcat-ref_tabname = 'EKKO'.
lfcat-no_out = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
ls_sort-spos = 1.
ls_sort-fieldname = 'EBELN'.
ls_sort-tabname = 'ITAB'.
ls_sort-up = 'X'.
ls_sort-group = 'UL'.
append ls_sort to it_sort.
clear ls_sort.
ls_sort-spos = 2.
ls_sort-fieldname = 'D'.
ls_sort-tabname = 'ITAB'.
ls_sort-up = 'X'.
ls_sort-group = 'UL'.
ls_sort-subtot = 'X'.
append ls_sort to it_sort.
endform. " fill_fcat
*& Form fill_event
text
-->P_T_EVENTS text
form fill_event using p_t_events type slis_t_event.
data : ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = p_t_events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
read table p_t_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move 'TOP_OF_PAGE' to ls_event-form.
append ls_event to p_t_events.
endif.
read table p_t_events with key name = SLIS_EV_SUBTOTAL_TEXT
into ls_event.
if sy-subrc = 0.
move 'SUBTOTAL' to ls_event-form.
append ls_event to p_t_events.
endif.
endform. " FILL_EVENT
FORM SUBTOTAL USING I_LISTHEAD STRUCTURE tab
I_SUBTOTAL TYPE SLIS_SUBTOT_TEXT.
*criteria type slis_fieldname,
keyword like dd03p-reptext,
criteria_text(255) type c,
max_len like dd03p-outputlen,
display_text_for_subtotal(255) type c,
if I_SUBTOTAL-criteria = 'D'.
I_SUBTOTAL-display_text_for_subtotal = 'Sub total'.
endif.
ENDFORM.
*& Form TOP_OF_PAGE
text
form top_of_page.
data : s_listhead type slis_listheader.
clear s_listhead.
s_listhead-typ = 'H'.
s_listhead-info = 'SIMPLE REPORT'.
append s_listhead to listhead.
s_listhead-typ = 'S'.
s_listhead-key = 'EBELN'.
s_listhead-info = 'ALV'.
append s_listhead to listhead.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = listhead
i_logo = 'ENJOYSAP_LOGO'
I_END_OF_LIST_GRID =
endform. "TOP_OF_PAGE
*& Form fill_layout
text
-->P_S_LAYOUT text
form fill_layout .
ls_layout-zebra = 'X'.
ls_layout-detail_popup = 'X'.
ls_layout-key_hotspot = 'X'.
ls_layout-window_titlebar = 'Dharma'.
ls_layout-detail_titlebar = 'Jasti'.
ls_layout-totals_text = 'GRAND TOTAL'.
ls_layout-subtotals_text = 'SUB'.
endform. " fill_layout
*& Form display
text
--> p1 text
<-- p2 text
form display .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
i_callback_pf_status_set = 'STATUS'
i_callback_user_command = 'USER_COMMAND'
I_STRUCTURE_NAME =
is_layout = ls_layout
it_fieldcat = t_fcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = it_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = t_events
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
if sy-subrc 0.
MESSAGE ID SY-MSGI D TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " display
*& Form status
text
-->EXTAB text
form status using extab type slis_t_extab.
set pf-status 'PFSA' excluding extab.
endform. "STATUS
*& Form user_command
text
-->R_UCOMM text
-->RS_SELFIELDtext
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&ETA'.
select * from eket into corresponding fields of itab1
where ebeln = rs_selfield-value.
write:/ itab1-ebeln,
itab1-ebelp,
itab1-etenr,
itab1-eindt,
itab1-menge.
endselect.
when 'BACK' or 'EXIT' or 'CANC'.
leave .
endcase.
endform. "USER_COMMAND -
Using Measurement Studio (Vis. Basic), I'm trying to calculate as a numerical value the total or average power between two stated frequencies of the AutoPowerSpectrum. The PowerFrequencyEstimate Method gets me part of the way there. Using appropriate values of the input variables SearchFreq and Span, I divided the range between my two frequencies into 12 segments and let PowerFrequencyEstimate find the frequency and its power at the highest point in each segment. Then I added the 12 resulting powers. Since these are power values at several peaks, not average power over a given frequency range, it's not exactl
y what I want. Do any other approaches occurr to anyone?
Thanks.Most people here won't do your homework for you. If you make an attempt yourself and get stuck then post your code (wrapped in code tags for easy reading), include any errors you get and what line they occur on and most of all ask a specific question. Don't just say "It doesn't work".
However, your assignment mentions that you are not allowed to use inbuilt C/C++ functions. This is a Java forum. Although the languages are similar and some here have C experience, try posting in a C forum.
Maybe you are looking for
-
Hi all Gurus, I am new to Assets. I am trying to run the reports for Assets. 1.Asset balances 2.depreciation 3.asset history I am getting an errror"fiscal year not maintianed for the Company code aaaa" can any one let me know what i should do solve t
-
How do you add a jar to the classpath?
I'm trying to load a driver for MySQL, but the program doesn't seem to find the driver. I get an exception everytime. I keep seeing references about adding the jar (mysql-connector-java-5.1.6-bin.jar) to the classpath, but I don't know how to do that
-
ScriptUI tab through the fields in a modeless dialog (IDCS4ME)
Hi, I've made a dialog with ScriptUI, a "palette" i.e., modeless. I'd like the user to be able to press the Tab key and shift through the various text input fields etc. But instead, the Tab key hides the InDesign panels even when the dialog has the f
-
ADS in ABAP and JAVA on different servers
Dear community, I need to run ADS with ABAP and JAVA on different servers but after read and apply every step on The ADS Configuration Guide, still getting doubts and problems. Those steps work succesfully on a server with ABAP+JAVA on same server.
-
Problem serving video to Internet explorer
Hello and thanks in advance to all. I am completely new to Flash Video and FMS, and have encountered a problem when using IE. Following Tom Green's 'Beginners guide to streaming video with Flash Media Server 3.5' I set up a video to be served from t