Modes in ALV
Hi Experts,
I got the requirement of Creating a New column next to G/L account number as G/L account Description .
I created it with the logic of
CLASS LCL_EVENT_RECEIVER1 DEFINITION.
PUBLIC SECTION.
METHODS:
HANDLE_DATA_CHANGED
FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
IMPORTING ER_DATA_CHANGED.
ENDCLASS. "lcl_event_receiver1 DEFINITION
DATA: G_EVENT_RECEIVER1 TYPE REF TO LCL_EVENT_RECEIVER1.
* CLASS LCL_EVENT_RECEIVER1 IMPLEMENTATION
CLASS LCL_EVENT_RECEIVER1 IMPLEMENTATION.
* Logic to access data and change itab and refresh table display
METHOD HANDLE_DATA_CHANGED.
DATA: LS_GOOD TYPE LVC_S_MODI,
LS_account like i_apr_tab,
ls_disc type TEXT50,
LS_GOOD_COST TYPE LVC_S_MODI.
LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO LS_GOOD.
CASE LS_GOOD-FIELDNAME.
WHEN 'GLACC'.
select single txt50 from skat into ls_disc where SAKNR = ls_good-value and SPRAS = sy-langu.
CALL METHOD ER_DATA_CHANGED->MODIFY_CELL
EXPORTING
I_ROW_ID = ls_good-ROW_ID
I_FIELDNAME = 'TXT50'
I_VALUE = ls_disc.
ENDCASE.
ENDLOOP.
ENDMETHOD. "handle_data_changed
ENDCLASS. "lcl_event_receiver1 DEFINITION
CREATE OBJECT G_EVENT_RECEIVER1.
SET HANDLER G_EVENT_RECEIVER1->HANDLE_DATA_CHANGED FOR G_GRID3.
when I test this by giving G/L account number , its description populated automatically using the MODE "I" and I saved it,
Now the problem is , when I enter the Record number and the Mode as P the display is showing only G/L account.. Not its description...
In the Image 1, the saved data is showed and saved using record number and the Mode "I" . But when I check in Mode "P", it is showing only G/L account number .. not its description.. in Image-2
As I think, the code needs to b trigerred in the PBO of the coding screen... what will be the logic ?
Kindly help me out...
Regards,
Kiran
set screen 0 .
leave screen.
will take you back to the selection screen.
Regards
Raja
Similar Messages
-
Making selected rows to display mode in ALV grid
I Have program with ALV grid display, which has check box as the first field.
The requirement is like.
When i select some rows in the grid display with the check box and click on a button , then the selected
rows shud change to display mode and others rows shud be in edit mode as before.
*& Report ZSRI_CHCKBOX_ITAB_UPDATE
REPORT ZSRI_CHCKBOX_ITAB_UPDATE.
TYPE-POOLS: SLIS.
DATA: BEGIN OF ITAB OCCURS 0,
CHK TYPE C,
VBELN TYPE VBAP-VBELN,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
MATWA TYPE VBAP-MATWA,
MATKL TYPE VBAP-MATKL,
END OF ITAB.
DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
W_FCAT TYPE SLIS_FIELDCAT_ALV,
RT TYPE SLIS_SELFIELD,
W_LAYOUT TYPE SLIS_LAYOUT_ALV .
PARAMETERS: S_VBELN TYPE VBAK-VBELN.
DATA: WA LIKE LINE OF ITAB.
DATA: G_GRID_REFERENCE TYPE REF TO CL_GUI_ALV_GRID.
DATA: BEGIN OF ITAB1 OCCURS 0,
CHK TYPE C,
VBELN TYPE VBAP-VBELN,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
MATWA TYPE VBAP-MATWA,
MATKL TYPE VBAP-MATKL,
END OF ITAB1.
DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
START-OF-SELECTION.
SELECT VBELN POSNR MATNR MATWA MATKL FROM VBAP
INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE VBELN EQ S_VBELN.
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'CHK'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-CHECKBOX = 'X'.
W_FCAT-EDIT = 'X'.
W_FCAT-SELTEXT_L = 'CHECK'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'VBELN'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'SALES'.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'POSNR'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'ITEM'.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 4.
W_FCAT-FIELDNAME = 'MATNR'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'MATERIAL'.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 5.
W_FCAT-FIELDNAME = 'MATWA'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'MATERIAL QTY'.
W_FCAT-OUTPUTLEN = 20.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 6.
W_FCAT-FIELDNAME = 'MATKL'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'MATERIAL GROUP'.
W_FCAT-OUTPUTLEN = 20.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS1'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = T_FCAT[]
TABLES
T_OUTTAB = ITAB[].
*& Form STATUS1
FORM STATUS1 USING P_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STATUS1' EXCLUDING P_EXTAB.
ENDFORM. "PF_STATUS_SET
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'READ'.
R_SELFIELD-REFRESH = 'X'.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = G_GRID_REFERENCE.
CALL METHOD G_GRID_REFERENCE->CHECK_CHANGED_DATA.
LOOP AT ITAB INTO WA WHERE CHK = 'X'.
APPEND WA TO ITAB1.
ENDLOOP.
W_FCAT1-COL_POS = 1.
W_FCAT1-FIELDNAME = 'CHK'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-CHECKBOX = 'X'.
W_FCAT1-SELTEXT_L = 'CHECK'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 2.
W_FCAT1-FIELDNAME = 'VBELN'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'SALES'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 3.
W_FCAT1-FIELDNAME = 'POSNR'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'ITEM'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 4.
W_FCAT1-FIELDNAME = 'MATNR'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'MATERIAL'.
W_FCAT-OUTPUTLEN = 20.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 5.
W_FCAT1-FIELDNAME = 'MATWA'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'MATERIAL TYPE'.
W_FCAT-OUTPUTLEN = 20.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 6.
W_FCAT1-FIELDNAME = 'MATKL'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'MATERIAL GROUP'.
W_FCAT-OUTPUTLEN = 20.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = T_FCAT1[]
IS_LAYOUT = W_LAYOUT
TABLES
T_OUTTAB = ITAB[].
CLEAR ITAB1.
CLEAR ITAB1[].
CLEAR T_FCAT1.
CLEAR T_FCAT1[].
ENDCASE.
ENDFORM. "USER_COMMAND
Edited by: dharmaji Srinivasu on Feb 6, 2009 1:22 PMHi
Check out the following links:
http://www.sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm " To obtain selected rows
http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm "To make cells editable
In the case stmt for particular button you can do:
loop at itab into wa.
if wa-sel EQ 'X'.
Process records that have been selected
endif.
endloop.
Hope this helps
Regards,
Jayanthi.K -
Going back to selection screen from Change mode in ALV.
Hello Gurus,
I am working on a issue related to ALV where ALV becomes editable when user clicks on change button. The Change button is a custom button defined in application toolbar of ALV display.
case ucomm.
WHEN 'TBACK'.
leave to screen 0.
when 'CHNG'.
loop at it_apst01.
WA_FIELD_LST-EDIT = 'X'.
* Then some field symbol stuff is there
MODIFY FIELD_LST from wa_field_lst transporting edit
where FIELDNAME = <FS5>.
ENDIF.
endif.
endloop.
ENDIF.
describe table gt_alv lines c_hits.
c_alv_hits = c_hits.
concatenate text-010 c_alv_hits 'hits' into c_alv_title separated
by space.
perform display_report tables gt_alv USING c_alv_title.
form display_report tables p_outtab using p_title.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = lv_progname
i_callback_pf_status_set = 'ALV_STATUS'
i_callback_user_command = 'ALV_UCOMM'
* i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = is_layout
it_fieldcat = field_lst
* is_variant = g_variant
it_event_exit = gt_event_exit
i_save = 'A'
it_sort = it_sort
i_screen_start_column = i_start_col
i_screen_start_line = i_start_ln
i_screen_end_column = i_end_col
i_screen_end_line = i_end_ln
tables
t_outtab = p_outtab
exceptions
program_error = 1
others = 2.
endform.
Everything is working ok. But when I click on Back button,the screen goes first to the ALV display mode from edit mode, then user has to click one time more the back button to go to selection screen because the FM 'REUSE_ALV_GRID_DISPLAY' is called once again when user clicks
on change button because I am making the EDIT flag = 'X' and then calling FM again.
Is there a way that when user clicks on Back button, he will directly go to Change Screen -> Selection screen instead of going to Change screen -> Display screen -> Selection screen
Regards,
Rajesh.You must not call the FM 'REUSE_ALV_GRID_DISPLAY' again to make it editable. Instead you can call the FM REUSE_ALV_GRID_LAYOUT_INFO_GET and REUSE_ALV_GRID_LAYOUT_INFO_SET to make your grid editable / non-editable.
Like this:
REPORT grid_edit.
TYPE-POOLS: slis.
* Data to be displayed
DATA: gt_sflight TYPE TABLE OF sflight.
DATA: gs_layout TYPE slis_layout_alv.
parameters: p_test type flag.
start-of-selection.
* Selection
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
* Eingabebereit
gs_layout-edit = 'X'.
* Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'SFLIGHT'
is_layout = gs_layout
TABLES
t_outtab = gt_sflight.
*& Form user_command
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: ls_layout TYPE slis_layout_alv.
IF r_ucomm = '&DATA_SAVE'.
MESSAGE i000(0k) WITH text-001.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
IMPORTING
es_layout = ls_layout.
IF sy-subrc <> 0.
ENDIF.
ls_layout-edit = ' '.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_SET'
EXPORTING
is_layout = ls_layout.
ENDIF.
ENDFORM. "user_command
In this example, when you SAVE, it will give you one Information message and than make the Layout to non-editable mode. When you press back button, it will get you back to selection screen.
Regards,
Naimesh Patel -
What does sel mode values " space,A,B,C,D " specify.
Can somebody describe in detail.
Regards,
Sinu.In sel mode u can observe one button in first column if u click this it will select all the coumns.
For more undrstanding check this code.
types: begin of tp_mkpf,
mblnr like mkpf-mblnr, "Number of Material Document
mjahr like mkpf-mjahr, "Material Document Year
budat like mkpf-budat, "Poating date
bldat like mkpf-bldat, "Document Date in Document
end of tp_mkpf.
types: begin of tp_mseg,
mblnr type mseg-mblnr,
mjahr type mseg-mjahr,
zeile type mseg-zeile,
werks type mseg-werks,
matnr type mseg-matnr,
ebeln type mseg-ebeln,
lifnr type mseg-lifnr,
ebelp type mseg-ebelp,
bwart type mseg-bwart,
objek type ausp-objek,
lgort type mseg-lgort,
end of tp_mseg.
types: begin of tp_ekpo,
ebeln type ekpo-ebeln,
ebelp type ekpo-ebelp,
matnr type ekpo-matnr,
werks type ekpo-werks,
txz01 type ekpo-txz01,
end of tp_ekpo.
types: begin of tp_ekko,
ebeln type ekko-ebeln,
bsart type ekko-bsart,
bedat type ekko-bedat,
zterm type ekko-zterm,
ekgrp type ekko-ekgrp,
end of tp_ekko.
types: begin of tp_makt,
matnr type makt-matnr,
spras type makt-spras ,
maktx type makt-maktx,
end of tp_makt.
types: begin of tp_cabn,
atinn type cabn-atinn,
adzhl type cabn-adzhl,
atnam type cabn-atnam,
end of tp_cabn.
types: begin of tp_ausp,
objek type ausp-objek,
atinn type ausp-atinn ,
atzhl type ausp-atzhl,
mafid type ausp-mafid,
klart type ausp-klart,
adzhl type ausp-adzhl,
atwrt type ausp-atwrt,
in_char(30), "Internal Characteristic Name
end of tp_ausp.
types: begin of tp_s032,
ssour type s032-ssour,
vrsio type s032-vrsio ,
werks type s032-werks,
lgort type s032-lgort,
matnr type s032-matnr,
letztzug type s032-letztzug,
letztabg type s032-letztabg,
end of tp_s032.
INTERNAL TABLES DECLARATION
data: t_mseg type standard table of tp_mseg with header line,
t_mkpf type standard table of tp_mkpf with header line,
t_ekpo type standard table of tp_ekpo with header line,
t_ekko type standard table of tp_ekko with header line,
t_cabn type standard table of tp_cabn with header line,
t_makt type standard table of tp_makt with header line,
t_ausp type standard table of tp_ausp with header line,
t_s032 type standard table of tp_s032 with header line.
data: begin of t_final occurs 0,
sel,
mblnr like mseg-mblnr,
budat like mkpf-budat,
ebeln like ekko-ebeln,
matnr like mseg-matnr,
maktx like makt-maktx,
werks like mseg-werks,
ekgrp like ekko-ekgrp,
lifnr like mseg-lifnr,
bedat like ekko-bedat,
atwrt like ausp-atwrt,
days(5) type c ,
letztzug type s032-letztzug,
letztabg type s032-letztabg,
end of t_final.
WORK AREAS DECLARATION
data: wa_mseg type tp_mseg,
wa_ekpo type tp_ekpo,
wa_ekko type tp_ekko,
wa_mkpf type tp_mkpf,
wa_makt type tp_makt,
wa_cabn type tp_cabn,
wa_ausp type tp_ausp,
wa_s032 type tp_s032.
data: gv_budat like mkpf-budat,
gv_werks like mseg-werks,
gv_matnr like mseg-matnr,
gv_lifnr like mseg-lifnr,
gv_ekgrp like ekko-ekgrp.
----Data declaration for ALV display -
data: it_heading type slis_t_listheader with header line.
data: it_fcat type slis_t_fieldcat_alv with header line.
data: lay type slis_layout_alv.
data: it_sort_subtotal type slis_t_sortinfo_alv with header line.
data: it_event type slis_t_event .
data wa_event type slis_alv_event .
data: v_repid like sy-repid.
data: title(45) type c value 'Report for Material Issurance to User'.
constants: c_h value 'H',
c_s value 'S',
c_x value 'X'.
ranges: t_ekgrp1 for ekko-ekgrp.
ranges: t_ekko1 for ekko-ebeln.
SELECTION SCREEN PARAMETERS
selection-screen begin of block b1 with frame title text-001.
selection-screen begin of block selection with frame.
select-options: s_budat for gv_budat .
select-options: s_werks for gv_werks.
select-options: s_matnr for gv_matnr .
select-options: s_lifnr for gv_lifnr .
select-options: s_ekgrp for gv_ekgrp.
selection-screen end of block selection.
selection-screen end of block b1.
START OF SELECTION *
start-of-selection.
select mblnr
mjahr
budat
bldat
from mkpf into table t_mkpf where budat in s_budat.
if t_mkpf[] is not initial.
select mblnr
mjahr
zeile
werks
matnr
ebeln
lifnr
ebelp
bwart
lgort
from mseg into corresponding fields of table t_mseg
for all entries in t_mkpf where mblnr eq t_mkpf-mblnr and
mjahr eq t_mkpf-mjahr and
werks in s_werks and
matnr in s_matnr and
lifnr in s_lifnr and
bwart eq '101'.
endif.
if t_mseg[] is not initial.
select ssour
vrsio
werks
lgort
matnr
letztzug
letztabg
from s032 into table t_s032
for all entries in t_mseg where matnr = t_mseg-matnr and
werks = t_mseg-werks and
lgort = t_mseg-lgort and
matnr ne space.
sort t_s032 descending by letztzug letztabg .
delete adjacent duplicates from t_s032 comparing matnr werks lgort.
endif.
if t_mseg[] is not initial.
select ebeln
bsart
bedat
zterm
ekgrp
from ekko into table t_ekko
for all entries in t_mseg where ebeln = t_mseg-ebeln and
ekgrp in s_ekgrp and
bsart ne 'ZSRV' and bsart ne 'ZSRE'.
endif.
" Checks for Perfomance by Dileep kumar C.
loop at t_ekko.
t_ekko1-low = t_ekko-ebeln.
t_ekko1-option = 'EQ'.
t_ekko1-sign = 'I'.
append t_ekko1.
clear: t_ekko,t_ekko1.
endloop.
if not t_ekko1[] is initial.
delete t_mseg where not ebeln in t_ekko1.
sort t_mseg by ebeln.
endif.
if t_mseg[] is not initial.
select ebeln
ebelp
matnr
werks
txz01
from ekpo into table t_ekpo
for all entries in t_mseg where ebeln = t_mseg-ebeln and
ebeln ne space .
endif.
if t_mseg[] is not initial.
select matnr
spras
maktx
from makt into table t_makt
for all entries in t_mseg where matnr = t_mseg-matnr and
spras = 'E'.
endif.
loop at t_mseg into wa_mseg .
wa_mseg-objek = wa_mseg-matnr.
modify t_mseg from wa_mseg transporting objek .
endloop.
if t_mseg[] is not initial.
select objek
atinn
atzhl
mafid
klart
adzhl
atwrt
from ausp into corresponding fields of table t_ausp
for all entries in t_mseg where objek = t_mseg-objek.
endif.
loop at t_mseg into wa_mseg.
t_final-matnr = wa_mseg-matnr.
t_final-werks = wa_mseg-werks.
t_final-mblnr = wa_mseg-mblnr.
t_final-lifnr = wa_mseg-lifnr.
read table t_ekpo into wa_ekpo with key ebeln = wa_mseg-ebeln.
if sy-subrc = 0.
t_final-ebeln = wa_ekpo-ebeln.
endif.
read table t_s032 into wa_s032 with key matnr = wa_mseg-matnr
werks = wa_mseg-werks
lgort = wa_mseg-lgort.
if sy-subrc = 0.
t_final-letztzug = wa_s032-letztzug.
t_final-letztabg = wa_s032-letztabg.
endif.
read table t_makt into wa_makt with key matnr = wa_mseg-matnr.
if sy-subrc = 0.
t_final-maktx = wa_makt-maktx.
else.
t_final-maktx = wa_ekpo-txz01.
endif.
read table t_ekko into wa_ekko with key ebeln = wa_mseg-ebeln.
if sy-subrc = 0 .
t_final-ekgrp = wa_ekko-ekgrp.
t_final-bedat = wa_ekko-bedat.
endif.
read table t_ausp into wa_ausp with key objek = wa_mseg-matnr.
if sy-subrc = 0.
t_final-atwrt = wa_ausp-atwrt.
endif.
if t_final-ekgrp in s_ekgrp.
append t_final.
endif.
clear: t_final,wa_mseg,wa_ekpo,wa_ekko,wa_makt,wa_ausp,wa_s032.
endloop.
perform display_data.
*& Form display_data
text
--> p1 text
<-- p2 text
form display_data .
data: v_repid like sy-repid.
perform alv_events . " USING 'TOP_OF_PAGE' 'ALE_EVENT_TOP_OF_PAGE'.
perform alv_declare_key_fields.
perform alv_layout.
perform alv_it_sort_subtotal.
perform alv_grid_display.
perform ale_event_top_of_page .
endform. " display_data
*& Form alv_declare_key_fields
text
--> p1 text
<-- p2 text
form alv_declare_key_fields .
perform ale_field_catagory using '' 'MBLNR' 'X' '' '' '' '' '' 'X' ''
'' 'GRN No.' ''.
perform ale_field_catagory using '' 'LETZTZUG' '' '' '' '' '' '' '' ''
'' 'GRN Date ' ''.
perform ale_field_catagory using '' 'LETZTABG' '' '' '' '' '' '' '' ''
'' 'Latest Issue Date ' ''.
perform ale_field_catagory using '' 'EBELN' 'X' '' '' '' '' '' 'X' ''
'' 'PO.No.' ''.
perform ale_field_catagory using '' 'BEDAT' '' '' '' '' '' '' '' ''
'' 'PO. Date' ''.
perform ale_field_catagory using '' 'MATNR' '' '' '' '' '' '' '' ''
'' ' MATERIAL ' ''.
perform ale_field_catagory using '' 'EKGRP' '' '' '' '' '' '' '' ''
'' 'Pur.Group ' ''.
perform ale_field_catagory using '' 'LIFNR' '' '' '' '' '' '' '' ''
'' 'Vendor No' ''.
perform ale_field_catagory using '' 'MAKTX' '' '' '' '' '' '' ''
'' '' 'Material Description' ''.
perform ale_field_catagory using '' 'WERKS' '' '' '' '' '' '' ''
'' '' 'PLANT' ''.
perform ale_field_catagory using '' 'DAYS' '' '' '' '' '' '' ''
'' '' 'No.of Days At Stores' ''.
perform ale_field_catagory using '' 'ATWRT' '' '' '' '' '' '' ''
'' '' 'VEDI' ''.
endform. " alv_declare_key_fields
*& Form alv_layout
text
--> p1 text
<-- p2 text
form alv_layout .
lay-box_fieldname = 'SEL'.
lay-zebra = 'X'.
lay-f2code = '&ETA'.
lay-detail_popup = 'X'.
lay-colwidth_optimize = 'X'.
endform. " alv_layout
*& Form alv_it_sort_subtotal
text
--> p1 text
<-- p2 text
form alv_it_sort_subtotal .
perform ale_sort
using 'EBELN' 'X' 'X'.
PERFORM ale_sort
USING 'MBLNR' 'X' 'X'.
PERFORM ale_sort
USING 'BELNR_I' 'X' 'X'.
endform. " alv_it_sort_subtotal
*& Form alv_grid_display
text
--> p1 text
<-- p2 text
form alv_grid_display .
v_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'F_USER_COMMAND'
I_STRUCTURE_NAME =
is_layout = lay
it_fieldcat = it_fcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = it_sort_subtotal[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = it_event[]
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 = t_final[]
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.
endform. " alv_grid_display
*& Form ale_sort
text
-->P_1064 text
-->P_1065 text
-->P_1066 text
form ale_sort using fieldname
subtot
up .
clear it_sort_subtotal.
it_sort_subtotal-fieldname = fieldname.
it_sort_subtotal-subtot = subtot.
it_sort_subtotal-up = up.
it_sort_subtotal-group = '*'.
append it_sort_subtotal.
endform. " ale_sort
*& Form ale_field_catagory
text
form ale_field_catagory using col_pos
fieldname
key
no_zero
do_sum
check
just
no_sum
hotspot
emphasize
icon
htext
fix_column .
clear it_fcat.
it_fcat-col_pos = col_pos .
it_fcat-fieldname = fieldname.
it_fcat-key = key.
it_fcat-no_zero = no_zero.
it_fcat-do_sum = do_sum.
it_fcat-checkbox = check.
it_fcat-just = just.
it_fcat-no_sum = no_sum.
it_fcat-hotspot = hotspot.
it_fcat-emphasize = emphasize.
it_fcat-icon = icon.
it_fcat-seltext_l = htext.
it_fcat-fix_column = fix_column .
append it_fcat.
endform. " ale_field_catagory
*& Form ALE_EVENT_TOP_OF_PAGE
text
--> p1 text
<-- p2 text
form ale_event_top_of_page .
data : l_time(10) type c,
l_date1(10) type c.
write sy-datum to l_date1 mm/dd/yyyy.
write sy-uzeit to l_time using edit mask '__:__:__'.
perform alv_heading
using 'H' '' 'HINDUSTAN ZINC LIMITED'.
perform alv_heading
using 'S' 'TITLE' title.
perform alv_heading
using c_s 'User' sy-uname.
perform alv_heading
using c_s 'Time' l_time.
perform alv_heading
using c_s 'Date' l_date1.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = it_heading[]
i_logo = 'HZLLOGO'.
clear it_heading[].
endform. " ALE_EVENT_TOP_OF_PAGE
*& Form alv_heading
text
-->P_1221 text
-->P_1222 text
-->P_1223 text
form alv_heading using typ
key
info.
clear it_heading.
it_heading-typ = typ.
it_heading-key = key.
it_heading-info = info.
append it_heading.
endform. " alv_heading
*& Form F_USER_COMMAND
text
--> p1 text
<-- p2 text
form f_user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&IC1'. "Double click
case rs_selfield-fieldname. "field name
*Purchase order Number
when 'EBELN'.
if not rs_selfield-value is initial.
*Setting parameter id
set parameter id 'BES' field rs_selfield-value.
call transaction 'ME23N' and skip first screen.
endif.
*Material Document number
when 'MBLNR'.
if not rs_selfield-value is initial.
*Setting parameter id
set parameter id 'MBN' field rs_selfield-value.
call transaction 'MIGO' and skip first screen.
endif.
when others.
endcase.
endcase.
endform. " F_USER_COMMAND
*& Form alv_events
text
--> p1 text
<-- p2 text
form alv_events .
" form.
clear it_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = it_event.
sort it_event by name form.
"Top of page event
read table it_event into wa_event
with key name = 'TOP_OF_PAGE'.
if sy-subrc = 0.
move 'ALE_EVENT_TOP_OF_PAGE' to wa_event-form.
modify it_event from wa_event transporting form
where name = wa_event-name .
endif.
" User Command event
read table it_event into wa_event
with key name = 'USER_COMMAND'.
if sy-subrc eq 0.
move 'F_USER_COMMAND' to wa_event-form .
modify it_event from wa_event transporting form
where name = wa_event-name .
endif.
append wa_event to it_event.
endform. " alv_events
Edited by: SnickyUcan on Jul 15, 2008 9:03 AM -
ALV GRID edit mode keyboard issue
Hi,
I have created a program that displays an ALV GRID.
From the Layout I said to edit in edit mode the ALV Grid.
In the menu toolbar I exclude the button 'cut - copy -paste and delete line'.
When I run the program I see that these buttons are not displayed --> OK.
BUT my problem is: if I use the keyboard then the ALV Grid manages these actions.
For instance. I select some lines and press the key DELETE on the keyboard --> the lines are removed and that is not that I expect because I removed this action from the toolbar.
For the cut - copy and paste it's the same.
Do you have a solution for me --> intercept an event or change the function keys or ....
I would like that the ALV Grid does not manage the keys delete, CRTL-C, CRTL-V in edit mode.
Thanks,
Stevie,Hi Steve
I was not aware of this. So, I recommend you to try this:
At the event <b>"before_user_command"</b> you can terminate the process by resetting the ALV user command.
<u><b>e.g.</b></u>
CASE e_ucomm .
WHEN '&INFO' .
CALL METHOD gr_alvgrid->set_user_command
EXPORTING i_ucomm = space.
ENDCASE .
This code within the event overrides the '&INFO' function and terminates its process. For cut and copy, you can find out ucomm values by putting a break point inside the event and tracing the value of <b>"i_ucomm"</b>.
For some relevant issues, you can inspect the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference For ALV Grid Control"</a>.
<i>As another thing, since you are a new SDN member, you are welcome and let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)</i>
Kind regards...
*--Serdar -
Need to be displayed in ALV grid
Dear All,
Below is my Program's code which is working accordingly. But in this code I am generating output as Basic list display. But I want my output to be displayed in ALV only. So from where I will start. Where to add code for Alv in my existing code. Can anybody help me out on the same.
Regards,
Abhay.
REPORT zfi_temp_rfkopr00
MESSAGE-ID FR
LINE-SIZE 132
NO STANDARD PAGE HEADING.
Report Name : Vendor Open Items Ageing Report
Purpose : This report displays the Vendor Open Items based on
different Ageing days (Calculated by taking the Base
Line date and the days mentioned in Payment Terms)
D A T A B A S E T A B L E S D E C L A R A T I O N
TABLES: lfa1, " Vendor Master (General)
t001, " Company Codes
rfpdo.
I N T E R N A L T A B L E S D E C L A R A T I O N S *
Internal Table for Vendor Open Items Data
DATA: BEGIN OF int_bsik OCCURS 0,
lifnr LIKE bsik-lifnr, " Vendor Number
name1 LIKE lfa1-name1, " Vendor Name
shkzg LIKE bsik-shkzg, " Dr/Cr Indicator
belnr LIKE bsik-belnr, " Document Number
xblnr LIKE bsik-xblnr, " Ref Doc No
blart LIKE bsik-blart, " Document Type
zfbdt LIKE bsik-zfbdt, " Base Line Date
zbd1t LIKE bsik-zbd1t, " Due date1
zbd2t LIKE bsik-zbd2t, " Due Date2
zbd3t LIKE bsik-zbd3t, " Due Date3
waers LIKE bsik-waers, " Currency
dmbtr LIKE bsik-dmbtr, " Amount in Local Curr
END OF int_bsik.
Internal Table for Amounts Sum Up Data
DATA: BEGIN OF int_final OCCURS 0,
lifnr LIKE bsik-lifnr, " Vendor Number
name1 LIKE lfa1-name1, " Vendor Name
total1 LIKE bsik-dmbtr, " Amount in Local Curr
total2 LIKE bsik-dmbtr, " Amount in Local Curr
total3 LIKE bsik-dmbtr, " Amount in Local Curr
total4 LIKE bsik-dmbtr, " Amount in Local Curr
total5 LIKE bsik-dmbtr, " Amount in Local Curr
total6 LIKE bsik-dmbtr, " Amount in Local Curr
total LIKE bsik-dmbtr, " Amount in Local Curr
END OF int_final.
D A T A D E C L A R A T I O N S
DATA : v_flag, " Flag
v_gtotal1 LIKE bsik-dmbtr, " Amount Totals
v_gtotal2 LIKE bsik-dmbtr, " Amount Totals
v_gtotal3 LIKE bsik-dmbtr, " Amount Totals
v_gtotal4 LIKE bsik-dmbtr, " Amount Totals
v_gtotal5 LIKE bsik-dmbtr, " Amount Totals
v_gtotal6 LIKE bsik-dmbtr, " Amount Totals
v_gtotal LIKE bsik-dmbtr, " Amount Totals
v_subtotal1 LIKE bsik-dmbtr, " Amount Totals
v_subtotal2 LIKE bsik-dmbtr, " Amount Totals
v_subtotal3 LIKE bsik-dmbtr, " Amount Totals
v_subtotal4 LIKE bsik-dmbtr, " Amount Totals
v_subtotal5 LIKE bsik-dmbtr, " Amount Totals
v_subtotal6 LIKE bsik-dmbtr, " Amount Totals
v_subtotal LIKE bsik-dmbtr, " Amount Totals
v_date LIKE bsik-zfbdt, " Due Date
v_tage1(4), " Age 30 days
v_tage2(4), " Age 60 days
v_tage3(4), " Age 90 days
v_fir(15), " Column Text1
v_sec(15), " Column Text2
v_thir(15), " Column Text3
v_four(17), " Column Text4
v_fidd(4), " Days field1
v_sedd(4), " Days field2
v_thdd(4), " Days field3
v_fodd(4), " Days field4
v_str TYPE sy-lisel, " String
v_str1(11), " String
v_tage(3), " String
v_date1(10). " Date field
R A N G E D E C L A R A T I O N S
RANGES: r_date1 FOR bsik-zfbdt, " Date Range 1
r_date2 FOR bsik-zfbdt, " Date Range 2
r_date3 FOR bsik-zfbdt, " Date Range 3
r_date4 FOR bsik-zfbdt. " Date Range 4
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr. "Vendor account
PARAMETERS: p_bukrs LIKE t001-bukrs. "Co. Code
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
"Open items at key date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
SELECTION-SCREEN END OF BLOCK b3.
A T S E L E C T I O N S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_flds.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
T O P O F P A G E
Header
TOP-OF-PAGE.
PERFORM header.
E N D O F P A G E
Footer
END-OF-PAGE.
ULINE.
T O P O F P A G E D U R I N G L I N E S E L E C T I O N *
Top of Page in Secondary List
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM header1.
A T L I N E S E L E C T I O N *
AT LINE-SELECTION.
Perform Line Selections
PERFORM line_selection.
E N D O F S E L E C T I O N
END-OF-SELECTION.
List generation
PERFORM basic_list.
*& Form validate_flds
Validation of Selection Screen fields
FORM validate_flds .
Validate Vendor Code
CLEAR lfa1-lifnr.
SELECT lifnr UP TO 1 ROWS
INTO lfa1-lifnr
FROM lfa1
WHERE lifnr IN s_lifnr AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Vendor Code range'(023).
ENDIF.
Validate Company Code
CLEAR t001-bukrs.
SELECT bukrs UP TO 1 ROWS
INTO t001-bukrs
FROM t001
WHERE bukrs = p_bukrs AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e021. " Invalid Company Code range
ENDIF.
IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 1 greater'(004)
'than Column# 2 or 3 or 4'(005).
ENDIF.
*column 2
IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 2 greater'(006)
'than Column# 3 or 4'(007).
ENDIF.
*column3
IF ( p_tage3 > p_tage4 ).
MESSAGE e999 WITH 'Column 3 greater'(008)
'than Column#4'(009).
ENDIF.
ENDFORM. " validate_flds
*& Form fetch_data
Fetching Data from Database Tables
FORM fetch_data .
Date Range Population
r_date1-sign = 'I'.
r_date1-option = 'BT'.
r_date1-low = p_allgst.
r_date1-high = r_date1-low + p_tage1.
APPEND r_date1.
r_date2-sign = 'I'.
r_date2-option = 'BT'.
r_date2-low = r_date1-high + 1.
r_date2-high = r_date1-low + p_tage2.
APPEND r_date2.
r_date3-sign = 'I'.
r_date3-option = 'BT'.
r_date3-low = r_date2-high + 1.
r_date3-high = r_date1-low + p_tage3.
APPEND r_date3.
r_date4-sign = 'I'.
r_date4-option = 'BT'.
r_date4-low = r_date3-high + 1.
r_date4-high = r_date1-low + p_tage4.
APPEND r_date4.
Select the Vendor Open Items data from BSIK
SELECT l~lifnr
l1~name1
b~waers
b~dmbtr
b~zfbdt
b~zbd1t
b~zbd2t
b~zbd3t
b~belnr
b~xblnr
b~shkzg
b~blart
INTO CORRESPONDING FIELDS OF TABLE int_bsik
FROM lfb1 AS l INNER JOIN lfa1 AS l1
ON llifnr = l1lifnr
INNER JOIN bsik AS b
ON llifnr = blifnr AND
lbukrs = bbukrs
WHERE l~lifnr IN s_lifnr AND
l~bukrs = p_bukrs AND
b~zfbdt LE p_allgst.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'No Data found'(027).
ENDIF.
Removing the date limit to get the due items in the past
DELETE int_bsik WHERE
( blart NE 'RE' AND blart NE 'KR' ) OR
shkzg NE 'H'.
SORT int_bsik BY lifnr.
ENDFORM. " fetch_data
*& Form header
Display the Report Columns
FORM header .
v_tage1 = p_tage1 + 1.
v_tage2 = p_tage2 + 1.
v_tage3 = p_tage3 + 1.
v_fidd = p_tage1.
v_sedd = p_tage2.
v_thdd = p_tage3.
v_fodd = p_tage4.
MOVE v_fodd0(4) TO v_fodd1(3).
v_fodd+0(1) = space.
CONCATENATE '1 to'(010) v_fidd INTO v_fir.
CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
Standard header
CLEAR: v_date1, v_str, v_str1, v_tage.
WRITE p_allgst TO v_date1.
MOVE p_tage4 TO v_tage.
CONCATENATE '>' v_tage text-025 INTO v_str1.
CONCATENATE
'Summary of Ageing Analysis for Vendor Open Invoices as on'(013)
v_date1 INTO v_str SEPARATED BY space.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = 'Saudi International Petrochemical Company'(012)
title2 = v_str.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
FORMAT COLOR 1 INTENSIFIED.
WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
50(101) 'Invoices Due For(In Days)'(014) CENTERED,
151 sy-vline, 168 sy-vline .
WRITE :/1 sy-vline, 2(11) 'Vendor#'(015) CENTERED,
13 sy-vline ,14(35) 'Vendor Name'(016) CENTERED,
49 sy-vline,
50(101) sy-uline,151 sy-vline,
152(16) 'Total'(017) CENTERED,
168 sy-vline.
WRITE : /1 sy-vline,13 sy-vline, 49 sy-vline,
50(16) v_fir CENTERED, 66 sy-vline,
67(16) v_sec CENTERED, 83 sy-vline,
84(16) v_thir CENTERED, 100 sy-vline,
101(16) v_four CENTERED, 117 sy-vline,
118(16) v_str1 CENTERED, 134 sy-vline,
135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
168 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
ENDFORM. " header
*& Form basic_list
Display the Basic List
FORM basic_list .
NEW-PAGE LINE-SIZE 168.
LOOP AT int_bsik.
CLEAR v_date.
IF int_bsik-zbd3t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd3t.
ELSE.
IF int_bsik-zbd2t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd2t.
ELSE.
v_date = int_bsik-zfbdt + int_bsik-zbd1t.
ENDIF.
ENDIF.
IF int_bsik-zbd1t = ' '.
v_date = int_bsik-zfbdt.
ENDIF.
IF v_date IN r_date1.
int_final-total1 = int_final-total1 + int_bsik-dmbtr.
ELSEIF v_date IN r_date2.
int_final-total2 = int_final-total2 + int_bsik-dmbtr.
ELSEIF v_date IN r_date3.
int_final-total3 = int_final-total3 + int_bsik-dmbtr.
ELSEIF v_date IN r_date4.
int_final-total4 = int_final-total4 + int_bsik-dmbtr.
ELSEIF v_date > r_date4-high.
int_final-total5 = int_final-total5 + int_bsik-dmbtr.
ELSEIF v_date < p_allgst.
int_final-total6 = int_final-total6 + int_bsik-dmbtr.
ENDIF.
AT END OF lifnr.
v_flag = 1.
ENDAT.
IF v_flag = 1.
int_final-lifnr = int_bsik-lifnr.
int_final-name1 = int_bsik-name1.
int_final-total = int_final-total1 + int_final-total2 +
int_final-total3 + int_final-total4 + int_final-total5 +
int_final-total6.
APPEND int_final.
v_gtotal1 = v_gtotal1 + int_final-total1.
v_gtotal2 = v_gtotal2 + int_final-total2.
v_gtotal3 = v_gtotal3 + int_final-total3.
v_gtotal4 = v_gtotal4 + int_final-total4.
v_gtotal5 = v_gtotal5 + int_final-total5.
v_gtotal6 = v_gtotal6 + int_final-total6.
v_gtotal = v_gtotal + int_final-total.
WRITE: /1 sy-vline,
2 int_final-lifnr COLOR 4 INTENSIFIED ON,
13 sy-vline,
14 int_final-name1 COLOR 4 INTENSIFIED ON,
49 sy-vline.
DATA : v_rem.
v_rem = sy-tabix MOD 2.
IF v_rem NE 0.
FORMAT COLOR 2 INTENSIFIED.
WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsik-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsik-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsik-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsik-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsik-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsik-waers,
168 sy-vline.
ELSE.
WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsik-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsik-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsik-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsik-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsik-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsik-waers,
168 sy-vline.
ENDIF.
FORMAT COLOR OFF.
HIDE int_final.
CLEAR int_final.
v_flag = 0.
ENDIF.
AT LAST.
WRITE : /1(168) sy-uline.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline, 2(47) 'GRAND TOTAL'(022) CENTERED,
49 sy-vline, 50 v_gtotal1 CURRENCY int_bsik-waers,
66 sy-vline, 67 v_gtotal2 CURRENCY int_bsik-waers,
83 sy-vline, 84 v_gtotal3 CURRENCY int_bsik-waers,
100 sy-vline,101 v_gtotal4 CURRENCY int_bsik-waers,
117 sy-vline,118 v_gtotal5 CURRENCY int_bsik-waers,
134 sy-vline,135 v_gtotal6 CURRENCY int_bsik-waers,
151 sy-vline,152 v_gtotal CURRENCY int_bsik-waers,
168 sy-vline.
HIDE : v_gtotal1,
v_gtotal2,
v_gtotal3,
v_gtotal4,
v_gtotal5,
v_gtotal6,
v_gtotal.
ENDAT.
FORMAT COLOR OFF.
ENDLOOP.
WRITE : /1(168) sy-uline.
ENDFORM. " basic_list
*& Form line_selection
When double clicked on the line display the seconday list
FORM line_selection .
NEW-PAGE LINE-SIZE 206.
Sy-lsind = 1.
DATA : v_rem,v_cnt LIKE sy-tabix.
v_cnt = 0.
SORT int_bsik BY belnr zfbdt.
LOOP AT int_bsik WHERE lifnr EQ int_final-lifnr.
v_rem = v_cnt MOD 2.
CLEAR v_date.
IF int_bsik-zbd3t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd3t.
ELSE.
IF int_bsik-zbd2t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd2t.
ELSE.
v_date = int_bsik-zfbdt + int_bsik-zbd1t.
ENDIF.
ENDIF.
IF int_bsik-zbd1t = ' '.
v_date = int_bsik-zfbdt.
ENDIF.
IF v_rem NE 0.
FORMAT COLOR 2 INTENSIFIED.
WRITE :/1 sy-vline, 2 int_bsik-belnr,
12 sy-vline,13 int_bsik-lifnr,
23 sy-vline,24 int_bsik-name1,
59 sy-vline,60 int_bsik-xblnr,
76 sy-vline,77 int_bsik-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline, 189 sy-vline,
190 int_bsik-dmbtr CURRENCY int_bsik-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
ENDIF.
FORMAT COLOR OFF.
ELSE.
WRITE :/1 sy-vline, 2 int_bsik-belnr,
12 sy-vline,13 int_bsik-lifnr,
23 sy-vline,24 int_bsik-name1,
59 sy-vline,60 int_bsik-xblnr,
76 sy-vline,77 int_bsik-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline,189 sy-vline,
190 int_bsik-dmbtr CURRENCY int_bsik-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
ENDIF.
ENDIF.
FORMAT COLOR OFF.
v_cnt = v_cnt + 1.
ENDLOOP.
WRITE : /1(206) sy-uline.
v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
+ v_subtotal4 + v_subtotal5 + v_subtotal6.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline,
2(85) 'Total'(017) CENTERED CURRENCY int_bsik-waers ,
87 sy-vline,
88 v_subtotal1 CURRENCY int_bsik-waers,
104 sy-vline,
105 v_subtotal2 CURRENCY int_bsik-waers,
121 sy-vline,
122 v_subtotal3 CURRENCY int_bsik-waers,
138 sy-vline,
139 v_subtotal4 CURRENCY int_bsik-waers,
155 sy-vline,
156 v_subtotal5 CURRENCY int_bsik-waers,
172 sy-vline,
173 v_subtotal6 CURRENCY int_bsik-waers,
189 sy-vline,
190 v_subtotal CURRENCY int_bsik-waers,
206 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(206) sy-uline.
CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
ENDFORM. " line_selection
*& Form header1
Secondary List Header
FORM header1 .
Standard header
CLEAR: v_date1, v_str, v_str1, v_tage.
WRITE p_allgst TO v_date1.
MOVE p_tage4 TO v_tage.
CONCATENATE '>' v_tage text-025 INTO v_str1.
CONCATENATE
'Details of Ageing Analysis for Vendor Open Invoices as on'(024)
v_date1 INTO v_str SEPARATED BY space.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = 'Saudi International Petrochemical Company'(012)
title2 = v_str.
FORMAT COLOR 1 INTENSIFIED.
WRITE :/1(206) sy-uline.
WRITE :/1 sy-vline,12 sy-vline ,
23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
88(101) 'Invoices Due For(In Days)'(014) CENTERED,
189 sy-vline,206 sy-vline.
WRITE : /1 sy-vline, 2(10) 'Doc Number'(021) CENTERED,
12 sy-vline, 13(10) 'Vendor#'(015) CENTERED,
23 sy-vline, 24(35) 'Vendor Name'(016) CENTERED,
59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
87 sy-vline, 88(101) sy-uline,
189 sy-vline,190(16) 'Total'(017) CENTERED,
206 sy-vline.
WRITE : /1 sy-vline, 12 sy-vline,
23 sy-vline,59 sy-vline,
76 sy-vline,87 sy-vline,
88(16) v_fir CENTERED, 104 sy-vline,
105(16) v_sec CENTERED, 121 sy-vline,
122(16) v_thir CENTERED, 138 sy-vline,
139(16) v_four CENTERED, 155 sy-vline,
156(16) v_str1 CENTERED,
172 sy-vline,
173(16) 'Already Overdue'(018) CENTERED,
189 sy-vline,
206 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(206) sy-uline.
ENDFORM. " header1Hi Abhay,
After moving the whole data into final internal table, pass that internal table to function module REUSE_ALV_GRID_DISPLAY.
before that you need to build field catalog and have to build layout with all the required columns.
Go through the below links for your reference.
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
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
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
Tabstrip
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
Editable ALV
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
http://www.sap-img.com/abap/what-is-alv-programming.htm
http://www.sap-img.com/abap-function.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
http://www.sap-img.com/abap-function.htm
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
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).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
<b>Reward points for helpful answers,</b>
Satish -
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.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. -
How to generate interactive report in alv
hi,
how to generate interactive report in alv,for this what are the requirements,
give me one sample report.
thankyou.Hi,
Chk these helpful links..
ALV
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
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
Anversha -
Need to display two ALV GRIDs in a single screen
Hi,
I have a question, i'm using version 4.6. I want to display 2 ALVs in a single screen or by calling.
Step 1 : The internal table (which holds the data for the ALVs has to be populated before calling ALV1 or ALV2)
Step 2 : Display In a single report
ALV1 report (Editable ,Has to be a GRID)
ALV2 report (Non Editable, Has to be a GRID)
(or)
Step 1 : The internal table (which holds the data for the ALVs has to be populated before calling ALV1 or ALV2)
Step 2 :
ALV1 report (Editable ,Has to be a GRID, with a custom button to call ALV2 hiding the ALV1 ie not visible to user)
ALV2 report (Non Editable ,Has to be a GRID, with a custom button to call ALV1 hiding the ALV2 ie not visible to user)
Please help me <b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada GalindoHi
ABAP List Viewer
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
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
Check the program in the following link:
http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm
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
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
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
13. Top-of-page in ALV
selection-screen and top-of-page in ALV
14. ALV Group Heading
http://www.sap-img.com/fu037.htm
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
15. ALV output to PDF conversion
It has an example code for PDF Conversion.
http://www.erpgenie.com/abap/code/abap51.htm
converting the output of alv in pdf
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
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).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Regards
Anji -
Hi guys !!
Do you have any good manual or tutorial on how to create a alv grid, including all the steps for the abap program and the screen painter.
Thanks a lot !Javier,
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
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
Don't forget to reward if useful.... -
How to focus a cell on ALV grid display
hi,
I need to set the focus to the first cell on the first row in the ALV grid.I am using object oriented ALV grid control.Can anyone help me out in this regard.
Regards,
Anil.Re: simple Grid display
Have a look at below links. It contains sample code for alv grid.
http://www.erpgenie.com/abap/controls/alvgrid.htm#Complete%20code%20for%20the%20ALV%20grid%20example
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
http://sap.niraj.tripod.com/id64.html
Also have a look at below for OO alv grid:
http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5533cd30911d2b467006094192fe3/frameset.htm
-->
ABAP List Viewer
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).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status iii. I_callback_user_command : routine where the function codes are handled iv. I_structure name : name of the dictionary table v. Is_layout : structure to set the layout of the report vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block II. it_fieldcat : field catalog III. i_tabname : internal table name with output data IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output ii. t_outtab_item : Name of the internal table in the program containing the output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary) E. ref_tabname : table (dictionary) F. key(1) : column with key-color G. icon(1) : icon H. symbol(1) : symbol I. checkbox(1) : checkbox J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
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
Reward If useful -
Function module used for formatting alv
hi gurus,
which function module is uesd to format alv?Hi
see the following
ABAP List Viewer
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).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
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
Check the program in the following link:
http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm
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
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
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
13. Top-of-page in ALV
selection-screen and top-of-page in ALV
14. ALV Group Heading
http://www.sap-img.com/fu037.htm
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
15. ALV output to PDF conversion
It has an example code for PDF Conversion.
http://www.erpgenie.com/abap/code/abap51.htm
converting the output of alv in pdf
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
Anji -
What is the difference b/w ALV Function Module and ALV Methods?
Hello Friends,
Can anybody help me in finding out the difference between ALV Function Modules and ALV methods?
Thanks & Regards
Sathish KumarHi Sathish,
Plz go through this info. It is very useful.
hi,
chk these excellent links.
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.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
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
OOPs:
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
Tabstrip
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
Editable ALV
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
Rewords some points if it is helpful.
Rgds,
P.Naganjana Reddy -
Hello Experts,
I need your help this is some kind of urgent. Im currently working on Dialog program right now, My counterpart is requesting that the standard toolbars from report alv will be displayed to my ALV Dialog with the same functionality. Were having a hard time to make it work all of the standard toolbars of ALV report on our ALV DIALOG.
PLease help. I'll be glad to give out pointssee these programs
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878 -
Display selection screen details in the header of ALV
hi..
can someone please help me on how to display the data in the selection screen in the header in ALV?
i hope someone can help me..thanks very much..Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
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
Maybe you are looking for
-
Error while transporting a data type
Hello all SAP PI Experts, I'm trying to transport a data type but I'm getting the below mentioned error. This is happening even when I gave the proper name of SWCV that contains this data type. Please suggest how this problem can be solved. Thanks, A
-
Query Tuning Assistance - part 5
"FIN_AGING_ARG"."FINANCIAL_SOURCE"='APR') AND "FIN_PAYMENT"."PAYMENT_DATE"<="FIN_AGING_ARG"."AGING_DATE" AND ("FIN_AGING_ARG"."PLC_ID" IS NULL OR "FIN_AGING_ARG"."PLC_ID" IS NOT NULL AND "FIN_PAYMENT"."LOCATION_ID"="FIN_AGING_ARG"."PLC_ID" AND "FIN_P
-
Transparent connections through HTTP proxies
Hi All, I am trying to connect to internet through java application. In my application I had an object for example SomeObject obj = new SomeObject("url"); which internally connects to the web application on internet. When I run this application I am
-
Pictures in CUPC looks strange
Hi I'm testing to show user pictures in CUPC but they look as if there was some kind of red filter om them. Dpes anyone have an idéa why this is happening? The pictires looks ok in Outlook
-
Why I can not open jpg and pdf attachments from my mails on my ipad2?
Everytime I receive an email with attachements jpg, pdf I can not open it. And all pps has no sound. Can you help me?