How to use selection column in a table control
I have given the name of the selection column to be 'DEF_SEL',now i want to select rows in the table control using the 'selection column attribute' and maniupulate it programmatically so that i would transport the rows selected using selection coulmn to a different table control.How would i do this?
Hi raja,
Once you have the table cobtrol built using the extra field in the internal table, all the selected rows will have DEF_SEL = 'X'.
Now you can loop your internal table and filter the records which were selected.
in pai modules:
loop at itab where DEF_SEL = 'X'.
Move itab information inrto another internal table.
append itab_new.
endloop.
have another table control which shows the data in the itab_new.
regards,
Ravi
Similar Messages
-
How can I select columns from a table EMP, using Select statement?.
Hi Friends,
How can I select columns from a table EMP?.
I want to select columns of EMP table, using select statement.
Please reply me urgently.
ShahzadSomething like this:
scott@DBA> select empno,ename,job from emp;
EMPNO ENAME JOB
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
14 rows selected.Check the documentation:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
Message was edited by:
Delfino Nunez -
How will use Select-Options in Read table Concept.
Hi All,
How will use Select-Options in Read table. For example,
Select-Options : test for bseg-prctr.
Select * from bseg into table ITAB.
Read table ITAB with key prctr in test.
Last line is showing error. If any way to read ITAB as conditions given per select options.
Thankx Advance,,,HI,
you cannot use " IN " with read statement , read statement is used as:
READ TABLE it_collect ASSIGNING <fs_collect>
WITH KEY rbpl = <fs_wkdet>-arbpl
ufnr = <fs_wkdet>-aufnr.
anyways you can use loop at statement before read to use " into " statement as:
LOOP AT it_master INTO l_master
WHERE werks = l_werks
hope it will help you
regards
rahul
Edited by: RAHUL SHARMA on Dec 30, 2008 9:14 AM -
How to delete a column from the table control in module pool?
Hi,
can any one please tell How to delete a column from the table control in module pool?
thanks in advance
warm regards
HareeshKumar Nhi hareesh,
I think it is better to hide it.
How to hide: You can check this link
Dynamic Hide column in table control -
Sort functionality using MULTIPLE columns in a table control
Hi all,
I have a custom screen with table control.Now i need to provide SORT functinality in this screen for the columns in the table control.
My questins:
1.Is it possible to seelct MULTIPLE columns in a table control for SORTING?If yes,what explicit settings do i need to do while creatng the TABEL CONTROL in the screen?DO I need to select "Column selection " as MULTIPLE??
2.How do I write the code for SORT functinonality for multiple columns?
I know how to write the code for SORTING on basis of single column .
Thanks!Hi Rob,
Thanks for the reply.
However I was thinking to apply the same logic as for single columns as follows:
types : begin of ty_fields,
c_fieldname(20),
end of ty_fields.
data : t_fields type table of ty_fields,
wa_fields like line of t_fields.
WHEN 'SORTUP'.(Ascending)
loop at TABLE tc01-cols INTO wa_tc01 where selected = 'X'.
SPLIT wa_tc01-screen-name AT '-' INTO g_help g_fieldname.
wa_fields-c_fieldname = g_fieldname.
append wa_fields to t_fields.
endloop.
describe table t_fields lines l_index.
c_count = 1.
if c_count <= l_index.
read table t_fields into wa_fields index c_count.
case c_count.
when '1'.
l_field1 = wa_fields-c_fieldname.
when '2'.
l_field2 = wa_fields-c_fieldname.
and so on depending on the no of columns in the table control...
endcase.
endif.
SORT t_tvbdpl_scr BY l_fields1 l_fields 2......l_fieldn.
Let me know if the above method will work!Also for the above method to work will the type of fields(columns on whihc sort function will be applied) matter???
Thanks again for your time. -
How to export selected columns in a table using expdp of oracle10g
Hi all..
I have a table with 10 columns and i want to export only 4 columns(selected columns) data using expdp
Pl. tell me if we can do this and if yes what is the syntax.
Thanks..
SekharThat's not possible, you could use QUERY to specify where clause but not columns in select clause,
for example,
QUERY=employees:'"WHERE department_id > 10 AND salary > 10000"'
you could use
create table2export as select c1,c2,c3,c4 from tableof10columns;and export the temp table. -
How to freeze the selection column in the table control of the module pool.
hi ,
in my module pool there is a row selection field <b>w/selcolumn</b> of the table control called as mark.
how to freeze the selection column where there is no record in the table control row.
or in other words where wa is initial.
thanks
ektaHi all,
in the PBO of the screen the following code is written.
say the selection column is MARK and is declared in the data as well.
thanks
ekta
*************************C O D E **************************************************
MODULE disp_tabctrl1 OUTPUT.
IF flag_c = 1.
READ TABLE it_create_data INTO wa_material_data
INDEX tab_ctrl1-current_line.
ELSE.
READ TABLE it_material_data INTO wa_material_data
INDEX tab_ctrl1-current_line.
IF sy-subrc = 0.
IF ok_code_0101 = '&SEL1'.
mark = 'X'.
ELSEIF ok_code_0101 = '&DSEL'.
mark = ' '.
ENDIF.
ELSE.
LOOP AT SCREEN.
IF screen-name = 'MARK'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
index_t = tab_ctrl1-top_line.
index_d = tab_ctrl1-top_line + n.
ENDMODULE. " DISP_TABCTRL1 OUTPUT -
How to delete select data in the table control
this problem makes me headache.
I am new to labview, when a table shows some data. many rows and column. how can delete on row which I selected. the other rows are remain no change.
I really need help.thanks in advance. It is better to attach the program.my labview is 2009
Solved!
Go to Solution.Hi,
You can do it with a table control as well. Check out the attached VI. To delete a row, Run the VI, just right click the row and click "Delete Row". To get back the default values, click reinitialize.
Reards,
NitZ
(Give Kudos to Good Answers, Mark it as a Solution if your problem is Solved)
Attachments:
Untitled 3.vi 8 KB -
How to use a radiobutton group on table control ?
In the selection screen ,i could define a variable as radiobutton group xxx .It's just so easy ,button when I want to use it in the table control through the the wizard ,but in the 4.6c version there is simply no such as radionbutton component in the panel .how could i do ?
Hi Jack,
It's a bit tricky to get the Radio Button in the Table Control. Only a few things needs to be done.
1. Create a structure with an Checkbox field of TYPE CHAR 1.
2. Create the Table Control with Wizard and mark the Checkbox field as CHECKBOX in one of the popup.
3. In the Screen, right-click on the Checkbox field. You will get a list of options and there you should check the radio button option. You will get the selection as Radio button available across all the rows.
You can check out the demo codes at SE38 by searching DYNPRO.
Also have a look at this following link.
http://www.esnips.com/doc/48bd95e8-facc-4932-b923-465ba59bad24/Table-Control
Hope this will help.
Thanks,
Samantak. -
How to optimize the column width in Table Control
Hi all,
When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
thanks for your help.
Points would be awarded .
Regards,
Anil .Hi,
In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
Regards
Sudheer -
How to make one column only in table control automatically filled in ?
Hi ,all.
I meet an issue while doing my screen programming. I have a table control on screen which has a few of column. And I want to display date in my first column each row automatically when user open that table/table control. All other column must be in empty in order to let user key in.
Hope anyone can help me in this issue.
Thanks in advance.Hi
Flow Logic:
PROCESS BEFORE OUTPUT.
MODULE STATUS_2209.
MODULE GET_DATA. "enters required no of dates in ur itab
loop at itab with control TBL1.
module POPULATE_TBL. "fills date col alone in tbl ctrl
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_2209.
loop at itab.
module UPDATE.
endloop.
Code:
*& Report YFEB2_SCREEN_TBL *
REPORT YFEB2_SCREEN_TBL .
TABLES: YSTUDENT.
CONTROLS TBL1 TYPE TABLEVIEW USING SCREEN 2209.
DATA: OK_CODE LIKE SY-UCOMM,
itab TYPE TABLE OF YSTUDENT WITH HEADER LINE, "ystudent is the db tbl i use
WA LIKE LINE OF ITAB,
v_date like sy-datum.
v_date = " initialise to start date.
CALL SCREEN 2209.
*& Module GET_DATA OUTPUT
* text
MODULE GET_DATA OUTPUT.
do 10 times.
itab-date = v_date.
append itab.
v_date = v_date + 1.
enddo.
ENDMODULE. " GET_DATA OUTPUT
*& Module POPULATE_TBL OUTPUT
* text
MODULE POPULATE_TBL OUTPUT.
MOVE ITAB TO YSTUDENT.
ENDMODULE. " POPULATE_TBL OUTPUT
*& Module UPDATE INPUT
* text
MODULE UPDATE INPUT.
WA-DATE = YSTUDENT-DATE.
WA-ID = YSTUDENT-ID.
WA-NAME = YSTUDENT-NAME.
INSERT YSTUDENT FROM WA.
ENDMODULE. " UPDATE INPUT
*& Module STATUS_2209 OUTPUT
* text
MODULE STATUS_2209 OUTPUT.
SET PF-STATUS 'BACK'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_2209 OUTPUT
*& Module USER_COMMAND_2209 INPUT
* text
MODULE USER_COMMAND_2209 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_2209 INPUT
If you have a specific date upto which you want you can declare a var for that and while filling the itab you can use it in condition.
Hope this helps
Regards,
Jayanthi.K -
How can we select multiple rows in table control for module pool program?
hi guru's
i cannt able to select multiple table control rows for deletion of records please give any code to select rows?
regrards,
satheesh.On the Table Control attributes there is a "Selectability" option where you choose one of: None, Single, or Multiple. In your code you then need to pick up which rows have the selection column set to 'X'.
-
How to select columns in a table by their column id and not the column name
Hello,
How do you select columns from a table based on their column_id.
I have create a view
but other than Select * , i cant now select one just one column from it
the view as follow:
create view count_student as
select a.acode "acode",aname "Activity Name",count(ae.acode) "Number of student joined"
from aenrol ae, activity a
where a.acode= ae.acode
group by a.acode,aname;The issue is that you have decided to use quoted column names. A pretty horrible idea (mostly for the reasons that you are now finding).
Re-create the view and get rid of the silly double quotes. -
Column Header In Table Control
Hi all,
how to mentain the column header in table control,
in case of manually table control( not with wizard).
Thanks.Hi,
First just drag and drop all the fields that are to be a part of the table control. Then drag the label on the column header. Give name and text to the label.
Regards,
Nikhil -
How to insert select columns from one internal table to another
Hi,
How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
regards,
SriramHi,
If your question is for copying data from 1 int table to other ;
we can use
APPEND LINES OF it_1 TO it_2.
or if they have different columns then:
loop at it_1 into wa_it1.
move wa_it1-data to wa_it2-d1.
apped wa_it2 to it_2.
clear wa_it2.
endloop.
thnxz
Maybe you are looking for
-
Hello to everyone. When encoding with PHP using sha1 i do not get the same result as Java's sha1 encoding. For example encoding letter 'e' in PHP produces: 58e6b3a414a1e0[b]90dfc6029add0f3555ccba127f whereas in Java it produces: 58e6b3a414a1e0[b]3fdf
-
How Can I do source-Excel format to dump into OLEDB
I want to do format the Excel source before dump to OLEDB to avoid Source error So If I use in Script component in Data flow to format the excel sheet How can I use ? Source: requirement CODE NUM UNIT LAST NAME FIRST NAME DATE PLAN USER NAME TRANS T
-
URL for apache plugin for linux with weblogic 6.1
Hi, can anyone tell me, where i can find the apache plugin for linux weblogic 6.1 thanks in advance, cheers chris
-
IWeb still won't publish. At All. Tired and fed up
Hi, yesterday I posted a Help note saying that iWeb was refusing to publish my website. I got some advice back from James Tseng (thanks James) saying I should keep trying. Well, I have kept trying - this is a day later - and i still get the message:
-
Printing Attached BW BPS Document
Hello everybody I have implemented a BPS Prototype with the possibility to create documents on the row (How to ... Document in SEM-BPS and BW-BPS). Everything is fine. No errors. but: when creating a report I can't get out, whats on the document. Ha