Select all and deselect all in table control
Hi experts,
I want to make the select all and deselect all options in my table control.
But i can't able to do that one. Kindly suggest me how to do that one.
one more thing, if i select some rows in the table control, and press save it should be saved in some other table. how can i implement that one.
Waiting for ur reply.
Regards...
Arun.
Hi Arun,
In the context node that you bind to the table, set the cardinality as 0..n and selection as 0..n. In the UI element Table, set the property selectionMode as 'multi'. Then a toggle button for select/deselect all will appear automatically in your table. You can see it in the top left corner.
For your second question, after selecting the elemets and pressing 'save', in your event handler, do a get_selected_elements( ) on your node. This will return you a set of context elements. Loop through each element and do a get_static_attributes to get the rows. Then you can append these rows to another internal table and bind it to the context. Bind your second table to this node. If the two tables are in different views, the context nodes need to be present in the component controller and mapped to the views.
Hope this helps.
Regards
Nithya
Similar Messages
-
Insert, Delete and Update options in Table control
Experts,
I have writen code for Insert, Delete and Update options in Table control. They are not working properly...
can any one send the code for the above please...
Thanks in advance..Hi,
Following steps will help you.
1.TOP-INCLUDE
DATA: ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
DATA: ITAB2 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
DATA: WA LIKE KNA1.
DATA: ANT TYPE I,CUR TYPE I.
DATA: OK_CODE TYPE SY-UCOMM.
CONTROLS: TABCTRL TYPE TABLEVIEW USING SCREEN 100.
IN FLOWLOGIC
PROCESS BEFORE OUTPUT.
LOOP AT ITAB1 CURSOR CUR WITH CONTROL TABCTRL.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CLEAR_DATA.
LOOP AT ITAB1.
MODULE MOVE_DATA.
ENDLOOP.
ADD OK_CODE IN ELEMENT LIST. CLICK ON LAYOUT AND ADD TABLE CONTROL(name it as TABCTRL) AND PUSHBUTTONS AS FOLLOWS.
SELECT THE FIELDS FROM PROGRAM. SAVE CHECK AND ACTIVATE.
CLICK ON FLOWLOGIC EDITOR FROM APPLICATION TOOL BAR.
DOUBLE CLICK ON MODULE CLEAR_DATA.
write the in this module as below.
CLEAR ITAB2. REFRESH ITAB2.
DOUBLE CLICK ON MODULE MOVE_DATA.
write the code in this module as below.
APPEND ITAB1 TO ITAB2.
ACTIVATE PAI AND WRITE THE CODE AS BELOW.
CASE OK_CODE.
WHEN 'FETCH'.
SELECT * FROM KNA1 INTO TABLE ITAB1 UP TO 20 ROWS.
TABCTRL-LINES = SY-DBCNT.
WHEN 'ADD'.
GET CURSOR LINE CNT.
CNT = TABCTRL-TOP_LINE + CNT - 1.
CLEAR WA.
INSERT WA INTO ITAB1 INDEX CNT.
WHEN 'MODIFY'.
GET CURSOR LINE CNT.
READ TABLE ITAB2 INDEX CNT.
LOOP AT ITAB2.
MODIFY KNA1 FROM ITAB2.
ENDLOOP.
SELECT * FROM KNA1 INTO TABLE ITAB1.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
SAVE,CHECK AND ACTIVATE ALL.
CREATE TCODE AND EXECUTE.
contact if u hv any issues regarding this code.
reward points,if it is useful.
Thanks,
Chandu. -
Hello all,
I created a table element which contains a column of check boxes.
I want to add to my table an option to check/uncheck all the check boxes.
I already created the events but I dont know how to call the events I created using the table?
Thanks in advance,
TomerHi Tomer,
you haven't said how your gui should look like. For example you can add two buttons ("select all" and "Unselect all") for this task. Now you add two actions, one for each button. Add the actions as eventtarget in the properties of the buttons. And in the event-methods of the actions you write your code to select/deselect the checkboxes, like
public void onActionSelectAll(...) {
for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(true);
public void onActionUnselectAll(...) {
for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(false);
HTH,
Frank -
Hi,
I am using a table control in my application vi for both reading inputs and displaying output. I have a few questions about it:
1. Sometimes I send the data in multiple lines to a cell but at the output, I am only able to see the first line and not the other parts unless I hover around the cell. Is there any way to autoincrease the cell (or row) height so that the table control show the multiple line output properly.
2. Also, how can I make cell of table to auto adjust the column width according to input text length.
Please refer the attached image for details. All suggestions are welcome..Hi mnx,
there's no auto-adjust. You have to set width/height using property nodes on your own…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Using Insert and Delete icons in table control wizard.
Can anyone tell me how to perform a new row insertion or deletion in a table created using the table control wizard.
I see there is a form fcode_insert_row and fcode_delete_row, but dont know how to call them and what parameters to pass and all.
Since iam new to SAP-ABAP, some code samples will be a great help.
Thanks to all in advance.Hi Lavanya ,
You have to add the icons personally in the table control.. . Put fcode for addition button as INSE and delete as DELE ..coding will be already thr in the wizard no need to anything just add icons in the table control by selecting from f4 help on icons option of screen.
Thanks,
Vishnu . -
How to Enable and Disable column in Table Control.
Hi all,
I want to make certain column of Table control as Enable or Disable on Button action.
Enable means ready for input and Disable means not ready for input.
Please send me sample code.
Thanks in advance.Hi Vipin,
You have to loop through the table columns to set the properties in the PBO of your screen.
Here is the sample solution.
delcare a workarea for the columns in the table control in your top include.
Table Control .
CONTROLS: TAB1 TYPE TABLEVIEW USING SCREEN '0100'.
DATA: WA_COLS LIKE LINE OF TAB1-COLS.
in your screen
PROCESS BEFORE OUTPUT.
MODULE INTIALISE_100.
*& Module 0100_INTIALISE OUTPUT
MODULE INTIALISE_100 OUTPUT.
LOOP AT TAB1-COLS INTO WA_COLS.
WA_COLS-SCREEN-INPUT = 1.
MODIFY TAB1-COLS FROM WA_COLS TRANSPORTING SCREEN-INPUT.
ENDLOOP.
ENDMODULE. " 0100_INTIALISE OUTPUT
modify the screen-input property as required for the table control columns.
Please provide points if helpfull.....
Thanks,
Karthik
Message was edited by: Karthik
Karthikeyan K -
Drag and drop ALV to table control
Hi all,
Does anyone know if it is possible to program the drag-and-drop functionality from an ALV list to a table control? I would like to have this feature to let the user enter data on 1 screen. On the left part the user sees an ALV list and on the right the user sees the online transaction. I would like the user to enter data simply by drag and drop instead of having to enter the data.
Does someone has a sample program for this?
Regards,
KrisHi Kris
I can download the programs and send them to you, but you should give me your e-mail.
Anyway you can use Drag and Drop if you build your table control by ALV, i.e. ALV GRID.
But I'm using 4.7 and I don't know how class CL_GUI_ALV_GRID is in your release, I believe the release 4.6B is one of first release whit this class.
Max -
Select option in dialog, in a table control
Hi Friends,
My need is creating dynamic select options in a table control in dialog screen. How can I do my desire?
Thanks.Hi,
You can make use of
FREE_SELECTIONS_INIT
and
FREE_SELECTIONS_DIALOG
Please see the documentation
a®s -
Select-option in module pool with table Control
HI,
How to use the select-option in Module Pool and how Can i use the Table control in it.
Can any body give me some Clues.
with rgds
RanjithHi ..
PBO.
LOOP at <table contriol>
module --- Inside the module
DATA: g_uti TYPE REF TO cl_fobu_input_util.
if rollname <> space.
CREATE OBJECT g_uti
EXPORTING typename =rollname.
*....convert to external pattern
CALL METHOD g_util->output_convert
EXPORTING
field_value_int = p_value " This is Tablecontrol-low
IMPORTING
field_value_ext = p_value. " Retrun value for Low
ENDLOOP.
lly you have code in PAI
DATA: g_util_1 TYPE REF TO cl_fobu_input_util.
if rollname <> space.
CREATE OBJECT g_util_1
EXPORTING typename = rollname.
*....convert to internal pattern
CALL METHOD g_util_1->input_convert
EXPORTING
field_value_ext = p_value
IMPORTING
field_value_int_c = p_value.
The above code should be written for tablecontrol-high aswell..
you can also refer: Inlcude LSE16NF10 line no 341 & 434 (SE16n)
Nag -
How to find the selected item in alv grid or table control
can any one tell me please
how to find the selected item in alv grid or table controlIn table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
IN PAI
LOOP AT it_tkhdr.
FIELD it_tkhdr-sel_row
MODULE tab_tkhdr_mark ON REQUEST.
ENDLOOP.
MODULE tab_tkhdr_mark INPUT.
MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
ENDMODULE. " tab_tkhdr_mark INPUT
here it_TKHDR is internal table sel_row is field for selection
After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
regards,
Gagan -
Copying and pasting rows in Table Control
Hi,
I've a table control in my screen. TC is displaying data from database.
Modifications, Insertion and deletion of data are allowed in the TC which will in turn reflect to Database.
Now i want users to copy and paste the rows in the TC.
Can any one help me in this regard?
Regards,
VenkatHi Jothivenkatesh M,
Place the cursor in forst field and press CNT+y now select the entair row by using your mouce and press CNT+C and paste the data in what ever position.
Plzz rewad if it is useful,
Mahi. -
Need Help to provide Filter and Total Provisions for Table Control
Hi ,
I need to provide 'Set Filter' and 'Total(Summation)' Buttons functionality in my application which is having a Table Control. I know these functionality provision with ALV Grid but not with Table control and would appreciate if any body can help me.
Regards,
Srinivashi SRINI VASA
can you provide me with the answer you found to your question, I'm having a spec with the similar requirement.
Thanks -
Checkbox selects client and inserts value in table
Hi,
I have requirement where I need to create form which displays all Client Names with checkbox infront of them
so that user can select client for whom they want to process orders.
I have created checkboxes and trying to insert client in a table but it is not working. Here is my code.
Any help will be greatly appreciated.
IF :block.checkbox='Y' THEN
insert into client values(:block.client,600,user,sysdate);
Thanks
SandySorry but it didnt work. I am getting error 'Another Order is running please exit' and client could not get inserted in client_log table when client_count !=0 BUT when I give say Client_count>5 then it will insert client in table but then again one problem suppose i have checked 2,5,9,10 clients it will be inserted in table in 2,10,9,5 sequence. Can we make it in same sequence in which I have checked in form.
Here is my code in When_Button_Pressed trigger. I have two blocks Client and Detail.
Client data block has Checkbox, client name and detail data block has Process Button.
PACKAGE BODY CLIENT_PKG IS
Procedure process_call is
client_count number;
return_value number:= NULL;
begin
select count(*) into client_count from client_log
where log_group_source_id= 600;
if client_count !=0 then
message('Another Order is running please exit');
else
go_block('Client');
first_record;
loop
if :Client.Checkbox = 'Y' then
insert into client_log values(:client.client,600,user,sysdate);
end if;
exit when :system.last_record = 'TRUE';
next_record;
end loop;
first_record;
commit;
if form_success or sqlcode = 0 then
message('records successfully saved into database');
message(' ',no_acknowledge);
else
message('Error saving records: '||sqlerrm);
message(' ',no_acknowledge);
end if;
process_pkg.process_orders(600,return_value);
message('Process Called');
if return_value =0 then
message('Successful processing');
else
message('there is some problem with'||2);
end if;
end if;
end;
END;
Edited by: sandy162 on Mar 23, 2009 8:12 AM -
Implement the Logic in Mapping to select, compare and update on one table
Hi All,
We have a Sales Order history table *(HISTORY_TABLE)* and we want implement the below logic in warehouse builder where we are using only one table for checking the condition and selecting the records to update in the HISTORY_TABLE.
Like
SELECT ORDERNO, LINENO, ORDERTYPE FROM HISTORY_TABLE A
WHERE EXISTS IN (SELECT ‘X’
FROM HISTORY_TABLE B
WHERE A. ORDERNO = B. ORDERNO
AND A. LINENO = B. LINENO
AND A.ORDERTYPE = B. ORDERTYPE
HAVING MAX (B.PDDJ) = 0)
Thanks in advance.Hi,
you can implement this as
SELECT A.ORDERNO, A.LINENO, A.ORDERTYPE FROM HISTORY_TABLE A,
(SELECT ORDERNO,LINENO,ORDERTYPE FROM HISTORY_TABLE GROUP BY ORDERNO,LINENO,ORDERTYPE HAVING MAX(PDDJ) = 0) B
WHERE A.ORDERNO = B.ORDERNO
AND A.LINENO = B.LINENO
AND A.ORDERTYPE = B.ORDERTYPE Use Aggregator (group by with having) and then Joiner
Regards,
Oleg -
I\
Moderator message : Search for available information, discussion locked.
Message was edited by: Vinod KumarHi,
You need to create table events to do so.
Refer blog
http://wiki.sdn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS
Maybe you are looking for
-
Proxy Activation - ECC 6.0 to SAP PI system
Hi All, Our envirnonment - 1) SAP ECC 6.0 ( R/3 system) 2) SAP PI ( R/3 system) To establish communicate between SAP ECC 6.0 to SAP PI ( R/3 system using proxies )- we have setup following steps on ECC 6.0 system- 1) Created a HTTP connection in the
-
Search not working in music library with newest update
since the iTunes update, I cannot type anything in the search box when looking in my music library. Anyone have this issue? any cures??
-
How to resolve "Performance counter registry hive consistency check" failed?
I want to install SQL Server 2008 November CTP Developer Enu. When "System Configuration Check" it shows: Rule "Performance counter registry hive consistency check" failed. The performance counter registry hive is corrupted. And cannot continue insta
-
How do i get Facebook/Twitter logos and links in my signature?
How do I get Facebook and Twitter logos and links in a signature in apple mail?
-
It's now 4days, I keep getting this Error from Start up. Am using windows8.1, since about a year now, first time I get any Error. I can't tell what really caused it, I am a Web/Desktop programmer and for the past 1 month, I haven't done any Desktop p