How to add sub total
hi
how to add sub total in SAP Script using subroutine
SAPscripts How to calculate Totals and Subtotals
I have some doubs in BDC and SMART FORMS. I want to change the material number using the transaction code MM02 through BDC.
In scripts and smartforms how to calculate totals and subtotals?
To calculate totals and sub totals in sap scripts you have to 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 <subroutine prog name> /: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.
I have given a rough outline, please be aware of the variable conversions as Int_cond-value and outt_cond-value are characters.
Similar Messages
-
How to add a Totals row in a dashboard
Oracle Business Intelligence 11.1.1.6.4
Hi there gurus,
I would like to know how to add a totals row at the end of a pivot table within a dashboard. Notice that the column I need to sum up is a measure column and not a dimension one.
Thank a lot.Alejandro Trejo wrote:
Oracle Business Intelligence 11.1.1.6.4
Hi there gurus,
I would like to know how to add a totals row at the end of a pivot table within a dashboard. Notice that the column I need to sum up is a measure column and not a dimension one.
Thank a lot.What do you mean? That's what you would always expect to aggregate. Click the sigma sign on the Rows section and it will sum up the measures column. If not, add the aggregation rule to the measure column. Otherwise, explain IN DETAIL what you did, don't assume that what you did was correct. -
Urgent : how to calculate sub total and grand total in smart forms
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 advance
Re: Subtotal with Table Node in smartforms
-
How to add sub menus in dreamweaver CC using Jquery Tabs
How can I add sub menus to a Menu Bar in DreamWeaver CC. I know how to do it in CS6 using Spry Menu bar but it's just not as simple as that was now in CC.
Any Help is appreciated!!jQuery tabs is a replacement for Spry tabs, not the Spry menubar.
Stella333 found a good replacement for the Spry menubar http://forums.adobe.com/thread/1247870 -
How to calculate Sub-Totals/Grand Totals on repeating row.
I have a this form that I need to calculate to produce a Sub-Total.... An end user can keep adding a line item but I would like to be able to add the amounts entered to calculate in a sub-total field. So basically, I need help with the actual script that would total the amount calculated from a Quantity*Amount which is -->"Sub Total" column then taking all of those to a new calculating script down to the "Sub-Total" field below it. I probably should rename them because its too similar.. I've tried the recommended scripts from the forums but just could not get it to work.
Excuse my editing...but this is what it looks like. If i need to clean it up so it looks more consistent please let me know if you have any advice. I just started working on acrobat forms 2 days ago and my eyes have gone blurry from reading the help forums
and here's the javascript on my "Sub-Total" (Which should probably be renamed to "Total" and my "Total" to "Grand Total". Any help would be much appreciated. Thanks!Try the LiveCycle Designer forums...
-
How to add sub pages in iWeb templates
Anybody knows how to add a sub pages in the templates? I want to add sub pages under the main header, e.g. "About Us."
Just to say that you can do it in the way that Steve has already said and I did this on one of my sites and it worked really well.
Lets take your example of About George. You create your page About George and you include this page in your navigation menu. Now lets suppose that you have more that you want to add about George with two other pages - George at Work and George at Play. You want to link to these pages from About George, but you don't want the page names visible. Well, you can do this by creating the pages and then going to Inspector. Click on pages and then check don't include in navigation menu. Then you can create links on the About George page to get to the other pages George at Work and George at Play - use shapes or text boxes to create these with something like Back and Next on those pages to take you forward to the next page and then back to the main page.
I think you will need to create your own nav bar to be able to achieve this, as it means linking to different pages, but it does work well. -
How to change sub total value in ALV Grid.
Hi All,
Can u please explain how to change SUBTOTAL Value in ALV Grid display based on another field value.
EX; F1 subtotal is initial then we have to modify the F2 sub total to 9999.9.
Thanks
Radha.Hi Radha,
I doubt if that can be changed....because the event that i was referring to in my previous post works with ALV List display...But in any case you can try that.....
There is an event in SLIS....(As i told you, i dont remember the name and currently i dont have access to SAP system, so i am not able to verify and let you know that event name).....
Other thatn TOP and END of PAGE events, there is an event for sub-total text......i think it would start with "SUBTOTAL"...
you need to use that event in your events table and pass it to ALV Grid display.
Then create a sub-routine with that name (As you do for TOP-OF-PAGE event)....and in this event you can change the values in runtime (PROVIDED, this event gets triggered for ALV GRID).....
If this does not work, i think calculating sub-totals while you build the internal table would be a better option....(If you have time constraint....else you can do some more research on the same)........
Best Regards,
Ram. -
How to get sub totals in alv list
Hi all,
i have a data in internal table which need to display by alv lis display, but i need to display
sub totals, like sub total by customer, subtotal by state, and complete total amount. In alv we have standard function
buttons , by i need by default it is displayed when i exe my report, hope to achieve that.
Please help me to know.
thanks,
rajeshhi Rajesh,
Check these threads out
http://www.sap-basis-abap.com/sapalv.htm
http://help.sap.com/saphelp_nw04/helpdata/en/ee/b99d37e188a049e10000009b38f8cf/content.htm
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
DATA SORTING AND SUBTOTAL
DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD1'.
GS_SORT-SPOS = 1.
GS_SORT-UP = 'X'.
<b>GS_SORT-SUBTOT = 'X'.</b>
APPEND GS_SORT TO GT_SORT.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD2'.
GS_SORT-SPOS = 2.
GS_SORT-UP = 'X'.
*GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
Regards,
Santosh -
How to add a total at the end of a characteristic column
Hi All,
There is a report where sales document number(0doc_number)is displayed in one of the columns,
now There is a requirement where I need to add a total count of those doc numbers at the end of that column.
I am not able to find a suitable way to do that.
I tried exception aggregation for taking a count of doc numbers but that will be another column then while I need the total at the end of the same
column which already exists.
Please assist.
Thanks,
DollyHi Suman,
A part of the report is :
I need a count as 2 in above example at the bottom of sales document column.
Dolly -
How to display sub total text in ALV grid display reporting
Hi,
I want to display a text 'SUB TOTAL' in Sub total row of an ALV report.
Presently I am getting the name of the field used in sorting to get sub totals. But I required to display own text. Could you please give me solution.
Thanks
Giridhar KarnamFor doing this u need to simply modify the layout properties, please award points if found helpful
DATA: L_LAYOUT TYPE SLIS_LAYOUT_ALV.
L_LAYOUT-SUBTOTALS_TEXT = 'GEN SUBTOT'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2. -
How to print sub total text in ALV
Hi All,
I have a prblem in printing sub total text in ALV. I am passing the text for sub total in ALV layout to the field SUBTOTALS_TEXT. Even then the text is not displayed where as this is working for TOTAL with the field TOTALS_TEXT.
Could any one provide me the solution please?
Thanks & Regards,
S.LakshmiHi Lakshmi,
Please refer to the following code :
report zalv10.
type-pools: slis.
data: g_repid like sy-repid,
gs_print type slis_print_alv,
gt_list_top_of_page type slis_t_listheader,
gt_events type slis_t_event,
gt_sort type slis_t_sortinfo_alv,
gs_layout type slis_layout_alv,
gt_fieldcat type slis_t_fieldcat_alv,
fieldcat_ln like line of gt_fieldcat,
col_pos type i.
data: begin of itab,
field1(5) type c,
field2(5) type c,
field3(5) type p decimals 2,
end of itab.
data: begin of itab1 occurs 0.
include structure itab.
data: end of itab1.
data: begin of itab_fieldcat occurs 0.
include structure itab.
data: end of itab_fieldcat.
Print Parameters
parameters:
p_print as checkbox default ' ', "PRINT IMMEDIATE
p_nosinf as checkbox default 'X', "NO SELECTION INFO
p_nocove as checkbox default ' ', "NO COVER PAGE
p_nonewp as checkbox default ' ', "NO NEW PAGE
p_nolinf as checkbox default 'X', "NO PRINT LIST INFO
p_reserv type i. "NO OF FOOTER LINE
initialization.
g_repid = sy-repid.
perform print_build using gs_print. "Print PARAMETERS
start-of-selection.
TEST DATA
move 'TEST1' to itab1-field1.
move 'TEST1' to itab1-field2.
move '10.00' to itab1-field3.
append itab1.
move 'TEST2' to itab1-field1.
move 'TEST2' to itab1-field2.
move '20.00' to itab1-field3.
append itab1.
do 50 times.
append itab1.
enddo.
end-of-selection.
perform build.
perform eventtab_build changing gt_events.
perform comment_build changing gt_list_top_of_page.
perform call_alv.
form build.
DATA FIELD CATALOG
Explain Field Description to ALV
data: fieldcat_in type slis_fieldcat_alv.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD1'.
fieldcat_ln-tabname = 'ITAB1'.
*FIELDCAT_LN-NO_OUT = 'X'. "FIELD NOT DISPLAY, CHOOSE FROM LAYOUT
fieldcat_ln-key = ' '. "SUBTOTAL KEY
fieldcat_ln-no_out = ' '.
fieldcat_ln-seltext_l = 'HEAD1'.
append fieldcat_ln to gt_fieldcat.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD2'.
fieldcat_ln-tabname = 'ITAB1'.
fieldcat_ln-no_out = 'X'.
fieldcat_ln-seltext_l = 'HEAD2'.
append fieldcat_ln to gt_fieldcat.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD3'.
fieldcat_ln-tabname = 'ITAB1'.
fieldcat_ln-ref_fieldname = 'MENGE'. "<- REF FIELD IN THE DICTIONNARY
fieldcat_ln-ref_tabname = 'MSEG'. "<- REF TABLE IN THE DICTIONNARY
fieldcat_ln-no_out = ' '.
fieldcat_ln-do_sum = 'X'. "SUM UPON DISPLAY
append fieldcat_ln to gt_fieldcat.
DATA SORTING AND SUBTOTAL
data: gs_sort type slis_sortinfo_alv.
clear gs_sort.
gs_sort-fieldname = 'FIELD1'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'. ***CRUCIAL STATEMENT****
append gs_sort to gt_sort.
clear gs_sort.
gs_sort-fieldname = 'FIELD2'.
gs_sort-spos = 2.
gs_sort-up = 'X'.
*GS_SORT-SUBTOT = 'X'. **THIS SHOULD NOT BE UNCOMENTED*
append gs_sort to gt_sort.
endform.
form call_alv.
ABAP List Viewer
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_structure_name = 'ITAB1'
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = gt_events[]
IT_EVENT_EXIT =
is_print = gs_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 = itab1
exceptions
program_error = 1
others = 2.
endform.
HEADER FORM
form eventtab_build changing lt_events type slis_t_event.
constants:
gc_formname_top_of_page type slis_formname value 'TOP_OF_PAGE'.
*GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = lt_events.
read table lt_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move gc_formname_top_of_page to ls_event-form.
append ls_event to lt_events.
endif.
define END_OF_PAGE event
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
endform.
form comment_build changing gt_top_of_page type slis_t_listheader.
data: gs_line type slis_listheader.
clear gs_line.
gs_line-typ = 'H'.
gs_line-info = 'HEADER 1'.
append gs_line to gt_top_of_page.
clear gs_line.
gs_line-typ = 'S'.
gs_line-key = 'STATUS 1'.
gs_line-info = 'INFO 1'.
append gs_line to gt_top_of_page.
gs_line-key = 'STATUS 2'.
gs_line-info = 'INFO 2'.
append gs_line to gt_top_of_page.
CLEAR GS_LINE.
GS_LINE-TYP = 'A'.
GS_LINE-INFO = 'ACTION'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
endform.
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
write: sy-datum, 'Page No', sy-pagno left-justified.
endform.
form end_of_page.
write at (sy-linsz) sy-pagno centered.
endform.
PRINT SETTINGS
form print_build using ls_print type slis_print_alv.
ls_print-print = p_print. "PRINT IMMEDIATE
ls_print-no_print_selinfos = p_nosinf. "NO SELECTION INFO
ls_print-no_coverpage = p_nocove. "NO COVER PAGE
ls_print-no_new_page = p_nonewp.
ls_print-no_print_listinfos = p_nolinf. "NO PRINT LIST INFO
ls_print-reserve_lines = p_reserv.
endform.
<b>Please reward points if helpful.</b>
Regards,
Amit Mishra -
How to add Sub Tabs to Admin Interface under Account Tab.
Guys,
Is there way to add sub tabs to Accounts Tab in admin interface.
Regards,
VinodIt can be done -
The necessary java code to achieve this needs to be put in the file: includes/bodyStart.jsp above the line that creates the navigation bar:
<% String navBar = p.getMainNavigation();
For example, let's say we want to add a new tab that gives us a shortcut to the debug/session pages, and a sub-tab below it that lists all configuration objects in the repository. Here's the code for it:
// Add a tab..
com.waveset.ui.PageNavigation DEBUG_PAGE = new com.waveset.ui.PageNavigation("Debug", "debug/session.jsp", 0);
DEBUG_PAGE.setRequiredPerms(new com.waveset.object.Permission[] { new com.waveset.object.Permission(com.waveset.object.Type.SYSTEM, com.waveset.object.Right.VIEW, true) });
p.addPage(DEBUG_PAGE);
// Add a sub-tab..
String urlDebugListConfiguration = "debug/List_Objects.jsp?List_Objects_Type=Configuration";
if (! DEBUG_PAGE.containsSubPage(urlDebugListConfiguration) ) {
com.waveset.ui.PageNavigation DEBUG_LIST_CONF_PAGE = new com.waveset.ui.PageNavigation("List Configuration", urlDebugListConfiguration, 0);
DEBUG_LIST_CONF_PAGE.setRequiredPerms(new com.waveset.object.Permission[] { new com.waveset.object.Permission(com.waveset.object.Type.CONFIGURATION, com.waveset.object.Right.VIEW, true)});
DEBUG_PAGE.addSubPage(DEBUG_LIST_CONF_PAGE);
As seen above, appropriate rights can be coded to limit the visibility of these tabs to administrators with certain capabilities. For a complete list of rights, refer to the IDM documentation and the java-docs for com.waveset.object.Type and com.waveset.object.Right. -
How to add sub flyout in a flyout
Hello All,
I have added two to three flyouts in my toolbar. Now I want to add a sub -flyout inside a flyout. how to make it , which object i am supposes to use for it. Please help me.I want to do as shown in figure.
-
How to add a total column (2 totals, just 1 key figure)
I have a query defined with only 1 key figure.
This key figure is in local currency.
I need the total of that key figure in the local currency, and another total with a foreign currency.
How can i show just 1 key figure in the detail, and 2 totals in the totals area??
Here i have some ideas.....
a) build a formula.
b) Hide that formula for the detail of the query.
PLEASE HELP ME.....!!!!
Thanks in advance for your help, if there is another better solution for that.....
Thanks again.....
Carlos Eduardo España
[email protected]Hello,
have you tried the GRID reporting. if the structure of your report is fix you can use a formular for each cell.
In we reporting you have the possibility to change the output of the report with the web table interface (user exit)
I have no other idea.
reg.
Michael -
How to add the total batch quantity in the delivery line item
Hi ,
I have one reqirement.the delivery items are having the batch splits.
Any Specific function module to add the individual line item level batch qty and assign to line item quantity.
Please suggest me for this requirement.
Thanks,
Sri.Hi,
Please check the FM 'VB_BATCH_DETERMINATION' for batch splits.
Reward points if useful.
Regards,
Abhishek
Maybe you are looking for
-
Hello, I want to import dimension members from a flat file in BPC 10 However, only the ID property is validated in the transformation file. This is an extract of my mapping section: BYPASSLCINCTRLS=*COL(5) CURRENCY=*COL(6) ISELIMINATIONENTITY=*COL(7)
-
X load to black screen solve, now I can't compile nvidia drv
When I run X I get black screen: cat x.log X Window System Version 7.1.1 Release Date: 12 May 2006 X Protocol Version 11, Revision 0, Release 7.1.1 Build Operating System: UNKNOWN Current Operating System: Linux myhost 2.6.19-ARCH #1 SMP PREEMPT Tue
-
I was notified of an update to itunes by Apple. I downloaded and installed it. During installation I continually got error messages and it did not instal. I then got an error message every time I booted my computer AND every time I tried to access It
-
How to have DDL "wait" until the lock is free in 10g
I saw this for 11g: http://www.scribd.com/doc/247954/Oracle-11g-DDL-Wait-Option-feature Moving to 11g is not an option. I have code that does partition maintenance (adds a new partition and drops an old one) at night. However, sql loader may be runni
-
Opening Time Machine Backup in Windows
Hi, My MacBook recently had a harddrive failure for the second time in a year. I think I have everything backed up from it through a Time Machine external harddrive, although after reading some of the posts on iTunes and iPhoto backups I'm not so sur