How to handle the check box in the alv tree display
Hello,
in my ALV Tree Report i have a check box in the output.
I have one check box in the selection screen as select all .
if this is selected then all the check boxes in the output must be selected that is (X).
am using CL_GUI_ALV_TREE for this.
Please give me some input how to make that check boxes 'X' in the above mentioned case.
With Regards,
Sumodh.P
Sumodh,
check this
Re: Select all checkbox in ALV tree
please search before posting
Thanks
Bala Duvvuri
Similar Messages
-
How to enable a check box using the table LVC_S_FCAT
hi,
I am working on reports. I have to have a check box and i am using the table LVC_S_FCAT to get the check box, i am getting the check box. how to enable it.Hi Preethi,
try to set default the check-box with the
value '0', '1', '-', ' ' and 'X' (0/1 -> only display,
'-' field is not shown, ' ' and 'X' is normal)
and see the differences.
Hope it helps.
Regards, Dieter
Sorry, i thought you meen enable not editable.
Message was edited by: Dieter Gröhn -
How to get a check box on the selection screen
Hi all
can any body tell me how to get a check box on the selection screenparameter: pa_check as checkbox.
To define the input field of a parameter as a checkbox, you use the following syntax:
PARAMETERS <p> ...... AS CHECKBOX ......
Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
REPORT DEMO.
PARAMETERS: A AS CHECKBOX,
B AS CHECKBOX DEFAULT 'X'. -
How can i add the check box beside the directory?
how can i add the check box beside the directory? anybody can help?
tis r the panel of my program :
// FileTreePanel.java
// JPanel for displaying file system contents in a JTree
// using a custom TreeModel.
package com.deitel.advjhtp1.mvc.tree.filesystem;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
import com.deitel.advjhtp1.mvc.tree.filesystem.FileSystemModel;
public class FileTreePanel extends JPanel {
private JTree fileTree;
private FileSystemModel fileSystemModel;
private JTextArea fileDetailsTextArea;
public FileTreePanel( String directory )
fileDetailsTextArea = new JTextArea();
fileDetailsTextArea.setEditable( false );
fileSystemModel = new FileSystemModel(
new File( directory ) );
fileTree = new JTree( fileSystemModel );
fileTree.setEditable( true );
fileTree.addTreeSelectionListener(
new TreeSelectionListener() {
public void valueChanged(
TreeSelectionEvent event )
File file = ( File )
fileTree.getLastSelectedPathComponent();
fileDetailsTextArea.setText(
getFileDetails( file ) );
JSplitPane splitPane = new JSplitPane(
JSplitPane.HORIZONTAL_SPLIT, true,
new JScrollPane( fileTree ),
new JScrollPane( fileDetailsTextArea ) );
setLayout( new BorderLayout() );
add( splitPane, BorderLayout.NORTH );
JCheckBox check = new JCheckBox("Check me");
add( check, BorderLayout.SOUTH );
public Dimension getPreferredSize()
return new Dimension( 400, 200 );
private String getFileDetails( File file )
if ( file == null )
return "";
StringBuffer buffer = new StringBuffer();
buffer.append( "Name: " + file.getName() + "\n" );
buffer.append( "Path: " + file.getPath() + "\n" );
buffer.append( "Size: " + file.length() + "\n" );
return buffer.toString();
public static void main( String args[] )
if ( args.length != 1 )
System.err.println(
"Usage: java FileTreeFrame <path>" );
else {
JFrame frame = new JFrame( "JTree FileSystem Viewer" );
FileTreePanel treePanel = new FileTreePanel( args[ 0 ] );
frame.getContentPane().add( treePanel );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.pack();
frame.setVisible( true );
}You can maybe explore button and forms feature in InDesign. It was added in CS6.
-
How to change the check box with the push button in itrator table rows
Hi all,
I want to change the check box of the itrator table rows with push button/ some thing better as to give
the table view more good look and user friendly.
Does any one has tried any other option in table view in place of check box
Thanks
BhagatThere are various objects which you can create via iterators. Please see the application SBSPEXT_TABLE for more details.
DATA: lo_text TYPE REF TO cl_htmlb_textview,
lo_ddlb TYPE REF TO cl_htmlb_dropdownlistbox,
lo_input TYPE REF TO cl_htmlb_inputfield,
lo_button TYPE REF TO cl_htmlb_button,
lo_chk_bx TYPE REF TO cl_htmlb_checkbox.
row_ref = p_row_data_ref.
CASE p_column_key.
WHEN 'EFF_DATE'. " Input field
CREATE OBJECT lo_input.
lo_input->id = p_cell_id.
lo_input->type = 'DATE'.
lo_input->showhelp = 'TRUE'.
lo_input->width = '60'.
lo_input->invalid = 'true'.
p_class = `ao`.
lo_input->value = get_column_value( p_column_key ).
p_replacement_bee = lo_input.
WHEN 'NEW_LOC'. " Drop down list box
CREATE OBJECT lo_ddlb.
GET REFERENCE OF gt_persa INTO lo_ddlb->table.
lo_ddlb->id = p_cell_id.
lo_ddlb->nameofkeycolumn = 'NAME'.
lo_ddlb->nameofvaluecolumn = 'VALUE'.
lo_ddlb->selection = get_column_value( p_column_key ).
lo_ddlb->selection = 'DUMMY'.
p_replacement_bee = lo_ddlb.
WHEN 'MON' . " Check box
CREATE OBJECT lo_chk_bx.
lo_chk_bx->id = p_cell_id.
lo_chk_bx->checked = get_column_value( p_column_key ).
p_replacement_bee = lo_chk_bx.
WHEN 'NEW_MGR_SRCH'. " Button
CREATE OBJECT lo_button.
lo_button->id = p_cell_id.
lo_button->text = 'Search Mgr'.
lo_button->onclientclick = 'script'.
p_replacement_bee = lo_button.
WHEN OTHERS. " Text
CREATE OBJECT lo_text.
lo_text->id = p_cell_id.
lo_text->wrapping = 'FALSE'.
lo_text->text = get_column_value( p_column_key ).
lo_text->design = 'STANDARD'.
lo_text->textcolor = 'POSITIVE'.
p_replacement_bee = lo_text.
ENDCASE.
Thanks
A -
The bold, italic, underline, color hi-lite and other boxes in that line suddenly disappeared from the screen and that section remains blank. However when writing a new message if I mouse over the area the boxes re-appear but without their previous alliterations. Also the system does not allow me to color hi-lite text and shows all the colors in a very fuzzy format when I mouse over where the hi-lite box used to be. Additionally the check box at the front of the email subject line has also disappeared but, again, if I mouse over & click it will perform a delete or other function. Need help!
Hi ITBobbyP,
According to your description, there are two text boxes at the bottom of the tablix and both of them are outside the tablix. When you export the report to excel, the upper text box could not be displayed.
Microsoft Excel places limitations on exported reports due to the capabilities of Excel and its file formats. The following limitations apply to text boxes and text:
Text box values that are expressions are not converted to Excel formulas.
Text boxes are rendered within one Excel cell.
The text effect "Overline" is not supported in Excel.
Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
To troubleshoot the problem, please make sure that the text box meet the limitations. In addition, please validate that visibility of the text box is set to true, it’s better to set CanGrow property of text box to false.
If the problem remain unresolved, i would appreciate it if you could give us detailed information about the report, I would be appreciated it if you could provide sample data and screenshot of the report. It will help us move more quickly toward a solution.
Thanks,
Wendy Fu -
How to read the check box value in alv report
hi experts,
i m working on one alv report where i m using the check box for field selection in alv display.
but i don't know how to read the only selected fields.
wa_fieldcat-fieldname = 'BOX'.
wa_fieldcat-tabname = 'IT_HEADER'.
wa_fieldcat-seltext_m = 'Box'.
wa_fieldcat-checkbox = 'X'.
wa_fieldcat-input = 'X'.
wa_fieldcat-edit = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AUFNR'.
wa_fieldcat-tabname = 'IT_HEADER'.
wa_fieldcat-seltext_m = 'Sales Doc'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
it_fieldcat = i_fieldcat[]
i_save = 'A'
it_events = v_events
TABLES
t_outtab = it_header
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
when '&RELEAS'.
endcase
endform.
i gone through some already posted que for same problem i tried options like
loop at it_header.
endloop.
but i m getting box field empty.
is there i missed something? plz sugeest.. if u have any other solution plz post...Have this code in your user command fm:
* For capturing changed data
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = w_grid.
CALL METHOD w_grid->check_changed_data
IMPORTING
e_valid = w_valid.
IF w_valid = 'X'.
loop at itab where mark = 'X'.
endloop.
ENDIF.
Regards,
Ravi -
Hi, I am using Captivate version 7. I am using a Checkbox widget on a slide. When the user checks the check box and then closes out of the course, how do I ensure that when the user goes back into the course, the check box remains? We're posting on an LMS. Thanks!
Every widget, variable is reset when a course is restarted. Moreover you cannot control what is checked in the Checkbox widget by another action than the user click, even though you can change the value of the associated variable. I think you'll have to look for another solution.
-
How to handle check box events in alv tree.
hi,
i am working in CL_GUI_COLUMN_TREE class.Also using Check box. Now i want to handle events for check box . I am new to ABAP Objects.
Pls expaline in detail or send code
thanks in advance,
senthil kumar.rHello Senthil
Have a look at the sample report
SAPCOLUMN_TREE_CONTROL_DEMO
. The crucial points are:
<b>(1) Register the required events at the control</b>
* define the events which will be passed to the backend
" checkbox change
event-eventid = CL_GUI_COLUMN_TREE=>EVENTID_checkbox_change.
event-appl_event = 'X'.
append event to events.
CALL METHOD G_TREE->SET_REGISTERED_EVENTS
EXPORTING
EVENTS = EVENTS
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
ILLEGAL_EVENT_COMBINATION = 3.
IF SY-SUBRC <> 0.
MESSAGE A000.
ENDIF.
<b>(2) Set the event handler</b>
assign event handlers in the application class to each desired event
SET HANDLER G_APPLICATION->HANDLE_CHECKBOX_CHANGE FOR g_tree.
<b>(3) Define and implement event handler method</b>
METHOD HANDLE_CHECKBOX_CHANGE.
" this method handles the checkbox_change event of the tree
" control instance
" show the key of the node and the name of the item
" of the clicked checkbox in a dynpro field
G_EVENT = 'CHECKBOX_CHANGE'.
G_NODE_KEY = NODE_KEY.
G_ITEM_NAME = ITEM_NAME.
CLEAR G_HEADER_NAME.
ENDMETHOD.
Regards
Uwe -
Regard check box concept in alv grid display
HI Friends,
i am displaying the sales order details with check box. so my first field is checkbox. When user click on check box then he press the details icon.
my question i need a logic for calling the tcode based on the vbeln when it is cheked.
thanks in advance.
Regards,
Purna.hi,
go through this program
program bcalv_edit_05.
Purpose:
~~~~~~~~
This example shows how to use checkboxes within an ALV Grid Control.
You learn:
o how to define a column for editable checkboxes for an attribute
of your list (see also remark below)
o how to evaluate the checked checkboxes
o how to switch between editable and non-editable checkboxes
Important Remark
~~~~~~~~~~~~~~~~
The checkbox functionality has been replaced by selection buttons
in front of each row (field SEL_MODE of the layout structure
set to 'A' or 'D'; when using the editable ALV Grid Control,
these selection buttons are always visible).
Class methods like GET_SELECTED_ROWS work only for this new
functionality and not for checkboxes.
Thus checkboxes should not be used for line selection but for
a column as an additional or for an already existing attribute
(like field SMOKER in SBOOK).
To check program behavior
~~~~~~~~~~~~~~~~~~~~~~~~~
Try out the functions displayed in the application toolbar:
o The first sets all checked lines to initial values.
(see form reset_selected_entries)
o The seconds marks all checkboxes that are input enabled
o The third unmarks all checkboxes that are input enabled
o To try the forth, you have to select a line first using
the selection buttons on the left.
The function deactivates/activates a checkbox.
Checkboxes may be locked/unlocked using a double click on the
checkbox cell.
Essential steps (search for '§')
~~~~~~~~~~~~~~~
This example focusses on two aspects of checkboxes in an
editable ALV Grid Control:
A How to integrate, set, reset and evaluate checkboxes
B What you must do to lock particular checkboxes against input
A) Integrate, set, reset and evaluate checkboxes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A1.Extend your output table by a checkbox field.
A2.Add an entry for the checkbox in the fieldcatalog
A3.Optionally, check checkboxes initially after selecting data.
A4.Before you (a)set, (b)reset, (c)(de)activate or
(d)evaluate checkboxes, you must check the input cells.
B) Lock particular checkboxes against input
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B1.Extend your output table by a field to dis- or enable
cells for input.
B2.After selecting data,
assign a style for each row of your checkbox column.
B3.Use the layout structure to aquaint additional field to ALV.
B4.Switch the style to dis- or enable a cell for input
class lcl_event_receiver definition deferred. "for event handling
data: ok_code like sy-ucomm,
save_ok like sy-ucomm,
g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',
g_grid type ref to cl_gui_alv_grid,
g_custom_container type ref to cl_gui_custom_container,
g_event_receiver type ref to lcl_event_receiver,
gt_fieldcat type lvc_t_fcat,
gs_layout type lvc_s_layo,
g_max type i value 100.
*§A1.Extend your output table by a checkbox field.
If you do not want to lock sole checkboxes against input
you do not need field 'celltab'.
types: begin of gs_outtab.
types: checkbox type c. "field for checkbox
§B1.Extend your output table by a field to dis- or enable
cells for input.
types: celltab type lvc_t_styl. "field to switch editability
include structure sflight.
types: end of gs_outtab.
data: gt_outtab type gs_outtab occurs 0 with header line.
LOCAL CLASSES
This local class only handles event DOUBLE_CLICK.
Wenn the user double clicks on a checkbox cell the status of
this cell is switched from editable to not editable and vice versa.
class lcl_event_receiver definition.
public section.
methods: catch_doubleclick
for event double_click of cl_gui_alv_grid
importing
e_column
es_row_no
sender.
endclass.
class lcl_event_receiver implementation.
method catch_doubleclick.
data: ls_outtab type gs_outtab,
ls_celltab type lvc_s_styl.
Function:
Switch between 'editable' and 'not editable' checkbox.
If the user clicked on another column there is
nothing to do.
if e_column-fieldname ne 'CHECKBOX'.
exit.
endif.
read table gt_outtab into ls_outtab index es_row_no-row_id.
The loop is only needed if there are other columns that
use checkboxes. At this point the loop could be
replaced by a READ of the first line of CELLTAB.
loop at ls_outtab-celltab into ls_celltab.
if ls_celltab-fieldname eq 'CHECKBOX'.
§B4.Switch the style to dis- or enable a cell for input
if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
else.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
endif.
modify ls_outtab-celltab from ls_celltab.
endif.
endloop.
modify gt_outtab from ls_outtab index es_row_no-row_id.
call method sender->refresh_table_display.
endmethod.
endclass.
MAIN *
end-of-selection.
call screen 100.
MODULE PBO OUTPUT *
module pbo output.
set pf-status 'MAIN100'.
set titlebar 'MAIN100'.
if g_custom_container is initial.
perform create_and_init_alv.
endif.
endmodule.
MODULE PAI INPUT *
module pai input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'EXIT'.
perform exit_program.
when 'SELECT'.
perform select_all_entries changing gt_outtab[].
when 'DESELECT'.
perform deselect_all_entries changing gt_outtab[].
when 'RESET'.
perform reset_selected_entries changing gt_outtab[].
when 'SWITCH'.
perform switch_activation changing gt_outtab[].
endcase.
endmodule.
FORM EXIT_PROGRAM *
form exit_program.
leave program.
endform.
*& Form BUILD_FIELDCAT
text
<--P_GT_FIELDCAT text
form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat.
*§A2.Add an entry for the checkbox in the fieldcatalog
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.
optional: set column width
ls_fcat-outputlen = 10.
append ls_fcat to pt_fieldcat.
endform.
*& Form CREATE_AND_INIT_ALV
text
<--P_GT_OUTTAB text
<--P_GT_FIELDCAT text
<--P_GS_LAYOUT text
form create_and_init_alv.
data: lt_exclude type ui_functions.
create object g_custom_container
exporting container_name = g_container.
create object g_grid
exporting i_parent = g_custom_container.
perform build_fieldcat changing gt_fieldcat.
Exclude all edit functions in this example since we do not need them:
perform exclude_tb_functions changing lt_exclude.
perform build_data.
*§ B3.Use the layout structure to aquaint additional field to ALV.
gs_layout-stylefname = 'CELLTAB'.
call method g_grid->set_table_for_first_display
exporting is_layout = gs_layout
it_toolbar_excluding = lt_exclude
changing it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab[].
create object g_event_receiver.
set handler g_event_receiver->catch_doubleclick for g_grid.
Set editable cells to ready for input initially
call method g_grid->set_ready_for_input
exporting
i_ready_for_input = 1.
endform. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
text
<--P_LT_EXCLUDE text
form exclude_tb_functions changing pt_exclude type ui_functions.
data ls_exclude type ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
append ls_exclude to pt_exclude.
endform. " EXCLUDE_TB_FUNCTIONS
*& Form build_data
text
--> p1 text
<-- p2 text
form build_data.
data: lt_sflight type table of sflight,
ls_sflight type sflight,
ls_celltab type lvc_s_styl,
lt_celltab type lvc_t_styl,
l_index type i.
select * from sflight into table lt_sflight up to g_max rows.
if sy-subrc ne 0.
generate own entries if db-table is empty so that this example
still works
perform generate_entries changing lt_sflight.
endif.
*§A3.Optionally, check checkboxes initially after selecting data.
(Omitted in this example)
loop at lt_sflight into ls_sflight.
move-corresponding ls_sflight to gt_outtab.
if gt_outtab-connid eq '400'.
gt_outtab-checkbox = 'X'.
endif.
append gt_outtab.
endloop.
§B2.After selecting data,
assign a style for each row of your checkbox column.
Initially, set all checkbox cells editable.
ls_celltab-fieldname = 'CHECKBOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
loop at gt_outtab.
l_index = sy-tabix.
refresh lt_celltab.
ls_celltab-fieldname = 'CHECKBOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
insert ls_celltab into table lt_celltab.
insert lines of lt_celltab into table gt_outtab-celltab.
modify gt_outtab index l_index.
endloop.
endform. " build_data
*& Form generate_entries
text
<--P_LT_SLFIGHT text
form generate_entries changing pt_slfight type standard table.
This form is only needed for the case that there is no
data in database table SFLIGHT.
data: ls_sflight type sflight,
l_month(2) type c,
l_day(2) type c,
l_date(8) type c.
ls_sflight-carrid = 'LH'.
ls_sflight-connid = '0400'.
ls_sflight-currency = 'DEM'.
ls_sflight-planetype = '747-400'.
ls_sflight-seatsmax = 660.
do 110 times.
ls_sflight-price = sy-index * 100.
ls_sflight-seatsocc = 660 - sy-index * 6.
ls_sflight-paymentsum = ls_sflight-seatsocc * ls_sflight-price.
l_month = sy-index / 10 + 1.
do 2 times.
l_day = l_month + sy-index * 2.
l_date+0(4) = '2000'.
l_date4(2) = l_month0(2).
l_date6(2) = l_day0(2).
ls_sflight-fldate = l_date.
append ls_sflight to pt_slfight.
enddo.
enddo.
endform. " generate_entries
*& Form select_all_entries
text
<--P_GT_OUTTAB text
form select_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = 'X'.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " select_all_entries
*& Form deselect_all_entries
text
<--P_GT_OUTTAB[] text
form deselect_all_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " deselect_all_entries
*& Form reset_selected_entries
text
<--P_GT_OUTTAB[] text
form reset_selected_entries changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c.
*§A4b. Before you set, (b)reset or evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
loop at pt_outtab into ls_outtab.
if not ls_outtab-checkbox is initial
and not ls_outtab-checkbox eq '-'.
clear ls_outtab.
modify pt_outtab from ls_outtab.
endif.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " reset_selected_entries
form switch_activation changing pt_outtab type standard table.
data: ls_outtab type gs_outtab.
data: l_valid type c,
lt_row_no type lvc_t_roid with header line.
*§A4c. Before you set, reset, (c)(de)activate
or evaluate checkboxes, you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
importing
e_valid = l_valid.
if l_valid eq 'X'.
call method g_grid->get_selected_rows
importing
et_row_no = lt_row_no[].
loop at lt_row_no.
read table pt_outtab into ls_outtab index lt_row_no-row_id.
if ls_outtab-checkbox ne '-'.
ls_outtab-checkbox = '-'.
else.
ls_outtab-checkbox = ' '.
endif.
modify pt_outtab from ls_outtab index lt_row_no-row_id.
endloop.
call method g_grid->refresh_table_display.
endif.
endform. " switch_activation
*& Form check_lock
text
-->P_LS_OUTTAB text
<--P_L_LOCKED text
form check_lock using ps_outtab type gs_outtab
changing p_locked.
data ls_celltab type lvc_s_styl.
loop at ps_outtab-celltab into ls_celltab.
if ls_celltab-fieldname = 'CHECKBOX'.
if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
p_locked = 'X'.
else.
p_locked = space.
endif.
endif.
endloop.
endform. " check_lock
Regards,
Sindhu -
Regarding enabled check box's in alv grid display
hi ,
in alv output i have three fields i have enabled check boxes of this three field i want to display the out put of them
could u please explain clearly with codeHi,
Go to Se38 --> Input BCALV_EDIT* and press F4. You can find many demo program with chekbox in ALV.
Thanks,
Sriram Ponna. -
How to name the Check Box as "Want Free Gift" using PARAMETERS statements
Hi all,
I am new to check boxes. I have a existing report where I have to add a check box to the selection screen.
So i said
PARAMETERS: p_cncldc AS CHECKBOX.
everythibng is fine and I get the check box on the selection screen. when i execute the report i get the name of check box as p_cncldc. but i want the name of the check box as "Want Free Gift".
How to name the check box as "Want Free Gift".
if i am saying
PARAMTERS: Want Free Gift AS CHECKBOX. it says a syntax error saying it canot be more that 8 chars.
Some one please help. I am new to Check boxes
Regards,
Jessica Sam
Edited by: jessica sam on Mar 31, 2009 10:37 PMText on the Right hand side of check box.
selection-screen begin of block b1.
selection-screen begin of line.
parameters: w_check as checkbox.
selection-screen: comment 4(30) TEST .
selection-screen end of line.
selection-screen end of block b1.
INITIALIZATION.
test = 'Want Free Gift AS CHECKBOX'.
Text on the Left hand side of check box.
selection-screen begin of block b1.
selection-screen begin of line.
selection-screen: comment 2(30) TEST .
parameters: w_check as checkbox.
selection-screen end of line.
selection-screen end of block b1.
INITIALIZATION.
test = 'Want Free Gift AS CHECKBOX'.
OR:
GOTO(Menubar)>Text Elements>Selection Texts
Regards,
Gurpreet -
How to add check box in the ALV list
dear Experts,
i have a requirement.
i want show the check boxes in my ALV list.
can u please give the solution.
thanksTYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
SEL, " add a single character field in the final output table
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort type slis_t_sortinfo_alv,
wa_sort like line of it_sort.
DATA: BEGIN OF it_flight_sel OCCURS 0,
SEL,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight_sel.
data: wa_flight like it_flight.
In the layout set give the name of the field
whose checkbox will be created ( SEL as it has 1 char only )
layout-box_fieldname = 'SEL'.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
wa_sort-fieldname = 'CARRID'.
wa_sort-group = 'UL'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
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.
WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
loop at it_flight into wa_flight.
if wa_flight-Sel EQ 'X'.
collecting records in table it_flight_sel to process further
append wa_flight to it_flight_sel.
clear wa_flight.
TYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
SEL, " add a single character field in the final output table
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort type slis_t_sortinfo_alv,
wa_sort like line of it_sort.
DATA: BEGIN OF it_flight_sel OCCURS 0,
SEL,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight_sel.
data: wa_flight like it_flight.
In the layout set give the name of the field
whose checkbox will be created ( SEL as it has 1 char only )
layout-box_fieldname = 'SEL'.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
wa_sort-fieldname = 'CARRID'.
wa_sort-group = 'UL'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
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.
WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
loop at it_flight into wa_flight.
if wa_flight-Sel EQ 'X'.
collecting records in table it_flight_sel to process further
append wa_flight to it_flight_sel.
clear wa_flight.
Please follow the code. -
How do can I have the form fill in a check box if the user has entered text in a textbox?
I have a form that is submitting an xml data file that is picked up by MS Word and used to populate a document. However, there's a 'Miscellaneous' field where the user can type in addtional information that would not drop easily into the Word document (exceptions, items not on the drop down lists, etc.). I'd like to test to see if that Miscellaneous field has infomation in it and if it does, to set a invisible checkbox to "1" so that I can insert a text message in the Word document that there's additional information in the .pdf form that will have to be addressed manually in the Word document.
I've tried
if(Misc.rawValue !== "")
otherinfo.rawValue = 1;
but while it doesn't generate a Javascript error, it doesn't set the value either, and I haven't found any function that checks for whether a field is empty. I'm sure there's got to be a way to do this, but I'm stumped. Any help greatly appreciated!
BillIt appears you are using LiveCycle Designer, so you will have to use the syntax of FormCalc or LiveCycle Designer JavaScript.
For FormCalc:
if(HasValue(Misc)) then
otherinfo = 1
else
otherinfo = 0
endif
For JavaScript
if(HasValue(Misc.rawValue))
otherinfo.rawValue = 1;
else
otherinfo.rawValue = 0;
I added code to clear the check box if the user clears the field. -
How can I format a field to have a Check Box in the center.
I am a new adobe user and I am creating a form in Adobe LiveCycle Designer. Most of what I needed to do I was able to figure out, but I cannot find a way to place a Check Box in the center of a chosen field. Each time I use the Check Box from the library it automatically places the Box in the center-right of the field. Then when trying to format the paragraph, I get no options about where I'd like the box to reside within the field. Is there a simple way to get a Check Box into the center of a Field or will I have to pursue other options. If I do have to pursue other options are there any ways to limit a text to an X and have it either be On or Off?
Thanks for your aid.This behaviors usually happens when you create the fields but a copy paste command from one of the fields. The copy paste command assumes that your intentions is to maintain a copy of the field in two separate locations (e.i, a form field "company name" printed in each and every page of a multi-page form document.
Go to the properties fields of each field and make sure to assign unique form field names.
Maybe you are looking for
-
How do you get your money back from a charge you never even made on the app store?
How do you get your money back from a charge you never even made on the app store?
-
Purchase Order GR based Invoice varifiation Field - ACtive
Hi, when ever Goods receipt field-WEPOS is active in purchase order,Delivery Tab at item level, Gr based IV should also get active - WEBRE, other wise system should not allow to save the Purchase document. how to control the same. any enhancement....
-
How do you display the now playing song title in miniplayer?
I can't seem to change my preferences such that I can see the song titlle of the current song playing in my miniplayer.
-
Production order system status after being settled
Hello, I am currently in ECC 605 project. I remembered once production order is variance calculated and settled,new system status, VCAL , is set at production order. And sometimes the production order won't be set with status VCAL even though it's v
-
Is there a fix for Captivate 4 with Flash Player 16 Installed?
Captivate 4 is not recognizing Flash Player since we upgraded to version 16. Which means we can not launch Captivate 4, is there a fix or a timeline for a fix on this issue? Thank you