Only some rows selectable
Hi,
I wonder if anybody could help me in my problem?
I made a table and would like only some of the rows to be selectable. Is this possible?
The best solution would be to hide those squares on the left of the rows.
Thanks in advance for your help.
Piotrek
Edited by: Piotr Kondratowicz on Feb 10, 2009 4:29 PM
Hi Piotr,
Create a value attribute of type boolean(Ex: ed) and assign it to all editable fields of the table.
Based on a condition enable(ed=true)/disable(ed=false) the row fields as read only.Which will fulfill your requirement.
Thanks & Regards,
Jhansi Miryala
Similar Messages
-
Why are only SOME metadadta selectable?
Why are only SOME metadadta selectable? (and this cmd - C copy-able)
If your try to select 'Pixel Size', you can.
If you try to select 'Aperture', you can not.
If you try 'Orientation', you can.
If you try 'Exposure Bias', you can not
Why on earth does it do this? Why not just give access to all the fields?
Aperture is so great at letting me attach metadata to my images, but it seems so limited in allowing you to get it back...itunes only back up photos in your camera roll.
-
ALV - how to make selectable only some rows on an ALV?
Hi my problem is:
I have an ALV GRID as output of a report.
I have to make selectable only few rows based on the contents of a field (showed in a column in the ALV).
Is it possible?
Best Regards, VincenzoI did understand, but as i told you there is nothing like that, neither an option nor an event to capture.
Here is the documentation: http://help.sap.com/saphelp_erp2005vp/helpdata/EN/bf/3bd1369f2d280ee10000009b38f889/frameset.htm
Read it and choose what you need and what is in existance. -
How to edit only some rows in ALV
Hi Experts,
I have editable ALV. I need to allow edit only for some rows, not generaly all of them.
Do you have any idea how to do it?
I use ALV through FM module REUSE_ALV_GRID_DISPLAY.
Thenks®ards,
JirkaHi,
You need to use events. Sample code from sdn.
TYPE-POOLS:SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA:IT_EVENTS TYPE SLIS_T_EVENT.
data: begin of it_chg occurs 0,
index type sy-tabix,
end of it_chg.
DATA: X_EVENTS TYPE SLIS_ALV_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
NAME(10) TYPE C,
ZTERM TYPE C,
END OF ITAB.
PERFORM FILL_TABLE.
loop at itab where zterm = 'A'.
it_chg-index = sy-tabix + 3.
" addition 3 IS FOR FIELD LABELS
append it_chg.
clear it_chg.
endloop.
DATA:L_POS TYPE I VALUE 1.
CLEAR: L_POS.
L_POS = L_POS + 1.
**fieldcatalog
X_FIELDCAT-FIELDNAME = 'NAME'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-FIELDNAME = 'ZTERM'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
**events
REFRESH:IT_EVENTS.
CLEAR:X_EVENTS,IT_EVENTS.
X_EVENTS-NAME = SLIS_EV_END_OF_LIST.
X_EVENTS-FORM = 'MODIFY_LIST'.
APPEND X_EVENTS TO IT_EVENTS.
CLEAR X_EVENTS.
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = IT_FIELDCAT
IT_EVENTS = IT_EVENTS
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.
*& Form FILL_TABLE
text
FORM FILL_TABLE.
ITAB-NAME = 'vijay'.
ITAB-ZTERM = 'A'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'ABC'.
ITAB-ZTERM = 'B'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'TEST'.
ITAB-ZTERM = 'C'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'DILIP'.
ITAB-ZTERM = 'D'.
APPEND ITAB.
clear itab.
ITAB-NAME = '123'.
ITAB-ZTERM = 'E'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'GEN'.
ITAB-ZTERM = 'A'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'ALV'.
ITAB-ZTERM = 'F'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'ALVTEST'.
ITAB-ZTERM = 'A'.
APPEND ITAB.
clear itab.
ENDFORM. "FILL_TABLE
*& Form MODIFY_LIST
text
FORM MODIFY_LIST.
data: l_lines type i.
describe table itab lines l_lines.
L_LINES = L_LINES + 3.
"because we have 3 lines extra occupied by lables.
"if we have header,i mean top of page add the no.of lines
"how many ever top of page have + 3 for labels.
DO L_LINES TIMES.
read table it_chg with key INDEX = sy-index.
if sy-subrc = 0.
**This code is for reading the out put line
**and modify accordinlg to our requiremnet.
**don't chnage this.
READ LINE SY-INDEX INDEX SY-LSIND.
IF SY-SUBRC = 0.
MODIFY LINE SY-INDEX INDEX SY-LSIND
FIELD FORMAT ITAB-NAME INPUT.
ENDIF.
ENDIF.
ENDDO.
ENDFORM. "MODIFY_LIST -
Counting only some rows without where or subqueries?
Is it possible with oracle to count only some of the rows? I mean without excluding the rows in where or using sub queries.
This does not work but I think it illustrates what I want:
SELECT count(flags), count(flags like '%P%'), count(flags like '%F%') FROM table WHERE some_column = 2;
Where the first would return the number of flags rows, while the second contet the numbers that have P in them and the third counted the number with F.
Table would be
Flags Some_column
'AFP' 2
'A* 1
'PF' 1
'P' 2
And so on.
In postgres you can do: count(substring(flags from 'R')), to achieve the above mentioned idea. Does oracle have a way of doing the same?Your requirement is not clear. But.. Is this what you are trying to achieve?
SQL> with t
2 as
3 (select 'AFP' st from dual
4 union all
5 select 'A*' from dual
6 union all
7 select 'PF' from dual
8 union all
9 select 'P' from dual
10 )
11 select sum(1) sum1,
12 sum(case when st like '%P%' then 1 else 0 end) sum2,
13 sum(case when st like '%F%' then 1 else 0 end) sum3
14 from t
15 /
SUM1 SUM2 SUM3
4 3 2 -
Download link for only some rows
Hi,
I have 2 tables. One contains records for products, and the other contains images for only some of the products. The images have been uploaded through the application and therefore are in a 'upload_data' table.
The tables are linked by product_id.
I would like to display a report that shows all the column from the products table and a download link for only those products that have an image.
So far the query only returns those rows that have an image.
Thanks
Edited by: user12970007 on 20-Apr-2010 17:59What does this query look like?
-
Restricting rights to modify only some rows
Hi,
I just discovered HTML DB and played around with it on myhtmldb.com because htmldb.oracle.com is down for some reason.
Is there a way to restrict write access to some rows of a table for each user? For example everybody can see the whole table but you can only add/delete/modify the rows where your id/company name/.. is present in one column.
Cheers
MathiasHi,
I just discovered HTML DB and played around with it
on myhtmldb.com because htmldb.oracle.com is down for
some reason.
Is there a way to restrict write access to some rows
of a table for each user? For example everybody can
see the whole table but you can only
add/delete/modify the rows where your id/company
name/.. is present in one column.
Cheers
Mathias -
How to set only one row selection in ALV GRID DISPLAY
How to set single row selection in grid display
not multiselection.Hi,
In the USER COMMAND, build the code to check the REFRESHED Data & then check the number of records with SEL = 'X'.
If more than single entry found, then raise an error message.
Best regards,
Prashant -
Hi all,
I've a query with more than 500 rows as result. I'm only interested to show the first 50 rows. Did you know any way to prepare the select sentence to do it? I prefer avoid use cursors to do that.
Regards,
dbajugHitesh Nirkhey wrote:
hi
use ROWNUM keyword for fetching first 50 rows
simplest example
select * from emp
where rownum < 5 ;
regards
HiteshROWNUM applies to the rows after they are collected into a result set. Thus, it may, or may not, fulfill the OP's requirements. He still needs to define what he means by "first 5 rows".
http://psoug.org/reference/pseudocols.html
Also see description of ROWNUM in the fine SQL Reference manual -
Display item renderer in only some rows of a datagrid
I need to display a combobox item renderer in my datagrid
only in the first of every 5 rows. With the remaining 4 rows in
this particular column empty. Then the pattern will repeat again.
This is how I am currently creating the columns however with
this approach the combobox itemrenderer is appearing in all rows
<mx:columns>
<mx:DataGridColumn headerText="No."
dataField="assCriteriaNum" width="60" />
<mx:DataGridColumn headerText="Assessment Criteria"
dataField="assCriteria" width="210"/>
<mx:DataGridColumn headerText="Mark Range"
dataField="markRange" width="50" />
<mx:DataGridColumn headerText="Mark" dataField="mark"
width="70" >
<mx:itemRenderer>
<mx:Component>
<mx:ComboBox>
<mx:dataProvider>
<mx:ArrayCollection>
<mx:String>0</mx:String>
<mx:String>1</mx:String>
<mx:String>2</mx:String>
<mx:String>3</mx:String>
<mx:String>4</mx:String>
<mx:String>5</mx:String>
<mx:String>6</mx:String>
<mx:String>7</mx:String>
<mx:String>8</mx:String>
<mx:String>9</mx:String>
<mx:String>10</mx:String>
</mx:ArrayCollection>
</mx:dataProvider>
</mx:ComboBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>Here is my data provider hard coded
<mx:dataProvider>
<mx:ArrayCollection>
<mx:Array>
<mx:Object assCriteria="A01 Manage." />
<mx:Object assCriteriaNum="1" assCriteria="Brief project
plan, with little evidence of monitoring progress of project work
against the project plan." markRange="(1-3)" />
<mx:Object assCriteriaNum="2" assCriteria="Limited
identification of the topic to be investigated/ researched and
limited evidence of appropriate aims and objectives, and proposed
project title." markRange="(1-3)" />
<mx:Object assCriteriaNum="3" assCriteria="Project plan,
with some evidence of monitoring progress of project work against
the project plan." markRange="(4-6)" />
<mx:Object assCriteriaNum="4" assCriteria="Some
identification of the topic to be investigated/ researched and some
evidence of appropriate aims complete the work and objectives, and
proposed project title." markRange="(4-6)" />
<mx:Object assCriteriaNum="5" assCriteria="Detailed
project plan, with clear evidence of monitoring progress of project
work against the project plan." markRange="(7-10)" />
<mx:Object assCriteriaNum="6" assCriteria="Clear
identification of the topic to be investigated/ researched and
clear evidence of appropriate aims identify the topic and
objectives, and proposed project title." markRange="(7-10)" />
<mx:Object assCriteriaNum="7" assCriteria="No relevant
response." markRange="(0)" />
<mx:Object assCriteria="A02 Use resources/research."
/>
<mx:Object assCriteriaNum="8" assCriteria="Little or no
analysis and application of the research, with few links made to
appropriate theories and concepts." markRange="(1-5)" />
<mx:Object assCriteriaNum="9" assCriteria="Evidence of
limited research involving limited selection and evaluation of
sources." markRange="(1-5)" />
<mx:Object assCriteriaNum="10" assCriteria="Some analysis
and application of the research, with links made to appropriate
theories and concepts." markRange="(4-6)" />
<mx:Object assCriteriaNum="11" assCriteria="Evidence of
some research involving the selection analyse data and evaluation
of a range of relevant sources." markRange="(4-6)" />
<mx:Object assCriteriaNum="12" assCriteria="Critical
analysis and application of the research, with obtain and select
clear links made to appropriate theories and information from a
concepts. variety of sources." markRange="(7-10)" />
<mx:Object assCriteriaNum="13" assCriteria="Evidence of
detailed research involving the selection and evaluation of a wide
range of relevant sources." markRange="(7-10)" />
<mx:Object assCriteriaNum="14" assCriteria="No relevant
response." markRange="(0)" />
</mx:Array>
</mx:ArrayCollection>
</mx:dataProvider> -
Make only some rows in a report as links
Hi friends,
I am trying to make some of the rows in a report(The report is using union to take data from multiple tables) as links. For example i am trying to make a row corresponding to "emp" as a link. For this i am trying to use the below code
select dname "c1" from dept where dname='dept5'
union all
select
'<a href=*"javascript:popUp2('
|| '''f?p=&APP_ID.:4:&SESSION.::&DEBUG.::'
|| 'P3_EXAMPLE:'
|| ename
|| ''', 700, 500);'
|| '" >'
|| ename*
|| '</a>'
"c1" from emp where Empno=7839
--remove the '*' from the codeBut i a getting the result as
dept5
<*a href="javascript:popUp2('f?p=19669:4:1768622885363834::NO::P3_EXAMPLE:KING', 700, 500);" >KING</a*>
--remove the '*'
What i need to use to make this row a link.
Thanks,
JeevEnsure that the Display As Column Attribute for the report column is Standard Report Column.
-
Hotspot click for only some rows in ALV grid for a particular column ?
Hi there,
In ALV grid, we can make Hotspot enable for all rows in a specified column
by specifying in the fieldcatalog with Hotspot attribute set as true.
But I want to enable Hotspot only for certain rows in the particular column. I tried with MC_STYLE4_LINK , but I didnt got the required result.
So , how could I achieve that in ALV grid.
Points would be rewarded for helpful answers.
Regards,
Anil .Hi,
You can do it for a column. Please refer to the code snippet below,
DATA : it_fcat TYPE lvc_t_fcat,
wa_fcat LIKE LINE OF it_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SMMW_ALERTS_ICON_S'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = it_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
LOOP AT it_fcat INTO wa_fcat.
IF wa_fcat-fieldname = 'STATUS'.
wa_fcat-hotspot = 'X'.
MODIFY it_fcat FROM wa_fcat.
CLEAR wa_fcat.
ENDIF.
ENDLOOP.
CALL METHOD l_obj_alv_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SMMW_ALERTS_ICON_S'
CHANGING
it_outtab = lt_alerts_st
it_fieldcatalog = it_fcat.
In the above replace the structure 'SMMW_ALERTS_ICON_S' with your structure and column 'STATUS' with your desired column.
Hope this helps,
Regards,
Vinodh -
How to capture indexes of multiple rows selected in Advance list
Hi,
- I have a prefilled advance list with multiselection enabled.
- There is a button, associated with an action,which is bind to a eventHandler,that event Handler has script operation which conains the ruby scrpt code.
- Now when i select multiple rows of that advance list and click on the action,I want to capture the indexes of all the selected rows.
I tried using following ruby code:
lead=$data.datalist.LeadSelectedIndex
But it returns index of only first row selected out of various rows selected.
So please anyone help me on that.
Regards ,
Saurabh Sharma.In FP2.6 there is no chance from SDK to have a mass enabled Action and bind to a mulli selection list as a BO Action in the UI Designer, as multiplicity will always be single and only lead selection would be selected.
this feature comes only in FP3.0.
So i am not sure what excatly Saurabh wants to do : maybe do some calculations based on multi seletions then i would do the following as also what Christian mentioned
multiSelect = ($data.DataList.GetSelectedRowsCount() > 1);
NoOfRowsSelected = $data.DataList.GetSelectedRowsCount();
SummationField = 0;
if ( multiSelect )
LeadSelection = $data.DataList.LeadSelectedIndex;
RequiredDataField = $data.DataList.Get(LeadSelection).AnydataField;
for i in 0..(NoOfRowsSelected - 1)
currentRow = LeadSelection + i;
RequiredDataField = $data.DataList.Get(currentRow).AnydataField;
// imagine this is just add values of the RequiredDataField
SummationField = SummationField + RequiredDataField
end
end
So i have not tried this directly - but i hope i make the idea clear.
Regards,
Nitesh Pai -
HI,
I want to make my ALV Grid only single row select enabled, can some one guide me which variable should be set for the same.
Thanks and Regards,
HarshIf you are using OO for alv then
call method grid1->get_selected_rows
importing
et_index_rows = i_sel_alvrows[].
call method cl_gui_cfw=>flush.
describe table i_sel_alvrows lines v_dbcnt.
if i_sel_alvrows[] is initial.
* Info message : Please select a row
message i176. " Please select a row'.
endif.
if v_dbcnt gt 1.
* Info message : Multiple Row Selection not possible
message i177. " Multiple Row Selection not
" possible'
endif.
or if your using REUSE then
form user_command using p_ucomm type sy-ucomm
rs_selfield type slis_selfield.
" Check the rs_selfield-tabindex value here
" you may get some clue here
endform.
a® -
How can i select some row from multiple row in the same group of data
I want to select some row from multiple row in the same group of data.
ColumnA
Column B
1 OK
1 NG
2 NG
2 NG
3 OK
3 OK
I want the row of group of
ColumnA if ColumnB contain even 'NG'
row , select only one row which Column B = 'NG'
the result i want =
ColumnA Column B
1 NG
2 NG
3 OK
Thank youThat's some awful explanation, but I think this is what you were driving at:
DECLARE @forumTable TABLE (a INT, b CHAR(2))
INSERT INTO @forumTable (a, b)
VALUES
(1, 'OK'),(1, 'NG'),
(2, 'NG'),(2, 'NG'),
(3, 'OK'),(3, 'OK')
SELECT f.a, MIN(COALESCE(f2.b,f.b)) AS b
FROM @forumTable f
LEFT OUTER JOIN @forumTable f2
ON f.a = f2.a
AND f.b <> f2.b
GROUP BY f.a
Maybe you are looking for
-
Can you have 2 apple tvs working with one computer - both active at the same time?
Can 2 Apple TVs - Generation 3 - work off the same computer? I can't seem to get the 2nd Apple TV to find the network yet I have full signal and the Network name is correct. Can they work at the same time using different content?
-
Ipod touch no longer autosyncs since adding new windows format. Simple how to ?
Hello. Since downloading the new format assoc'd w/ Itunes10.1 my Ipod touch no longer automatically syncs. Is there something simple I'm missing ?
-
Unable to install SQL 2012 Enterprise on Windows 8.1 OS
I had installed SQL 2012 Enterprise on my Windows 8.1 and was running successfully. I faced some SSRS & SSIS Authentication issue. So i decided to uninstall SQL and re-install it. On doing so, i am unable to install it. Wizard disappears from this sc
-
External Monitor blurry with MacBook Pro
Good day, I have searched the forums but have not found a solution to my problem... I recently purchased a Dell 2005FWP External Monitor and plugged it in (DVI to VGA) to my MacBook Pro. It automatically adjusted to a 800x600 resolution which of cour
-
Re: Inheritance and Inner classes
Sorry all, I forgot to include that I loose the inner classes in codesense. And the editor will not let me reference them. Thanks again, Stu "Stu Pidasso" <[email protected]> wrote in message news:41fe9aac$[email protected].. Hello all,I'm an Eclipse