10-10-2007 7:56 AM
10-10-2007 7:57 AM
10-10-2007 7:58 AM
Hi
You can better search in SDN for the same.
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
10-10-2007 7:59 AM
Hi,
Check this sample code.
DATA : IT_RANK TYPE TABLE OF ZVIJIRANK.
DATA : IT_RANK1 TYPE TABLE OF ZVIJIRANK1.
SELECT *
INTO TABLE IT_RANK
FROM ZVIJIRANK
UP TO 2 ROWS.
SELECT *
INTO TABLE IT_RANK1
FROM ZVIJIRANK1
UP TO 2 ROWS.
**-----------------------------------------------------FOR LIST DISPLAY---------------------------------*CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
* EXPORTING
** I_INTERFACE_CHECK = ' '
** I_BYPASSING_BUFFER =
** I_BUFFER_ACTIVE = ' '
** I_CALLBACK_PROGRAM = ' '
** I_CALLBACK_PF_STATUS_SET = ' '
** I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME = 'ZVIJIRANK'
** IS_LAYOUT =
** IT_FIELDCAT =
** IT_EXCLUDING =
** IT_SPECIAL_GROUPS =
** IT_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
** IR_SALV_LIST_ADAPTER =
** IT_EXCEPT_QINFO =
** I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
** IMPORTING
** E_EXIT_CAUSED_BY_CALLER =
** ES_EXIT_CAUSED_BY_USER =
* TABLES
* T_OUTTAB = IT_RANK
** 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.
*------------------------------------------------------------------------------------------------------------------
*---------------------------------------------------------FOR GRID DISPLAY-----------------------------
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'ZVIJIRANK1'
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
* IT_FIELDCAT =
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_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_RANK1
* 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.
*--------------------------------------------------------------------------------------------------------------------
Thanks.
10-10-2007 7:59 AM
hi
The ALV Grid control is a flexible tool for displaying lists. The tool provides common list operations as generic functions and can be enhanced by self-defined options.
The ALV Grid control is used to build non-hierarchical, interactive, and modern-design lists. As a control, it is a component that is installed on the local PC.
The ALV Grid control provides typical list functions as sorting, filtering, summing, etc... while also gives the opportunity to develop user functions where needed. It presents numerous interfaces like Excel Inplace and Crystal Reports.
The wrapper class implemented to encapsulate ALV Grid functionality is CL_GUI_ALV_GRID. There is another way to display lists with ALV utilizing REUSE_ALV... functions. However, that way is not comprised in this tutorial.
Building Blocks
While preparing a list to be displayed via an ALV grid control, we have some basic components to prepare. These are;
i. List data: Obviously, this is the data in an internal table to be listed. Standard ALV functions except sorting makes just read access to the list data. However, sorting changes state of the internal table. The internal table holding list data may be of any flat type. Deep types are only allowed when set for some functionalities of ALV Grid.
ii. Field Catalog: We use another internal table to define specifications on how the fields of our list will be displayed. This internal table is called the field catalog. The field catalog must comprise some technical and additional information about display options for each column to be displayed. There are three procedures to generate the field catalog as Automatic generation, Semi-automatic generation, and Manual generation. The internal table for the field catalog must be referenced to the dictionary type LVC_T_FCAT.
iii. Layout Structure: We fill a structure to specify general layout options for the grid. With this structure we can set general display options, grid customizing, totals options, color adjustments etc... The layout structure must be of type LVC_S_LAYO.
iv. Event Handler: We should define and implement an event handler class if we want to handle events triggered by the ALV Grid instance. After creating ALV Grid instance, we must register an instance of this event handler class to handle ALV Grid events.
v. Additional Data: To trigger some additional features of ALV Grid we can have some additional data to pass as parameters. For example, initial sorting criteria, buttons to be deactivated, etc...
regards
Nagesh.Paruchuri
08-15-2014 8:13 AM
Hi Nagesh
I know this thread is old. But you might answer.
We are using ALV and Crystal Reports. I have altered the standard Crystal Report Template and added a logo in the top right corner of the Report Header.
The problem is, that when we open the report from ALV, a new Report Header Section is created, with additional information ( I guess from the point v in your explanaiton.
I would like this to be joined into the excisting Report Header Section, or maybe that it makes a new Report Header 2 section. So that the logo on first page stays on top.
Any Ideas ?
Best Regards
Ingrid
10-10-2007 8:01 AM
Hi balaji,
In classic reports, we are using write statements in order to dispaly the data from our interanl table, here it is developers burden to align them correctly.
In ALV grid reports, SAP will provide you a standard l;ay out which you can use for your reporting purpose.
ALV grid also provides standard report functionalities like sorting searching etc...
regards
Antony Thomas
10-10-2007 8:01 AM
Hi Balaji,
Advantages of FM is
1) no need of write statement,
2) field catlogue has nearly 40 attributes,
3) U can design the output in what ever way u desire
Regards,
Nagaraju
10-10-2007 8:06 AM
Hi,
it will give the grid display.it will have many predefined options to format the grid.
<b>example:</b>
TABLES:MARA.
DATA ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
SELECT * FROM MARA INTO TABLE ITAB UP TO 25 ROWS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'MARA'
I_GRID_TITLE = 'GENERAL MATERIAL DATA'
TABLES
T_OUTTAB = ITAB.