How clear own f4 help in ALV GRID OO
Hi experts,
I have to create OWN F4 Help for 4 different cells in a ALV Grid list. I create one and it works.
But how can I create the another ones without copy all the abapcode? (dynpro, classes, methods, etc.)
To create one I use de BCALV_EDIT_08 standard report by example.
Please help me.
Thanks in advance.
Oscar.
Hi Ganesh,
Did you have a look at sample report BCALV_TEST_GRID_F4_HELP ?
Here is part of the header documentation:
*& Report BCALV_GRID_F4_HELP *
Purpose:
~~~~~~~~
This report illustrates the use of f4-Help in an alv grid control.
Background:
~~~~~~~~~~~
There a two possibilities to implement an f4-Help in the alv grid
control: one can either use standard f4-help or write one by Hand.
For the former there is nothing to do at all. This report shows how
to implement user-defined f4-help.
I am sure you will find within this report the solution you are looking for.
Reward points if this Helps.
Manish
Similar Messages
-
How to get f4 help in alv grid in container-urgent
hi,
how to get f4 help in alv grid in container using abap objects
ganeshHi Ganesh,
Did you have a look at sample report BCALV_TEST_GRID_F4_HELP ?
Here is part of the header documentation:
*& Report BCALV_GRID_F4_HELP *
Purpose:
~~~~~~~~
This report illustrates the use of f4-Help in an alv grid control.
Background:
~~~~~~~~~~~
There a two possibilities to implement an f4-Help in the alv grid
control: one can either use standard f4-help or write one by Hand.
For the former there is nothing to do at all. This report shows how
to implement user-defined f4-help.
I am sure you will find within this report the solution you are looking for.
Reward points if this Helps.
Manish -
Hi regarding how to put f4 help for alv grid editable
Hi,
Please guide me with sample program how to pass f4 value for particular selected field . In case i haved kunnr ,sales org , channel , division and i select kunnr for selected kunnr i need to exaactact the data for kunnr in kna1 table and place that value in f4 editable field .
Regarding
anilHi
Please check program BCALV_GRID_EDIT_DELTA
Thanks
Vishal Kapoor -
How to enable excel downloading in ALV grid report.
Hi all,
How to enable excal downing in ALV grid report?
Thanks in Advance.
Siva Sankar.hi
check the following code
Example of a Simple ALV Grid Report
REPORT ZTUFI091 .
*& Report ZDEMO_ALVGRID *
*& Example of a simple ALV Grid Report *
*& The basic requirement for this demo is to display a number of *
*& fields from the EKKO table. *
*REPORT zdemo_alvgrid .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
hope it will help you
regards
sreelatha gullapalli -
F4 help in ALV grid using existing search help
Hi All,
It would be appreciable , if some help on problem. Thanks in advance.
How to provide user defined F4 help in ALV grid using existing search help?
ALV grid has developed using OOPS concept.
Thanks,
Sudhakar.Hi,
if you already developed using OO concept, it should be possible to:
create a handler for event ONF4
The interface will tell you actual field name and value where F4 is pressed. This will enable you to call your own routine (see FM F4-IF....).
Please check how the standard handles F4 - if you have standard and customer-F4 mixed you shouldtake care that the standard handling is triggered.
Regards,
Clemens -
F4 Help in ALV GRID class based
hi
you have any idea about how to invoke the F4 help in ALV GRID Class based program.,
if u have any other related document or program using F4 function in ALV GRId please send to me for reference
Thanks & Regards
K.Ghi for what kind of fields you need to give f4.
are they std or custom...
please let me know about the fields..
try to check my logic which i gave in the below post..
it will give f4 help to the fields(if thet are standard table fieldS)
Message was edited by: Vijay Babu Dudla -
How can I call functionality of ALV Grid by event of button outside grid?
Hello,
How can I call functionality of ALV Grid by event of button located outside ALV Grid? For example how to fire printing of this ALV Grid by button click elsewhere on the screen (not in toolbar of ALV Grid).
Best regards,
Josef Motlhi Motl,
these are steps to create a button in ALV and trigger an event from it..
1.Use the parameter i_callback_pf_status_set in the function module REUSE_ALV_GRID_DISPLAY
i_callback_program = gd_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'NEWALVSTATUS'.
endform.
You have to copy the standard ALV pf stauts to 'NEWALVSTATUS' and add your button.
2.You have to do the following to process the new button click.
i_callback_user_command = 'USER_COMMAND'
form user_command using i_ucomm like sy-ucomm
is_selfield type slis_selfield.
case i_ucomm.
3. to copy the standard pf status to a new one.go to the ALV screen and take the menu System -> Status. Then look for the standard pf status. Copy this to Z range and then add your new button.
reward points if helpful
regards
satesh -
How to trigger left_click_run event on ALV GRID
Hiiiiiiii........
Can any of u please tell me how to trigger left_click_run event on ALV GRID.
There is an event LEFT_CLICK_RUN and its a public accessed event. But the problem is , the corresponding attribute of this event "EVENT_LEFT_CLICK_RUN" which is needed to registered that event (We need to register our events through a method set_register_events using table of type cntl_simple_events...) is protect accessed. So I am unable to use that attribute...Could u please tell me is there any alternative way to register that event.......ANY POSSIBLE WAY?
Thanks in advance,
RamsI think you should use event selection_changed. Note that you shouldn't allow multiple selection for the tree at the same time, i.e. use: create object g_tree exporting \[...\] node_selection_mode = cl_gui_column_tree=>node_sel_mode_single.
For more information, see this thread: Urgently required : cl_gui_alv_tree single_click event... -
What is shortest way to attach particular Search Help in ALV grid using OOPS ?
Thanks Gurpreet,
Through search helps attached to data element it is possible but is there any other way to attach searchhelp differet from from the search help attached to the data element ? The new search-elp is not customized search help as given in the above threads ?
Eg. - If I want to attach MAT2 to a field named MATNR in the table instead of the MAT1 which is standard.
Thanks in advance -
F4 help in ALV grid by using function module?
Hi,
I need to get f4 search help in ALV grid for a certain fields by using function module method.
Please guide me.
Thank You.Hi
F4IF_INT_TABLE_VALUE_REQUEST use this fm to get f4 search help for a certain fields .
Regards
Divya -
F4 help in ALV grid, how to check the entries?
Hello,
I have created F4 help on the cells in a ALV using OO ABAP. The F4 Help works fine and the user can select the entries from it. BUt in F4 help, the user can manually enter values also.
I want to either disallow the user the enter values manually or validate his entries and ask him to choose from F4 only.
How to achieve this??Use this in Top Include
class local_event_handler definitin deferred.
data handler type ref to local_event_handler
After ALV Grid, register the edit event as shown below after the SET_TABLE_FOR_FIRST_DISPLAY and also set the handler as event handler
if handler is initial.
create object handler.
endif.
set handler handler->handle_data_changed
for main_grid. " Main Grid is your ALV Grid
call method main_grid->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
Class Definition / Implementation
class local_event_handler definition.
public section.
methods
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
methods
local_event_handler .
endclass. "local_event_handler DEFINITION
class local_event_handler implementation.
method local_event_handler.
" do nothing
endmethod. "llocal_event_handler
method handle_data_changed.
read table er_data_changed->mt_mod_cells into ls_mod_cell index 1.
perform handle_data_changed using er_data_changed.
" ls_mod_cell-row_id contains the row number that changed. More details in er_data_changed
endmethod. "handle_data_changed
endclass. "handle_btn_click -
How to make a field of ALV Grid to use a Search Help?
Hi;
I have a ALV grid with a field catalog. Say the field is 'USR000'.
F4availabl = 'X' . for the field in the field catalog.
I have prepared search help named ZEV_PROTYPE that uses tha table ZEV_PROTYPES.(two fields in the table :ProType and Text).
Is it possible to make the field in ALV grid to use this search help if F4 is pressed on the field. ?
Which structure of the ALV must be used for that ? Is it Field Catalog ?
Would you please help me ?
erk.Hi,
If you have a Z data element and the search help is attached to it, you can just give the reference table and field in the field catalog for the editable ALV field, and the search help should appear.
Regards,
Sagar -
How to display Insert button in ALV Grid
Hi All,
When I create an ALV Grid, I dont see the Insert Row and Delete Row buttons in the toolbars by default. But when I see the class CL_GUI_ALV_GRID, I see two attributes named MC_FC_LOC_INSERT_ROW and MC_FC_LOC_DELETE_ROW. These attributes, I feel are for the insert and delete functionalities only.
Then How can we display them in our toolbar..
Please help me out.
Points are guaranteed for useful answers.
Thanks in advance.
Regards,
Himanshuhi,
1) define local CLASS : DEFINITION.
METHODS:
*for event double click
handle_dclick for event double_click OF cl_gui_alv_grid
importing ES_ROW_NO,
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
PRIVATE SECTION.
ENDCLASS.
2)
implmentation:
METHOD handle_toolbar.
* § 2.In event handler method for event TOOLBAR: Append own functions
* by using event parameter E_OBJECT.
* DATA: ls_toolbar TYPE stb_button.
* append a separator to normal toolbar
CLEAR ls_toolbar.
ls_toolbar-butn_type = 0.
ls_toolbar-function = 'PICK'.
ls_toolbar-icon = ICON_MASTER_DATA_ACT.
ls_toolbar-quickinfo = 'Debitor anzeigen'.
ls_toolbar-disabled = space.
APPEND ls_toolbar TO e_object->mt_toolbar.
endmethod.
3) after creating grid
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_dclick FOR grid.
SET HANDLER event_receiver->handle_toolbar FOR grid.
A. -
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 -
How to control edit checks on alv grid fields
I have set up an alv grid that allows for user input.
The fields are defined from the data dictionary.
Edit checks are happening on all fields, but I would like to turn that off for some fields.
How is that controlled?
Regards!u need to define ur own field catalog for this purpose, for the fields for which u want to set check box, add property like this
X_FIELDCAT-FIELDNAME = 'LIFNR'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-SELTEXT_L = 'VENDOR'.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = 10.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'BUKRS'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-CHECKBOX = 'X'.
X_FIELDCAT-SELTEXT_L = 'COMPANY'.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = 4.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_FINAL'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = IT_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.
u can even check program BCALV_EDIT_05, award points if found helpful
Maybe you are looking for
-
Will not boot from reset.
I have an iPod Classic that I rarely, if ever plug into my computer. After a couple of years, I dusted it off yesterday and plugged it into my computer. My computer recognized it as a hard drive and it properly interfaced with iTunes. However, iTunes
-
Lost preview in Finder - cannot see photos
I saw another previous, archived post on this same topic. The answer did not work for the person who posted the issue, and it does not work for me. The issue: Finder, in column view, should display a preview of the photo thumbnail icon when the file
-
Can I use new install disks for older computer?
I have a new MBP (which I'm very excited about!). I am going to pass my two-year old MBP to one of my college kids. I would like to wipe it clean as he will be transferring all of his own info onto it from his current MBP (which will then be passed d
-
Need to disable 2 SQL instances out of 5 instances in SCOM
Hello All, Thanks in advance, Server name: HELIC.common.com we have 5 sql instances in the servver HELIC01-DEV\DEV01 HELIC02-DEV\DEV02 HELIC03-DEV\DEV03 HELIC05-TEST\Test01 HELIC06-Prod\Prod1 i want to disable the below two instances HELIC01-DEV\D
-
How to set MIME-TYPE in weblogic6.1
hi, i have developed a sample example putted in weblogic, how can i set the mime-type in weblogic6.1 to application/x-java-jnlp-file so that it returns the above given mime-type..... thanks in advance