07-25-2007 6:13 AM
hi experts,
i have naver used alv in my report programming..can u plz suggest me how could i start using alv in my reports..can u give me some related examples..can u send me some reports related to alv..i would b thankful if u send 3-4 reports.
regards,
raman.
07-25-2007 6:16 AM
hi,
ALV
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
Using ALV, we can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
http://www.sapmaterial.com/alv1.html
.
Hope this helps
<b>if it helped, you can acknowledge the same by rewarding</b>
regards
dinesh
07-25-2007 6:17 AM
hi
please see the the sap standard programs starting with BCALV*
vamsi
07-25-2007 6:17 AM
hi
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
regards
ravish
<b>plz dont forget to reward points if useful</b>
07-25-2007 6:19 AM
The best way to learn ALV is
simply go to se38..then go to menu ENVIRONMENT->Examples-Control example..
all sample related ALV examples are avaiable
Regards,
Reema.
07-25-2007 6:20 AM
HI,
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
See this sample Example.
TABLES : ekko,
ekpo.
SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.
TYPE-POOLS: slis.
DATA: BEGIN OF headertab OCCURS 0,
ebeln LIKE ekko-ebeln,
bstyp LIKE ekko-bstyp,
bsart LIKE ekko-bsart,
statu LIKE ekko-statu,
END OF headertab.
DATA: BEGIN OF itemtab OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
werks LIKE ekpo-werks,
menge LIKE ekpo-menge,
netpr LIKE ekpo-netpr,
peinh LIKE ekpo-peinh,
netwr LIKE ekpo-netwr,
END OF itemtab.
DATA: BEGIN OF level2 OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
werks LIKE ekpo-werks,
menge LIKE ekpo-menge,
netpr LIKE ekpo-netpr,
peinh LIKE ekpo-peinh,
netwr LIKE ekpo-netwr,
END OF level2.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
i_fieldcat1 TYPE slis_t_fieldcat_alv.
DATA: v_repid LIKE sy-repid,
v_layout TYPE slis_layout_alv,
v_events TYPE slis_t_event,
v_print TYPE slis_print_alv,
l_fieldcat TYPE slis_fieldcat_alv.
START-OF-SELECTION.
v_repid = sy-repid.
SELECT ebeln bstyp bsart statu
INTO TABLE headertab
FROM ekko
WHERE ebeln IN s_ebeln.
IF NOT headertab[] IS INITIAL.
SELECT ebeln ebelp matnr werks menge netpr peinh netwr
INTO TABLE itemtab
FROM ekpo
FOR ALL ENTRIES IN headertab
WHERE ebeln = headertab-ebeln.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'HEADERTAB'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
i_bypassing_buffer = 'X'
i_buffer_active = ' '
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
LOOP AT i_fieldcat INTO l_fieldcat.
CASE l_fieldcat-fieldname.
WHEN 'EBELN'.
l_fieldcat-hotspot = 'X'.
MODIFY i_fieldcat FROM l_fieldcat.
ENDCASE.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_bypassing_buffer = 'X'
i_buffer_active = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
I_STRUCTURE_NAME =
IS_LAYOUT =
it_fieldcat = i_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = 'A'
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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = headertab
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,CSR.