Resizing ALV Grid When Changing Screen Resolution
I have an ALV Grid imbedded in a custom container. I would like for the Grid to resize if the user switches from 1024x768 to 800x600 resolution. I obviously could size it for the lower res screen (and it would be ok on the higher res screen), but I ultimately would like it to resize. Does anyone know how to make this happen?
Is your Grid running within a custom container that was placed in the screen painter? If so this is very easy. Just make you screen very large (much larger then even 1024x768). When you lay down the custom container, make it large enough to fill the entire empty area. Your custom container should have a Resizing section in the attributes window. Just check on Vertical and Horizontal resizing and choose you minimum size.
Similar Messages
-
Satellite M40: Graphic Errors when changing screen resolution
Hi,
I have a Satellite M40 and a big problem.
in windows xp pro sp2:
when a program changes the screen resolution, the screen gets messed up,
I see only stripes and only a restart can get it back working (or suspend to disk).
[edit]
I plugged an external monitor to the laptop and it works,
the laptop screen is full of lines and the 2nd monitor shows what the laptop screen should normally also show
[/edit]
in linux:
this can be also seen when changing from the xwindow mode in linux back to tty(1-6)
Here are some pictures of this strange behavior:
http://www.ronnylindner.de/extern/images/toshiba/screen1.jpg
http://www.ronnylindner.de/extern/images/toshiba/screen2.jpg
http://www.ronnylindner.de/extern/images/toshiba/screen3.jpg
It looks like a hardware problem, but could it be just a wrong bios setting?
What can I do?
Bye and thanks in advance, Ronny
Message was edited by: [email protected]_DEI will try it with the Toshiba graphics driver, at the moment I use the newest Omega driver
I use 1280x800 as normal resolution
programs giving this error:
world of warcraft (1024x768) -> working with 1280x800
age of empires 2 (800x600)
as I said before, I get this problem also using Suse Linux when I switch from KDE to tty
thanks you too, hope we can get it working together :-)
[edit]
strange, using the Toshiba display driver I got the problem at the first try (aoe2), but now it is not reproducable :-(
[/edit]
Message was edited by: [email protected]_DE -
ALV Grid - Display/change Problem
Hi Guys,
I have a peculiar problem. I have developed a Module pool application containing two screens. In the first screen I have a input field and 2 buttons for display and change. When I enter the value and press Displaythe second screen is called which shows an ALV grid in the respective display mode. But If I come back and press change I could not get the change mode for the ALV grid still it remains in the Display mode. Again if rerun the transaction and press change it shows the ALV grid in change mode but if we press back and choose display then it is not getting changed still remains as such. In all at the first run what ever the mode is chosen it remains stationery. I am using OOALV and i have tried flushing the container, grid and also refreshing the ALV. But could not trace the problem. If you guys have worked or can put some inputs please reply back.
Jagath.Please find the attached code...
from the first screen 100 i am assigning the flag w_display or w_change based on the okcode. in the second screen 200 PBO i have the following code:
MODULE status_0200 OUTPUT.
SET PF-STATUS 'STAT200'.
SET TITLEBAR 'TIT200'.
if w_display eq 'X'.
perform grid_display.
else.
perform grid_change.
endif.
ENDMODULE. " STATUS_0200 OUTPUT
Now in perform display I have the following code:
form grid_display .
Set the Fieldcatalog.
REFRESH t_fieldcat.
PERFORM get_field_catalog.
set the Layout.
CLEAR wa_layout.
wa_layout-cwidth_opt = 'X'.
wa_layout-stylefname = 'CELLTAB'.
set the Variant
w_variant-report = sy-repid.
Create the Instance for container
IF lcl_custom_disp IS INITIAL.
CREATE OBJECT lcl_custom_disp
EXPORTING
PARENT =
container_name = 'CONTAINER1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
create the object for ALV grid
CREATE OBJECT lcl_grid_disp
EXPORTING
i_parent = lcl_custom_disp
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Create the object for events
CREATE OBJECT lcl_events.
SET HANDLER lcl_events->handle_top_of_list FOR lcl_grid_disp.
Display the ALV.
CALL METHOD lcl_grid_disp->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = ' '
is_layout = wa_layout
CHANGING
it_outtab = t_final[]
it_fieldcatalog = t_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
Refresh the ALV grid
CALL METHOD lcl_grid_disp->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
finished = 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.
ENDIF.
endform. " grid_display
In the perform change the same code is followed for different object with the fieldcatalog is changed to edit based on flag.
Set the Fieldcatalog.
REFRESH t_fieldcat.
PERFORM get_field_catalog.
set the Layout.
CLEAR wa_layout.
wa_layout-cwidth_opt = 'X'.
wa_layout-stylefname = 'CELLTAB'.
set the Variant
w_variant-report = sy-repid.
Create the Instance for container
IF lcl_custom_chng IS INITIAL.
CREATE OBJECT lcl_custom_chng
EXPORTING
PARENT =
container_name = 'CONTAINER1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
create the object for ALV grid
CREATE OBJECT lcl_grid_chng
EXPORTING
i_parent = lcl_custom_chng
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Create the object for events
CREATE OBJECT lcl_events.
SET HANDLER lcl_events->handle_top_of_list FOR lcl_grid_chng.
SET HANDLER lcl_events->handle_data_changed FOR lcl_grid_chng.
SET HANDLER lcl_events->handle_data_changed_finished FOR lcl_grid_chng.
Display the ALV.
CALL METHOD lcl_grid_chng->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = ' '
is_layout = wa_layout
CHANGING
it_outtab = t_final[]
it_fieldcatalog = t_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
Refresh the ALV grid
CALL METHOD lcl_grid_chng->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
finished = 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.
ENDIF.
Please let me know if you require some more inputs?
Jagath -
2 alv grids in 1 screen with 2 different header
Hi All,
I have a requirement where in I need to display 2 alv grids in 1 screen and each has its own set of header information. If anybody has come across such a requirement then pls send the code. I can do this using BLOCKED list alv but I want to do in grids.
Thanks in advance.
Sutapa Senguptathr u go with code..
Code listing for: Z_011_ALV_GRID_EVENT
Description: EXAMPLE OF ALV GRID CONTROL
SCREEN 101 : FLOW LOGIC
PROCESS BEFORE OUTPUT.
MODULE STATUS_0101.
MODULE GET_DATA.
MODULE CREATE_OBJECTS.
MODULE SHOW_ALV.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0101.
MODULE POOL Z_011_ALV_GRID_EVENT
PROGRAM Z_011_ALV_GRID_EVENT.
CLASS CL_EVENT_HANDLER DEFINITION
CLASS CL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS: ON_DOUBLE_CLICK FOR EVENT
DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING ES_ROW_NO E_COLUMN,
ON_RIGHT_CLICK FOR EVENT
RIGHT_CLICK OF CL_GUI_ALV_GRID.
ENDCLASS. "CL_EVENT_HANDLER DEFINITION
CLASS CL_EVENT_HANDLER IMPLEMENTATION
CLASS CL_EVENT_HANDLER IMPLEMENTATION.
METHOD ON_DOUBLE_CLICK.
DATA: TEXT TYPE STRING,
ES_ROW_STRING TYPE STRING.
ES_ROW_STRING = ES_ROW_NO-ROW_ID.
CONCATENATE 'ROW : ' ES_ROW_STRING 'COLUMN : '
E_COLUMN-FIELDNAME INTO TEXT SEPARATED BY SPACE.
MESSAGE TEXT TYPE 'I'.
ENDMETHOD. "ON_DOUBLE_CLICK
METHOD ON_RIGHT_CLICK.
MESSAGE 'RIGHT MOUSE BUTTON HAS CLICKED !!!' TYPE 'I'.
ENDMETHOD. "ON_RIGHT_CLICK
ENDCLASS. "CL_EVENT_HANDLER IMPLEMENTATION
INCLUDE PROGRAMS
INCLUDE Z_011_ALV_GRID_EVENT_TOP. " Global Data
INCLUDE Z_011_ALV_GRID_EVENT_O01. " PBO-Modules
INCLUDE Z_011_ALV_GRID_EVENT_I01. " PAI-Modules
INCLUDE Z_011_ALV_GRID_EVENT_F01. " FORM-Routines
TOP INCLUDE Z_011_ALV_GRID_EVENT_TOP
TYPES AND DATA DECLARATION
TABLES: SFLIGHT.
DATA: OK_CODE TYPE SY-UCOMM,
IT_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT,
R_HANDLER TYPE REF TO CL_EVENT_HANDLER,
R_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
R_GRID TYPE REF TO CL_GUI_ALV_GRID.
PBO INCLUDE Z_011_ALV_GRID_EVENT_O01
Module SHOW_ALV OUTPUT
MODULE SHOW_ALV OUTPUT.
CHECK OK_CODE IS INITIAL.
CALL METHOD R_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
CHANGING
IT_OUTTAB = IT_SFLIGHT.
ENDMODULE. " SHOW_ALV OUTPUT
Module GET_DATA OUTPUT
MODULE GET_DATA OUTPUT.
CHECK OK_CODE IS INITIAL.
PERFORM GET_DATA
USING
SFLIGHT-CARRID.
ENDMODULE. " GET_DATA OUTPUT
Module CREATE_OBJECTS OUTPUT
MODULE CREATE_OBJECTS OUTPUT.
IF R_HANDLER IS NOT BOUND. "CHECKS WHETHER A REFERENCE
"VARIABLE CONTAINS VALID REFERENCE
CREATE OBJECT R_HANDLER.
ENDIF.
IF R_CONTAINER IS NOT BOUND. "CHECKS WHETHER A REFERENCE
"VARIABLE CONTAINS VALID REFERENCE
CREATE OBJECT R_CONTAINER
EXPORTING
CONTAINER_NAME = 'CC_ALV'.
ENDIF.
IF R_GRID IS NOT BOUND.
CREATE OBJECT R_GRID
EXPORTING
I_PARENT = R_CONTAINER.
SET HANDLER R_HANDLER->ON_DOUBLE_CLICK
R_HANDLER->ON_RIGHT_CLICK FOR ALL INSTANCES
ENDIF.
ENDMODULE. " CREATE_OBJECTS OUTPUT
Module STATUS_0101 OUTPUT
MODULE STATUS_0101 OUTPUT.
SET PF-STATUS 'Z_010_STATUS'.
"SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0101 OUTPUT
PAI INCLUDE Z_011_ALV_GRID_EVENT_I01
Module USER_COMMAND_0101 INPUT
MODULE USER_COMMAND_0101 INPUT.
CASE OK_CODE .
WHEN 'SEARCH'.
PERFORM GET_DATA
USING
SFLIGHT-CARRID.
CALL METHOD R_GRID->REFRESH_TABLE_DISPLAY.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0101 INPUT
FORM INCLUDE Z_011_ALV_GRID_EVENT_F01
FORM : GET_DATA
Created : 26.03.2008 12:34:09
FORM GET_DATA USING VALUE(P_CARRID) TYPE SFLIGHT-CARRID.
IF P_CARRID IS INITIAL.
SELECT * FROM SFLIGHT INTO CORRESPONDING
FIELDS OF TABLE IT_SFLIGHT.
ELSE.
SELECT * FROM SFLIGHT INTO CORRESPONDING
FIELDS OF TABLE IT_SFLIGHT WHERE CARRID = P_CARRID.
ENDIF.
ENDFORM. "GET_DATA -
Return from ALV Grid to Selection screen
hi,
I want to go back from ALV grid to selection screen.
I am using the following code:
WHEN 'BACK'.
CALL METHOD grid1->refresh_table_display.
CALL METHOD grid1->free.
CALL METHOD custom_container1->free.
CALL SELECTION-SCREEN 1000.
it is working,but when i press BACK button from selection screen to program it is showing ERROR IN FLUSH 4 Error.
Also I tried with method FLUSH
WHEN 'BACK'.
CALL METHOD grid1->refresh_table_display.
CALL METHOD grid1->free.
CALL METHOD custom_container1->free.
CALL METHOD cl_gui_cfw=>flush.
it's still showing same Error.
Please help on this.
Regards,
SankarHi,
My grid name is grid1.
I tried with :
DATA grid1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = grid1.
CALL METHOD grid1->check_changed_data.
CALL METHOD grid1->refresh_table_display.
LEAVE TO SCREEN 0.
Even, I tried with declaring another grid : grid2
DATA grid1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = grid1.
CALL METHOD grid1->check_changed_data.
CALL METHOD grid1->refresh_table_display.
LEAVE TO SCREEN 0.
In both cases, I am getting the following Error : OBJECTS_OBJREF_NOT_ASSIGNED -
Change Screen Resolution or not Change Screen Resolution?
I mean is it possible to change screen resolution with Java?
I read some topics (not in this forum) that is impossible. I know there is a method to set at full screen a frame with the favourite resolution but does it effectively exist a method to set the screen with a favourite resolution?
For example:
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setUndecorated(true);
frame.setIgnoreRepaint(true);
device.setFullScreenWindow(frame);
if (displayMode != null && device.isDisplayChangeSupported()) {
try {
device.setDisplayMode(displayMode);
} catch (IllegalArgumentException iae) {
System.err.println("EX: " + iae);
...the device.setDisplayMode(displayMode) always throw me an exception: Invalid Display Mode (or something like that) with all permitted display modes (640by480, 800by600, 1024by768, etc...), with all permitted refresh rates, with all permitted color depths.
Illuminate me please!
Thanx in advance!Hi,
I think i you should check this link
http://forum.java.sun.com/thread.jspa?threadID=624649&messageID=3554316
with help of above link you solve your problem of screen resolution
but problem with above code is when you apply on frame that's ok but is you add any JDialog to that frame then JDialog and move JDialog with mouse dragged and dropped
then dialog is invisibly run .
you check this i you find any solution please post that it's urgent -
How to change screen resolution on touchpad
how to change screen resolution on touchpad ?i was working on my tp and out of the blues my screen looks like it is at 800*600
or is this the screen itself that went bad?
can someboby please tell me the procedure to use the 12 mt warranty..
tia
Post relates to: HP TouchPad (WiFi)Sorry to say reloading WebOS did not help this issue on my TP. contacted Support and was told to send it.Even sorrier to say that my TP is now lost. My tracking number reports it as delievered on Dec 5, but HP has no record of it.When I got back on Chat they are now also telling me that my TP serial number is a EU model, even though my box clearly states HP Touchpad ,US, 1.20,32gb,Wifi.
Not sure what that even has to do with it being lost now..if it is as they say and no warranty on it in US I just want it sent back.
******Clicking the Thumbs-Up button is a way to say -Thanks!.******
**Click Accept as Solution on a Reply that solves your issue to help others** -
Problem to change screen resolution in MB Intel DG41 with video on board
Hi, I need some help as soon as possible because this problem it´s make me difficult my job. I have installed the MAC OS Snow Leopard 10.6.2 in a Motherboard Intel DG41 with micro Core2Duo and video on board of this motherboard and don´t let me change screen resolution. I have a display of 22´ inches and the panel to change the screen resolution only mark 1024x768. I think the more likely it is that the system does not recognize me the drivers to this chipset of video. I searched everywhere on the internet but I have not found the solution.
Thanks FernandoFirst of all sorry for my English is not very good. My PC is an Intel MotherBoard DG41 with onboard video and a micro Core2Duo. The system is MAC OS Snow Leopard 10.6.2.
Thanks for replying -
Change Screen Resolution GNU/linux
hi everyone
i need to change screen resolution for my linux box.
with command #xrandr
showing only 640 X 480,can i add more size?how to add?
tqHi,
Use this forum for feedback about OTN programs, Web site content, and systems - product-related questions will be deleted.
Please post your question in the appropriate forum.
Oracle Enterprise Linux
Oracle Linux
Linux (non-OEL)
Generic Linux
Thanks,
Hussein -
Another feature to allow users to change screen resolution to HD for gaming
I liked k3 Note, smartphone which is filled with lots of professional features. Can you add a control to change screen resolution to HD for games. Lots of people are there which are thinking that other phones' gpu are better and the Mali t760 m2 not so good.
Hi
In case someone else encounters the same problem, here is some more information.
The high refresh rate is quite visible in Device Manager. It would refresh every one or two seconds. The cause seems to be a conflict between a Fingerprint software installed during the Task sequence and the Validity Sensors Drivers.
I made a Scan for hardware change in Device manager and saw that a few devices were appearing as unknown. Right click, update drivers from local cache solved the problem.
I cancelled install of the fingerprint software and did not encounter the problem anymore.
Brgds
bruno -
Change screen resolution message when trying to start media manager
I use a UMPC (Samsung Q1UP) that only has a screen resoluion opion of 1024 x 600 as it is a 7" landscape mobile computer. When I start up the blackberry software, and then try to launch Media Manager etc., it gives me an error message to change the screen resolution to at least 1024 x 768 or higher.
As I cannot change the screen resolution to accomodate the software request, has anyone come up with a fix for this issue?
Thanks in advance!This is the part of technology I hate with a passion. When new products come out, companies have no idea what to do when compatibility issues arise and they leave millions of people in the dark.
Blackberry charges for support if you call them direct (imbecilic policy in my opinion). You have to go through AT&T to get support from Blackberry for free. (I believe the Curve phone has an inactivated price of $699, you would think Blackberry would want to talk directly to their customers for free, but no!)
I spent 20 minutes on the phone with AT&T to explain the issue I was having. After convincing them I know what I am doing, they put me through to Blackberry support tech, where I had to repeat the issue over again.
After spending another 40 minutes with a junior, then senior Blackberry tech, their solution was for me to plug in an external monitor and set it to 1024X768 so the Roxio Media Manager comes up.
This is imbecilic as well, as the whole purpose for this netbook is so that I don't have to have to lug around a monitor with me, otherwise with the netbook and the monitor I am way over 7 lbs.
There was another person in this forum who recommended installing an older Desktop manager software without the media manager product on my PC to allow me to access the files directly. Although this works for a media card, it DOESN'T work for the internal memory in the phone. The internal memory in the phone appears to be locked up tight and only accessible to the media manager, or Bluetooth. I did manage to get the files off via Bluetooth ONE FILE AT A TIME! took me nearly 2 hours.
My suggestions to Blackberry:
1) Scrap Roxio Media Manager. Most people who use this phone know what they are doing and understand how to drag and drop files from a disk drive to a computer. Roxio Media Manager should not be necessary to get files off of a phone.
2) Open up the internal memory inside the phone so it comes up as a disk drive on the computer.
3) or - Do something else to make this work with Netbooks!
Message Edited by diode on 04-09-2009 11:36 AM
[email protected] -
Report with 5 ALV grids on 1 screen
I am trying to build a screen/report with 5 ALV grids which are interactive. One grid will display all sales order. When I click on a Sales order Hotspot, the items of the sales order would appear in the ALV grid box below.
When i click on an sales order item hotspot, i want the delivery information in another alv grid in the same screen.
There should be 2 more grids - one displaying the customer information -name,address, in one grid and one grid for open items if any. Any advice is welcome . Should I be creating a split container/docking container or multiple containers ? Sample code is welcome.
Edited by: Shareen Hegde on Apr 2, 2008 9:25 PMHello Shareen
Below I have added my sample report ZUS_SDN_THREE_ALV_GRIDS showing three interactive ALV grids. Perhaps it might be useful to you. I would prefer one or multiple splitter containers over multiple "stand-alone" containers.
*& Report ZUS_SDN_THREE_ALV_GRIDS
*& Display Customer data in three ALV lists:
*& 1st ALV: Customers
*& 2nd ALV: Sales order of selected customer (double-click)
*& 3rd ALV: Positions of selected sales order (double-click)
*& Double-click on material -> display material (MM02)
*& NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
*& Flow logic of dynpro '0100':
*&PROCESS BEFORE OUTPUT.
*& MODULE STATUS_0100.
*&PROCESS AFTER INPUT.
*& MODULE USER_COMMAND_0100.
REPORT zus_sdn_three_alv_grids.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_splitter_2 TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_cell_left TYPE REF TO cl_gui_container,
go_cell_right TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
go_grid3 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_vbak TYPE STANDARD TABLE OF vbak,
gt_vbap TYPE STANDARD TABLE OF vbap.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '1000'.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender. " sending control, i.e. ALV grid that raised event
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_vbak TYPE vbak,
ls_vbap TYPE vbap.
* Distinguish according to sending grid instance
CASE sender.
WHEN go_grid1.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDERS' ).
WHEN go_grid2.
READ TABLE gt_vbak INTO ls_vbak INDEX e_row-index.
CHECK ( ls_vbak-vbeln IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DETAILS' ).
WHEN go_grid3.
READ TABLE gt_vbap INTO ls_vbap INDEX e_row-index.
CHECK ( ls_vbap-matnr IS NOT INITIAL ).
SET PARAMETER ID 'MAT' FIELD ls_vbap-matnr.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
WHEN OTHERS.
RETURN.
ENDCASE.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 1
columns = 2
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_left.
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = go_cell_right.
* Create 2nd splitter container
CREATE OBJECT go_splitter_2
EXPORTING
parent = go_cell_left
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter_2->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter_2->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid3
EXPORTING
i_parent = go_cell_right
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid2.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid3.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbak.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAK'
CHANGING
it_outtab = gt_vbak " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbap.
CALL METHOD go_grid3->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAP'
CHANGING
it_outtab = gt_vbap " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
CALL SCREEN '0100'.
* Flow logic of dynpro:
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "ORDERS"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
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.
* Refresh display of detail ALV list
CALL METHOD go_grid3->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Orders"
WHEN 'ORDERS'.
PERFORM customer_show_orders.
WHEN 'ORDER_DETAILS'.
PERFORM order_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form CUSTOMER_SHOW_ORDERS
* text
* --> p1 text
* <-- p2 text
FORM customer_show_orders .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM vbak INTO TABLE gt_vbak
WHERE kunnr = ls_knb1-kunnr.
REFRESH: gt_vbap.
ENDFORM. " CUSTOMER_SHOW_ORDERS
*& Form ORDER_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM order_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_vbak TYPE vbak.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_vbak INTO ls_vbak INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM vbap INTO TABLE gt_vbap
WHERE vbeln = ls_vbak-vbeln.
ENDFORM. " ORDER_SHOW_DETAILS
Regards
Uwe -
Display alv grids in selection screen based on the user event
Hi All,
I am workign on displaying ALV in same selection screen.I am able to display the ALV in selection screen.
But i have 2 buttons in my selection screen 'Create' and 'change'.
When i click on create i need with some type of data and when i click on 'change' my alv grid another type of data.Ex: if i click on crate mara data should be dispalyed when i click on change makt table data should be dispalyed and also i have user defined buttons are in my grids.
So i have used 2 containers to dispaly to different data.I am able to display the perfectly but the problem is first time when i click on create the grid is displaying when i click on change button the create alv grid is displaying down and change data is dispalying up.
I need only one alv grid at a time.Can anybody please let me know how can i do this.
Thanks,
TaraginiHello,
Also I would suggest if it is relevant data maintain in one interntal table and show/hide based on condition
through fieldcatalog (NO_OUT) parameter.
Thanks -
Hi Folks ,
i'm using an alv grid in my program and might have change the initial size of it's custom container which seats above it .
is there any way that i can chnage the initial size (H/V) of it ?
i try via screen table but it can't cupture the custom container name within the loop .you can use the set_alignment method of cl_gui_custom_container class for this
create object my_container
exporting
container_name = 'OUTPUT_CONTAINER'
exceptions
others = 1.
case sy-subrc.
when 0.
when others.
raise cntl_error.
endcase.
alignment = my_container->align_at_left +
my_container->align_at_right +
my_container->align_at_top +
my_container->align_at_bottom.
call method my_container->set_alignment
exporting
alignment = alignment.
Regards
Raja -
Unable to Change Screen Resolution in Remote Session - Windows Server 2012 R2
Does anybody know of a way to allow Remote Desktop users to adjust their own screen resolution in a remote session under Windows Server 2012 R2? We are struggling with this and can't seem to find a solution.
When users login to their RDP session and try to adjust their screen resolution this message is displayed in Control Panel:
"The display settings can't be changed from a remote session."
We don't want to use the "make text and other items larger or smaller" scaling feature, as this produces undesirable results with some of our applications. We also don't want to have to support multiple types of RDP clients or RDP shortcut
files.
We have looked at other posts but can't find an answer that applies to Windows Server 2012 R2. The closest thing we could find is KB2726399, but it only applies to Server 2008.
Does anybody have a solution for Server 2012?
ThanksHi,
Currently you cannot change the resolution from within the session. This is normal and expected behavior.
Unfortunately this means you need to set the desired resolution before connecting by using custom .rdp files, manually within the Remote Desktop Client, custom web launch page, custom windows launch program, etc.
-TP
Maybe you are looking for
-
Landscape and portrait page orientation in forms.
Could anyone let me know how to have both portrait and landscape page orientations in a form. Building an audit report and need (would be nice) to have both in one single form. Regards, Raffe.
-
Model: HPE-030sc My dvd/cd drive doesn't work. I've tried to reinstal throw device manager. But the drive wont read any disc. When I push the F drive in my computer, it just says program could't be fund. Anybody who can help.
-
Ora-907 during create table statement
Customer is receiving an ora-907 error running this sql statement and I cannot determine where the problem is, if there is extra spaces or if it's truly missing the right parenthesis. SQL> set timing on SQL> set echo on SQL> set autotrace on SQL> @sr
-
Edit JPG in Preview and i loose the original ?
Hi i am very muddled up with, is it called Auto Save ? I Crop a photo in Preview, there isnt a Save As.... just a Save, so i Save it and it Overwrites the original !!. Why cant i have a Save As.... it would be far Safer and and Easier for me, an Old
-
[svn] 1090: compiler: class renaming in the mxml package
Revision: 1090 Author: [email protected] Date: 2008-04-03 11:59:00 -0700 (Thu, 03 Apr 2008) Log Message: compiler: class renaming in the mxml package * flex2.compiler.mxml.builder:ApplicationBuilder to AbstractDocumentBuilder * flex2.compiler.mxml.bui