Sum hidden fields in web dynpro ALV reports
Hi everyone
Could anyone tell if it is possible to sum a field that is hidden in an ALV Report in Web Dynpro?
I need to hide a row so as not to be seen by the user (like the filter option) but with the need that the value that is stated in that hidden row must still impact in the Column Total.
Thanks!
Fede
Hi everyone
Could anyone tell if it is possible to sum a field that is hidden in an ALV Report in Web Dynpro?
I need to hide a row so as not to be seen by the user (like the filter option) but with the need that the value that is stated in that hidden row must still impact in the Column Total.
Thanks!
Fede
Similar Messages
-
Input field in Web Dynpro ALV does not have correct focus
Hello Friends,
Our client's SAP system is recently upgraded with ECC 6.0 SP 18.
After that the focus in the editable field of Web Dynpro ALV does not working properly by down arrow navigation.
The common scenario:
The ALV has more than one rows and one column is editable...
when user is selecting field of first row and making some entries...
after that pressing down arrow it is going to next row and coloring the field like focusing...
but the 'cursor' is not blinking so user can not make entry without clicking by mouse...
this was working Ok before upgrade...
Could you please anyone have a look and propose a suitable solution?
Thanks
KrishHello,
The problem was with Javascript....which play an important role in layout of web dynpro ALV...
which resides in MIME repository -> SAP ->PUBLIC - >BC ->NW5 ->JS ->SAPURI_Ie6....
We wrote to SAP for giving us the fix...
after we got a new file from SAP the problem is solved...
also we have to clear server cache through SMICM and client cache...
Thanks.
K. -
Aut. cursor jump to next cell/field in Web Dynpros ALV
Hi all
How do I get the cursor in a cell to jump automatically to the next cell when the user enters the last character?
Any help is greatly appreciated.
Regards
Lars RomerHere is the sample code for auto tabing.
You can use as per you need where ever you wanted. Reward & close the thread if its helpful.
<!-- TWO STEPS TO INSTALL AUTO TAB:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form<i> == input)index = i;
else i++;
return index;
return true;
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form>
<table>
<tr>
<td>Phone Number : <br>
1 - (
<small><input onKeyUp="return autoTab(this, 3, event);" size="4" maxlength="3"></small>) -
<small><input onKeyUp="return autoTab(this, 3, event);" size="4" maxlength="3"></small> -
<small><input onKeyUp="return autoTab(this, 4, event);" size="5" maxlength="4"></small>
</td>
</tr>
<tr>
<td>Social Security Number : <br>
<small><input onKeyUp="return autoTab(this, 3, event);" size="4" maxlength="3"></small> -
<small><input onKeyUp="return autoTab(this, 2, event);" size="3" maxlength="2"></small> -
<small><input onKeyUp="return autoTab(this, 4, event);" size="5" maxlength="4"></small>
</td>
</tr>
</table>
</form>
</center> -
How to Email POWL Reports / Apply Web Dynpro ALV Table Layout Settings
Hi all,
we want to be able to automatically extract POWL reports and email them to users in a batch job.
We can refresh a POWL report using FM POWL_QUERY_REFRESH, and access the raw report data using method CL_POWL_QUERY_ACCESSOR=>GET_CACHED_RESULTS.
However this merely gives us a table of raw data. No view layout (ie. Web Dynpro ALV table layout) settings have been applied, so there is no hiding or arranging of columns, row sorting, calculations or filters.
Ideally we would like to be able to specify a query and view layout. The batch job would then refresh and extract the data, and format the data according to the view layout before sending it on as an attachment in an email.
Does anyone know how to determine and apply Web Dynpro ALV table layout settings to format table data outside of the Web Dynpro environment ?
Thanks & regards,
GroganHi Grogan,
Did you find out how this works..i also have the same issue.
Thanks
Jdsouza -
Hi,
I have created an application that uses a web dynpro alv grid. I want to display totals - is there a setting that can do this automatically - if so, can you please tell me how to do this? Thanks,Hi
You can take help of following code snippet to create totals for a particular column
Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column TYPE REF TO cl_salv_wd_column,
lt_column type salv_wd_t_column_ref,
ls_column type salv_wd_s_column_ref.
Data: lr_field_amnt type REF TO CL_SALV_WD_FIELD.
* get reference of ALV component
lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
* get function settings
lr_function_settings ?= wd_this->alv_config_table.
* display columns in correct order
lr_column_settings ?= wd_this->alv_config_table.
lt_column = lr_column_settings->get_columns( ).
loop at lt_column into ls_column.
CASE ls_column-id.
when 'AMOUNT'
* aggregate field
CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
EXPORTING
FIELDNAME = 'AMOUNT'
RECEIVING
VALUE = lr_field_amnt.
* create aggregate rule as total
CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
EXPORTING
AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
RECEIVING
VALUE = lv_aggr_rule.
endcase.
Regards
Manas DUa -
Web Dynpro ALV vs. Table
Hello,
can u please describe the main differences between Web Dynpro ALV and Web Dynpro Table ?
When do I choose which component for my applications ?
Thanks in adavance
Best regards
hermannhHi,
SAP List Viewer (ALV) is a tool which is used to display lists and tabular structures and provides a lot of flexibilty for report generation.
Flexible in the sense , it has a lot of inbuilt functionalities which are used in general in a reporting and thus helps in reducing a large amount of coding.
for eg: <code> CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'YCLII_CUST_STRU'
CHANGING
it_outtab = CUST_TAB
<code>
The above method is used for table generation. Mny more funtionalities such as sorting and re-arranging of result output is also available.
for further info check this link.
http://www.sap-img.com/abap/what-is-alv-programming.htm
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/f0b107e4-dc72-2c10-08a7-b822c9abf0e2
Thanks -
How to get sum for each currency's in ALV Report
Hi,
A column has amounts with various currency's.
May I know how to get sum quantity for each currency in ALV Report?
Thanks in advance.Hi,
Currency value column should have reference to currency code column.
Regards,
Wojciech -
Adding a field in Web dynpro java in Travel Request application
Hi All,
How to add a field in Web dynpro java in Travel Request application or can we copy the Web dynpro java application to Web dynpro ABAP and add a field. Experts, Can you please suggest me step by step in resolving the problem.
Thanks & Regards,
KumarHi Kumar,
First, in order to customise the ESS webdynpro Java iViews you need to be aware that, you are about to change the SAP standard iviews. In order to avoid this you can make a copy of the SAP standard one's and then try to customise the copied one's.
Now, you should have NetWeaver Development Infrastructure(NWDI) installed. Once it is installed you should also install the Netweaver Developer Studio (NWDS) on your computer.
Once you have these two installed, you should deploy the ESS Business Package onto the NWDI by creating tracks. There is a cookbook available on SAP Service Marketplace for configuring NWDI for ESS.
Once you have all the above mentioned tools, have a look at the following blog which clearly explains about the procedure of customising ESS iviews.
/people/vinoth.murugaiyan/blog/2007/08/24/essmss-customization-150-make-it-simple
Also check the following Wiki, this might be useful!
https://www.sdn.sap.com/irj/scn/wiki?path=/display/erphcm/employee%252bself%252bservice
I hope this helps. Let me know if you have any issues.
Dont forgett to contribute points if this is useful! All the Best.
Regards,
PG -
Clear/refresh(F5) fields in web dynpro application view
How to clear or refresh(F5) fields in web dynpro application abap while redirecting to another view? I have tried using "context_node->invalidate()" but it's not working for all the fields, some are getting initialised and some not. Is there any other method to refresh all the fields in the view all at once. Please guide.
Hi,
For the Context node( to which the drop down is bound) create a supply function as shown below:
Now populate the drop down in supply function method instead of WDDOINIT method.
Go to methods tab and write the below code in supply function method:
DATA lo_nd_drop TYPE REF TO if_wd_context_node.
DATA lt_drop TYPE wd_this->elements_drop.
DATA ls_drop TYPE wd_this->element_drop.
*Fill Drop down
ls_drop-val = 'ABC'.
APPEND ls_drop to lt_drop.
ls_drop-val = 'DEF'.
APPEND ls_drop to lt_drop.
* bind all the elements
node->bind_table(
new_items = lt_drop
set_initial_elements = abap_true ).
Now once you call invalidate( ) the drop down will automatically be initialized( since the supply function will be called again) And you don't have to write the code again to populate the drop down.
hope it's clear now.
Regards,
Kiran -
How to create field catalog using field-symbols in normal alv report?
hi all,
how to create field catalog using field-symbols in normal alv report? i.e, using function modules...reuse_alv_list_display/grid_display?
regards,
jackHI
LIKE THIS
TYPE-POOLS : slis.
DATA : t_fieldcat TYPE slis_t_fieldcat_alv,
st_fieldcat TYPE slis_fieldcat_alv.
st_fieldcat-fieldname = 'STATUS'.
st_fieldcat-seltext_l = 'STATUS INDICATOR'.
st_fieldcat-outputlen = 17.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'VBELN'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Sales Document No.'.
st_fieldcat-outputlen = 10.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'AUDAT'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Document Date'.
st_fieldcat-outputlen = 10.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'VBTYP'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Document Type'.
st_fieldcat-outputlen = 4.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'AUART'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Category'.
st_fieldcat-outputlen = 1.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'AUGRU'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Reason'.
st_fieldcat-outputlen = 3.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'NETWR'.
st_fieldcat-do_sum = 'X'.
st_fieldcat-seltext_l = 'Net Amount'.
st_fieldcat-outputlen = 15.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'WAERK'.
st_fieldcat-do_sum = ' '.
st_fieldcat-seltext_l = 'Unit'.
st_fieldcat-outputlen = 5.
APPEND st_fieldcat TO t_fieldcat.
CLEAR st_fieldcat.
*sortinfo
st_sort-fieldname = 'AUART'.
st_sort-up = 'X'.
st_sort-subtot = 'X'.
APPEND st_sort TO t_sort.
CLEAR st_sort.
st_sort-fieldname = 'VBTYP'.
st_sort-up = 'X'.
st_sort-subtot = ' '.
APPEND st_sort TO t_sort.
CLEAR st_sort.
st_sort-fieldname = 'WAERK'.
st_sort-up = 'X'.
st_sort-subtot = 'X'.
APPEND st_sort TO t_sort.
CLEAR st_sort.
st_sort-fieldname = 'VBELN'.
st_sort-up = ' '.
st_sort-subtot = 'X'.
APPEND st_sort TO t_sort.
CLEAR st_sort.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_eventcat
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF grid = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = g_program
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = t_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = t_sort
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_final
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.
REWARD IF USEFULL -
Web Dynpro ALV grid column colour
Hi,
I have tried to set the colour of a column for my web dynpro alv with the below code but it the colour for this column has not changed - it seems to remain the standard colour. Is there something else i need to do?
DATA: lt_columns TYPE salv_wd_t_column_ref
, ls_columns TYPE salv_wd_s_column_ref
, lr_column TYPE REF TO cl_salv_wd_column
lt_columns = lo_value->if_salv_wd_column_settings~get_columns( ).
LOOP AT lt_columns INTO ls_columns.
IF ls_columns-id CS 'TOTAL_'.
lr_column = ls_columns-r_column.
lr_column->set_cell_design( cl_wd_abstr_master_table_col=>e_cell_design-positive ). "CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL1
ENDIF.
ENDLOOP.Hi Samir,
You will have to create an attribut WDUI_TABLE_CELL_DESIGN and bind this attribute with the cell design property of the column. Check this wiki link [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Web%20Dynpro%20ALV%20-%20Change%20Cell%20Colour%20based%20on%20Content], it will solve your issue.
Regards,
Radhika. -
hI,
i HAVE a requirement to add extra 2 columns in web dynpro alv of standard web dynpro component
what are the steps to be taken.Hi Madhav,
Please cehck Thomus answer in this thread..
is possible to enhance standard ALV?
Enhancement Implementation - Removing columns in standard ALV table
Cheers,
Kris. -
Web Dynpro ALV grid filter on date
Hi,
I want to set a "view" on my web dynpro alv grid that uses the current date. Is there a way to specify the current date in the filter values? Thanks,
SamirThanks Thomas. I will certainly look into using POWL in the future.
A related question - Its possible to use a filter by entering something like " .01. " but it doesnt seem to allow me to save that value as its not a date. Is there any way around this? Thanks -
Web Dynpro ALV grid sub totals
Hi,
I have managed to get totals working with web dynpro ALV using code like this :
DATA: lr_field TYPE REF TO cl_salv_wd_field.
For total calculations...
lo_value->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).
lr_field = lo_value->if_salv_wd_field_settings~get_field( 'N_OF_DLRS' ).
lr_field->if_salv_wd_aggr~create_aggr_rule( aggregation_type = if_salv_wd_c_aggregation=>aggrtype_total ).
Please can someone advise how i can do subtotals also. Thanks
Edited by: Samir Vora on Jul 15, 2009 12:40 PMHi,
For creating subtotals, you can have a look at following article:
[Tutorial for Creation Subtotals using ALV|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20abap/tutorial%20for%20creating%20totals%20and%20subtotals%20using%20alv.pdf].
Hope this helps.
Regards
Manas Dua -
Web Dynpro ALV grid equivalent of onLeadSelect
Hi,
I am new to web dynpro alv and would like to know how to implement the equivelent of the action onLeadSelect that you can do with a table UIElement, but I want to do this for the ALV table that I have. Many thanks,
SamirHi,
Go to the View's property tab and include you ALV in that.
whenever you instantiate the ALV then in the view, METHODS tab, you can find the Event handler for the lead selection for that ALV. Implement that.
Method name Method type Event
ONLEADSELECT Eventhandler ON_LEAD_SELECT
Check out the links -
Re: click event on ALV
http://www.flickr.com/photos/31042772@N08/3408386623/
Regards,
Lekha
Maybe you are looking for
-
If my battery on my screen is an x what do i do
what do i do if my battery is an x on my sreen and it wont turn on on the back but sometimes it goes green and then off
-
I was looking at my most recent bill and noticed that there was a $9.99 charge on one of our lines for "Premium Messaging." I pulled up last month's bill and the noticed that the charge was there as well. I called Verizon and asked the customer rep
-
Lightroom 2.1 Auto import file naming adding -1
I have used lightroom's (2.1) auto import function on 5 separate shoots with no problem. On my last shoot lightroom has been adding a "-1" to the file name. I am using "Custom name - Original File". So what used to be "Jen-1007" is now "Jen-1-1007",
-
hi... am developing an application where i am using kxml parser. am using j2me wireless tool kit and palm emulator. while i try to compile my code in the tool kit, it gives error saying : c:\WTK104\apps\XMLTest\src\XMLTest.java:5: package org.kxml do
-
end I purchased the full version and now all the products won't work they tell me I need a serial number to register them, so I decided to delete all the applications and see if i could download them again from my account now the new application mang