Moving Scroll bar in ALV?
Hi,
Is it possible to move scroll bar in ALV table programatically, if i have more fields?
Thanks,
GS
Hi Sathish,
I think you can try have a workaround by using the following method of class
CL_SALV_WD_CONFIG_TABLE~IF_SALV_WD_TABLE_SETTINGS~SET_FIRST_VISIBLE_ROW
It takes Integer as input for Row Number to be displayed as first row. So put your coding within a button up on pressing which you want the scrolling to take place. I however haven't tried it out myself ever...
Regards,
Uday
Similar Messages
-
Hi Ppl,
I am using REUSE_ALV_COMMENTARY_WRITE to display top of page in ALV. The issue is i want to restrict the top-of-page height.
As of now if i have 10 lines to print...the top-of-page comes with 10 lines in display.
But i want some (say 4 or 5) to be visible with scroolbar and rest can be viewed by use of the scroll--bar movement!!
Any soln?? Please reply
Regards,
Santosh!!Hi Santosh,
I am not sure if that is possible by using FM approach. - REUSE_ALV_COMMENTARY_WRITE
But yes its possible if you are using Docking Container. with split container approach. ie. OOPs .
Refer sample code.
Constants Declaration
CONSTANTS: c_x TYPE c VALUE 'X',
c_mode TYPE char1 VALUE 'O',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_error_log TYPE tabname VALUE 'ZERROR_LOG',
c_succ TYPE iconname VALUE '@01@', "#EC *
c_fail TYPE iconname VALUE '@02@',
c_object TYPE emg_object VALUE 'PARTNER'," Legacy obj
c_opbuk TYPE opbuk_kk VALUE 'UK01',
c_split TYPE c
VALUE cl_abap_char_utilities=>horizontal_tab,
c_path TYPE char100
VALUE '/local/data/interface/A28/DM/OUT'.
*Variables Declaration
DATA: flg_pre TYPE c, " Flag - Presentation browse
flg_x TYPE c,
cnt_total TYPE char8, " Total Records processed
cnt_success TYPE char8, " Total Records success
cnt_failed TYPE char8, " Total Records failed
cnt_repeat TYPE char8.
*-- ALV Grid data declaration
CLASS v_lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_print_top_of_page FOR EVENT print_top_of_page OF
cl_gui_alv_grid,
handle_top_of_page FOR EVENT top_of_page OF
cl_gui_alv_grid.
ENDCLASS. "o_lcl_event_receiver DEFINITION
ALV Data declaration
DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
o_split TYPE REF TO cl_gui_easy_splitter_container,
o_dockingcontainer TYPE REF TO cl_gui_docking_container,
<b> o_container_top TYPE REF TO cl_gui_container,
o_container_bot TYPE REF TO cl_gui_container,
o_html TYPE REF TO cl_dd_document,</b> o_event_receiver TYPE REF TO lcl_event_receiver,
ok_code LIKE sy-ucomm,
i_fieldcat TYPE lvc_t_fcat,
wa_fieldcat TYPE lvc_s_fcat,
wa_layout TYPE lvc_s_layo.
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
*-- Top of Page
METHOD handle_print_top_of_page.
ENDMETHOD. "handle_print_top_of_page
METHOD handle_top_of_page.
ENDMETHOD. "handle_top_of_page
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
*-- ALV List data declaration
DATA: i_field_cat1 TYPE slis_t_fieldcat_alv,
w_lay_out1 TYPE slis_layout_alv,
w_field_cat TYPE slis_fieldcat_alv,
i_events1 TYPE slis_t_event,
w_event TYPE slis_alv_event,
w_print TYPE slis_print_alv.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STANDARD'.
SET TITLEBAR 'TITLE'.
*-- Create Instances
PERFORM f0040_create_object.
*-- Create Field catalog
PERFORM f0050_field_catalog
TABLES i_fieldcat
USING c_error_log.
*-- Modify Field Catalog
PERFORM f0060_modify_fldcatalog
TABLES i_fieldcat.
*-- Set ALV Layout
PERFORM f0070_layout.
*-- Generate ALV Grid
PERFORM f0080_display_list
TABLES i_error
i_fieldcat
USING wa_layout.
ENDMODULE. " STATUS_0100 OUTPUT
*& Form f0040_create_object
FORM f0040_create_object .
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
*-- Create Container
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = '95'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc NE 0.
MESSAGE i000 WITH text-013. " Error in object creation
LEAVE LIST-PROCESSING.
ENDIF.
*--Create Splitter Container
CREATE OBJECT o_split
EXPORTING
parent = o_dockingcontainer
sash_position = 20
with_border = 0
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
*--Get the containers of the splitter control
o_container_top = o_split->top_left_container.
o_container_bot = o_split->bottom_right_container.
ENDIF.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_container_bot.
*-- Print Top of Page
PERFORM f0041_top_of_page.
ENDFORM. " f0040_create_object
<b>&----
*& Form f0041_top_of_page</b>
FORM f0041_top_of_page .
DATA: lws_text TYPE sdydo_text_element.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
*-- Object for HTML top container
CREATE OBJECT o_html
EXPORTING style = 'ALV_GRID'
background_color = 35.
*-- Top of Page
CALL METHOD o_alvgrid->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_html.
*-- Total Record Text
CALL METHOD o_html->add_text
EXPORTING
text = text-014
sap_emphasis = text-017.
CALL METHOD o_html->add_gap
EXPORTING
width = 8.
**-- Total record Value
lws_text = cnt_total.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = text-017.
CLEAR lws_text.
CALL METHOD o_html->new_line
EXPORTING
repeat = 1.
**-- Total Success text
CALL METHOD o_html->add_text
EXPORTING
text = text-015
sap_emphasis = text-017
fix_lines = c_x.
CALL METHOD o_html->add_gap
EXPORTING
width = 12.
lws_text = cnt_success.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = text-017
fix_lines = c_x.
CLEAR lws_text.
CALL METHOD o_html->new_line
EXPORTING
repeat = 1.
*-- Total Failed text
CALL METHOD o_html->add_text
EXPORTING
text = text-016
sap_emphasis = text-017
fix_lines = c_x.
CALL METHOD o_html->add_gap
EXPORTING
width = 16.
lws_text = cnt_failed.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = text-017
fix_lines = c_x.
CLEAR lws_text.
*-- Display Report Header
<b> CALL METHOD o_html->display_document
EXPORTING
parent = o_container_top.</b>
ENDIF.
ENDFORM. " f0041_top_of_page
*& Form f0050_field_catalog
FORM f0050_field_catalog TABLES p_fieldcat STRUCTURE lvc_s_fcat
USING value(p_structure).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_structure
CHANGING
ct_fieldcat = p_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i000(zo_spa) WITH text-017.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " f0050_field_catalog
*& Form f0070_layout
FORM f0070_layout .
wa_layout-zebra = c_x.
wa_layout-cwidth_opt = c_x.
ENDFORM. " f0070_layout
*& Form f0080_display_list
FORM f0080_display_list TABLES p_output
p_fieldcat
USING value(p_layout).
*-- Display Report
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = p_layout
CHANGING
it_outtab = p_output[]
it_fieldcatalog = p_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i000(zo_spa) WITH text-022. " Error in Displaying
LEAVE LIST-PROCESSING.
ENDIF.
**-- Create Event object
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_print_top_of_page
FOR o_alvgrid.
ENDFORM. " f0080_display_list
*& Module USER_COMMAND_0100 INPUT
MODULE user_command_0100 INPUT.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'EXIT' OR 'CANC'.
PERFORM f4000_free_objects:
USING o_alvgrid 'ALV' text-031,
USING o_dockingcontainer 'DOCKING' text-032.
LEAVE PROGRAM.
WHEN 'BACK'.
PERFORM f4000_free_objects:
USING o_alvgrid 'ALV' text-031,
USING o_dockingcontainer 'DOCKING' text-032.
SET SCREEN '0'.
LEAVE SCREEN.
WHEN OTHERS.
PERFORM f4000_free_objects:
USING o_alvgrid 'ALV' text-031,
USING o_dockingcontainer 'DOCKING' text-032.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form f4000_free_objects
FORM f4000_free_objects USING pobject
value(ptype)
value(ptext) TYPE c.
DATA: lo_objectalv TYPE REF TO cl_gui_alv_grid.
CASE ptype.
WHEN 'ALV'.
lo_objectalv = pobject.
IF NOT ( lo_objectalv IS INITIAL ).
CALL METHOD lo_objectalv->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lo_objectalv.
PERFORM f4010_error_handle USING ptext.
ENDIF.
WHEN 'DOCKING'.
DATA: lo_objectdock TYPE REF TO cl_gui_docking_container.
lo_objectdock = pobject.
IF NOT ( lo_objectdock IS INITIAL ).
CALL METHOD lo_objectdock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lo_objectdock.
PERFORM f4010_error_handle USING ptext.
ENDIF.
WHEN OTHERS.
sy-subrc = 1.
PERFORM f4010_error_handle
USING text-031.
ENDCASE.
ENDFORM. " f4000_free_objects
*& Form f4010_error_handle
FORM f4010_error_handle USING value(ptext) TYPE c.
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-031
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
ENDFORM. " f4010_error_handle
Reward points if this Helps.
Manish -
Regarding Horizontal Scroll bar in ALV
Hi Experts,
I am using FM " Reuse_alv_grid_display" to dsplay the output. But defaultly it is not showing all the output in single view .I have large no of columns to show up.horizontal scroll bar is not set up defaultly.
I would like to use CL_GUI_ALV_GRID->SET_HORIZONTAL_SCROLLBARS method
is this is the right way to do it ? suggest best and simple way to do it.
regards
Vishnuhi,
there was exception raised "raise exception type cx_salv_not_found"
i have used the fallowing code:
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = INT_FINAL ).
DATA: lr_columns TYPE REF TO cl_salv_columns_table,
lr_column TYPE REF TO cl_salv_column_table.
lr_columns = gr_table->get_columns( ).
lr_columns->set_optimize( gc_true ).
lr_column ?= lr_columns->get_column( 'SYMBOL' ).
lr_column->set_symbol( if_salv_c_bool_sap=>true ).
lr_column->set_long_text( 'SYMBOL' ).
gr_table->display( ).
Please let me know how to proceed
regards
vishnu -
Moving scroll bar programmatically?
hi.. i have an AS class that extends a panel... then i add a
component to it which zooms out and moves to a certain position
which means that i need the scroll bar to move along. however, even
if i set the horizontalScrollPosition, the scroll bar still stays
at the 0-position. any help would be appreciated. thanks!here are some more details... the mxml file contains the
following structure:
<canvas>
<vbox>
<vbox />
<canvas />
<vbox />
</vbox>
</canvas>
this is instantiated inside a draggable panel during
runtime... then, afterwards, the inner canvas is zoomed out and,
supposedly, centered. -
I open my illustrator file (version CS3), put my mouse/select tool over the graphics/page and the scroll bar moves itself (and my graphics) quickly across the whole width of the page to the left. When I remove my mouse arrow out of the page and on to the desktop it stops scrolling. I have unplugged the keyboard, mouse and wacom tablet and tried them all separately and the fault happens with eveything. I am unable to work on my graphics as it just flies off the page every time I go into it.
Does this sound familiar to anyone - any ideas?keystroke "end" using command down
Since you quote "end" this will send the specific keys 'e', 'n' and 'd' in sucession, each with the command key - i.e. Command-e, Command-n, Command-D. No wonder it doesn't work
What you need to do is use the specific key codes for the arrow keys since you can't type them directly into your script:
tell application "TextExit" to activate
tell application "System Events"
key code 125 using command down
end tell
123 - left arrow
124 - right arrow
125 - down arrow
126 - up arrow -
ALV top-of-page remove scroll bar
Hi!
In my ALV i have a header with some information and a logo. With the logo it creates a vertical scroll bar. I can't reduce the size of the logo because it as to be that size.
So...i've been searching for some way to remove the scroll bar from the header, butt i didn't found anything that could help me.
I'm using 'REUSE_ALV_GRID_DISPLAY' with i_callback_top_of_page = 'TOP-OF-PAGE'. And in form top-of-page i use
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header
i_logo = 'LOGO'.
to call the logo.
Is there a way to remove or set the header to a fix size?
Thanks in advance,
RTHi!
In my ALV i have a header with some information and a logo. With the logo it creates a vertical scroll bar. I can't reduce the size of the logo because it as to be that size.
So...i've been searching for some way to remove the scroll bar from the header, butt i didn't found anything that could help me.
I'm using 'REUSE_ALV_GRID_DISPLAY' with i_callback_top_of_page = 'TOP-OF-PAGE'. And in form top-of-page i use
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header
i_logo = 'LOGO'.
to call the logo.
Is there a way to remove or set the header to a fix size?
Thanks in advance,
RT -
Component on page not moving as vertical scroll bar is moved
All -
I have a mxml page that is a mx:Application. This page basically consists of a VBox
and a number of components included within that VBox. All but 1 of the components
within this VBox are built-in flex components. The one component that is not a built-in
flex component is the one that is causing me issues. The issue is happening when I run
the application, once running the vertical scroll bar appears on the right-hand side of the
page (as expected because I have quite a few items in my VBox). The problem is that as
I drag the vertical scroll bar from the top of the page to the bottom of the page, the custom
component within my VBox that I built is staying put (it's not moving with respect of the
movement of the vertical scroll bar). All of the built-in flex components that are within my
VBox are moving with respect of the movemnet of the vertical scroll bar as expected.
I appreciate any information that you can provide that will lead me in the right direction,
Thank you,
Wes// THIS IS THE CUSTOM COMPONENT
-
Scroll bar moved layout slightly to left
If content on ALL of my site either did or didn't require a scroll bar, the transitions when clicking from page to page would all look smooth. Unfortunately I have some pages that are short (and so the browser displays no display bar) and other pages that are long, and when the scroll bar appears, my content gets moved slightly to the left. I suppose I could just keep adding a bunch of new paragraphs at the bottom of my short pages until a scroll bar appears, but this problem is bugging me. I'd like to fix it the real way. To visualize this problem see attached pictures below.
And here's some of the code that I think is relevant to my issue here.
body {
background-attachment: fixed;
background-image: url(images2/palisades.jpg);
background-repeat: no-repeat;
background-color: #000000;
background-position: center left;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
margin: 0;
padding: 0;
.header {
width: 1000px;
margin-left: auto;
margin-right: auto;
height: 50px;
Below: the scroll bar pushes content slightly to the left.Actually, this one looks pretty simple.
The first page shown is long enough to need a vertical scrollbar. When that scroll bar kicks on, the actual width of the page changes slightly, so the content (which appears to be centered) will shift to the left when the scroll bar appears.
If it really bothers you (most visitors would never notice it) you can add a scroll bar to every page on your site (the pages that don't need it will pop up with a grayed out bar that doesn't allow scrolling) and your pages won't shift anymore if you add in overflow-y:scroll to the body tag css....
body {
overflow-y:scroll; -
Possible to have vertical scroll bar for a cell in ALV Grid (using methods)
Hi All,
I have a field with length 100 characters on a ALV Grid (using methods)..User doesn't want to scroll all the 100 characters horizontally to see the whole text rather he wants to have a vertical scroll bar for the cell so that he can scroll vertically.
Is it possible to have split the cell text into lines and have a vertical scroll bar for a cell in ALV Grid?
Regards
Jaker.Thanks for the suggestion Balu.I tried this , but while scrolling,headers also getting scrolled.
Becoz of this , if i scroll down to the last row,headers are getting hidden.
Headers should always be static.only the data should scroll.
Since h:datatable is being rendered as one table , i can div tag for this table alone.
If i have seperate datatable for headers alone i can do this .But i should not use two datatables. -
"Scroll Bar" appears when moving cursor - Satellite L305D-S5904
I just bought a Satellite L305D-S5904 for my mother.
It came with Windows Vista Home Premium.
I noticed that a tiny scroll bar appears at the cursor sometimes.
It makes navigation quite a pain.
Can you turn this feature off?
To clarify, when using the touchpad, moving the cursor, sometimes a tiny "scrollbar" appears at the point of the cursor's "arrow."
This is unbelievably aggrevating!
I've never seen such a thing before.
Thanks for the help!> I've never seen such a thing before.
Maybe because you didnt work with such hi-tech touchpad??? ;) lol
This is a touchpad feature which can be disabled in touchpad properties.
Check you control panel-> mouse
There should be something about touchpad settings.
There you have to disable the Virtual scrolling. -
The picture on my screen has moved over to the right hand side and I want it to be in the centre. How do I move it back as I do not have a scroll bar at the bottom of the page to do this and am unable to drag it back. Hope this makes sense!
Its a toolbar thing. I got rid of my Babylon toolbar and it sorted it out!
-
ALV-Horizontal scroll bar not working
Hi,
I have one ALV. There are 3 fields. First 2 fields are key fields and the third field is of type string with length 3000. The problem is I cant scroll the grid horizontally though the scroll bar is there.
where to use this method set_scroll_info_via_id() ?
Regards,
SunilHI Sunil,
If it is normal ALV the Vertical and Horizantal bars will enable automatically...
while fililng the filed catalog you use the parameter "OPTIMIZE"....
ie
wa_filedcat-COL_OPT = 'X'.
for better understanding..refer to this.
Re: Cursor in ALV container
hope it works..
Thanks!
Edited by: Prasanth on Mar 23, 2009 11:32 AM
Edited by: Prasanth on Mar 23, 2009 11:36 AM -
Disable / hide ALV scroll bar (Navigation Pane)
Hello,
is there a way to disable or hide the scroll bar in an ALV table? in other words I wanna display all
the data in an ALV table without having to scroll down.
Thanks,
Abdul.Hi, you can use the table configuration to control this. set_visible_row_count to -1.
data:
l_salv_wd_table type ref to iwci_salv_wd_table,
l_table type ref to cl_salv_wd_config_table.
l_salv_wd_table = wd_this->wd_cpifc_usage_alv( ).
l_table = l_salv_wd_table->get_model( ).
l_table->if_salv_wd_table_settings~set_visible_row_count( -1 ). -
This problem started about 4-5 days ago.
After i scroll down a bit on a longer page, the scroll bar is still near (not at) the top. The page is scrolling at that point based only on me continuing to move the cursor in the scroll bar vertical column - even though not in line with the actual scroll bar itself. Then when I put the cursor on the actual scroll bar the page jumps back up to near the top of the page.
Thanks for any help.Are you using code in userContent.css or Stylish?
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do not click the Reset button on the Safe mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode
Firefox Safe mode also disables the customizations in the userChrome.css and userContent.css files.
See also:
*[https://bugzilla.mozilla.org/show_bug.cgi?id=787465 bug 787465] - scrollbars don't update sometimes -
Scroll bar keeps moving out of sight
I open fire fox and then when I open one of my accounts the scroll bars moves out of sight on the screen and I can't scroll down The Even when I use the zoom bar. The fire fox screen is large than my monitor and I have a large monitor. When I try to go into Face Book there is no way to scroll down the page to see when is farther down the page.
It is possible that the screen is too wide or too high and that the scroll bars fall off.
* Use Restore or Maximize in the right-click context menu of the Taskbar icon to set focus to the Firefox application if you do not see the Firefox window.
* Open the system menu of that Firefox window via Alt+Space and see if you can move and resize that window.
If that works then close Firefox (File > Exit/Quit) to save that setting.
See also:
* http://kb.mozillazine.org/Resizing_oversize_window
If the above didn't help then see:
* http://kb.mozillazine.org/Corrupt_localstore.rdf
Maybe you are looking for
-
How to get more than 1 iphone connected on itunes to home computer
i need to get my wife's iphone on itunes for our home computer and not sure how to proceed so we can both have access
-
Dear All, BPC 10.0 - Consolidation Project When performing consolidation, every month's closing balance is being brought forward from one month to next month. Would like to know the business practice on how this is being brought forward. My question
-
ABAP Query in Upgradation from 4.7 to ECC6.0
Hi there, We are upgrading SAP system from 4.7 to ECC6.0. We have s/w component SAP_BASIS = 700. It would be of great help if anybody share their thought on handling ABAP queries after upgradation from 4.7 to ECC6.0. We have refered SAP notes 132813
-
Flash Player 9 - OS X install problem
I downloaded the latest version and am trying to install on my MacBook. OS is 10.5.2. After quitting Firefox and Safari I launched the installer, and it went fine until I reached "Items remaining to be installed: 4". It hung there with the blue-and-w
-
"Send" email option disappeared BB8520
I followed your steps (deleteing service books and then sending them again), rebooted, etc. Nothing works. I called my carrier, they don't have a clue. help please!! THANKS