JTable-Selecting a row when i press an alphabet in a single column table
hi,
I have come across a issue where if i press a alphabet the row containig the leading alphabet should be selected.
for eg: if i press "s" the first occurence of row containing string starting with "s" ie "stateful" sholud be selected.My table has 1 column only..
please look in to it nad provide a solution.
Looking fwd
cheers,
sharath
Use a JList. It supports this functionality.
Otherwise you would need to add a KeyListener to the table. Loop through the model using getValueAt(...) and compare the first character and then highlight the line.
Similar Messages
-
JTable selecting a row....
I have tried many things to figure out how to select a row using jTable. Nothing works for me, can someone please help. Here are some samples of what I have tried. If you need more information please ask and I will post it immediately. Thanks
Attempt #1
void jTable1_mouseClicked(MouseEvent e) {
ListSelectionModel lm = jTable1.getSelectionModel();
int selectedRow1 = lm.getMinSelectionIndex();
if ((e.getModifiers() & InputEvent.BUTTON1_MASK)!=0) {
int row = jTable1.getSelectedRow();
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
Attempt #2
void jButtonSelect_actionPerformed(ActionEvent e) {
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ListSelectionModel lm = jTable1.getSelectionModel();
int selectedRow1 = lm.getMinSelectionIndex();
if ((e.getModifiers() & InputEvent.BUTTON1_MASK)!=0) {
int row = jTable1.getSelectedRow();
ListSelectionModel rowSM = jTable1.getSelectionModel();
rowSM.addListSelectionListener (new ListSelectionListener() {
public void valueChanged (ListSelectionEvent e) {
if (e.getValueIsAdjusting ()) return;
ListSelectionModel lsm = (ListSelectionModel ) e.getSource();
if(lsm.isSelectionEmpty()){
System.out.println("No rows are selected.");
else{
int selectedRow = lsm.getMinSelectionIndex();
System.out.println("Row "+selectedRow+" is now selected.");
Thank you once again :0)Why do you want to know when a row is selected?
If you are just trying to edit data you are going about this the hard way. Just use the table model.
If you want to have some other action occur when a row is selected try something like this.
table.addMouseListener (new MouseAdapter()
public void mouseClicked (MouseEvent e)
Point origin = e.getPoint();
if ( e.getClickCount() == 2)
{ // double clicked
int row = table.rowAtPoint(origin);
if (row == -1)
return;
else
// Do something
else
// single click
int row = tabl.rowAtPoint (origin);
if (row > -1)
// Do something else -
How do I capture selected record ID when I pressed the Button
Hi
I have a repdort with below query.
select
empno, ename, job, sal,
'<input type="button" value="Employee" />' "Select"
from emp
This query gives each row a button. When I press a button of a particular row I wanted to capture that row empno field value. How can I do this?
Regards
kiran AkkirajuIf you are trying to make the button do a submit to this page or another page to see employee detail, you are probably better off creating a link on you column in the "Report Attributes" section that will make the column a hyperlink (text or image, you can pick) (see How can i make a linking column in a report it has a link to a how-to from Oracle and some HTML formatting hints to make the link more informative with ALT text)
Here is one way to capture the selected employee number. Hopwever, it will not submit the form though. You can put the value of empno into another field using javascript. The Pxxx_destination_field is the name of the field on the page you want to push the empno into.
select
empno, ename, job, sal,
'<input type="button" onclick="javascript:html_GetElement(''Pxxx_destination_field'').value = ' || empno || ';" value="Employee" />' "Select"
from emp -
How do i select a row when a table is loaded?
Hello Guys
could somebody help me? I'm new to ADF and I'm trying to make a SearchPage. It works but I get this behavior:
#1: I bound the Table with the ResultSet of a EJB-SessionBean find-Method. When the SearchPage is loaded, a the SessionBean-find-Mehod is called. I want, that the Table only shows the ResultSet when the CommandButton "Search" is clicked not on PageLoad.
#2. In the ResultSet shown in the table no row is preselected. How can i change that?
# 3. The Table is placed in a TabbedPanel in a showDetailItem "SearchResult". After i select a row I want to show the Details of the selected row-Object in anoteher showDetailItem "Details". How could i handle that?
Thnx a lot for your Help!Hello Frank,
thank you for responding!
#1) I tryed #1 but i got the Exception Illegal . I followed the steps you recommended as follow:
a) On the button "Search" add an af:setPropertyListener. It looks like this:
<af:commandButton actionListener="#{bindings.getDelegateFindAllBySearchCriteria.execute}"
text="Suche starten"
disabled="#{!bindings.getDelegateFindAllBySearchCriteria.enabled}"
id="cb1" inlineStyle="margin-left:8px;">
<af:setPropertyListener from="#{true}" to="#{viewScope.executeOK}" type="action"/>
</af:commandButton>
b) Have the RefreshCondition property on the iterator in the pageDef file looking for a memory flag e.g #{viewScope.executeOk==true?true:false}. In the ExpressionBuilder I get "#{adfFacesContext.viewScope}" but not #{viewScope}
I got an error message writing this in de pageDefinition. It accepted: #{viewScope.executeOk==true}. It is right, if TRUE -> TRUE, if FALSE -> FALSE
The compiler says: "executeOK is an unknown property"
After that i started the Application and got an
<14.04.2011 16:59 Uhr MESZ> <Error> <HTTP> <BEA-101020> <[ServletContext@17109869[app:EHRCPD_PISA_TT module:EHRCPD_PISA_TT-ViewController-context-root path:/EHRCPD_PISA_TT-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
java.lang.IllegalStateException
at oracle.jbo.uicli.binding.JUSearchBindingCustomizer.getViewCriteria(JUSearchBindingCustomizer.java:2161)
#2) I set DisplayProperty to "selected" but it did not works. I checked the rows (they are 2) but they are the same. If i debbug the application i see, that the resultSet got from the Database (JPA) is OK. The size of the resultSet is 2 and the Objects retrieved are different. What i'm doing wrong?
#3) This worked perfectly! Thank you!
I hope, I get this working.
Thnx again -
Hi
How is it possible to select the entire row of a JTable without the cell that`s selected, gaining a border.
Any help would be appreciated.
Thanks
KellyCould you explain what you need? You don't want the border of the selected row to be displayed?
-
Extract two rows when two codes are stored in the same column
I have a column like this
American Indian or Alaska Options
XCK,XON
I want to be able to insert to records for this pidm (primary key)
this is how it is in the table
SZSCAPL_APPLICANT_ID SZSCAPL_AMER_INDIAN_ALASKA_OPT
5666090 XCK,XONso I need to be able to extract one ROW for XCK, and another row for XON, so I can insert two records in the GORPRAC table
for an speific record in a column, I want to be able to select two records for this person in a select staement, so I can inserted two records in another table
I need to be able to display two records
I got this code, but it is not working...
INSERT INTO general.gorprac
(gorprac_pidm, gorprac_race_cde, gorprac_user_id,
gorprac_activity_date, gorprac_data_origin
SELECT spriden_pidm,
DECODE (szscapl_amer_indian_alaska_opt,
'XAN', 'N1',
'XCW', 'N1',
'XCH', 'N1',
'XCK', 'N1',
'XNV', 'N1',
'XSX', 'N1',
'XON', 'N1'),
p_user,
sysdate,
'Common App Load'
FROM saturn_midd.szscapl, saturn.spriden
WHERE spriden_id = szscapl_applicant_id
AND spriden_ntyp_code = 'CAPP'
AND szscapl_amer_indian_alaska_opt IN ('XAN','XCW','XCH','XCK','XNV','XSX','XON')
AND NOT EXISTS
(SELECT * FROM GORPRAC
WHERE GORPRAC_PIDM = SPRIDEN_PIDM
AND spriden_ntyp_code = 'CAPP'
AND GORPRAC_RACE_CDE = 'N1'); Edited by: peace4all on Sep 10, 2009 3:19 PMLearn about Oracle insert statements.
http://www.morganslibrary.org/reference/insert.html
It can be done with:
INSERT ALL
INSERT WHEN
INSERT ALL WHEN
and
INSERT FIRST WHEN -
Select data into LOV as Multi Column form a Single Column Table
Table: CALL_DETAILS
FLT_NO CALL_NO LOCATION DATE_ARRIVAL PRV_FLT_NO
FLT01 1 DXB 01/07/07 FLT00
FLT01 2 TIL 02/07/07 FLT00
FLT01 3 HKG 03/07/07 FLT00
FLT01 4 SIN 04/07/07 FLT00
FLT01 5 DXB 05/07/07 FLT00
FLT02 1 DXB 05/07/07 FLT01
FLT02 2 TIL 06/07/07 FLT01
FLT02 3 HKG 07/07/07 FLT01
FLT02 4 SIN 08/07/07 FLT01
FLT02 5 DXB 09/07/07 FLT01
FLT03 1 DXB 09/07/07 FLT02
FLT03 2 TIL 10/07/07 FLT02
FLT03 3 HKG 11/07/07 FLT02
FLT03 4 SIN 12/07/07 FLT02
FLT03 5 DXB 13/07/07 FLT02Above is my Table & Data
I want a query to populate like blow after selecting 2 LOCATIONS.
LOC 1 = DXB
LOC 2 = HKG
LOV Data........
FLT01 DXB 01/07/07 HKG 03/07/07
FLT02 DXB 05/07/07 HKG 07/07/07
FLT03 DXB 09/07/07 HKG 11/07/07On the form the user will type LOC_1 and LOC_2. Then on the next field the user have to select the
available Flight Details between LOC_1 and LOC_2. May through a LOV the Flight_Details to be populated.
Also there will be a possibility to have the Locations like below
LOC 1 = SIN
LOC 2 = TIL
LOV Data........
FLT01 SIN 04/07/07 TIL 06/07/07
FLT02 SIN 08/07/07 TIL 10/07/07Another go, including an extra flight which is not connected to the first. Original query would break with this data. It would be better if you could structure your data so that flights were grouped into logical services instead of using the previous flights column.
WITH data AS(
SELECT 'FLT01' FLT_NO, 1 CALL_NO, 'DXB' LOCATION, To_Date('01/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT01' FLT_NO, 1.5 CALL_NO, 'DXB' LOCATION, To_Date('01/07/07 12','DD/MM/YY HH') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT01' FLT_NO, 2 CALL_NO, 'TIL' LOCATION, To_Date('02/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT01' FLT_NO, 2.5 CALL_NO, 'HKG' LOCATION, To_Date('02/07/07 12','DD/MM/YY HH') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT01' FLT_NO, 3 CALL_NO, 'HKG' LOCATION, To_Date('03/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT01' FLT_NO, 4 CALL_NO, 'SIN' LOCATION, To_Date('04/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT01' FLT_NO, 5 CALL_NO, 'DXB' LOCATION, To_Date('05/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT00' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT02' FLT_NO, 1 CALL_NO, 'DXB' LOCATION, To_Date('05/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT01' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT02' FLT_NO, 2 CALL_NO, 'TIL' LOCATION, To_Date('06/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT01' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT02' FLT_NO, 3 CALL_NO, 'HKG' LOCATION, To_Date('07/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT01' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT02' FLT_NO, 4 CALL_NO, 'SIN' LOCATION, To_Date('08/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT01' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT02' FLT_NO, 5 CALL_NO, 'DXB' LOCATION, To_Date('09/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT01' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT03' FLT_NO, 1 CALL_NO, 'DXB' LOCATION, To_Date('09/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT02' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT03' FLT_NO, 2 CALL_NO, 'TIL' LOCATION, To_Date('10/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT02' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT03' FLT_NO, 3 CALL_NO, 'HKG' LOCATION, To_Date('11/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT02' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT03' FLT_NO, 4 CALL_NO, 'SIN' LOCATION, To_Date('12/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLT02' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLT03' FLT_NO, 5 CALL_NO, 'DXB' LOCATION, To_Date('13/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLTAA' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLTXX' FLT_NO, 1 CALL_NO, 'DXB' LOCATION, To_Date('14/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLTAA' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLTXX' FLT_NO, 2 CALL_NO, 'TIL' LOCATION, To_Date('15/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLTAA' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLTXX' FLT_NO, 3 CALL_NO, 'HKG' LOCATION, To_Date('16/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLTAA' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLTXX' FLT_NO, 4 CALL_NO, 'SIN' LOCATION, To_Date('17/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLTAA' PRV_FLT_NO FROM dual UNION ALL
SELECT 'FLTXX' FLT_NO, 5 CALL_NO, 'DXB' LOCATION, To_Date('18/07/07','DD/MM/YY') DATE_ARRIVAL, 'FLTAA' PRV_FLT_NO FROM dual
SELECT flt_no, f_location, f_date, t_location, t_date
--,rn_from, rn_to
FROM(
SELECT
tfrom.flt_no,
tfrom.location f_location,
tfrom.date_arrival f_date,
tto.location t_location,
tto.date_arrival t_date,
Row_Number() over(PARTITION BY tto.date_arrival ORDER BY tfrom.date_arrival DESC) rn_from,
Row_Number() over(PARTITION BY tfrom.date_arrival ORDER BY tto.date_arrival ASC) rn_to
FROM
(SELECT DISTINCT sys_connect_by_path(flt_no,'/') flts FROM data CONNECT BY PRIOR prv_flt_no = flt_no) service,
(SELECT * FROM data d1 WHERE call_no != (SELECT Max(call_no) FROM data WHERE flt_no = d1.flt_no)) tfrom,
(SELECT * FROM data d1 WHERE call_no != (SELECT Max(call_no) FROM data WHERE flt_no = d1.flt_no)) tto
WHERE tfrom.location = 'SIN'--'DXB'
AND tto.location = 'TIL'--'HKG'
AND tto.date_arrival > tfrom.date_arrival
AND InStr(service.flts,tfrom.flt_no) > 0
AND InStr(service.flts,tto.flt_no) > 0
WHERE rn_from = 1
AND rn_to = 1
ORDER BY 1,3; -
How can i select the next column instead of next row when press enter key
I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged but column index will changed.
Thanks to all.Well, the right arrow key will already move you to the next column, so the easiest way to do this is to modify the InputMap to have the Enter key invoke the same Action as the right arrow key.
You can search the forum for my "Table Actions" (without the space) example that will show you how to do this. -
Hi experts it is urgent, how to read current row when f4 is pressed
hi all
i have a field xyz which is input/output enabled. this field is attached with f4 help.
my requirement is to get or read the row when user press f4 on that field so that restrict value should come in f4 help.
right now f4 is showing all data, but i want data with respect to the row.
so how to get or read the row when user press f4 i.e user will choose any row and this out is on alv grid and there are multiple records.
i hope u understood the query.
thanx
rockyHi,
Use function module DYNP_VALUES_READ and then read the Tables parameter of this function module to get the value of the field. for demo program see this report 'DEMO_DYNPRO_F4_HELP_MODULE'.
Thanks and regards.
Tanweer -
Select Multiple Rows in a Table without CTRL
Expecting the user to press "Ctrl" when selecting multple rows is very unfriendly and unintuitive. We'd like the row selection to work as in ALV where you just select multiple rows by clicking on them.
We've set the tables rowSelectable to true and selectionMode to 'multi' but we still cannot select multiple rows without the CTRL hotkey.
This issue apparently [arose before|About selection in the table] but wasn't resolved.
System Details
SAP_ABA 701 0006 SAPKA70106
SAP_BASIS 701 0006 SAPKB70106
SAP_AP 700 0019 SAPKNA7019Hello Marc,
you need to call IF_WD_CONTEXT_NODE->set_selected(index = lv_index) sorry for the typo in my previous comment.
by calling IF_WD_CONTEXT_NODE->set_selected method wont remove the lead selection.
to unselect the records, you can call the same method by passing the FLAG value as abap_false.
so for your usecase the logic will be like this in the ON_SELECT event handler
1. get the index of the new_lead_selection
2. check whether this is already seleted in the context node by calling IF_WD_CONTEXT_NODE->IS_selected
3. if already selected then call IF_WD_CONTEXT_NODE->set_selected( flag = abap_false index = lv_index)
if not selected then call IF_WD_CONTEXT_NODE->set_selected( index = lv_index )
Hope this solved your problem.
BR, Saravanan
Edited by: Saraa_n on Jul 6, 2011 11:52 AM -
HOW TO SELECT ALL ROWS IN A MULTI SELECT TABLE!!!!!
Hello
I have a table with tableSelectMany component. how can I set the page to initially select all rows when first opened?????efffffttttttt? are you saying you will do an electronic funds funds funds funds funds transfer transfer transfer transfer transfer transfer to anyone who answers?
What version of JDeveloper are you using - that is quite important in order to be able to give you an answer.
What also might be useful is "please" and "thank you" instead of SHOUTING IN ALL CAPS THAT YOUR QUESTION IS IMPORTANT. Realizing that you asked this question over a weekend when most people dont sit and read the forum...
You have a habit of saying all your questions are URGENT!!!!!! which is generally considered, um...., impolite. -
How to select multiple row of table using check box?
hi,
i am having table on view having first field as checkbox. what i want, when i click on checkboxes in multiple rows, and i click on any button i need to use those content to next view...
my problem is if i select only one row , i can use onlead select property of table..but when i select multiple rows through check box how should i read contents of table....?
Plz solve it.
Thanks,
Saurin ShahHello Saurin,
You are right using LeadSelection you can select only 1 row at a time. You will have to make use of Selection for achieving this. First you will have to change the selection mode of the table to multiple & also change the selection property for the related context to 0..n . Please find a code extract which might help you. (However this facility is only available from SP 14.) The main part is using the set_selected method of if_wd_context_node.
data: node_zcourse_details type ref to if_wd_context_node,
node_course_assign type ref to if_wd_context_node,
elem_course_assign type ref to if_wd_context_element,
stru_course_assign type if_v_details=>element_course_assign ,
item_popin_selected like stru_course_assign-popin_selected.
" navigate from <CONTEXT> to <ZCOURSE_DETAILS> via lead selection
node_zcourse_details = wd_context->get_child_node( name = if_v_details=>wdctx_zcourse_details ).
" navigate from <ZCOURSE_DETAILS> to <COURSE_ASSIGN> via lead selection
node_course_assign = node_zcourse_details->get_child_node( name = if_v_details=>wdctx_course_assign ).
" @TODO handle not set lead selection
if ( node_course_assign is initial ).
exit.
endif.
data elem_set type wdr_context_element_set.
field-symbols <wa_elem> like line of elem_set.
elem_set = node_course_assign->get_elements( ).
loop at elem_set assigning <wa_elem>.
<wa_elem>->set_selected( TRUE OR FALSE ). " Supply either TRUE/FALSE in here
endloop. -
How to select the row on right click.
Hi,
I want row selection when user right click on the table.
Right now when user right click on table a pop up menu comes but no row selected at this time.
Can any body tell how select the row when right click over the table.Hi,
look at this thread:
http://forum.java.sun.com/thread.jspa?threadID=501957&messageID=2374481
L.P. -
Selecting Multiple Rows from ALV GRID Display
Hi,
I am having a ALV GRID Display. I want to select multiple rows from the Output and move them to an internal table.
Please let me know how do I acheive this.
Thanks in advance,
Ishaq.Hi,
Have a look on the following code. It displays the selected rows which hv been selected in basic list.
TABLES:
spfli.
TYPE-POOLS:
slis.
DATA:
BEGIN OF t_spfli OCCURS 0,
checkbox.
INCLUDE STRUCTURE spfli.
DATA: END OF t_spfli.
DATA:
t_sspfli LIKE STANDARD TABLE OF t_spfli .
DATA:
fs_spfli LIKE LINE OF t_sspfli.
DATA:
fs_layout TYPE slis_layout_alv,
w_program TYPE sy-repid.
SELECT *
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE t_spfli.
*fs_layout-info_fieldname = 'COLOR'.
fs_layout-box_fieldname = 'CHECKBOX'.
w_program = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = w_program
i_callback_pf_status_set = 'FLIGHT'
i_callback_user_command = 'SPFLI_INFO'
i_structure_name = 'SPFLI'
is_layout = fs_layout
TABLES
t_outtab = t_spfli
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.
*& Form FLIGHT
text
-->RT_EXTAB text
FORM flight USING rt_extab TYPE slis_t_extab..
SET PF-STATUS 'FLIGHT' EXCLUDING rt_extab.
ENDFORM. "FLIGHT
*& Form SPFLI_INFO
text
-->UCOMM text
-->SELFIELD text
FORM spfli_info USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
selfield-refresh = 'X'.
CASE ucomm.
WHEN 'FLIGHT'.
LOOP AT t_spfli.
IF t_spfli-checkbox = 'X'.
t_spfli-checkbox = ' '.
t_spfli-color = 'C51'.
MODIFY t_spfli TRANSPORTING checkbox.
fs_spfli = t_spfli.
APPEND fs_spfli TO t_sspfli.
ENDIF.
ENDLOOP.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
CLEAR fs_spfli.
fs_layout-info_fieldname = 'COLOR'.
fs_layout-confirmation_prompt = 'X'.
fs_layout-key_hotspot = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = w_program
i_structure_name = 'SFLIGHT'
is_layout = fs_layout
TABLES
t_outtab = t_sspfli
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.
REFRESH t_sspfli.
ENDFORM. "SPFLI_INFO
Regards,
Chandu -
Title/Heading/Row-Align Multi-Column Tables
File under: Frame Annoyances, with a limited hacky work-around
In the two-column format we commonly work in, we often need a table that is column-wide, but may flow into multiple colums.
The problem is that the continuation heading (and TableTitle, if used), never align with the starting heading/title. This is because the continuations start at top of column, whereas the table itself starts (by "Anywhere" default) below the anchor line (presumed to be "In Column" for this discussion)..
OK, what if we change Table > Table Designer [Basic] Start to:
Top of Column: Oops, that becomes top of next column, leaving the anchor text column-widowed (but it gave me an idea).
Top of Page: Oops, that becomes top of next page, leaving the anchor text page-widowed.
Float: No effect
OK, what if we change the anchor text Format > Paragraph > Para Designer [Pagination] Format to:
[Pagination] Across All Columns (AAC): Oops, table appears only in left column on all pages, or;
[Basic] Space & Line Spacing, including negative values, appears to have no effect. Using a tiny font only minimizes the problem, and doesn't cure it.
I thought I had figured out how to solve this at one time, but could not recall it. I'm posting this in part to solicit some simpler solution. Web searching found only one solid candidate solution, and it was, of course, 404. Perhaps Frame versions later than the FM7/Win and FM7.1/Unix that I routinely use have enhancements to address this.
We normally just sidestep the problem by using an AAC format and a table that spans the page, with a fake center gutter, simulating a multi-column flow. But in a recent case, I wanted a real single-column-wide table of variable length (due to conditional rows and expected future growth), but I wanted the headings to align across columns. The table did fit on a single page, which is a limitation of the following hack.
Hack: This example presumes a normal 2-column page text frame that is 7.5in wide with a 0.24in gutter (3.63in columns), and table that needs no more than one page. It works for 3- and 4-column layouts as well.
Use an AAC anchored frame text line.
Create a full page width (7.5in) anchored frame (which can be Below, Top of Col, as desired).
Create a text frame inside the anchored frame. This frame is:
one more than your standard page (3-column for this example)
Same gutter size (0.24in for this example).
Initially draw the text frame to fit inside the the anchored frame, so you can easily grab it.
Make sure the default (anchored table) paragraph format of the first column is "In Column".
Use Graphics > Object Properties to adjust the inside text frame:
Set Width: to your standard text frame total width plus 1 column and 1 gutter (11.37in for this example).
Set Offsets: to 0 and 0 (this will push the rightmost column out of sight for the moment).
Insert your table at the anchored table text of the inside text frame.
In Table Designer, set Start: to Top of Column (this pushes the start of table to column 2).
Select the internal text frame again.
Set Offset From: Left: to negative one column + one gutter (-3.87in for this example).
The table now appears to start in page column one, and flows to additional columns with heading alignment.
This worked perfectly for my recent requirement. In fact, I used a 3-column layout (4 actual) for the text frame inside the anchored frame. Some math is required, sorry .I'm not sure if I followed that correctly, but if I read it right, you
have a single-column table that spans multiple columns, and the issue is
that the first column does not butt up against the top of the text
frame, while the additional columns do. You want the table in all
columns to butt up against the top of the text frame so that they are even.
If that is the case, the solution is this:
1. Create a paragraph format called "TableAnchor" in the Paragraph
Designer. Assign it with a negative Space Below of -12.0 pt, "Fixed"
line spacing, "Start Anywhere.," "In Column." Assign the font size as
12.0 pt.
2. Create your table format. Give it a Space Above of 12.0 pt.
3. Then, always insert your table into its own, empty TableAnchor
paragraph. You will get the alignment you seek.
NOTES: Anywhere I said "12.0 pt," you can use a different font size-- as
long as you use the same number in each place. You may also want to
create a TableAnchorAAC paragraph format, which is identical except for
the Across All Columns setting, to hold tables that span multiple columns.
I hope I understood the question correctly and was of help.
Maybe you are looking for
-
Please help me solve this problem.
-
Shopping cart not appearing in users sourcing cockpit for completion
Hi A user cannot see his shopping carts in his sourcing cockpit in his worklist. He finds them with the find tab but he cannot mark them as complete. The completion check box column is not there. However another colleague can find these shooping car
-
Select DBASE IV data from Oracle on Linux
Can I select DBASE IV data from Oracle on Linux
-
Reader won't start, Fedora Core 6 newbie
I am a Linux newbie running an up-to-date Fedora Core 6 with GNOME. I just installed the Adobe Reader version 7.0.8 for Linux .rpm file by downloading and right clicking it and choosing Open with Software Installer. I find the Adobe Reader launch ico
-
Problem running "owsctl" (Oracle application server)
Hello everybody, I installed Oracle Application Server v. 4.0.8.2 for Sparc Solaris, it seems that all worked right (no error messages on logs files), but to complete the installation is necessary run the command "owsctl start -nodemgr", it4s to star