Smartform total sum
Hi All,
I am a newer of smartform. Now I face a problem, I want to do total sum at the bottom of main table without showed at each page. But I tried many method and it is not ok.
Plz help me.
Hi,
In the node where u r printing the value , u will be printing each value in the textelement. so Before that text elelment u create a program line.
u take a variable and assign the variable as zero .
in the program lines u put the code as
variable = variable + (text-value).
ex:-itab-menge.( uwant to make sum of menge).
var type menge. = 0.(This u do in global def.).
in the program lines.
var = var + itab-menge.
after the loop.
var will be sum of the all .
Assign points if useful.
Similar Messages
-
Total sum to be displayed in a table view control ?
Hi,
I am unable to display the total sum of a column in a table view control( using HTMLB ). How should one display the sum of a column ?
THanks in advance,
VaraPrasadHi,
it should work once you are restricting the capacity of the out put port then it should provide that much rows only otherwise its a Bug.
Alternativily you are tellin to disaply using sorting then add a Sort operator to the output port and the display ur output port in down order.
But first option should work just check it again.
On which SP u r working?
Regards,
Govindu -
Hi All,
The following is a test I performed in order to check a problem I got.
I created a simple function in Oracle which receives a number and returns it divided by 2. (NUM/2). I registered this function in Discoverer Administrator and then created a simple report with only one column: A calculated column, calling for this formula with the value of 1000. As expected, the returned value was 500. But when I tried to use Total->Sum of this column, it failed. All the other options (Average, Count...) worked, except the sum.
As I mentioned in the beginning, this is just a test for my real situation.
Any ideas how it can be solved?Hi
Other than the neat workaround suggested by Russ, if my memory serves me right that issue was fixed in the final release for 4.1 - 4.1.48
The patch to upgrade Discoverer 4.1 Admin and Desktop is 3201601, while for Plus and Viewer the patch is 3201610. These patches will upgrade you to 4.1.48.06. If you are using E-Business Suite the patch you need is 3451636 which is the upgrade to 4.1.48.08.
All of these patches are still available for download on Metalink.
For further information on the latest patches please look on my blog here: http://learndiscoverer.blogspot.com/2006/09/releases-and-patch-numbers-september.html
I'll be updating this again very soon with the latest information for other releases but for 4.1 my posting is accurate.
Best wishes
Michael -
How to Hide rows in ALV without affecting total sum at the end of table?
Hi,
I need some help in hiding particular rows in an ALV Grid without affecting the total sum at the end of the table. I am trying to hide the rows that have negative quantities, but I still need those values so that the user can still compute for the total sums. Can anyone help? Thanks.
JosephHi,
Hopw this way you can hide the rows in the GRID.
DATA:
ld_column TYPE lvc_fname,
ld_hide TYPE abap_bool.
FIELD-SYMBOLS:
<ls_entry> TYPE any,
<ld_fld> TYPE any.
ld_column = 'COL_1'. " column which you want to suppress if everything is zero
ld_hide = abap_true. " = 'X'; default hide column
LOOP at <gt_outtab> ASSIGNING <ls_entry>.
ASSIGN COMPONENT (ld_column) OF STRUCTURE <ls_entry> TO <ld_fld>.
IF ( <ld_fld> > 0 ).
ld_hide = abap_false. " display column because at least single value > 0
EXIT. " leave LOOP
ENDIF.
ENDLOOP.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = ld_column.
IF ( syst-subrc = 0 ).
ls_fcat-no_out = ld_hide.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDIF.
hop you will get the total with for those columns too.
Regards,
Madhavi -
Different units in total sum row
Hello Bex Experts,
I have orders with different Units in a report. currently the total sum row show * for Mix
How can I get the total sum for ST and KG like
Total Sum 366 KG
Total Sum 342 ST
BR MatthiasHi Matthias,
If you want to sum their numbers regardless of the UNITS, just use the NODIM() in formula..But if you need to add them and have 1 unit for the result, you must convert one of the them to another unit..
Regards,
Loed -
Displaying a total sum value in the af:table - footer
Hello everyone,
I have seen various threads on how to calculate a summary column based on a af:column in an af:table. I would like the value of this column to be displayed in the af:table -> footer (right undernead the af:column)
I'm having trouble putting together the pieces. This is the last requirement I have on this page, so hopefully I won't have to start all over.
Here this what I have:
I have created my page. (jspx) I did not create the page with a "backing bean". I have seen in various threads that the backing bean can be used to programmatically populate the table.
This is what I have done so far.
For the DataModel:
I have created my entity object, and I have a view assigned to the object. I assigned the view to my Application Module.
For the UserInterface:
On the layout, I dragged the instance of the view from the page definition. I created an af:table.
My questions/train of thought are:
I didn't create a "backing bean" when I first created my jspx page. From the various threads that I have seen, they all reference this. Can anyone explain how I can do this when the page has already been created? I'm using jdev version 10.1.3.3
Within the backing bean, I assume this is where I would then create a method that would do the "sum" of my column.
To display the column:
I would then create an af:output_text and drag it to theh table footer. The binding section
If anyone has a prior thread that I haven't found that can point me in the right direction with what I already I would really appreciate it.
ThanksKuba,
By creating a managed bean against the page definition, you are able to access the "iterator". The iterator is an object that is based off of hte View object (which the page is build off of)... From there, you can then loop through the rows and add them together to come up with the total sum.
You can then reference this method in the TEST.java class since it was created as a managed bean.
I believe I got the gist of it now... Coming from an Oracle Forms perspecitive, it is actually pretty similar. Now I understand what Managed Beans are used for. Thanks again for the great example.
Danny -
How to get total sum of big filtered table?
Hello
I'm using JDeveloper 11.1.1.3.0
I have an af:table with big data source (100 000 rows). The table have filters.
I want to display total count of the filtered rows and total sum by the one of column of the filtered rows in the footer of the table.
In my backing bean I can get a Map with all filter values:
Map<String, Object> filters = ((FilterableQueryDescriptor)table.getFilterModel()).getFilterCriteria();And, in this case, I may create the method for getting sum I need on my own.
In this method I may create SQL Query dynamically, because I have to process all filter values with different types
It is possible, but, maybe, there is a more easy way to do it?
AnatoliiHi, sanchezis
Code example.
In the jsp:
<af:column sortProperty="Sumv" sortable="true" filterable="false" align="end" width="125px"
headerText="#{bindings.TransactionView1.hints.Sumv.label}" id="c16">
<af:outputText value="#{row.Sumv}" id="qt4">
<af:convertNumber maxFractionDigits="2" minFractionDigits="2"/>
</af:outputText>
<f:facet name="footer">
<af:panelGroupLayout id="pg41" halign="right"
layout="vertical">
<af:outputText value="#{backing_reptransactions.tableTransactionTotalSumV}" id="ot44">
<af:convertNumber maxFractionDigits="2" minFractionDigits="2"/>
</af:outputText>
</af:panelGroupLayout>
</f:facet>
</af:column>In the backing bean:
public double getTableTransactionTotalSumV() {
DCIteratorBinding iter =
binding.findIteratorBinding("TransactionView1Iterator");
TransactionViewImpl vo = (TransactionViewImpl)iter.getViewObject();
return vo.getFilteredTotalSumV();
}In the ViewImpl (TransactionViewImpl) class.
public double getFilteredTotalSumV() {
double sumV = 0d;
DBTransaction dbTransaction = getDBTransaction();
ResultSet rs = null;
String query = "SELECT SUM(SumV) sumvtotal FROM (" + getQuery() + ")";
String str1 = "WHERE ROWNUM < :Bind_RangePage_High";
String str2 = "WHERE Z_R_N > :Bind_RangePage_Low";
int i = query.indexOf(str1);
if (i > 0) {
query = query.substring(0, i) + " " + query.substring(i + str1.length());
i = query.indexOf(str2);
if (i > 0) {
query = query.substring(0, i) + " " + query.substring(i + str2.length());
PreparedStatement st = dbTransaction.createPreparedStatement(query, 0);
try {
Object[] params = this.getWhereClauseParams();
int index = 0;
for (Object avalue : params) {
String key = (String)((Object[])avalue)[0];
if ((!key.equals("Bind_RangePage_High")) &&
(!key.equals("Bind_RangePage_Low"))) {
Object value = ((Object[])avalue)[1];
index++;
if (value instanceof Integer) {
st.setInt(index, (Integer)value);
} else if (value instanceof oracle.jbo.domain.Date) {
st.setDate(index,
((oracle.jbo.domain.Date)value).dateValue());
} else if (value instanceof java.sql.Date) {
st.setDate(index, (Date)value);
} else {
st.setString(index, (String)value);
rs = st.executeQuery();
if (rs.next()) {
sumV = rs.getDouble("sumvtotal");
} catch (SQLException e) {
throw new JboException(e);
} finally {
if (st != null) {
try {
st.close();
} catch (SQLException e) {
return sumV;
public long getFilteredTotalCount() {
return this.getEstimatedRowCount();
}But, you need to know that in the TransactionView in the "General" - "Tuning" I set up next values:
"All rows",
"As needed",
"Fill Last Page of Rows when Paging through Rowset",
"Passivate State(..."
Access Mode - "Range Paging Incremental"
Range Size - 160
Range Paging Cache Factor - 3
If you have other values, then your SQL request may be different, so, you will have to rewrite it.
I talk about
"WHERE ROWNUM < :Bind_RangePage_High",
"WHERE Z_R_N > :Bind_RangePage_Low",
if ((!key.equals("Bind_RangePage_High")) &&
(!key.equals("Bind_RangePage_Low")))If you have other solution, please, tell me.
Anatolii -
How to calculate the total sum value of a particular field that repeats
Hi All,
I have the following Req...File----Idoc Scenario
In the Inbound xml file i will get the Sales Order details with suppose 10 line items( 10 Orders)
Each line item represents one one SO. So totally i wil have 10 Sales Orders in this file.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Sales_Order xmlns:ns0="http://sap/Sales_Order">
<Header>
<COMP_CODE></COMP_CODE>
<DOC_TYPE></DOC_TYPE>
<SUPPL_VEND></SUPPL_VEND>
</Header>
<Item>
<ITEM></ITEM>
<MATERIAL></MATERIAL>
<PLANT></PLANT>
<QUANTITY></QUANTITY>
<Amount></Amount>
</Item>
In the above structure Item Segment will repeats as many no. of Sales Orders comes in a file.
In a file if there are 10 Orders means the Item segment wil repeats 10 times.
I have the Amount field in the Item Segment, each and every time that needs to be added to next Amount value that presents in the next Line Item.
Finally i will have the Another separate field caled Grand Total, and i have to get the total summation of the 10 values of the Amount field at last.
Can we achieve this using UDF or is there any way to do this
REgardsHi,
Do like this, actually in your case sum is taking place before the condition check for discount type
do a little change in mapping
DiscntType--removeContext--
EqulsS-------IfWithoutElse----Amount---removecontext--then---SUM-
Connstatnt(Value)
--->GrandAmount
Krishna, Check the same question asked by Rajesh in thread Calculate totals of segments that occur multiple times
Thanks! -
ABAP Dump while doing total(summing up)
Hello Experts
I have a report:
This program reads Sales Order and Delivery information. When i tried to sum the Order Quantity, an ABAP Dump is coming. Can anyone help me in correcting my Code?
Program looks like following and DUMP follows.
Global data declaration
TYPE-POOLS: slis.
TABLES: vbap, vbrk, vbfa, vbak, vbrp, konv, kna1, bkpf, bsad, bkpf_bsad,
knvv, pa0002, t005u, mvke, lips, likp, vbpa, vbep.
DATA: BEGIN OF i_list OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbap-posnr,
etenr like vbep-etenr,
matnr LIKE vbap-matnr,
erdat LIKE vbap-erdat,
mvgr1 LIKE mvke-mvgr1,
wadat_ist LIKE likp-wadat_ist,
days TYPE i,
werks LIKE vbap-werks,
lgort LIKE vbap-lgort,
kwmeng LIKE vbap-kwmeng," CH01+
lfimg LIKE lips-lfimg," CH01+
pstyv LIKE vbap-pstyv," CH01+
obd LIKE lips-vbeln," CH01+
obd_pos LIKE lips-posnr," CH01+
soldto LIKE vbaK-kunnr," JR+
shipto LIKE vbpa-kunnr," JR+
edatu like vbep-edatu," PR+
END OF i_list.
DATA: i_list2 LIKE i_list OCCURS 0 WITH HEADER LINE,
i_list3 LIKE i_list OCCURS 0 WITH HEADER LINE.
DATA: i_list4 LIKE vbap OCCURS 0 WITH HEADER LINE.
*ALV Output Header
DATA: gt_list_top_of_page TYPE slis_t_listheader,
prognm LIKE sy-repid,
gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
gt_events TYPE slis_t_event,
is_layout TYPE slis_layout_alv,
is_variant LIKE disvariant,
it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA:gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA:gt_outtab LIKE i_list OCCURS 0 WITH HEADER LINE.
DATA: g_repid LIKE sy-repid,
g_count LIKE sy-tabix.
SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME TITLE text-t01.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-t10.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-t11.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-t12.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK block0.
*/ Selection and Input Parameters
SELECTION-SCREEN BEGIN OF BLOCK blocko WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR vbap-vbeln, "SO
s_auart FOR vbak-auart DEFAULT 'KB' OBLIGATORY,
s_matnr FOR vbap-matnr," obligatory,
s_mvgr1 FOR mvke-mvgr1,
s_erdat FOR vbap-erdat OBLIGATORY,
s_werks FOR vbap-werks,
s_lgort FOR vbap-lgort,
s_edatu FOR vbep-edatu.
PARAMETERS: p_vkorg LIKE vbak-vkorg DEFAULT '5010'.
SELECTION-SCREEN SKIP 2.
+EC1
Addition +EC1
+EC1
PARAMETERS: p_vari LIKE disvariant-variant.
+EC1
End Addition +EC1
+EC1
SELECTION-SCREEN END OF BLOCK blocko.
+EC1
Addition +EC1
+EC1
DATA: g_save(1) TYPE c,
g_default(1) TYPE c,
g_exit(1) TYPE c,
gx_variant LIKE disvariant,
g_variant LIKE disvariant.
+EC1
End Addition +EC1
+EC1
Initialization fieldcatalog
INITIALIZATION.
PERFORM clear_tables.
g_repid = sy-repid.
PERFORM fieldcat_init USING gt_fieldcat[].
+EC1
Addition +EC1
+EC1
g_save = 'A'.
PERFORM variant_init.
Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
AT SELECTION-SCREEN.
PERFORM auth_check. "+ESC
PERFORM pai_of_selection_screen.
+EC1
End Addition +EC1
+EC1
START-OF-SELECTION.
PERFORM get_data.
PERFORM alv.
END-OF-SELECTION.
FORM get_data *
FORM get_data.
*CH01 - Added kwmeng(order qty) to selection, excluded rejects
*JR -added soldto and shipto code
SELECT avbeln aposnr amatnr aerdat awerks algort
akwmeng apstyv bkunnr cedatu
CH01+
INTO
(i_list-vbeln, i_list-posnr, i_list-matnr, i_list-erdat, i_list-werks,
i_list-lgort,
i_list-kwmeng , i_list-pstyv, i_list-soldto,i_list-edatu)
CH01+
FROM vbap AS a INNER JOIN vbak AS b ON avbeln = bvbeln
INNER JOIN vbep AS c ON avbeln = cvbeln
WHERE b~vkorg = p_vkorg
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND b~auart IN s_auart
AND a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~abgru = ''" CH01+
AND a~matnr IN s_matnr
AND c~edatu IN s_edatu.
APPEND i_list.
ENDSELECT.
COMMIT WORK AND WAIT.
SORT i_list BY VBELN POSNR EDATU.
DELETE ADJACENT DUPLICATES FROM i_list COMPARING vbeln posnr.
LOOP AT i_list.
SELECT SINGLE mvgr1 INTO i_list-mvgr1 FROM mvke
WHERE matnr = i_list-matnr.
MODIFY i_list.
CLEAR: i_list.
ENDLOOP.
COMMIT WORK AND WAIT.
LOOP AT i_list.
IF i_list-mvgr1 IN s_mvgr1.
CONTINUE.
ELSE.
DELETE i_list.
COMMIT WORK AND WAIT.
ENDIF.
ENDLOOP.
CH01 - commented these lines out and redid logic below
LOOP AT i_list.
select single vbeln into lips-vbeln from lips
where vgbel = i_list-vbeln
and vgpos = i_list-posnr.
select single wadat_ist into i_list-wadat_ist from likp
where vbeln = lips-vbeln.
SELECT b~wadat_ist INTO i_list-wadat_ist
FROM lips AS a INNER JOIN
likp AS b ON avbeln = bvbeln WHERE a~vgbel = i_list-vbeln
AND a~vgpos = i_list-posnr.
MODIFY i_list.
CLEAR: i_list, lips-vbeln.
ENDSELECT.
ENDLOOP.
CH01 - Changed to select multiple delivery lines & del qty
summing the total deliveries per OBD# and date
LOOP AT i_list.
SELECT avbeln sum( alfimg ) b~wadat_ist
INTO (i_list-obd , i_list-lfimg , i_list-wadat_ist)
FROM lips AS a INNER JOIN
likp AS b ON avbeln = bvbeln WHERE a~vgbel = i_list-vbeln
AND a~vgpos = i_list-posnr
AND a~pstyv = i_list-pstyv
group by avbeln bwadat_ist.
i_list2 = i_list.
APPEND i_list2.
ENDSELECT.
IF sy-subrc <> 0.
i_list2 = i_list.
APPEND i_list2.
ENDIF.
ENDLOOP.
i_list[] = i_list2[].
*End CH01
COMMIT WORK AND WAIT.
LOOP AT i_list.
IF i_list-wadat_ist IS INITIAL.
CONTINUE.
ELSE.
i_list-days = i_list-wadat_ist - i_list-erdat.
ENDIF.
MODIFY i_list.
CLEAR: i_list.
COMMIT WORK AND WAIT.
ENDLOOP.
COMMIT WORK AND WAIT.
LOOP AT i_list.
IF i_list-vbeln IS INITIAL.
DELETE i_list.
ENDIF.
ENDLOOP.
COMMIT WORK AND WAIT.
*JR
LOOP AT i_list.
SELECT SINGLE KUNNR INTO i_list-shipto FROM vbpa
WHERE vbeln = i_list-vbeln
AND parvw = 'WE'.
MODIFY i_list.
ENDLOOP.
*END JR
gt_outtab[] = i_list[].
COMMIT WORK AND WAIT.
ENDFORM.
FORM alv *
FORM alv.
PERFORM e03_eventtab_build USING gt_events[]. "+EC1
PERFORM e04_comment_build USING gt_list_top_of_page[]. "+EC1
prognm = sy-repid. "+EC1
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_user_command = 'USER_COMMAND'
i_callback_program = g_repid
it_fieldcat = gt_fieldcat[]
it_events = gt_events[] "+ESC
it_sort = it_sort[]
+EC1
Addition +EC1
+EC1
is_variant = g_variant
i_save = g_save
+EC1
End Addition +EC1
+EC1
TABLES
t_outtab = gt_outtab.
COMMIT WORK AND WAIT.
ENDFORM.
FORM fieldcat_init *
--> I_FIELDCAT *
FORM fieldcat_init
USING i_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
DATA: pos TYPE i VALUE 1.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'VBELN'.
ls_fieldcat-ref_tabname = 'VBAK'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'POSNR'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'MATNR'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'MVGR1'.
ls_fieldcat-ref_tabname = 'MVKE'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'WERKS'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'LGORT'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'ERDAT'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'WADAT_IST'.
ls_fieldcat-ref_tabname = 'LIKP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'DAYS'.
ls_fieldcat-ref_fieldname = 'DAYS'.
ls_fieldcat-seltext_s = '# Of Days'.
ls_fieldcat-seltext_m = '# Of Days'.
ls_fieldcat-seltext_l = '# Of Days'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*Begin CH01
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'KWMENG'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-outputlen = 7.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'LFIMG'.
ls_fieldcat-ref_tabname = 'LIPS'.
ls_fieldcat-outputlen = 7.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'OBD'.
ls_fieldcat-seltext_s = 'OBD'.
ls_fieldcat-seltext_m = 'Outbound Del'.
ls_fieldcat-seltext_l = 'Outbound Delivery'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'OBD_POS'.
ls_fieldcat-seltext_s = 'OBD Ln'.
ls_fieldcat-seltext_m = 'Outbound Del Ln'.
ls_fieldcat-seltext_l = 'Outbound Del Line'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*End CH01
*JR
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'SOLDTO'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-seltext_m = 'Sold To'.
ls_fieldcat-seltext_l = 'Sold To'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'SHIPTO'.
ls_fieldcat-ref_tabname = 'VBPA'.
ls_fieldcat-seltext_m = 'Ship To'.
ls_fieldcat-seltext_l = 'Ship To'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'ETERN'.
ls_fieldcat-ref_tabname = 'VBEP'.
ls_fieldcat-seltext_m = 'Schedule line number'.
ls_fieldcat-seltext_l = 'Schedule line number'.
ls_fieldcat-key = 'Schedule line number'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*END JR
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'EDATU'.
ls_fieldcat-ref_tabname = 'VBEP'.
ls_fieldcat-seltext_m = 'Requested Delivery date'.
ls_fieldcat-seltext_l = 'Requested Delivery date'.
ls_fieldcat-outputlen = 20.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*FOR ALV SORT & SUBTOTAL
CLEAR it_sort.
it_sort-spos = '0'.
it_sort-fieldname = 'VBELN'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '1'.
it_sort-fieldname = 'POSNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '2'.
it_sort-fieldname = 'MATNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '3'.
it_sort-fieldname = 'MVGR1'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '4'.
it_sort-fieldname = 'ERDAT'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '5'.
it_sort-fieldname = 'WADAT_IST'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-down = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '6'.
it_sort-fieldname = 'PERNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '7'.
it_sort-fieldname = 'VORNA'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '8'.
it_sort-fieldname = 'NACHN'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '9'.
it_sort-fieldname = 'VKGRP'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '10'.
it_sort-fieldname = 'VBELN'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '11'.
it_sort-fieldname = 'ERDAT'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '12'.
it_sort-fieldname = 'BEZEI'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
clear it_sort.
it_sort-spos = '1'.
it_sort-fieldname = 'BELNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
append it_sort.
ENDFORM.
+EC1
Addition +EC1
+EC1
*& Form VARIANT_INIT
text
--> p1 text
<-- p2 text
FORM variant_init.
CLEAR g_variant.
g_variant-report = g_repid.
ENDFORM. " VARIANT_INIT
FORM f4_for_variant *
FORM f4_for_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
it_default_fieldcat =
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
p_vari = gx_variant-variant.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
text
FORM pai_of_selection_screen.
IF NOT p_vari IS INITIAL.
MOVE g_variant TO gx_variant.
MOVE p_vari TO gx_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant.
g_variant = gx_variant.
ELSE.
PERFORM variant_init.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
+EC1
End Addition +EC1
+EC1
FORM e03_eventtab_build *
--> E03_LT_EVENTS *
FORM e03_eventtab_build USING e03_lt_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 = e03_lt_events.
READ TABLE e03_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 e03_lt_events.
ENDIF.
ENDFORM.
FORM e04_comment_build *
--> E04_LT_TOP_OF_PAGE *
FORM e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
*Report Title
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = text-007.
APPEND ls_line TO e04_lt_top_of_page.
**Doc Type Desc.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-008.
ls_line-info = p_matnr.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-009.
ls_line-info = p_werks.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-010.
ls_line-info = p_stlan.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-011.
ls_line-info = p_stlal.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-012.
ls_line-info = p_stlal.
append ls_line to e04_lt_top_of_page.
ENDFORM.
FORM top_of_page *
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page.
ENDFORM.
FORM auth_check *
FORM auth_check.
AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
ID 'VKORG' FIELD p_vkorg.
IF sy-subrc NE 0.
MESSAGE e054 WITH p_vkorg.
ENDIF.
ENDFORM. " auth_check
*& Form USER_COMMAND
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
PERFORM display_so_order USING r_ucomm
rs_selfield.
ENDCASE.
ENDFORM.
*& Form display_sales_order
text
-->P_R_UCOMM text
-->P_RS_SELFIELD text
FORM display_so_order USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE rs_selfield-sel_tab_field.
WHEN '1-VBELN'.
SET PARAMETER ID 'AUN' FIELD rs_selfield-value.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
WHEN '1-MATNR'.
SET PARAMETER ID 'MAT' FIELD rs_selfield-value.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
WHEN '1-OBD'.
SET PARAMETER ID 'VL' FIELD rs_selfield-value.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
WHEN OTHERS.
MESSAGE i000(z1) WITH 'Please Click on the Valid Selection'.
EXIT.
ENDCASE.
ENDFORM. " display_sales_order
FORM EDit_table *
-do_sum = 'C'.
009350 * save the actual grouplevel information
009360 gs_grouplevels = rs_grouplevels.
009370 clear g_lines.
009380
009390 * get number of lines of the collect table
009400 describe table rt_data lines g_lines.
009410 * if there is only one line or the field has no references so
009420 * that only the first line has to be considered
Contents of system fields
SY field contents..................... SY field contents.....................
SY-SUBRC 4 SY-INDEX 1
SY-TABIX 15 SY-DBCNT 1
SY-FDPOS 1 SY-LSIND 0
SY-PAGNO 0 SY-LINNO 1
SY-COLNO 1
Chosen variables
Name.......................... Contents.1........2........3....+....4
%_ARCHIVE
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 40
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 80
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 120
44444444
0000000
-FIELDNAME ETERN
CECDD4444444444444444444444444
535950000000000000000000000000
T_DATA 00004082920002000000 00
FFFFFFFFFFFFFFFFFFFF444444444444444444FF
0000408292000200000000000000000000000000
.. + 40 000000 00000000####### ########
FFFFFF444FFFFFFFF00000004444444400000000
000000000000000000000000000000000000000C
.. + 80 ####### 000000
000000044444444444444FFFFFF4444444444444
000000C000000000000000000000000000000000
.. + 120 00000000#
4444444F
0000000
S_DRAGDROP ####
444444444444444444444444444444440000
000000000000000000000000000000000000
000000000000000000000000000000000000
SY-SUBRC 4
0000
0004
SY-XPROG SAPCNVE
ECDCDEC444444444444444444444444444444444
2173555000000000000000000000000000000000
%_SPACE
0
0
SY-MSGID 0K
FD444444444444444444
02000000000000000000
%_PRINT 000
4444FFF444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 40
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 80 0 ########
4444444444F40000000044444444444444444444
0000000000000000000000000000000000000000
... + 120
44444444
0000000
SY-MSGNO 000
FFF
000
000
%_ITAB_MODIFY_LIST ###########################ø##Èø########
0000000000000000000000000007007700000000
0000000000000000000000004000004000000000
... + 40 ###################################Ø#²#0
0001000100010000FFFF00000000020000083E0F
0009000900090000FFFF04000002900000000A50
... + 80 ########################################
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
... + 120 ################################
00000000
0000000
SY-MSGV1
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 40
4444444444
0000000000
SY-MSGV2
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
... + 40
4444444444
0000000000
SY-MSGV3
4444444444444444444444444444444444444444
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
... + 40
4444444444
Hi Experts,
I tried with OUTPUT length, still Dump Persists, Any Ideas??
<b>Source code extract on the dump is:</b>
Thanks
SP
008930 gs_roid-row_id = rs_row-index * -1.
008940 endif.
008950 gs_roid-sub_row_id = rs_row-rowtype+7(10).
008960 gs_poid-row_id = gs_roid-row_id.
008970 gs_poid-sub_row_id = gs_roid-sub_row_id.
008980 gs_poid-rowtype = rs_row-rowtype.
008990 gs_poid-index = rs_row-index.
009000 insert gs_poid into table rt_poid.
009010 endif.
009020 append gs_roid to rt_roid.
009030
009040 loop at rt_fieldcat assigning <ls_fieldcat>
where tech ne 'X' and
009050
no_out ne 'X'.
009060
009070 if gflg_invisible = 'X'.
009080 if <ls_fieldcat>-do_sum is initial.
009090 clear gflg_invisible.
009100 continue.
009110 else.
009120 clear g_col_counter.
009130 clear gflg_invisible.
009140 endif.
009150 endif.
009160
009170 clear gs_lvc_data.
009180 clear g_style.
009190
009200 assign component
009200 assign component
009210 <ls_fieldcat>-fieldname of structure
rt_data to <g_field>.
009220 if sy-subrc ne 0.
> message x000(0k).
009240 endif.
009250
009260 g_col_counter = g_col_counter + 1.
009270
009280 gs_lvc_data-row_pos = r_row_counter.
009290 gs_lvc_data-col_pos = g_col_counter.
009300 gs_lvc_data-row_id = gs_roid-row_id.
009310 gs_lvc_data-sub_row_id = gs_roid-sub_row_id.
009320
009330 * Endtotal and average
009340 if rs_row-rowtype(1) ca 'T' and
<ls_fieldcat>-do_sum = 'C'.
009350 * save the actual grouplevel information
009360 gs_grouplevels = rs_grouplevels.
009370 clear g_lines.
009380
009390 * get number of lines of the collect table
009400 describe table rt_data lines g_lines.
009410 * if there is only one line or the field has
no references so
009420 * that only the first line has to be
considered -
Hello, How I can sum(code1). Every code1 has a group and every group's total (total_per) should be 100. I want to add the comments column in the result as well. Thanks.
create table #Cumulate (code numeric (10), code1 numeric (10), total_per numeric(10),code_desc char(20))
insert into #Cumulate values (1,121,10,'DHJ')
insert into #Cumulate values (2,121,90,'DHJ')
insert into #Cumulate values (3,121,10,'DHJ')
insert into #Cumulate values (4,122,10,'CRT')
insert into #Cumulate values (5,122,80,'CRT')
insert into #Cumulate values (6,122,05,'CRT')
insert into #Cumulate values (7,122,10,'CRT')
insert into #Cumulate values (8,123,10,'DRT')
insert into #Cumulate values (9,123,60,'DRT')
insert into #Cumulate values (10,123,10,'DRT')
insert into #Cumulate values (11,123,10,'DRT')
insert into #Cumulate values (12,123,10,'DRT')
insert into #Cumulate values (13,124,20,'DRT')
insert into #Cumulate values (14,124,60,'DRT')
insert into #Cumulate values (15,124,10,'DRT')
insert into #Cumulate values (16,124,10,'DRT')
insert into #Cumulate values (17,124,10,'DRT')
--Results
Code1 total_per Commments
121 100 Total is 100
122 105 Total is not 100
123 100 Total is 100
124 110 Total is not 100Try the below:
Select Code1, Sum(Total_per) total_per, 'Total is '+Case when Sum(Total_per)=100 then '' else ' not' end+'100' Comments
From
#Cumulate
Group by Code1
However, I would suggest you to do the comment session at presentation layer, which would be a good for performance.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
[Blog] -
Hi All.
I have Requirement to Calculate the Total Duration in OAF Table Style Region.
Check In
Check Out
Total Hours (HH:MM)
08:50:59
15:29:56
6:38
07::02:18
17:05:10
10:02
08:20:56
16:28:33
8:07
Total
24:47
If i Could not Able to Sum of 6:38+10:02+8:07=24:47 Due to VArchar2 as Display.
If i use Total (True) in Attribute it is through as sum 0.
Please Help me to Calculate the Duration Sum in OAF Page.
Regards
RamaYour question is not clear..
Provide CREATE tABLE and INSERT statements and expected output. Your DB version also.
What is the data type of the column RUNTIME?
And what does your calculation " avg((01:29:40+ 07:10:58)/14)" mean - what is the result of this?
Please read FAQ: {message:id=9360002} -
Sort on group total ( Sum of group)
I need to sort output either on the details and when the details are suppressed on the total of a group
If I suppress details and manually change sorting using
the designer and "Group Sort Expert", " For this group sort All based on Sum of table.column" gives me exactly what I need.
However, I need to switch this "Sort on Total" on and off programatically.
Tried to change or add a TopBottomNSortField programtically using RAS - with no success yet.
Am I using the correct approach at all ?
Using CR 2008 ( 12.3.0.601 ) on Windows, fat client
Thanks
Oskar
Edited by: Oskar Atkinson on Apr 15, 2011 1:05 AMI wonder if you should be looking at the Group itself (GroupNameFieldClass.Group property in the documentation). It has a SpecifiedGroupOptions property that you can specify the sorting criteria. Maybe try setting this in the designer and see if you can retrieve the sorting through your application and then try to change it if you can.
-
Smartform: total amount conversion to Japanese language
Hi all,
I am facing an issue in the smartform with the japanese language. The total amount which is calculated and dispalyed on the form is not translated to the japanese language. All the other quantity and value fields on which no manipulation is performed are successfully translated.
Like for 1 item the value is 1,000 JPY
2 item value is 1,000 JPY,
The total value GV_TOTAL = value of item 1 + value of item 2
Now this GV_TOTAL is displyed as 20.00 JPY
Can anyone help as to how can we display the Total value correctly on the form in japanese?
Thanks in advance.
Regards,
PakheeWhatever the Curreny you can convert the amount to the corresponding currency by using
WRITE <source>TO <dest>CURRENCY <currency field>.
This will ensure you always you are printing the total value with appropriate currency.
Thanks
Mani -
How to total sum of all low bid
CALCBTOT CALL LETTING VENDOR
70,526 001 97101502 M018
63,960 001 97101502 S201
72,289 001 97101502 S498
21,100 001 97102401 A620
19,129 001 97102401 B0020
36,000 001 97102401 H330
26,424 001 97102401 J0008
3,328,419 002 97102401 C470
3,426,462 002 97102401 C480
3,495,741 002 97102401 E110
0 003 97102401 M577
465,280 003 97102401 R0026
1,359,124 004 97102401 E130
1,365,660 004 97102401 P272
I would like sum the low bid from the above table. for example call 001 has 7 vendors submitted their bid. I just want to get the low bid out of the 7 vendors and add with the low bid with call number 002, 003 and 004. can you shed some light how I can do this.
thank youEdited by: 893601 on Nov 15, 2011 12:56 PMI did a running total kind of thing but I got the result is the same as Solomon.
/* Formatted on 11/15/2011 4:16:42 PM (QP5 v5.149.1003.31008) */
WITH sample_data AS (SELECT 70526 CALCBTOT,
001 CALL,
97101502 LETTING,
'M018' VENDOR
FROM DUAL
UNION ALL
SELECT 63960,
001,
97101502,
'S201'
FROM DUAL
UNION ALL
SELECT 72289,
001,
97101502,
'S498'
FROM DUAL
UNION ALL
SELECT 21100,
001,
97102401,
'A620'
FROM DUAL
UNION ALL
SELECT 19129,
001,
97102401,
'B0020'
FROM DUAL
UNION ALL
SELECT 36000,
001,
97102401,
'H330'
FROM DUAL
UNION ALL
SELECT 26424,
001,
97102401,
'J0008'
FROM DUAL
UNION ALL
SELECT 3328419,
002,
97102401,
'C470'
FROM DUAL
UNION ALL
SELECT 3426462,
002,
97102401,
'C480'
FROM DUAL
UNION ALL
SELECT 3495741,
002,
97102401,
'E110'
FROM DUAL
UNION ALL
SELECT 0,
003,
97102401,
'M577'
FROM DUAL
UNION ALL
SELECT 465280,
003,
97102401,
'R0026'
FROM DUAL
UNION ALL
SELECT 1359124,
004,
97102401,
'E130'
FROM DUAL
UNION ALL
SELECT 1365660,
004,
97102401,
'P272'
FROM DUAL)
SELECT TO_CHAR (low_bid, '$999,999,999') low_bid,
TO_CHAR (call, '009') call,
TO_CHAR (SUM (low_bid) OVER (ORDER BY call), '$999,999,999')
running_total
FROM ( SELECT MIN (CALCBTOT) low_bid, call
FROM sample_data
GROUP BY call)
ORDER BY call
LOW_BID CALL RUNNING_TOTAL
$19,129 001 $19,129
$3,328,419 002 $3,347,548
$0 003 $3,347,548
$1,359,124 004 $4,706,672 -
Hi all!
I am trying to grab a total of the COUNTS and SUM them together. I am trying to build a chart with graphics builder, but alas, that software has a 2000 character limit for its queries, so the inline view approach did not work. Here is my query:
SELECT
to_char(to_date(papf.attribute1, 'YYYYMMDD'), 'YYYY') Base_Entry_Year,
count(*)
-- SUM(count(*)) does not work
FROM
per_all_assignments_f paaf,
per_all_people_f papf,
per_jobs pj,
per_job_definitions pjd
WHERE
papf.person_id = paaf.person_id
AND paaf.ass_attribute14 IS NOT NULL
AND to_char(to_date(papf.attribute1, 'YYYYMMDD'), 'YYYY') IS NOT NULL
AND (papf.employee_number IS NOT NULL OR papf.person_type_id = 3)
AND paaf.job_id = pj.job_id
AND pj.job_definition_id = pjd.job_definition_id
AND pjd.segment1 NOT IN ('09140018', '09340006', '09140037', '09140051', '09140052', '09140054', '09140055')
GROUP BY
to_char(to_date(papf.attribute1, 'YYYYMMDD'), 'YYYY')
ORDER BY
to_char(to_date(papf.attribute1, 'YYYYMMDD'), 'YYYY')
Any ideas on how I can accomplish this? Thanks!
SteveHi,
I ran two different queries:
1.
select KeyCol, count(*), Sum(count(*)) over ()
from Test t
group by t.KeyCol ;
Result:
KEYCOL COUNT SUM(COUNT(*))OVER()
1 DHP 398 5505
2 FIH 1 5505
3 FIN 2971 5505
4 FLP 5 5505
5 HTBC 1 5505
6 Z99 22 5505
7 2107 55052.
select KeyCol, count(*), count(*) over ()
from test t
group by KeyCol;
Result:
KEYCOL COUNT COUNT(*)OVER()
1 DHP 398 7
2 FIH 1 7
3 FIN 2971 7
4 FLP 5 7
5 HTBC 1 7
6 Z99 22 7
7 2107 7This shows that both queries are not equivalent.
Thanks,
Dharmesh Patel
Maybe you are looking for
-
How to change sap-language parameter at runtime
Hi I want to create a Change Language button on an webdynpro Application. I know that the parameter is determined during url creation, but i need the to give the user the posibility of changing the language without closing the browser and logging out
-
JDODataStoreException: The instance null does not exist in the data store
I'm unable to figure out how this exception occurs. I have a class IDCounter which has a number of fields such as 'm_Name' (String) 'm_AccountName' (String) 'm_UserName' (String) 'm_Description' (String) 'm_CreationDate' (Date) 'm_LastModifiedDate' (
-
Automatic Post Goods Issue Of Stock Transport Order
Here is the scenario: We are using stock transport order to logically move inventory from one company to another company inside the same physical location. The material# is the same but the plant# is different. Process is as follows: Associate enters
-
In Debtors Trial Balance Report single customer only displaying
When i run the India - Debtors Trial Balance Report the Parameter Customer LOV its showing only single customer..
-
I'm editing my photos on a MacBook Air and then photostreaming. On my iMac, I get the photos in Photo Stream, where they cannot be changed. I've set the Photo Stream preferences to "automatically import to Library" - but that does not happen. How can