08-17-2015 7:52 AM
Hello All,
I am displaying ALV report with just 6 columns using SALV, Now the functional wants it to be displayed it to little right side, (not right justified data or something), just all the columns should be moved to little right, for look and feel, can you please suggest me how to do this?
Thanks in advance,
Regards,
CA.
08-17-2015 8:11 AM
Hello Chitranjali,
As per my knowledge, you can achieve this in two ways. Either increase the width at field catalog level to make the columns move towards right or by creating and saving a Global Layout for that ALV display.
Thanks
Rajit
08-17-2015 8:15 AM
Hi Chitra,
Please create a custom container in the screen, bring it to right a bit. (As per your need) adn use OO ALV to display data.
OO ALV : class CL_GUI_ALV_GRID
Regards,
Deepan Swaminathan.
08-17-2015 8:22 AM
Hi,
Can the consultant show a standard sap screen as a sample ?
Can you post a screen shot of the current screen and also the desire result ?
Regards
08-17-2015 8:39 AM
Hi guys,
I know I can use oops ALV and container concept , but just want to know whether I can simply solve it with SALV, as I am currently using it.
Please see the screenshot for your reference, now I want that total ALV report to centered(not data in cells), means first coloumn should be started from the 4th coloumn onwards, Hope you got the point.
Consider SALV while replying please.
08-17-2015 9:45 AM
Hi Chitranjali,
Maybe you can add a dummy column then freeze the column.
Thanks,
Norman
08-17-2015 9:57 AM
08-17-2015 10:38 AM
Perfect Eitan,This is how I need, Can you please share how to achieve this using SALV?
08-17-2015 10:40 AM
08-17-2015 11:29 AM
08-17-2015 11:33 AM
Hi,
Some code:
REPORT y_r_eitan_test_08_27.
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK block04 WITH FRAME .
PARAMETERS: p_debug TYPE debug_flg .
SELECTION-SCREEN END OF BLOCK block04 .
*----------------------------------------------------------------------*
START-OF-SELECTION .
PERFORM at_start_of_selection .
*----------------------------------------------------------------------*
FORM at_start_of_selection .
CALL SCREEN 100 .
ENDFORM. "at_start_of_selection
*----------------------------------------------------------------------*
MODULE at_pbo OUTPUT.
PERFORM at_pbo .
ENDMODULE. "at_pbo OUTPUT
*----------------------------------------------------------------------*
FORM at_pbo .
DATA: ob_gui_splitter_container TYPE REF TO cl_gui_splitter_container .
DATA: ob_gui_container TYPE REF TO cl_gui_container.
CREATE OBJECT ob_gui_splitter_container
EXPORTING
parent = cl_gui_container=>screen0
rows = 1
columns = 3.
CALL METHOD ob_gui_splitter_container->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = ob_gui_container.
CALL METHOD ob_gui_splitter_container->set_column_width
EXPORTING
id = 2
width = 50.
DATA: it_sflight TYPE TABLE OF sflight .
SELECT * INTO TABLE it_sflight
FROM sflight
UP TO 20 ROWS .
DATA: ob_salv_table TYPE REF TO cl_salv_table .
cl_salv_table=>factory(
EXPORTING r_container = ob_gui_container
IMPORTING r_salv_table = ob_salv_table
CHANGING t_table = it_sflight ) .
ob_salv_table->display( ) .
ENDFORM. "at_pbo
*----------------------------------------------------------------------*
MODULE at_pai_process INPUT.
LEAVE TO SCREEN 0 .
ENDMODULE. " AT_PAI_PROCESS INPUT
08-17-2015 11:35 AM
And Screen:
**************************************************************** | ||||||||||||||||||||||||||||||||||
* THIS FILE IS GENERATED BY THE SCREEN PAINTER. | * | |||||||||||||||||||||||||||||||||
* NEVER CHANGE IT MANUALLY, PLEASE ! | * | |||||||||||||||||||||||||||||||||
**************************************************************** | ||||||||||||||||||||||||||||||||||
%_DYNPRO | ||||||||||||||||||||||||||||||||||
Y_R_EITAN_TEST_08_27 | ||||||||||||||||||||||||||||||||||
0100 | ||||||||||||||||||||||||||||||||||
701 | ||||||||||||||||||||||||||||||||||
40 | ||||||||||||||||||||||||||||||||||
%_HEADER | ||||||||||||||||||||||||||||||||||
Y_R_EITAN_TEST_08_27 | 0100 0100 | 0 0192 37 0 0 27120 0G E | 20150817114032 | |||||||||||||||||||||||||||||||
%_DESCRIPTION | ||||||||||||||||||||||||||||||||||
Main | ||||||||||||||||||||||||||||||||||
%_FIELDS | ||||||||||||||||||||||||||||||||||
OK_CODE | CHAR 20 80 10 00 00 00 255 1 O 0 0 0 | 0 | 0 0 | ____________________ | ||||||||||||||||||||||||||||||
%_FLOWLOGIC | ||||||||||||||||||||||||||||||||||
PROCESS BEFORE OUTPUT. | ||||||||||||||||||||||||||||||||||
MODULE at_pbo . | ||||||||||||||||||||||||||||||||||
* | ||||||||||||||||||||||||||||||||||
PROCESS AFTER INPUT. | ||||||||||||||||||||||||||||||||||
MODULE at_pai_process . | ||||||||||||||||||||||||||||||||||
%_PARAMS | ||||||||||||||||||||||||||||||||||