Checkbox in alvgrid display
hi experts,
i want to insert a checkbox in the first field of the table that is displayed in the grid view.i want to include the checkbox on the leftmost of the first field.
can anyone give me some idea .
hi simhadri,
REPORT ztest_alv .
TYPE-POOLS: slis.
DATA: x_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE slis_t_fieldcat_alv,
l_layout TYPE slis_layout_alv.
data: IT_EXCLUDE TYPE SLIS_T_EXTAB.
DATA: BEGIN OF itab OCCURS 0,
field1 TYPE i,
field2 TYPE i,
field3 TYPE i,
<b> chk(1),</b>
END OF itab.
DO 20 TIMES.
itab-field1 = sy-index.
itab-field2 = sy-index + 1.
APPEND itab.
CLEAR itab.
ENDDO.
LOOP AT itab.
itab-field3 = itab-field1 + itab-field2.
MODIFY itab INDEX sy-tabix.
ENDLOOP.
<b>x_fieldcat-fieldname = 'CHK'.
x_fieldcat-seltext_l = 'Select'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-checkbox = 'X'.
x_fieldcat-input = 'X'.
x_fieldcat-edit = 'X'.
x_fieldcat-col_pos = 1.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.</b>
x_fieldcat-fieldname = 'FIELD1'.
x_fieldcat-seltext_l = 'One'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 2.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'FIELD2'.
x_fieldcat-seltext_l = 'Two'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 3.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'FIELD3'.
x_fieldcat-seltext_l = 'Sum'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 4.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = l_layout
it_fieldcat = it_fieldcat
TABLES
t_outtab = itab
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.
<b>* Check box
g_t_fcat-fieldname = 'SELKZ'.
g_t_fcat-ref_table = 'G_T_ITAPHU'.
g_t_fcat-coltext = 'Select'.
g_t_fcat-outputlen = 6.
g_t_fcat-hotspot = 'X'.
g_t_fcat-checkbox = 'X'.
APPEND g_t_fcat. CLEAR g_t_fcat.</b>
Regards,
Jayant
Similar Messages
-
The itemRenderer CheckBox of Datagrid displays incorrect sometime.
The itemRenderer CheckBox of Datagrid displays incorrect
sometime.
A datagrid has a column:
<mx:DataGridColumn headerText="selectMe" editable="true"
dataField="_selected" itemRenderer="{new
ClassFactory(mx.controls.CheckBox)}"
rendererIsEditor="true" editorDataField="selected"/>
There are serveral records which have been get from database.
the records all are unchecked. after I checked some records , then
refresh the data from database, the checkBoxs will display
incorrect sometimes.
any suggestion?
thanks.It occured frequently. What can I do?
-
Requrred screenshots for alvgrid display
hi,
i am the beginner to ABA/4,
i want to learn how to create alv reports .
can u people help me?Hi Sravanthi
WELCOME TO SDN COMMUNITY
ALV is ABAP LIST VIEWER.
To have more functionalities like totals, subtotals,logos,etc we choose ALVs compared to reports.
Check this:
Documentation on alv:
you can check out:
http://www.****************/Tutorials/ALV/ALVMainPage.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/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 cat
alog. 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
some theory regarding alv:
This table tells ALV which events are processed by the caller by CALLBACK.
The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.
You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module
REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.
The table structure contains the fields:
IT_EVENTS-NAME
Name of the Callback event.
Possible Callback events:
Action
USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD
Process actions on the list
As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND.
PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB
If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).
The STANDARD status of the function group SALV should be used as a template for a user-specific status.
As this is a frequently-used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET.
ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C
Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.
Exit for passing item entries (ITEM table) for a header record which was expanded interactively by the user.
RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header which is to be expanded.
RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that entries are not repeated in the item table. RS_SELFIELD is initial in this case.
CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.
List processing events
IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.
TOP_OF_LIST no USING parameter. Information output at the start of the list
END_OF_LIST no USING parameter. Information output at the end of the list
TOP_OF_PAGE no USING parameter
Equivalent to the list processing TOP-OF-PAGE event
END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.
Information output at the end of a page. This is only called for printing.
TOP_OF_COVERPAGE no USING parameter
The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:
IS_PRINT-NO_COVERPAGE
IS_PRINT-NO_PRINT_SELINFOS
IS_PRINT-NO_PRINT_LISTINFOS
IS_LAYOUT-GET_SELINFOS
The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event.
END_OF_COVERPAGE no USING parameter
Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.
FOREIGN_TOP_OF_PAGE no USING parameter
The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).
In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.
FOREIGN_END_OF_PAGE no USING parameter
The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).
In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.
BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
Output information before each output line. Should only be used in justified cases because it costs a lot of performance.
AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
Output information after each output line. Should only be used in justified cases because it costs a lot of performance.
Internal use only
LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME
R_INDEX LIKE SY-TABIX
R_INDEX_ITEM LIKE SY-TABIX
R_INDEX_SUM LIKE SY-TABIX
IT_EVENTS-FORM
Name of the form routine which should be called in the calling program at the event.
Field_catalog:
Field catalog with field descriptions
2.7.1. Description
Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.
The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module
See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.
The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.
A field catalog need not be built-up and passed explicitly only under the following conditions:
The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.
all fields in this structure are to be output
the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.
Positioning
row_pos (row position)
value set: 0, 1 - 3
Only relevant if the list output is to be multi-line (two or three lines) by default.
A multi-line list can also be defined by the user interactively if the default list is one-line.
The parameter specifies the relative output line of the column in a multi-line list.
col_pos (column position)
value set: 0, 1 - 60
only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.
Identification
fieldname (field name)
value set: internal output table field name (required parameter)
Name of the internal output table field which is described by this field catalog entry
tabname (internal output table)
value set: SPACE, internal output table name
This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.
Name of the internal output table which contains the field FIELDCAT-FIELDNAME.
Data Dictionary reference
ref_fieldname (reference field name)
value set: SPACE, Data Dictionary field name
Name of the Data Dictionary field referred to.
This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.
ref_tabname (reference table/structure field name)
value set: SPACE, name of a Data Dictionary structure or table
Structure or table name of the referred Data Dictionary field.
This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).
Reference to fields with currency/measurement unit
Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:
the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)
There is a field in the internal output table which contains the associated unit.
There is also an entry in the field catalog for the unit field.
(If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.
The association of a value field to a unit affects the output as follows:
appropriate decimal places display for the unit
an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.
an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.
When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.
Link to currency unit
cfieldname (currency unit field name)
value set: SPACE, output table field name
Only relevant for amount columns with associated unit.
Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
ctabname (internal currency unit field output table)
value set: SPACE, output table field name
only relevant for hierarchical-sequential lists
Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
Link to measurement unit
qfieldname (measurement unit field name)
value set: SPACE, output table field name
only relevant for quantity columns with unit link.
Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME.
The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
qtabname (internal measurement unit field output table)
value set: SPACE, output table field name
only relevant for hierarchical-sequential lists
Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
Column output options
outputlen (column width)
value set: 0 (initial), n
For fields with a Data Dictionary link this parameter can be left initial.
For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).
initial = column width is the output length of the referred Data Dictionary field (domain).
n = column width is n characters
key (key column)
value set: SPACE, 'X' 'X' = kex field (key field output in color)
Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
key_sel (hideable key column)
value set: SPACE, 'X'
only relevant when FIELDCAT-KEY = 'X'
Key field which can be hidden interactively.
The key column sequence cannot be changed interactively by the user.
The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.
no_out (field in field list)
value set: SPACE, 'X' 'X' = field is not displayed in the current list.
The user can interactively choose the field for output from the field list.
The user can display the contents of these fields at line level using the 'Detail' function.
See also the 'Detail screen' documentation of the parameter IS_LAYOUT.
tech (technical field)
value set: SPACE, 'X' 'X' = technical field
Field cannot be output in the list and cannot be displayed interactively.
Field can only be used in the field catalog (not in IT_SORT, ...).
emphasize (highlight columns in color)
value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
'X' = column is colored with the default column highlight color.
'Cxyz' = column is colored with a coded color:
C: Color (coding must begin with C)
x: color number
y: bold
z: inverse
hotspot (column as hotspot)
value set: SPACE, 'X'
'X' = column cells are output as hotspots
fix_column (fix column)
value set: SPACE, 'X'
Not relevant for block lists (output of several lists consecutively)
'X' = column fixed (does not scroll horizontally)
All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter
IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.
do_sum (sum over column)
value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.
This function can also be called by the user interactively.
no_sum (sums forbidden)
value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.
input (column ready for input)
Function not available
Format column contents
icon
value set: SPACE, 'X' 'X' = column contents to be output as an icon.
The caller must consider the printability of icons.
symbol
value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.
The internal output table column must be a valid symbol character.
The caller must consider the printability of symbols.
Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
just (justification)
value set: SPACE, 'R', 'L', 'C'
Only relevant for fields of data type CHAR or NUMC
' ' = default justification for this data type
'R' = right-justified output
'L' = left-justified output
'C' = centered output
The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.
lzero (leading zeros)
value set: SPACE, 'X'
Only relevant for fields of data type NUMC
ALV outputs NUMC fields right-justified without leading zeros by default.
'X' = output with leading zeros
Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.
no_sign (no +/- sign) Only relevant for value fields
value set: SPACE, 'X' 'X' = value output without +/ sign
no_zero (suppress zeros) Only relevant for value fields
value set: SPACE, 'X' 'X' = suppress zeros
edit_mask (field formatting)
value set: SPACE, template
template = see documentation of WRITE formatting option USING EDIT MASK template
The output conversion conv can be made by template = '== conv'.
Texts
The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.
The 'long field label' is also used in display variant definition, sort, etc. popups.
seltext_l (long field label)
seltext_m (medium field label)
seltext_s (short field label)
reptext_ddic (header)
analogous to the Data element maintenance 'Header'
The specified text is not necessarily output in the list, an optimum among all texts is sought.
ddictxt (specify text)
value set: SPACE, 'L', 'M', 'S'
You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.
Parameters for program fields without Data Dictionary reference
see also 'Text' parameters
datatype (data type)
value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)
Only relevant for fields without Data Dictionary reference
Program field data type
ddic_outputlen (external output length)
value set: 0 (initial), n
Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
Prerequisites:
FIELDCAT-EDIT_MASK = '==conv'
see also the documentation of the parameter FIELDCAT-EDIT_MASK
FIELDCAT-INTLEN = n
see also the documentation of the parameter FIELDCAT-INTLEN
n = external format field output length
The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).
intlen (internal output length)
value set: 0 (initial), n
Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
Prerequisites:
FIELDCAT-EDIT_MASK = '==conv'
see also the documentation of the parameter FIELDCAT-EDIT_MASK
FIELDCAT-DDIC_OUTPUTLEN = n
see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN
n = internal format field output length
rollname (data element)
value set: SPACE, Data Dictionary data element name
F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.
When F1 help is called for this field, the documentation of the specified data element is displayed.
If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.
Others
sp_group (field group key)
value set: SPACE, CHAR(1)
Field group key.
Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).
When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.
reprep (Report/Report interface selection criterion)
value set: SPACE, 'X'
Prerequisites:
The system contains the Report/Report interface (function group RSTI, table TRSTI)
Parameter LAYOUT-REPREP = 'X'
(see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )
'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.
2.7.2. Default
The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :
fieldname
ref_tabname
Notes:
ALV gets the remaining information from the Data Dictionary.
If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.
REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.
Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.
Priority rule:
Entries in the field catalog have priority over differing entries in the Data Dictionary.
The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):
fieldname
outputlen
datatype
seltext_s
seltext_m
seltext_l
Notes:
F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.
If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes
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
13. 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
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
For beginners
if u have got access to R/3 system.. check transaction ABAPDOCU..
Go for Siemens material. Check the following link:
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
http://sapabap.iespana.es/sapabap/manuales/learnabap/
Use function module ABAP_DOCU_DOWNLOAD..
This will download 1100 documents to your local drive .
Please check also the foll links to start learning ABAP.
http://help.sap.com/
http://www.sapgenie.com/abap/
http://www.sappoint.com/abap.html
http://cma.zdnet.com/book/abap/index.htm
http://www.sap-img.com
http://www.sappoint.com
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://sap.ittoolbox.com
U can also get help from below links
Please chk the below links
This is link from SAP about ABAP certification
http://www50.sap.com/useducation/certification/curriculum.asp?rid=351
http://www.sapteched.com/india/confactivities/certexam.htm
http://www50.sap.com/useducation/certification/curriculum.asp?rid=351
There is a pdf called ABAP certification.
http://www.esnips.com/web/SAP-ABAP?
You can try www.sapdoamin.com
They provide Certification simulation questions which are very useful and a must try site.
Have a look at below link for mySAP Technology - ABAP Workbench
https://websmp206.sap-ag.de/~sapidp/011000358700000746472003E
Have a look at below link for SAP NetWeaver - ABAP Workbench
http://www30.sap.com/hk/services/education/pdf/cert/ABAPWB.pdf
http://www.sap-img.com/ab040.htm
http://www.sapdomain.com/
this is link from SAP about ABAP certification
http://www50.sap.com/useducation/certification/curriculum.asp?rid=351
ABAP Materials
http://sapabap.iespana.es/sapabap/manuales/learnabap/
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://sap.niraj.tripod.com/
http://www.geocities.com/victorav15/sapr3/abapfun.html
http://www.sapgenie.com/abap/index.htm
http://www.sap-img.com/abap.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
http://www.thespot4sap.com/
http://www.kabai.com/abaps/q.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapgenie.com/abap/tips_and_tricks.htm
www.sapbrain.com
http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
In this link You can find Step by Step Scren Shot document :
http://www.201interviewquestions.com/docs/User%20exits.ppt
http://erpgenie.com/abaptips/component/option,com_docman/task,doc_details/gid,27/
Reprots
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
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.
Dictionary
http://sapabap.iespana.es/sapabap/manuales/learnabap/
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb6e446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea31446011d189700000e8322d00/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBDIC/BCDWBDIC.pdf
ABAP objects
Please check this online document (starting page 1291).
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Also check this links as well.
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.futureobjects.de/content/intro_oo_e.html
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
SAPScripts
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
Check these step-by-step links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
BAPI
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
List of all BAPIs
http://www.planetsap.com/LIST_ALL_BAPIs.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
ALV programs.
http://www.geocities.com/mpioud/Abap_programs.html
. 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
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
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 - http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Top-of-page in ALV
ALV Group Heading
http://www.sap-img.com/fu037.htm
ALV
http://www.geocities.com/mpioud/Abap_programs.html
RFC Destination
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Table Control -
Record Level - Enabling & Disabling Item Checkbox in hierarchical Display
Hi all,
I need to display the a Hierarchical ALV. My requirement is to enable or disable particular Line Item's Checkbox.
*Header
Field1 Field2 Field3 Field4 Field5
#Item
'Checkbox' Field1 Field2 Field3 Field4 Field5 Field6 Field7
Here for perticular Item records ,the checkbox should be disabled.
Please help me in this aspect.
Thanks & Best Regards,
VishnuYou can do that using TOP_OF_LIST event , there you can Disable or Enable the check box using the condition.
In TOP_OF_LIST Event , read the report line by line and there you can check the condition. -
Hi Everyone,
I'm sure I'm doing something really dumb here but I cannot
get my checkbox state to show as true when making a call from my
Access database. The checkbox just displays unticked. The code I am
using is:
<input <%If
(CStr((rsEditProfile.Fields.Item("approvedSupplier").Value)) =
CStr("true")) Then Response.Write("checked=""checked""") :
Response.Write("")%> name="approvedSupplier" type="checkbox"
id="approvedSupplier">
The databse record is selected and so is true but the
checkbox doesn't diplay ticked. Any help please appreciated.
Ta Jules xI found a page that I did and copied the code and replaced
with your values,
the values are in a different order...who knows. I also
noticed your
response.write had some extra "
<input <%If
(CStr((rsEditProfile.Fields.Item("approvedSupplier").Value)) =
CStr("TRUE")) Then Response.Write("checked") :
Response.Write("")%>
name="approvedSupplier type="checkbox" id="approvedSupplier"
value="TRUE">
"Julesmg" <[email protected]> wrote in
message
news:f4ufnm$5ab$[email protected]..
> Thanks for the suggestion, but it makes no difference.
The feild updates
> OK
> when I submit a ticked checkbox but just will not show
as ticked on the
> resulting page. ASP is now:
>
> <input name="approvedSupplier" type="checkbox"
id="approvedSupplier"
> value="TRUE" <%If
>
(CStr((rsEditProfile.Fields.Item("approvedSupplier").Value))
> = CStr("TRUE")) Then
Response.Write("checked=""checked""") :
> Response.Write("")%>>
>
> It's got me stumped!!!
> -
Hi members,
I want to insert blank editable rows in ALV grid display.Number of rows can be determined by size of container.
Grid display is through CL_GUI_ALV_GRID.
Are there any methods.
Thanks a lot in advanceHi Abhishek,
Check above thread you will get lot of information
http://****************/Tutorials/ALV/cell/highlight.htm
http://****************/Tutorials/ALV/Subtotals/text.htm
Regards,
Syf -
Hai guys about ALVgrid display
CAN I USE 2 GRID LIST DISPLAY IN SAME REPORT.MEANS I HAVE SOME RECORDS IN ONE TABLE AND SOME OTHER RECORDS IN ONTHER GRID DISPLAY
Hello,
try with the following Code( Just copy the code & try with in SE38 Tcode & Execute it that all)
REPORT ZALV_SALES_HEADER_DETAIL MESSAGE-ID Z50650(MSG) .
* TABLES
TABLES: VBAK . "SALES DOCUMENT HEADER
* DATA OBJECTS DECLARATION
DATA: IT_VBAK TYPE STANDARD TABLE OF ZVBAK_STRUC,
IT_VBAP TYPE STANDARD TABLE OF ZVBAP_STRUC,
GS_LAYOUT TYPE LVC_S_LAYO,
GS1_LAYOUT TYPE LVC_S_LAYO,
GRID TYPE REF TO CL_GUI_ALV_GRID,
CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
VBAK_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
VBAP_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
WA_VBAK LIKE LINE OF IT_VBAK,
WA_VBAP LIKE LINE OF IT_VBAP,
SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
TOP_OF_PAGE_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
GRID_VBAP TYPE REF TO CL_GUI_ALV_GRID,
TOP_PAGE TYPE REF TO CL_DD_DOCUMENT,
FLAG(1).
*"EVENT RECIEVER CLASS DEFINITION
CLASS LCL_EVENT_RECIEVER DEFINITION DEFERRED.
DATA: OBJ_EVENT TYPE REF TO LCL_EVENT_RECIEVER.
* SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
PARAMETERS: P_VBTYP LIKE VBAK-VBTYP DEFAULT 'C'.
SELECTION-SCREEN: END OF BLOCK B1.
* CLASS DEFINITION AND DECLARATIONS
CLASS LCL_EVENT_RECIEVER DEFINITION.
PUBLIC SECTION.
EVENTS:DOUBLE_CLICK,
TOP_OF_PAGE.
METHODS:HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW .
METHODS: HANDLE_TOP_OF_PAGE FOR EVENT TOP_OF_PAGE OF CL_GUI_ALV_GRID.
ENDCLASS. "LCL_EVENT_RECIEVER DEFINITION
* CLASS LCL_EVENT_RECIEVER IMPLEMENTATION
CLASS LCL_EVENT_RECIEVER IMPLEMENTATION.
METHOD: HANDLE_DOUBLE_CLICK.
READ TABLE IT_VBAK INDEX E_ROW-INDEX INTO WA_VBAK.
PERFORM FETCH_ITEM_DETAILS USING WA_VBAK.
PERFORM ALV_GRID.
ENDMETHOD. "HANDLE_DOUBLE_CLICK
METHOD: HANDLE_TOP_OF_PAGE.
CALL METHOD TOP_PAGE->ADD_TEXT
EXPORTING
TEXT = 'SALES HEADER & ITEM DETAILS'.
CALL METHOD TOP_PAGE->DISPLAY_DOCUMENT
EXPORTING
PARENT = TOP_OF_PAGE_CONTAINER.
ENDMETHOD. "HANDLER_TOP_OF_PAGE
ENDCLASS. "LCL_EVENT_RECIEVER IMPLEMENTATION
* AT SELECTION-SCREEN
AT SELECTION-SCREEN.
IF S_VBELN IS NOT INITIAL.
SELECT COUNT(*)
FROM VBAK
WHERE VBELN IN S_VBELN.
IF SY-DBCNT = 0.
MESSAGE E000 WITH 'NO TABLE ENTRIES FOUND FOR LOW KEY SPECIFIED'.
ENDIF.
ENDIF.
* START-OF-SELECTION.
START-OF-SELECTION.
PERFORM FETCH_SALES_HEADER_RECORD.
PERFORM CREATE_CALL. "CREATION OF OBJECTS & CALLING METHODS
* END-OF-SELECTION.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Form FETCH_SALES_HEADER_RECORD
* text
* --> p1 text
* <-- p2 text
FORM FETCH_SALES_HEADER_RECORD .
SELECT
VBELN
AUDAT
VBTYP
AUART
AUGRU
NETWR
WAERK
FROM VBAK
INTO CORRESPONDING FIELDS OF TABLE IT_VBAK
WHERE VBELN IN S_VBELN
AND VBTYP = P_VBTYP.
ENDFORM. " FETCH_SALES_HEADER_RECORD
*& Form CREATE_CALL
* text
* --> p1 text
* <-- p2 text
FORM CREATE_CALL .
IF CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT CUSTOM_CONTAINER
EXPORTING
* PARENT =
CONTAINER_NAME = 'CUSTOM_CONTAINER'
* STYLE =
* LIFETIME = lifetime_default
* REPID =
* DYNNR =
* NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT SPLITTER
EXPORTING
TOP = 5
PARENT = CUSTOM_CONTAINER
ROWS = 3
COLUMNS = 1
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_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.
CALL METHOD SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = TOP_OF_PAGE_CONTAINER.
CALL METHOD SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = VBAK_CONTAINER.
CALL METHOD SPLITTER->GET_CONTAINER
EXPORTING
ROW = 3
COLUMN = 1
RECEIVING
CONTAINER = VBAP_CONTAINER.
CREATE OBJECT GRID
EXPORTING
* I_SHELLSTYLE = 0
* I_LIFETIME =
I_PARENT = VBAK_CONTAINER
* I_APPL_EVENTS = space
* I_PARENTDBG =
* I_APPLOGPARENT =
* I_GRAPHICSPARENT =
* I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
GS_LAYOUT-GRID_TITLE = 'SALES HEADER DETAILS.'(100).
CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'ZVBAK_STRUC'
* IS_VARIANT =
* I_SAVE =
* I_DEFAULT = 'X'
IS_LAYOUT = GS_LAYOUT
* IS_PRINT =
* IT_SPECIAL_GROUPS =
* IT_TOOLBAR_EXCLUDING =
* IT_HYPERLINK =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = IT_VBAK
* IT_FIELDCATALOG =
* IT_SORT =
* IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CREATE OBJECT OBJ_EVENT .
SET HANDLER OBJ_EVENT->HANDLE_DOUBLE_CLICK FOR GRID.
SET HANDLER OBJ_EVENT->HANDLE_TOP_OF_PAGE FOR GRID.
CREATE OBJECT TOP_PAGE
EXPORTING
STYLE = 'ALV_GRID'
CALL METHOD TOP_PAGE->INITIALIZE_DOCUMENT.
CALL METHOD GRID->LIST_PROCESSING_EVENTS
EXPORTING
I_EVENT_NAME = 'TOP_OF_PAGE'
I_DYNDOC_ID = TOP_PAGE.
CALL SCREEN 100.
ENDFORM. " CREATE_CALL
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form FETCH_ITEM_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM FETCH_ITEM_DETAILS USING WA_VBAK TYPE ZVBAK_STRUC .
SELECT
VBELN
POSNR
MATNR
MATWA
PMATN
CHARG
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN = WA_VBAK-VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO RECORDS FOUND FOR SPECIFIED KEY'.
ENDIF.
ENDFORM. " FETCH_ITEM_DETAILS
*& Module STATUS_0200 OUTPUT
* text
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
* text
MODULE USER_COMMAND_0200 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Form alv_grid
* text
* --> p1 text
* <-- p2 text
FORM ALV_GRID .
IF FLAG = ''.
FLAG = 'X'.
CREATE OBJECT GRID_VBAP
EXPORTING
* I_SHELLSTYLE = 0
* I_LIFETIME =
I_PARENT = VBAP_CONTAINER
* I_APPL_EVENTS = space
* I_PARENTDBG =
* I_APPLOGPARENT =
* I_GRAPHICSPARENT =
* I_NAME =
* EXCEPTIONS
* ERROR_CNTL_CREATE = 1
* ERROR_CNTL_INIT = 2
* ERROR_CNTL_LINK = 3
* ERROR_DP_CREATE = 4
* others = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
GS1_LAYOUT-GRID_TITLE = 'SALES ITEM DETAILS.'(100).
CALL METHOD GRID_VBAP->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'ZVBAP_STRUC'
* IS_VARIANT =
* I_SAVE =
* I_DEFAULT = 'X'
IS_LAYOUT = GS1_LAYOUT
* IS_PRINT =
* IT_SPECIAL_GROUPS =
* IT_TOOLBAR_EXCLUDING =
* IT_HYPERLINK =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = IT_VBAP
* IT_FIELDCATALOG =
* IT_SORT =
* IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
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
Regards,
Vasanth -
Difference bet alvgrid display and normal list display
can any body tell difference bt reuse_alv_grid display and reusealv_list_display. i
Hi,
For all practical purposes, they are the same.
2. Some differences:
a) from abap coding point of view,
alv list is done with Function modules,
alv gris can also be done with FM,
but can also be done using OO concepts.
b) Alv grid (using oo concept) requires
designing the screen layout .
Hence, in one screen, we can show more
then one alv grid
(we cannot show more than
one alv list on one screen)
c) ALV grid uses ActiveX controls
present on the Presentation Server.
Hence, it consumes More Memory
on the presentation server.
d) ALV LIST is Display Only.
Whereas
ALV Grid Can Be made EDITABLE for entry purpose.
e) In alv grid, these options are possible,
but not in alv list.
without horizontal lines
without vertical lines
without cell merging during sorts
display total lines above the entries
ALV LIST Can be coded using only FMs
ALV GRID Can be coded using FMs and object oriented concepts
ALV LIST Can be displayed hieraicharlly
ALV GRID cannot be displayed hierarichally
Regards,
Sreevani -
How to Edit the CheckBox in Classic ALV GRID Display
Hi,
I want to Edit the checkbox in Grid Display.
I have one checkbox field in my internal Table,
Code Of the Program,
Data :
Begin of itab occurs 0,
CHK type C,
MATNR like MARA-MATNR,
end of itab.
Iam building the fieldcatelog using Merge Funcion module.
After that I am chaning the properties of the field
catelog like below,
loop at I_FCAT assigning <FCAT>.
Case <FCAT>-Fieldname
When 'CHK'.
<FCAT>-Checkbox = 'X'.
<FCAT>-INPUT = 'X'.
I dont have edit option in fieldcatelog.
modify I_FCAT from <FCAT>.
endcase.
endloop.
In the Layout,
I_LAYOUT-box_fieldname = 'CHK'.
I_LAYOUT-box_tabname = 'ITAB'.
It is displaying the Checkbox field.but I couldnt edit the checkBox.
I can able to edit in REUSE_ALV_LIST_DISPLAY.
But I have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
Thanks in Advance,
SumithraHi vasu,
The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
Add another field to the output table in which you want to display checkboxes
OR
Define an existing field as a checkbox.
Procedure
1. Add a field to your output table:
Data: gt_fieldcat type lvc_t_fcat.
Types: begin of gs_outtab.
Types: checkbox type c. "field for checkbox
Include structure <ABAP Dictionary structure> .
Types: end of gs_outtab.
Data: gt_outtab type gs_outtab occurs 0 with header line.
2 * Add an entry for the checkbox to the field catalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
* Essential: declare field as checkbox and
* mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
* do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
append ls_fcat to gt_fieldcat.
regards,
venu. -
Checkboxes not displaying in webaccess of maximizer (program)
When I open the webaccess of the program maximizer in IE it works perfectly but when I use any version of Firefox newer than version 3.0 the checkboxes will not display. How can I make checkboxes available in Firefox 5. Is there a plugin?
I'm running XP SP3 however this happens on the server, windows 7 machines and other xp machines. This is definately a bug in the newer versions of Firefox.Clear the cache and the cookies from sites that cause problems.
"Clear the Cache":
* Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
"Remove Cookies" from sites causing problems:
* Tools > Options > Privacy > Cookies: "Show Cookies"
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes -
Checkbox display when printing
Hello All,
I have created a web page that contains several checkboxes (input type="checkbox") that is to be filled out by a user and then printed. When printing from Safari, however, the checkboxes do not display. Does anyone have any idea as to what may be causing this? Do I have to change any print settings?WebDevDan, did you get an answer to your question? Your problem with checkboxes may be the same problem as my problem with radio buttons (See my separate post). I've tried other pages besides the one I developed, and the problem is the same.
-
Hello friends
i have an internal table displayed in alv with one field as editable checkbox.
The display is OK.
After the user click the SAVE button, I want to process the ckecked records only.
My problem: after clicking the SAVE button, in USER_COMMAND form, all the records of the internal table have the checkbox field empty even if they were checked.
MOVE 'SET_PF_STATUS' TO wv_slis_formname.
wv_repid = sy-repid.
DELETE wt_input INDEX 1. "remove the header texts
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_user_command = 'USER_COMMAND'
i_callback_program = wv_repid
i_callback_pf_status_set = wv_slis_formname
is_layout = ws_layout
it_fieldcat = wt_field1
* i_save = 'X'
TABLES
t_outtab = wt_input
EXCEPTIONS
program_error = 1
OTHERS = 2.
anybody could give me a hint?
In debug session I check : wt_input table here
FORM user_command USING r_ucomm LIKE sy-ucomm
ls_selfield type slis_selfield.
DATA: save_ok TYPE sy-ucomm.
DATA: ref1 TYPE REF TO cl_gui_alv_grid.
save_ok = sy-ucomm.
CASE save_ok.
WHEN 'SAVE'.
ENDCASE.
ENDFORM. "user_command
and its fields corresponding for the checkbox are all emptyHi,
Go through this code . This code is for interactive alv . This interactive alv will display only for Checked ones.
TYPE-POOLS : SLIS.
PARAMETERS : P_EBELN TYPE EKKO-EBELN.
TYPES: BEGIN OF TY_EKKO,
CHECK TYPE C,
EBELN TYPE EKKO-EBELN,
BUKRS TYPE EKKO-BUKRS,
EKORG TYPE EKKO-EKORG,
BEDAT TYPE EKKO-BEDAT,
END OF TY_EKKO.
DATA : REPID TYPE SY-REPID.
DATA : IT_EKKO TYPE TABLE OF TY_EKKO,
WA_EKKO TYPE TY_EKKO.
DATA : ITAB TYPE TABLE OF TY_EKKO.
DATA: IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT TYPE SLIS_FIELDCAT_ALV.
data : gs_layout type SLIS_LAYOUT_ALV.
FIELD-SYMBOLS : <WA_EKKO> LIKE LINE OF IT_EKKO.
SELECT EBELN BUKRS EKORG BEDAT FROM EKKO INTO CORRESPONDING FIELDS OF TABLE IT_EKKO UP TO 10 ROWS.
PERFORM FIELDCAT.
PERFORM DISPLAY_DATA.
FORM SET_PF_STATUS USING STATUS.
SET PF-STATUS 'STATUS'.
ENDFORM.
FORM USER_COMMAND USING FU_UCOMM LIKE SY-UCOMM FU_SELFIELD TYPE SLIS_SELFIELD.
CASE fu_ucomm.
WHEN 'CHECK'.
LOOP AT IT_EKKO ASSIGNING <WA_EKKO>.
<WA_EKKO>-check = 'X'.
MODIFY TABLE IT_EKKO FROM <WA_EKKO> TRANSPORTING CHECK.
ENDLOOP.
FU_SELFIELD-REFRESH = 'X'.
WHEN 'UNCHECK'.
LOOP AT IT_EKKO ASSIGNING <WA_EKKO>.
<WA_EKKO>-check = ' '.
MODIFY TABLE IT_EKKO FROM <WA_EKKO> TRANSPORTING CHECK.
ENDLOOP.
FU_SELFIELD-REFRESH = 'X'.
WHEN 'READ'.
IF IT_EKKO IS NOT INITIAL.
LOOP AT IT_EKKO INTO <WA_EKKO> WHERE CHECK = 'X'.
BREAK-POINT.
APPEND <WA_EKKO> TO ITAB.
ENDLOOP.
ENDIF.
if itab is not initial.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = IT_FCAT
I_SAVE = 'X'
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
endif.
WHEN OTHERS.
READ TABLE IT_EKKO ASSIGNING <WA_EKKO> INDEX FU_SELFIELD-TABINDEX.
<WA_EKKO>-CHECK = 'X'.
MODIFY table IT_EKKO FROM <WA_EKKO> TRANSPORTING CHECK .
*BREAK-POINT.
FU_SELFIELD-REFRESH = 'X'.
ENDCASE.
ENDFORM.
FORM FIELDCAT .
WA_FCAT-FIELDNAME = 'CHECK'.
wa_fcat-seltext_m = 'Select' .
wa_fcat-checkbox = 'X'.
wa_fcat-edit = 'X'.
WA_FCAT-COL_POS = 5.
WA_FCAT-OUTPUTLEN = '20'.
wa_fcat-hotspot = 'X'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-FIELDNAME = 'EBELN' .
WA_FCAT-TABNAME = 'EKKO' .
WA_FCAT-COL_POS = 1.
WA_FCAT-OUTPUTLEN = '20'.
wa_fcat-seltext_m = 'BILLING NUM' .
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-FIELDNAME = 'BUKRS' .
WA_FCAT-TABNAME = 'EKKO' .
WA_FCAT-COL_POS = 2.
WA_FCAT-OUTPUTLEN = '20'.
wa_fcat-seltext_m = 'COMPANY CODE' .
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-FIELDNAME = 'EKORG' .
WA_FCAT-TABNAME = 'EKKO' .
WA_FCAT-COL_POS = 3.
WA_FCAT-OUTPUTLEN = '20'.
wa_fcat-seltext_m = 'ORGANIZATION' .
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-FIELDNAME = 'BEDAT' .
WA_FCAT-TABNAME = 'EKKO' .
WA_FCAT-COL_POS = 4.
WA_FCAT-OUTPUTLEN = '20'.
wa_fcat-seltext_m = 'BILLING DATE' .
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
ENDFORM.
FORM DISPLAY_DATA .
IF NOT IT_EKKO IS INITIAL.
GS_LAYOUT-zebra = 'X' .
GS_LAYOUT-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = IT_FCAT
I_SAVE = 'X'
TABLES
T_OUTTAB = IT_EKKO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ENDIF.
ENDFORM.
Edited by: Aditya.G on Dec 29, 2011 12:35 PM -
How to use a SelectAll box / checkbox to select multiple checkboxes!!
I have a question regarding checkboxes.
My jsp page has the following layout generated dynamically based on a drop down selection box.
ID State Initiated Released Locked
US Initiated X
Arg Released X X
Ger Released X X
Ita Locked X X X
The Initated, Released & Locked columns are checkboxes. The checkboxes are enabled or disabled based on the State. This means that if the state is Initaited, the user will click the desired checkbox, while the others in the same row will be disabled, and so forth.
Now all I want is the option of having a SelectAll button / checkbox (something like in yahoo,hotmail) for each column (Initiated,Released,Locked), which when clicked will select all the desired checkboxes under them.(which will select only those in the respective state).
This is basically to make life easier for the user in case there are some 100 rows. Instead of selecting each individually, he can just click a single button for each column. He can then unselect whichever one he wants.
I know this can be done using javascript. Remember that this list is not static, but dynamic. So I cannot send a fixed no. into my javascript function to iterate. Im using <nested:iterate> & <nested:checkbox> for iterating & displaying the checkboxes.
If someone has a solution on it please do send me the code snippet.
Thanks.Javascript is the only solution for something like this.
I presume you are using struts indexed properties?
Remember that this list is not static, but dynamic. So I cannot send a
fixed no. into my javascript function to iterateTrue, but once your JSP is generated you know exactly how many controls you have generated using the varStatus of a iterate tag, or just looking at the size() of the list being iterated on. You can use that to generate the javascript function/call.
Also you can use javascript without knowing exactly how many are there. You can actually discover the fields on the page.
Hope this helps,
evnafets -
I need to identify a series of single-response checkbox variables and display the ones selected (as a group) in a text field in an appended (comma, space) format. Last week, you provided a great little script for a similar need using List Box (multiple response) variables. This time I need to know how to formally identify the checkbox variables and, I presume, use a similar script to display the results in a comma, space format.
You've been of great help.
ThanksHere's the script adapted to this situation. It assumes there are ten check boxes named cb1, cb1, cb2, ...cb10.
// Custom Calculate script for text field
(function () {
// Initialize the string
var v, s = "";
// Loop through the check boxes to build up a string
for (var i = 1; i < 11; i++) {
// Get the value of the current check box
v = getField("cb" + i).value;
if (v !== "Off") {
if (s) s += ", "; // Add a comma and a space if needed
s += v; // Add the selected value
// Set this field value to the string
event.value = s;
You'll have to change the field name and starting/ending numbers to match your form. -
I'm using the function 'reuse_alv_grid_display' to display an internal table with the first column as a checkbox. Everything displays fine, but the checkbox column is grayed out and I can't check or uncheck the rows as needed. How do I activate this column so I can check or uncheck rows as needed.
Edward,
For all the fields where you want the user to enter / edit the data, you should check EDIT field of the field catalog for that field.
Regards,
Ravi
Note : Please mark the helpful answers.
Maybe you are looking for
-
I just realized this problem on my iPad. In the WEEK VIEW... the Right Arrow does not respond in either the portrait or landscape mode. when tapping the next week, the previous week is displayed. and when tapping the left arrow, the week skips one we
-
What are the uses of diffrent concepts in data warehousing
What are the uses of diffrent concepts in data warehousing? Why? naveen
-
ViewerPreferences (e.g. HideWindowUI) in Adobe LiveCycle Designer
Hi, When creating PDFs in Adobe Acrobat, you can set some ViewerPreferences: * HideWindowUI * HideMenubar * HideToolbar true These settings can be set via "Document Properties" => "Initial View" => "User Interface Options" However, when creating a fo
-
TS1368 iPod touch does not have software update feature
Ipod could not be restored unknown error (-1). Any ideas?
-
Oracle Light Simulator Tutorial Not working
Hi I have installed Oracle AS 10g and Oracle SES without SDR.THere is a tutorial to create light Simulator .But for this I do nto have an option of "Event Dispatcher" in the SES Console. Cnn someone help me in getting this right Regards Gayathri [ema