REUSE_ALV_HIERSEQ_LIST_DISPLAY and subtotal functionality
Hello,
I'm using REUSE_ALV_HIERSEQ_LIST_DISPLAY for a report.
Can a field in the ITEM_TABLE (ITEMCOST) be subtotaled directly into a field in its parent line in the HEADER_TABLE (TOTALINVOICE)?
Or do I need to do this programmatically outside of the call to REUSE_ALV_HIERSEQ_LIST_DISPLAY?
Thx.
Andy
Hi,
add do_sum = 'X" for the field in the field catalog
see the example..
w_l_fieldcat-reptext_ddic = 'WRBTR'.
w_l_fieldcat-outputlen = 18.
w_l_fieldcat-do_sum = 'X'. "write this
MODIFY ch_tab_fieldcat from w_l_fieldcat.
Pass this field catalog to fm 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'.
Regards,
Prabhudas
Similar Messages
-
ALV Grid Control - Modifiy data in total and subtotal lines
Hello all,
I´am creating a report using ALV Grid Control. This report calculates (using delivered and returned materials) for each vendor/material-combination the return quote.
Using the totals and subtotals function for different characteristics I want to calculate the return quote for the selected characteristic. Example:
Material delivered returned quote
..4711 . . . 500 . . . 5 . . . . 1 (=returned*100/delivered)
..4711 . . . 400 . . . 10 . . . . 2,5
. SUM . . . 900 . . . 15 . . . . 3,5 <-- 3,5 is the sum but I want display the calculated value 1,667
Is there a possibility to modify data in the total and subtotal lines.
Thank you for your answer
Best regards
Thomasyou said instead of 3.5 you want to show 1,667 ..
how is it possible...
3,5 become 1,667
i thought you are doing any conversions...
vijay -
Change the total and subtotal dynamically in ALV GRID
Hi guys,
I need to change the total and subtotal of field "AMOUNT" dynamically.I am using ALV GRID CONTROL(oops concept).I need to override the standard functionality.I need to show my own subtotal and total line instead of standard one .Hi
I've understood it, I wanted to use OO Grid too, but I had to use the ALV list in order to write my total.
If you need to use OO grid u can try to exclude all funcitonalities for the total, subtotal and sorting and insert in the output table the lines with your totals.
Max -
hi,
i have an ALV REPORT,displaying the fields such as po item(ekpo-menge).the data type is qunt.
but i am unable to perform total and sub total,it gives me a information message 'total cannot b performed'.
even i tried with X_FIELDCAT-DO_SUM = 'X',
can any one help me, how to total and subtotal.HI
GOOD
CHECK WITH THIS EXAMPLES
data: begin of output_tab occurs 0,
total_field_hidden(1) type c,
sortfield1(3) type c,
sortfield1_hidden(3) type c,
numerator type p,
denominator type p,
perc type p decimals 2,
percentage type p decimals 2, "(7) type c,
end of output_tab.
data: abaplist type standard table of abaplist.
type-pools: slis.
data: g_repid like sy-repid.
data: gt_events type slis_t_event.
parameters: p_grid radiobutton group g1,
p_list radiobutton group g1.
initialization.
*This is necessary so that the ALV_GRID knows where to
find the form
g_repid = sy-repid.
start-of-selection.
perform fill_output_tab.
perform output_alv.
*& Form FILL_OUTPUT_TAB
form fill_output_tab.
output_tab-total_field_hidden = '1'.
output_tab-sortfield1 = output_tab-sortfield1_hidden
= 'AAA'.
output_tab-numerator = 1.
output_tab-denominator = 2.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-numerator = 1.
output_tab-denominator = 3.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-numerator = 1.
output_tab-denominator = 5.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-numerator = 1.
output_tab-denominator = 5.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-sortfield1 = output_tab-sortfield1_hidden
= 'BBB'.
output_tab-numerator = 1.
output_tab-denominator = 2.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-numerator = 1.
output_tab-denominator = 2.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-numerator = 1.
output_tab-denominator = 3.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
output_tab-numerator = 1.
output_tab-denominator = 5.
output_tab-perc = output_tab-numerator /
output_tab-denominator
100.
output_tab-percentage = output_tab-perc .
write output_tab-perc to output_tab-percentage.
append output_tab.
endform. " FILL_OUTPUT_TAB
*& Form output_alv
output the list in an ALV Grid
form output_alv.
data: ls_layo type slis_layout_alv,
lt_fcat type slis_t_fieldcat_alv,
lt_sort type slis_t_sortinfo_alv.
perform f01_set_sort changing lt_sort.
perform f01_set_layo changing ls_layo.
perform f01_set_fcat changing lt_fcat.
perform eventtab_build using gt_events[].
g_repid = sy-repid.
clear output_tab.
case 'X'.
when p_list.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = 'X'
i_callback_program = g_repid
is_layout = ls_layo
it_fieldcat = lt_fcat
it_events = gt_events[]
it_sort = lt_sort
tables
t_outtab = output_tab
exceptions
program_error = 1
others = 2.
when p_grid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = ls_layo
it_fieldcat = lt_fcat
it_events = gt_events[]
it_sort = lt_sort
tables
t_outtab = output_tab
exceptions
program_error = 1
others = 2.
endcase.
endform. " output_alv
Sets the Events the ALV Grid needs to react to for
the Overall Output.
-->RT_EVENTS[] A table of events and the forms
that must be
performed for each one.
form eventtab_build using rt_events type slis_t_event.
*"Registration of events to happen during list display
data: ls_event type slis_alv_event.
refresh rt_events.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = rt_events.
Subtotal
read table rt_events with key name =
slis_ev_subtotal_text
into ls_event.
if sy-subrc = 0.
move 'SUBTOTAL_TEXT' to ls_event-form.
append ls_event to rt_events.
endif.
endform. " EVENTTAB_BUILD2
*& Form f01_set_sort
form f01_set_sort changing p_lt_sort type
slis_t_sortinfo_alv.
data: ls_sort type slis_sortinfo_alv.
clear ls_sort.
ls_sort-spos = 1.
ls_sort-fieldname = 'TOTAL_FIELD_HIDDEN'.
ls_sort-subtot = 'X'.
append ls_sort to p_lt_sort.
clear ls_sort.
ls_sort-spos = 2.
ls_sort-fieldname = 'SORTFIELD1_HIDDEN'.
ls_sort-subtot = 'X'.
append ls_sort to p_lt_sort.
endform. " f01_set_sort
*& Form f01_set_layo
Sets layout options
form f01_set_layo changing p_ls_layo type
slis_layout_alv.
p_ls_layo-no_totalline = 'X'.
endform. " f01_set_layo
*& Form f01_set_fcat
Sets the columns and texts for the ALV Grid
<--P_LT_FCAT text
form f01_set_fcat changing ct_fcat type
slis_t_fieldcat_alv.
data: ls_fcat type slis_fieldcat_alv.
ls_fcat-tabname = 'OUTPUT_TAB'.
ls_fcat-fieldname = 'TOTAL_FIELD_HIDDEN'.
ls_fcat-no_out = 'X'.
ls_fcat-col_pos = 1.
append ls_fcat to ct_fcat.
clear ls_fcat.
ls_fcat-tabname = 'OUTPUT_TAB'.
ls_fcat-fieldname = 'SORTFIELD1_HIDDEN'.
ls_fcat-no_out = 'X'.
ls_fcat-col_pos = 2.
append ls_fcat to ct_fcat.
clear ls_fcat.
ls_fcat-seltext_m = 'SORT'.
ls_fcat-tabname = 'OUTPUT_TAB'.
ls_fcat-fieldname = 'SORTFIELD1'.
ls_fcat-col_pos = 3.
append ls_fcat to ct_fcat.
clear ls_fcat.
ls_fcat-seltext_m = 'SALES'.
ls_fcat-tabname = 'OUTPUT_TAB'.
ls_fcat-fieldname = 'NUMERATOR'.
ls_fcat-col_pos = 4.
ls_fcat-datatype = 'CURR'.
ls_fcat-do_sum = 'X'.
append ls_fcat to ct_fcat.
clear ls_fcat.
ls_fcat-seltext_m = 'COST'.
ls_fcat-tabname = 'OUTPUT_TAB'.
ls_fcat-fieldname = 'DENOMINATOR'.
ls_fcat-datatype = 'CURR'.
ls_fcat-col_pos = 5.
ls_fcat-do_sum = 'X'.
append ls_fcat to ct_fcat.
clear ls_fcat.
ls_fcat-seltext_m = 'MARGIN'.
ls_fcat-tabname = 'OUTPUT_TAB'.
ls_fcat-fieldname = 'PERCENTAGE'.
ls_fcat-datatype = 'CHAR'.
ls_fcat-do_sum = 'X'.
ls_fcat-col_pos = 6.
append ls_fcat to ct_fcat.
endform.
*& Form subtotal_text
Manipulate the subtotal line in the ALV to
recalculate eficiency at
total level.
form subtotal_text using ep_subtot_line like
output_tab
es_subtottxt type
slis_subtot_text.
if es_subtottxt-criteria = 'TOTAL_FIELD_HIDDEN'.
es_subtottxt-display_text_for_subtotal = 'Final
Total'.
endif.
ep_subtot_line-percentage = ep_subtot_line-numerator
/ ep_subtot_line-denominator
100.
ep_subtot_line-perc = ep_subtot_line-percentage.
endform.
total_field_hidden(1) type c,
> sortfield1(3) type c,
> sortfield1_hidden(3) type c,
> numerator type p,
> denominator type p,
> perc type p decimals 2,
> percentage type p decimals 2, "(7) type c, end of output_tab.
>
>data: abaplist type standard table of abaplist.
>
>type-pools: slis.
>data: g_repid like sy-repid.
>data: gt_events type slis_t_event.
>*----
>parameters: p_grid radiobutton group g1,
> p_list radiobutton group g1.
>
>initialization.
>*This is necessary so that the ALV_GRID knows where to
>find the form
> g_repid = sy-repid.
>
>start-of-selection.
> perform fill_output_tab.
>
> perform output_alv. &---- *& Form FILL_OUTPUT_TAB &---- form fill_output_tab.
> output_tab-total_field_hidden = '1'.
> output_tab-sortfield1 = output_tab-sortfield1_hidden = 'AAA'.
> output_tab-numerator = 1.
> output_tab-denominator = 2.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-numerator = 1.
> output_tab-denominator = 3.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-numerator = 1.
> output_tab-denominator = 5.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-numerator = 1.
> output_tab-denominator = 5.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-sortfield1 = output_tab-sortfield1_hidden = 'BBB'.
> output_tab-numerator = 1.
> output_tab-denominator = 2.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-numerator = 1.
> output_tab-denominator = 2.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-numerator = 1.
> output_tab-denominator = 3.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
> output_tab-numerator = 1.
> output_tab-denominator = 5.
> output_tab-perc = output_tab-numerator / output_tab-denominator
> * 100. output_tab-percentage = output_tab-perc . * write output_tab-perc to output_tab-percentage. append output_tab.
>
>endform. " FILL_OUTPUT_TAB
>&----
>*& Form output_alv
>&----
>* output the list in an ALV Grid
>----
>form output_alv.
> data: ls_layo type slis_layout_alv,
> lt_fcat type slis_t_fieldcat_alv,
> lt_sort type slis_t_sortinfo_alv.
>
> perform f01_set_sort changing lt_sort.
> perform f01_set_layo changing ls_layo.
> perform f01_set_fcat changing lt_fcat.
> perform eventtab_build using gt_events[].
> g_repid = sy-repid.
> clear output_tab.
> case 'X'.
> when p_list.
> call function 'REUSE_ALV_LIST_DISPLAY'
> exporting * I_INTERFACE_CHECK = 'X'
> i_callback_program = g_repid
> is_layout = ls_layo
> it_fieldcat = lt_fcat
> it_events = gt_events[]
> it_sort = lt_sort tables
> t_outtab = output_tab exceptions
> program_error = 1
> others = 2. when p_grid. call function 'REUSE_ALV_GRID_DISPLAY' exporting
> i_callback_program = g_repid
> is_layout = ls_layo
> it_fieldcat = lt_fcat
> it_events = gt_events[]
> it_sort = lt_sort tables
> t_outtab = output_tab exceptions
> program_error = 1
> others = 2. endcase.
>
>endform. " output_alv
>
>&----
>* Sets the Events the ALV Grid needs to react to for
>the Overall Output.
>----
>* -->RT_EVENTS[] A table of events and the forms
>that must be
>* performed for each one.
>----
>form eventtab_build using rt_events type slis_t_event.
>*"Registration of events to happen during list display
> data: ls_event type slis_alv_event.
>*
> refresh rt_events.
> call function 'REUSE_ALV_EVENTS_GET'
> exporting
> i_list_type = 0 importing
> et_events = rt_events.
>
>* Subtotal
> read table rt_events with key name = slis_ev_subtotal_text
> into ls_event. if sy-subrc = 0. move 'SUBTOTAL_TEXT' to ls_event-form. append ls_event to rt_events. endif.
>
>endform. " EVENTTAB_BUILD2
>&----
>*& Form f01_set_sort
>&----
>form f01_set_sort changing p_lt_sort type
>slis_t_sortinfo_alv.
>
> data: ls_sort type slis_sortinfo_alv.
>
> clear ls_sort.
> ls_sort-spos = 1.
> ls_sort-fieldname = 'TOTAL_FIELD_HIDDEN'.
> ls_sort-subtot = 'X'.
> append ls_sort to p_lt_sort.
>
> clear ls_sort.
> ls_sort-spos = 2.
> ls_sort-fieldname = 'SORTFIELD1_HIDDEN'.
> ls_sort-subtot = 'X'.
> append ls_sort to p_lt_sort.
>
>endform. " f01_set_sort
>&----
>*& Form f01_set_layo
>&----
>* Sets layout options
>----
>form f01_set_layo changing p_ls_layo type
>slis_layout_alv.
>
> p_ls_layo-no_totalline = 'X'.
>
>endform. " f01_set_layo
>&----
>*& Form f01_set_fcat
>&----
>* Sets the columns and texts for the ALV Grid
>----
>* <--P_LT_FCAT text
>----
>form f01_set_fcat changing ct_fcat type
>slis_t_fieldcat_alv.
>
> data: ls_fcat type slis_fieldcat_alv.
>
> ls_fcat-tabname = 'OUTPUT_TAB'.
> ls_fcat-fieldname = 'TOTAL_FIELD_HIDDEN'.
> ls_fcat-no_out = 'X'.
> ls_fcat-col_pos = 1.
> append ls_fcat to ct_fcat.
>
> clear ls_fcat.
> ls_fcat-tabname = 'OUTPUT_TAB'.
> ls_fcat-fieldname = 'SORTFIELD1_HIDDEN'.
> ls_fcat-no_out = 'X'.
> ls_fcat-col_pos = 2.
> append ls_fcat to ct_fcat.
>
> clear ls_fcat.
> ls_fcat-seltext_m = 'SORT'.
> ls_fcat-tabname = 'OUTPUT_TAB'.
> ls_fcat-fieldname = 'SORTFIELD1'.
> ls_fcat-col_pos = 3.
> append ls_fcat to ct_fcat.
>
> clear ls_fcat.
> ls_fcat-seltext_m = 'SALES'.
> ls_fcat-tabname = 'OUTPUT_TAB'.
> ls_fcat-fieldname = 'NUMERATOR'.
> ls_fcat-col_pos = 4.
> ls_fcat-datatype = 'CURR'.
> ls_fcat-do_sum = 'X'.
> append ls_fcat to ct_fcat.
>
> clear ls_fcat.
> ls_fcat-seltext_m = 'COST'.
> ls_fcat-tabname = 'OUTPUT_TAB'.
> ls_fcat-fieldname = 'DENOMINATOR'.
> ls_fcat-datatype = 'CURR'.
> ls_fcat-col_pos = 5.
> ls_fcat-do_sum = 'X'.
> append ls_fcat to ct_fcat.
>
> clear ls_fcat.
> ls_fcat-seltext_m = 'MARGIN'.
> ls_fcat-tabname = 'OUTPUT_TAB'.
> ls_fcat-fieldname = 'PERCENTAGE'. * ls_fcat-datatype = 'CHAR'.
> ls_fcat-do_sum = 'X'.
> ls_fcat-col_pos = 6.
> append ls_fcat to ct_fcat.
>
>endform.
>&----
>*& Form subtotal_text
>&----
>* Manipulate the subtotal line in the ALV to
>recalculate eficiency at
>* total level.
>----
>form subtotal_text using ep_subtot_line like
>output_tab
> es_subtottxt type slis_subtot_text.
>
> if es_subtottxt-criteria = 'TOTAL_FIELD_HIDDEN'.
> es_subtottxt-display_text_for_subtotal = 'Final Total'. endif.
>
> ep_subtot_line-percentage = ep_subtot_line-numerator
> / ep_subtot_line-denominator
> * 100.
>
> ep_subtot_line-perc = ep_subtot_line-percentage. endform.
>
THANKS
MRUTYUN -
Implementing Total and Subtotal in ADF tables
Hi i use Jdeveloper 11.1.2.3.0...
Please i just came across the ADF table subtotal and total function in oracle Docs but it didnt specify steps on how to accomplish that..... Im not a pro, so please if anyone has a link or link to a tutorial or can tell me the necessary steps to take so as to accomplish the subtotal and total in my ADF table, i will be very grateful.
I await your reply.
Thank you
OBYYSOk.. let me explain fully so you capture what in doing here....
What i have is an SQL Query view (with a rollup) which has an input text, i highlight the input and in the properties Inspector --> Style --> contentStyle... i add the code "#{row.Course==null and row.Semester==null and row.Levell==null ? 'font-weight:bold;':'' But it shows thesame error, i also tried "inlineStyle" and it throws thesame error....
(If you have skype you can add me [email protected] or mail me yours, i will be grateful)
I appreciate your time, thank you... -
Implementing Subtotal functionality
Hi,
I have a web dynpro application in which i need to implement the subtotal functionality for a table.I have a table which has 5 columns, where in the first 2 columns have datatype string.So i need to find the sub total of the third column wrt first column and second column.In the same way, i need to find the subtotal of any column with integer datatype wrt any column with string datatype.
Please suggest me how to proceed.
Regards,
Padmalatha.K
Points will be rewarded.Hi,
Create a calculatted attribute to do the calculation
public int getSub_Col(IPrivateTestCompView.IContextElement element)
//@@begin getSub_Col
int x = element.getAttributeValue("<Your first attribute");
int y = Integer.parseInt(element.getAttributeValue("<Your second string attribute"))
return x+y;
//@@end
Pl handle the exceptions
Regards
Ayyapparaj -
Grandtotal and Subtotal on amount field
Hello all,
In the ALV display when I press the total or subtotal button for amount column it gives the total irrespective of the currencies which are different. I need the sum to show for separate currencies. I have even added the Totals field with the following cde
ls_fieldcat-fieldname = 'TOTAL'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = '15'.
ls_fieldcat-cfieldname = 'WAERK'.
ls_fieldcat-do_sum = 'X'.
Still I get the same result with the Totals column showing vaccant and at the end of the totals column it only lists zero
and at the end of currency column it lists the various currencies. However when i run the standard report BALVEX01 it shows the sum in different currencies for both totals and subtotals operation without any extra coding.
FARKANKHUDtry this
DATA : IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
WA_SORT-TABNAME = 'IT_OUTPUT'. " your internal table name
WA_SORT-FIELDNAME = 'AMOUNT'. " field name for Amount
WA_SORT-UP = 'X'.
WA_SORT-GROUP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-TABNAME = 'IT_OUTPUT'.
WA_SORT-FIELDNAME = 'CURRENCY'. " field name for currency
WA_SORT-UP = 'X'.
WA_SORT-GROUP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
and
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = ''
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_SORT = IT_SORT
IT_FILTER = IT_FILTER
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = IT_OUTPUT
EXCEPTIONS
PROGRAM_ERROR = 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. -
ALV print problems for reports with two sort fields and subtotal at each
When a report has two sort fields and subtotal at each of them, the print function is not working correctly. Please see the report below.
The second "" (single star) record (the 10 RL record) and the '*' (double star) record (the 12 RL record) are not printing.
This is happening for any standard SAP reports. Any resolution? Any OSS Notes?
Material/Stock Code Grade Units Count Unit Type Set Position LFT
520085V000 7818 1 RL A 19,682 LF
520085V000 7818 1 RL A 19,682 LF
* 520085V000 2 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 1 RL
599098V000 7717 1 RL A 36,167 LF
* 599098V000 10 RL
** 12 RL
*** 12
Thanks
Anand
Edited by: Anand Velayudhan on Feb 9, 2009 11:50 PMHi,
Check these OSS Notes..
Note 975777 - ALV total: Subtotals disappear from printout
Note 1039655 - ALV total: Subtotals disappear from printout II
Thanks
Naren -
ALV total and subtotaling problem
Hi,
I am unable to proceed in total and subtotal using ALV List Display.
Fico Scenario
For each change of Asset Location within same Asset Class:
Column Logic
Location Total Location wise do the Sum of the columns u201CAcquired Valueu201D, u201CSalv/168 Allow Sec 179u201D, Depreciable Basisu201D, u201CPrior Accum Depreciationu201D, u201CDepreciation This Runu201D, Current YTD Depreciationu201D, Current Accum Depreciationu201D and u201CNet Book Valueu201D
Code Done :
FORM summation .
DEFINE m_fieldcat.
add 1 to gs_fieldcat-col_pos.
gs_fieldcat-fieldname = &1.
gs_fieldcat-ref_tabname = 'gt_fieldcat1'.
gs_fieldcat-do_sum = &2.
gs_fieldcat-cfieldname = &3.
append gs_fieldcat to gt_fieldcat1.
END-OF-DEFINITION.
DEFINE m_sort.
add 1 to wa_sort-spos.
wa_sort-fieldname = &1.
wa_sort-up = 'X'.
wa_sort-subtot = &2.
append wa_sort to i_sort.
END-OF-DEFINITION.
m_fieldcat 'ANBTR' 'X' ''.
m_fieldcat 'SALV' 'X' ''.
m_fieldcat 'DEP_BASIC' 'X' ''.
m_fieldcat 'DEP_LAST' 'X' ''.
m_fieldcat 'DEP_CURRUN' 'X' ''.
m_fieldcat 'DEP_CURYTD' 'X' ''.
m_fieldcat 'DEP_ACC' 'X' ''.
m_fieldcat 'NET_BOOK' 'X' ''.
m_sort 'ANLKL' 'X'.
m_sort 'SALV' 'X'.
m_sort 'DEP_BASIC' 'X'.
m_sort 'DEP_LAST' 'X'.
m_sort 'DEP_CURRUN' 'X'.
m_sort 'DEP_CURYTD' 'X'.
m_sort 'DEP_ACC' 'X'.
m_sort 'NET_BOOK' 'X'.
gs_layout-cell_merge = 'X'.
ENDFORM. " SUMMATION
FORM alv_display .
PERFORM build_catlog.
PERFORM eventtab_field USING gs_event.
PERFORM comment_build USING gt_list_top_of_page[].
perform html_top_of_page using top. "TYPE REF TO cl_dd_document.
gv_repid = sy-repid.
gs_variant-report = gv_repid.
gs_layout-colwidth_optimize = 'X'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-info_fieldname = 'LINE_COLOR'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gv_repid
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
is_layout = gs_layout
is_variant = gs_variant
it_events = gs_event[]
it_fieldcat = gt_fieldcat1[]
i_save = 'A'
TABLES
t_outtab = gt_output[]
EXCEPTIONS
program_error = 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.
ENDFORM. " ALV_DISPLAY
Any Help or Suggestions needed.
Better if guided with the code as m new to ALV Reports.Hi,
I am unable to proceed in total and subtotal using ALV List Display.
Fico Scenario
For each change of Asset Location within same Asset Class:
Column Logic
Location Total Location wise do the Sum of the columns u201CAcquired Valueu201D, u201CSalv/168 Allow Sec 179u201D, Depreciable Basisu201D, u201CPrior Accum Depreciationu201D, u201CDepreciation This Runu201D, Current YTD Depreciationu201D, Current Accum Depreciationu201D and u201CNet Book Valueu201D
Code Done :
FORM summation .
DEFINE m_fieldcat.
add 1 to gs_fieldcat-col_pos.
gs_fieldcat-fieldname = &1.
gs_fieldcat-ref_tabname = 'gt_fieldcat1'.
gs_fieldcat-do_sum = &2.
gs_fieldcat-cfieldname = &3.
append gs_fieldcat to gt_fieldcat1.
END-OF-DEFINITION.
DEFINE m_sort.
add 1 to wa_sort-spos.
wa_sort-fieldname = &1.
wa_sort-up = 'X'.
wa_sort-subtot = &2.
append wa_sort to i_sort.
END-OF-DEFINITION.
m_fieldcat 'ANBTR' 'X' ''.
m_fieldcat 'SALV' 'X' ''.
m_fieldcat 'DEP_BASIC' 'X' ''.
m_fieldcat 'DEP_LAST' 'X' ''.
m_fieldcat 'DEP_CURRUN' 'X' ''.
m_fieldcat 'DEP_CURYTD' 'X' ''.
m_fieldcat 'DEP_ACC' 'X' ''.
m_fieldcat 'NET_BOOK' 'X' ''.
m_sort 'ANLKL' 'X'.
m_sort 'SALV' 'X'.
m_sort 'DEP_BASIC' 'X'.
m_sort 'DEP_LAST' 'X'.
m_sort 'DEP_CURRUN' 'X'.
m_sort 'DEP_CURYTD' 'X'.
m_sort 'DEP_ACC' 'X'.
m_sort 'NET_BOOK' 'X'.
gs_layout-cell_merge = 'X'.
ENDFORM. " SUMMATION
FORM alv_display .
PERFORM build_catlog.
PERFORM eventtab_field USING gs_event.
PERFORM comment_build USING gt_list_top_of_page[].
perform html_top_of_page using top. "TYPE REF TO cl_dd_document.
gv_repid = sy-repid.
gs_variant-report = gv_repid.
gs_layout-colwidth_optimize = 'X'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-info_fieldname = 'LINE_COLOR'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gv_repid
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
is_layout = gs_layout
is_variant = gs_variant
it_events = gs_event[]
it_fieldcat = gt_fieldcat1[]
i_save = 'A'
TABLES
t_outtab = gt_output[]
EXCEPTIONS
program_error = 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.
ENDFORM. " ALV_DISPLAY
Any Help or Suggestions needed.
Better if guided with the code as m new to ALV Reports. -
GUI_DOWNLOAD and UPLOAD Function Modules?
Hi All,
What exactly done by GUI_DOWNLOAD and UPLOAD Function Modules?
Akshitha.What you exactly want know?
Here is the Sap documentation for both FM:
FU GUI_UPLOAD
Short Text
Upload for Data Provider
Functionality
The module loads a file from the PC to the server. Data can be transferred binarily or as text. Numbers and date fields can be interpreted according to the user settings.
Example
Binary upload: No conversion or interpretation
begin of itab,
raw(255) type x,
end of itab occurs 0.
CALL FUNCTION 'GUI_UPLOAD'
exporting
filetype = 'BIN'
filename = 'C:\DOWNLOAD.BIN'
tables
data_tab = itab.
Text upload
begin of itab,
text(255) type c,
end of itab occurs 0.
CALL FUNCTION 'GUI_UPLOAD'
exporting
filetype = 'ASC'
filename = 'C:\DOWNLOAD.TXT'
tables
data_tab = itab.
Parameters
FILENAME
FILETYPE
HAS_FIELD_SEPARATOR
HEADER_LENGTH
READ_BY_LINE
DAT_MODE
CODEPAGE
IGNORE_CERR
REPLACEMENT
CHECK_BOM
VIRUS_SCAN_PROFILE
NO_AUTH_CHECK
FILELENGTH
HEADER
DATA_TAB
Exceptions
FILE_OPEN_ERROR
FILE_READ_ERROR
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
BAD_DATA_FORMAT
HEADER_NOT_ALLOWED
SEPARATOR_NOT_ALLOWED
HEADER_TOO_LONG
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
Function Group
SFES
FU GUI_DOWNLOAD
Short Text
Download an Internal Table to the PC
Functionality
Data transfer of an internal table form the server to a file on the PC. The Gui_Download module replaces the obsolete modules Ws_Download and Download. The file dialog of the download module is available in the class Cl_Gui_Frontend_Services.
Further information
TYPE-POOLS: ABAP.
Binary download table
DATA: BEGIN OF line_bin,
data(1024) TYPE X,
END OF line_bin.
DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.
Ascii download table
DATA: BEGIN OF line_asc,
text(1024) TYPE C,
END OF line_asc.
DATA: data_tab_asc LIKE STANDARD TABLE OF line_asc.
DAT download table
DATA: BEGIN OF line_dat,
Packed TYPE P,
Text(10) TYPE C,
Number TYPE I,
Date TYPE D,
Time TYPE T,
Float TYPE F,
Hex(3) TYPE X,
String TYPE String,
END OF line_dat.
DATA: data_tab_dat LIKE STANDARD TABLE OF line_dat.
Get filename
DATA: fullpath TYPE String,
filename TYPE String,
path TYPE String,
user_action TYPE I,
encoding TYPE ABAP_ENCODING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Gui_Download Demo'
WITH_ENCODING = 'X'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILENAME = filename
PATH = path
FULLPATH = fullpath
USER_ACTION = user_action
FILE_ENCODING = encoding
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
IF user_action <> CL_GUI_FRONTEND_SERVICES=>ACTION_OK.
EXIT.
ENDIF.
Download variables
DATA: length TYPE I.
Binary download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_bin
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Ascii download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'ASC'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_asc
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
DAT download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'DAT'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_dat
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Parameters
BIN_FILESIZE
FILENAME
FILETYPE
APPEND
WRITE_FIELD_SEPARATOR
HEADER
TRUNC_TRAILING_BLANKS
WRITE_LF
COL_SELECT
COL_SELECT_MASK
DAT_MODE
CONFIRM_OVERWRITE
NO_AUTH_CHECK
CODEPAGE
IGNORE_CERR
REPLACEMENT
WRITE_BOM
TRUNC_TRAILING_BLANKS_EOL
WK1_N_FORMAT
WK1_N_SIZE
WK1_T_FORMAT
WK1_T_SIZE
WRITE_EOL
FILELENGTH
DATA_TAB
FIELDNAMES
Exceptions
FILE_WRITE_ERROR
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
HEADER_NOT_ALLOWED
SEPARATOR_NOT_ALLOWED
FILESIZE_NOT_ALLOWED
HEADER_TOO_LONG
DP_ERROR_CREATE
DP_ERROR_SEND
DP_ERROR_WRITE
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
FILE_NOT_FOUND
DATAPROVIDER_EXCEPTION
CONTROL_FLUSH_ERROR
Function Group
SFES -
Not able to sign into Blackberry Protect. Backup and Restore function not working. Message is: "Your device isn't associated with a Blackberry ID." My Blackberry Messenger and Blackberry World is working fine so I am sure its not an ID issue on the phone. I can sign into Link, Blackberry.com and Protect. I see my device in Protect but cannot send messages or view it on a map. Times out with cannot reach device message. BB Protect on Device has a swirling circle beside the on/of switch. Cannot turn off.
I have deleted Link and re-installed.
I have reset phone to default(factory) and signed in.
OS level is 10.2.1.3062
BB Link is 1.2.3.56
Solved!
Go to Solution.I managed to figure this out myself. I had to delete the device from the Blackberry Protect website. protect.blackberry.com. I wiped my device again and signed in with my Blackberry ID. I dont know if the step of wiping was necessary as I did not try my backup with the current configuration on the device following the delete. Restore is in progress for me!
-
Problem with tpcall and tpgetrply functions
Hi,
I have a problem with tpcall() and tpgetrply() functions.
In this example (invoke tpcall()):
FBFR32 *buf;
FLDLEN32 buflen;
buf = a_buffer.getBuffer(); /* getBuffer() returns FBFR32* */
buflen = a_buffer.getLongitud();
/* at this point: buf == a_buffer.getBuffer() */
if (tpcall(a_contenedor.getServname(),
(char*)a_contenedor.getBufferPeticion()->getBuffer(),
a_contenedor.getBufferPeticion()->getLongitud(),
(char**)&buf,
(long*)&buflen,
0) == -1)
if (tperrno != TPESVCFAIL)
LANZAR_EXCEPCION(CADENA_WHAT_SB,
"Error en funcion Execute(), llamada tpcall()",
tpstrerror(tperrno))
/* at this point: buf != a_buffer.getBuffer() */
tpcall() function change the memory address of buf. What is the problem? Is wrong my code? Is a problem with tuxedo version?
My tuxedo version is:
tmadmin -vINFO: BEA Tuxedo, Version 8.0, 32-bit, Patch Level 306
INFO: Serial #: 650522264137-773290431251, Expiration NONE, Maxusers 150
INFO: Licensed to: Telefonica Moviles Espa?a, S.A.
INFO: 56-bit Encryption Package
Thanks,
ANTONIO.There's nothing wrong with your code or tuxedo. tpcall (and tpgetrply) can change the address of the return buffer if it needs to allocate more memory to hold the data. This is the reason why you pass a pointer to the buffer as the output buffer parameter to tpcall and tpreturn. Everything is working as expected.
-
Pinch open and close function not working after upgrade
I'm having trouble with the pinch open and close function on my trackpad. It was working fine until I installed the new Google upgrade and now it doesn't seem to be working. Any suggestions. The other functions are working fine.
Click on the Apple icon at the top left of the screen. Select "System Preferences", then "Trackpad".
Be sure to select:
"Pinch Open and Close" in the "Two Finger" Menu...
Sly -
Field over flow can not display the total and subtotal in ALV
hi
i am running a z report with huge data in quality system.
in 2 columns and not able to show the total and subtotal in 2 columns
it says field overflow and cannot be dispayed.
value is around 20character integer.You can create a domains with 20 positions and 2 decimal, for example.
Than, associate this domain a data element.
To finish assign that data element to the column you wanna sum.
I hope help. -
Display Like and Share functionality in SharePoint 2013 search result
Hello Experts,
I dont Know whether i am asking a good question or bad one . but i am not very much expert in search.
I have to display No of Likes , Share functionality in SharePoint Search Results.
i know little basic about how display templates works. i want to implement these like and share functionality as actions in Item_common_hoverpanel_Actions template. show that i can see in preview.
please if any body can help me . i will be highly thankful to you.
MukeshThis will be difficult. The number of likes has a managed property called LikesCount but it is not populated by the search crawler. So your JavaScript will have to read the "LikesCount" field of the corresponding list item. That would be a
lot of code to execute in the item display template just to display the number of likes. You could have a button that displayed a callout that would get the information and display it. The Sharing could be done via JavaScript in your item display template
using a REST call. You can see an example of code to do that here:
http://sharepointfieldnotes.blogspot.com/2014/09/sharing-documents-with-sharepoint-rest.html?showComment=1428595550241#c3227376854590814312
Just remember the user must have permission to share these documents, so your code will have to handle this.
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer
Maybe you are looking for
-
How to Force Enable 3D Menu Contents in PhotoShop CS6 Extended
Hello I have a weird problem with photoshop cs6 extended I bought my new laptop HP Pavilion dv6 6170ee which has 2 graphics card 1 is the intel one and the other is the AMD one ( High Performance ) As you can see from the screen shot above my drivers
-
I can't update iTunes. It says the feature you are trying to use is on a network resource that is unavailable.
-
Migration from VIRSA 4.0 to GRC 10.0 (ARA)
Hi Guys, We've just migrated from VIRSA 4.0 to GRC 10.0. We have only two connectors configured ECC and Finace System. Rules have been generated and we're using the standard "global" ruleset. The rules seem to be generated successfully ( I've checked
-
Best FS for 500X5GB hardware RAID5?
I would like to hear your thoughts on this. I have a 500x5GB RAID5 array currently formatted with NTFS (from Windows), and I'm currently moving all of the data over to another RAID0 partition in order to allow me to delete the partition and reformat
-
How can I get TOOLS to show up. Lost whole bar includ bookmarks
I once had a bar showing the standard "File, edit, tools ,bookmarks It has gone away. How to get it back?