Selecting rows of a particular day
I have always had problems when dealing with dates :p (Ok pun intended)
I have table which has a date field in the format:
DD/MM/YYYY hh:mm:ss
How can I select only the rows which have the date 20/08/2004 ?
Hello
The internal format of a date column does not change, every single date is recorded with the century, year, month,day, hour, minute, second. The only thing that changes is the way you display it. Anyway, if you want to get rows with a specific date, regardless of the time you can do a few things.
SELECT
column
FROM
table
WHERE
TRUNC(date_col) = TO_DATE('28/08/2004','DD/MM/YYYY');This works by truncating the time portion of the date value to be midnight. If you "create" a date value without specifying the time, it will default to midnight too. The only problem with using TRUNC on date_col is that oracle will not be able to use any indexes on that column (unless there is a function index on it using TRUNC)
To make sure that oracle is able to use any indexes on the date column you need to set up a range from midnight to 23:59:59 on the day you are searching, either of the following will do that...
SELECT
column
FROM
table
WHERE
date_col BETWEEN TO_DATE('28/08/2004','DD/MM/YYYY') AND TO_DATE('28/08/2004 23:59:59','DD/MM/YYYY HH24:MI:SS');
SELECT
column
FROM
table
WHERE
date_col >= TO_DATE('28/08/2004','DD/MM/YYYY')
AND
date_col < TO_DATE('29/08/2004','DD/MM/YYYY');For the last example, if you are using a variable to store the search date, you can do the following which just means less typing...
SELECT
column
FROM
table
WHERE
date_col >= SearchDateVar
AND
date_col < SearchDateVar + 1;HTH
Similar Messages
-
EL expression to set row at particular index as selected row
Hi,
What should be the EL expression to set row at index 'i' as selected row in a tree binding.
I tried *#{bindings.treeBinding.collectionModel.selectedRow[i]}* . But it doesn't work.
I also want to make the selected row as current. Will *#{bindings.treeBinding.collectionModel.makeCurrent}* work?
Thanks
KKHi,
create a managed bean that returns the selected RowKeys for the tree. See this example:
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/61search-in-rendered-trees-177577.pdf
It searches for a specific label in a tree and marks it as selected
Frank -
IPad iOS7 Select a particular day from month view?
When I open my calendar in month view, in the past (iOS6) I was able to double tap on a particular day and that day view would show up. Ever since the update to iOS7, I am not able to do that. When I hit day view, it seems to send me to a random day, or sometimes today, and then I have to scroll all the way over to the day I wanted, which could be months away. Is this an issue with everyone or is there something I am not doing correctly? Thanks!
I tried restarting it and there is no change. I did already notice that I can hold down and add an event to a day if I wish. I use my calendar constantly for work, so what I would be trying to do is looking ahead in month view to schedule an appointment, or just view appointments. Each day I can have as many as 5 or 6 appointments listed, so not all of the events will show up. So it was easy for me before to just double tap that day to see the full list of appointments. Thanks all for responses so far. Am I correct in assuming that no one can do this anymore with the update?
-
How do I get the values from a selected row.
I am using JDeveloper 9.0.5. On my page, I have placed a button within a table. The button has been assigned an event. The event is within my Action class. This class implements DataAction and has overriden the
processComponentEvents(DataActionContext actionContext);
method.
Question: While I am within the processComponentEvents method, is it possible to obtain the values of selected row?Good Morning Jeffery,
First off thanks for your clear explanation. I have a few related questions as noted from your response:
There are two ways to communicate the desired model row between the UIX view and the struts controller. One way is to use the singleSelection component in your table and put your buttons in the singleSelection's contents.
When the user selects the radio button for a particular row and then clicks on one the buttons, a built in event handler in UIX will set the current row in the model to be the user selected row. Therefore, your Struts action can operate on the currently selected model row.
When you drop a UIX table from the data control palette it is automatically set up in this way (with a single selection).
Ok, Lets say that i've set everything up as you described. Not lets say that the button was pressed and I hit the overriddenprotected void processComponentEvents(DataActionContext actionContext) throws IOException, ServletException ;
When I look at the request object, I do not see the values. How do I get access to the rowkey at this point?
Some people, however, want to actually render buttons in their table rows, and have those buttons initiate an action on their row. If you are doing this, then you need to pass the row id to your struts action as a parameter, which means that you need to know the row id when you are rendering a button for a given row. There is an EL expression that will return the row-id for the current row, it is:
${uix.current.rowKeyStr}
which is not so obvious or well documented in the preview release (sorry) but should be for the production release.
A generic code snippet would go a long way to shedding some light on that. I guess I am use to using JDeveloper 9.0.3. It seems,"to me", that JDev 9.0.5 has put a completely new twist on things. I find myself wondering when I can use the 9.0.3 syntax and when
should not. If your team has any short source toys around which demonstrated using rowkeys, or accessing the internal parts of the
struts controller, I would find that invaluable. It dose not matter if this information is documented.
Thank you -
Vendor Balance on a particular Day
Hi Guys,
I need to get the vendor balance on a particular day.
I need to develop a new report for calculating the vendor balances on a particular day.
How can i do this using BSIK and BSAK table. What logic can be used to calculate the balance for a particular vendor.
I need to give the specs to the ABAPer.
Pls advise.
Thanks
srik.Hi,
If you want vendor balance on a particular day.
Refer Table BSIS and BSAK and select field LIFNR and combine the vendor from BSAK and BSIK.
And take the total as of Posting date or Document Date ( BUDAT or BLDAT).
Along with Clearing date ( AUGDT) and Clearing Document(AUGBL) from BSAK table to differentitate the Open item and Cleared item.
And sum up the total based on posting Date.
Regards,
Hemanth. -
Hi,
I have a multi-row select report with checkboxes. I would like to have it so you can check off your desired rows and click a button to have another window popup with the row information displayed in a different layout. The reason I am doing this is because I want to print specific rows (3 at a time, actually) in a particular format (ie not horizontally). I can get this to work with static fields in the region but cannot make the leap to multi-row select.
I'm thinking it's a combination of passing htmldb_application.g_f01 to pick the checked rows and then have javascript loop through the values in the report and place them in fields on the pop up. I found other postings, but they were for update of the multiple rows: I'm looking to just copy the text from the rows themselves to another window.
Is this possible?
I want a specific format to print out data in non-row fashion for a select set of data.
Does this make sense?
Thank you,
DeanI believe I was getting caught up because I was trying to mix server side and client side functions.
I ended up doing two things slightly different.
Created a new small table to house my selections:my_print.
I had check boxes on the rows and an after submit process that would delete the rows in the selection table and insert the key values of those selected.
BEGIN
DELETE from MY_PRINT;
FOR i in 1..HTMLDB_APPLICATION.G_F01.count
LOOP
INSERT INTO MY_PRINT (CARD_ID) VALUES (HTMLDB_APPLICATION.G_F01(i));
END LOOP;
END;
Then when I added a Submit "Print" button that took you to another page. That page was a print-friendly formatted report which selected the rows off the my_print keys. To get the format I ended up modifying the report template behind the page. This required a little trial and error with the different template types but I got what I wanted with a vertical named template and custom HTML tagging on the Row Template to build the page like a table.
It's all server side now and loads within the page, rather than a pop-up.
It accomplished the ultimate goal of being able to print selected rows in a format I liked. Plus, doing it this way was way easier than trying to code it all with a pop-up.
good luck
dean -
Dear All,
I need a query to find out the Stock of a particular Day and Warehouse.
Thanks
AshishHi Ashish,
You may try following
SELECT A.ItemCode, ISNULL(SUM(A.Quantity), 0) AS QTY
FROM (SELECT dbo.PDN1.ItemCode, dbo.PDN1.Quantity
FROM dbo.OPDN INNER JOIN
dbo.PDN1 ON dbo.OPDN.DocEntry = dbo.PDN1.DocEntry
WHERE (dbo.OPDN.DocDate <= '30/APR/2011') AND (dbo.PDN1.WhsCode = '01')
UNION ALL
SELECT dbo.INV1.ItemCode, - dbo.INV1.Quantity AS Expr1
FROM dbo.OINV INNER JOIN
dbo.INV1 ON dbo.OINV.DocEntry = dbo.INV1.DocEntry
WHERE (dbo.OINV.DocDate >= '01/apr/2006') AND (dbo.OINV.DocDate <= '30/APR/2011') AND (dbo.INV1.WhsCode = '01') AND (dbo.INV1.BaseType <> 15)
UNION ALL
SELECT dbo.DLN1.ItemCode, - dbo.DLN1.Quantity AS Expr1
FROM dbo.ODLN INNER JOIN
dbo.DLN1 ON dbo.ODLN.DocEntry = dbo.DLN1.DocEntry
WHERE (dbo.ODLN.DocDate <= '30/APR/2011') AND (dbo.DLN1.WhsCode = '01')
UNION ALL
SELECT dbo.RIN1.ItemCode, dbo.RIN1.Quantity
FROM dbo.ORIN INNER JOIN
dbo.RIN1 ON dbo.ORIN.DocEntry = dbo.RIN1.DocEntry
WHERE (dbo.ORIN.DocDate >= '01/apr/2006') AND (dbo.ORIN.DocDate <= '30/APR/2011') AND (dbo.RIN1.WhsCode = '01') AND (dbo.RIN1.BaseType <> 16)
UNION ALL
SELECT dbo.RDN1.ItemCode, dbo.RDN1.Quantity
FROM dbo.ORDN INNER JOIN
dbo.RDN1 ON dbo.ORDN.DocEntry = dbo.RDN1.DocEntry
WHERE (dbo.ORDN.DocDate <= '30/APR/2011') AND (dbo.RDN1.WhsCode = '01')
UNION ALL
SELECT dbo.RPD1.ItemCode, - dbo.RPD1.Quantity AS Expr1
FROM dbo.ORPD INNER JOIN
dbo.RPD1 ON dbo.ORPD.DocEntry = dbo.RPD1.DocEntry
WHERE (dbo.ORPD.DocDate <= '30/APR/2011') AND (dbo.RPD1.WhsCode = '01')
UNION ALL
SELECT dbo.IGE1.ItemCode, - dbo.IGE1.Quantity AS Expr1
FROM dbo.OIGE INNER JOIN
dbo.IGE1 ON dbo.OIGE.DocEntry = dbo.IGE1.DocEntry
WHERE (dbo.OIGE.DocDate <= '30/APR/2011') AND (dbo.IGE1.WhsCode = '01')
UNION ALL
SELECT dbo.IGN1.ItemCode, dbo.IGN1.Quantity
FROM dbo.OIGN INNER JOIN
dbo.IGN1 ON dbo.OIGN.DocEntry = dbo.IGN1.DocEntry
WHERE (dbo.OIGN.DocDate <= '30/APR/2011') AND (dbo.IGN1.WhsCode = '01')
UNION ALL
SELECT dbo.WTR1.ItemCode, dbo.WTR1.Quantity
FROM dbo.OWTR INNER JOIN
dbo.WTR1 ON dbo.OWTR.DocEntry = dbo.WTR1.DocEntry
WHERE (dbo.OWTR.DocDate <= '30/APR/2011') AND (dbo.WTR1.WhsCode = '01')
UNION ALL
SELECT WTR1_1.ItemCode, - WTR1_1.Quantity AS Expr1
FROM dbo.OWTR AS OWTR_1 INNER JOIN
dbo.WTR1 AS WTR1_1 ON OWTR_1.DocEntry = WTR1_1.DocEntry
WHERE (OWTR_1.DocDate <= '30/APR/2011') AND (OWTR_1.Filler = '01')) AS A INNER JOIN
dbo.OITM ON A.ItemCode = dbo.OITM.ItemCode
GROUP BY A.ItemCode
This is giving me the result
You may make thc change as per your requirement.
thanks
Malhaar -
How To Edit Selected Row In ALV Table
Hello Experts,
In My Webdynpro Application, I am displaying records from database table into an ALV Table.
I want to edit only selected record from ALV table.
Please Suggest How to achieve this.
Thanks,
PratibhaThe link given above is for the UI element 'Table' and does not pertain to ALV.
To Make an ALV Editable on lead selection for that particular lead selected row.
1. The ALV should be made lead selectable, when initializing
2. The ON_LEAD_SELECT function should be invoked.
3. Withing this function the index has to be retrieved to know which row was selected.
4. Based on the index retrived all the columns have to pass FALSE to read_only in the column properties.
Regards,
Pramod -
To change the font of a selected row in a Jtable
Hello,
Is it possible to change the font of a selected row in a jtable?
i.e. if all the table is set to a bold font, how would you change the font of the row selected to a normal (not bold) font?
thank you.String will be left justified
Integer will be right justified
Date will be a simple date without the time.
As it will with this renderer.Only if your custom renderer duplicates the code
found in each of the above renderers. This is a waste
of time to duplicate code. The idea is to reuse code
not duplicate and debug again.
No, no, no there will be NO duplicated code.
A single renderer class can handle all types ofdata.
Sure you can fit a square peg into a round hole if
you work hard enough. Why does the JDK come with
separate renderers for Date, Integer, Double, Icon,
Boolean? So that, by default the rendering for common classes is done correctly.
Because its a better design then having code
with a bunch of "instanceof" checks and nested
if...else code.This is only required for customization BEYOND what the default renderers provide
>
And you would only have to use instanceof checkswhen you required custom
rendering for a particular classAgreed, but as soon as you do require custom
renderering you need to customize your renderer.
which you would also have to do with theprepareRenderer calls too
Not true. The code is the same whether you treat
every cell as a String or whether you use a custom
renderer for every cell. Here is the code to make the
text of the selected line(s) bold:
public Component prepareRenderer(TableCellRenderer
renderer, int row, int column)
Component c = super.prepareRenderer(renderer, row,
, column);
if (isRowSelected(row))
c.setFont( c.getFont().deriveFont(Font.BOLD) );
return c;
}It will work for any renderer used by the table since
the prepareRenderer(...) method returns a Component.
There is no need to do any kind of "instanceof"
checking. It doesn't matter whether the cell is
renderered with the "Object" renderer or the
"Integer" renderer.
If the user wants to treat all columns as Strings or
treat individual columns as String, Integer, Data...,
then they only need to override the getColumnClass()
method. There is no change to the prepareRenderer()
code.
Have you actually tried the code to see how simple it
is?
I've posted my code. Why don't you post your solution
that will allow the user to bold the text of a Date,
Integer, and String data in separate column and then
let the poster decide.Well, I don't see a compilable, runnable demo anywhere in this thread. So here's one
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Vector;
public class TableRendererDemo extends JFrame{
String[] headers = {"String","Integer","Float","Boolean","Date"};
private JTable table;
public TableRendererDemo() {
buildGUI();
private void buildGUI() {
JPanel mainPanel = (JPanel) getContentPane();
mainPanel.setLayout(new BorderLayout());
Vector headerVector = new Vector(Arrays.asList(headers));
Vector data = createDataVector();
DefaultTableModel tableModel = new DefaultTableModel(data, headerVector){
public Class getColumnClass(int columnIndex) {
return getValueAt(0,columnIndex).getClass();
table = new JTable(tableModel);
// table.setDefaultRenderer(Object.class, new MyTableCellRenderer());
table.setDefaultRenderer(String.class, new MyTableCellRenderer());
table.setDefaultRenderer(Integer.class, new MyTableCellRenderer());
table.setDefaultRenderer(Float.class, new MyTableCellRenderer());
table.setDefaultRenderer(Date.class, new MyTableCellRenderer());
JScrollPane jsp = new JScrollPane(table);
mainPanel.add(jsp, BorderLayout.CENTER);
pack();
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
private Vector createDataVector(){
Vector dataVector = new Vector();
for ( int i = 0 ; i < 10; i++){
Vector rowVector = new Vector();
rowVector.add(new String("String "+i));
rowVector.add(new Integer(i));
rowVector.add(new Float(1.23));
rowVector.add( (i % 2 == 0 ? Boolean.TRUE : Boolean.FALSE));
rowVector.add(new Date());
dataVector.add(rowVector);
return dataVector;
public static void main(String[] args) {
Runnable runnable = new Runnable() {
public void run() {
TableRendererDemo tableRendererDemo = new TableRendererDemo();
tableRendererDemo.setVisible(true);
SwingUtilities.invokeLater(runnable);
class MyTableCellRenderer extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if ( isSelected){
setFont(getFont().deriveFont(Font.BOLD));
else{
setFont(getFont().deriveFont(Font.PLAIN));
if ( value instanceof Date){
SimpleDateFormat formatter =(SimpleDateFormat) SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
setText(formatter.format((Date)value));
if(value instanceof Number){
setText(((Number)value).toString());
return this;
}Hardly a "bunch of instanceof or nested loops. I only used the Date instanceof to allow date format to be specified/ modified. If it was left out the Date column would be "18 Apr 2005" ( DateFormat.MEDIUM, which is default).
Cheers
DB -
Editing Cell Column of a selected row in UI table element.
Hi Experts,
I have a UI Table Element with three columns. First two columns are input fields in read only mode. Third column is a text edit field.
Now when I Select a row and press a button 'EDIT' i want that particular rows third column CELL alone to be in editable mode.
In order to achieve this, I created a WDY_BOOLEAN attribute in the same node which is used to bind the table. I binded this attribute to the READ ONLY property of third column.
In the EDIT button i wrote the following code.
lo_el_n_stp->set_attribute(
EXPORTING
name = 'A_EDIT'
value = ' ' ).
Here A_EDIT is the name of the attribute.
When i do this, my first rows third column is only going to EDIT mode and not the row which i selected.
Please tell me how to solve this problem.
Thanks in advance.Hi thanks for your reply.I have already tried this, the problem is i am not getting the seleted row value by using the below code
l
lo_nd_node1->get_static_attributes(
IMPORTING
static_attributes = ). "here you will get the selected row
Its giving me the first row value.
Edited by: Delphi on Mar 11, 2010 11:52 AM -
How to populate the selected row details of table in the next view?
hi,
Im having a table, on selecting a particular row of a table by clicking on a radio button. i need that row details to be passed on(populated) to the next view when i navigate to that view by clicking on a button?
Thanks & Regards,
SureshHi Suresh,
Your scenario is simple. Just follow the ex as shown below
(Assuming you want default selection view provided by table itself.)
1>Create 2 views (Ex:A and B)
2>Create a Context with a node and attributes(For Ex:Person as node and Fname and Last Name as attributes
2>In A view create a table with F name and L Name(map to context as well) and a action button to navigate to B view when you selected a particualr row o.k
3>In B view, create a TextView with mapping to LastName(or all the data if you want from input selection) from the context
If you want you can add back action button from B view to A view for easy navigation.
4>Execute the application and select any row in the table appeared, press next action button,you can see that the selected row details will be shown in second(B) view.
If you do the above example, I think you can easily find the solution for navigation issue.. try it out.
In case if you are not able to ...let me know..I have that example.
Hope that helps
Regards
Praveen -
Making selected rows to display mode in ALV grid
I Have program with ALV grid display, which has check box as the first field.
The requirement is like.
When i select some rows in the grid display with the check box and click on a button , then the selected
rows shud change to display mode and others rows shud be in edit mode as before.
*& Report ZSRI_CHCKBOX_ITAB_UPDATE
REPORT ZSRI_CHCKBOX_ITAB_UPDATE.
TYPE-POOLS: SLIS.
DATA: BEGIN OF ITAB OCCURS 0,
CHK TYPE C,
VBELN TYPE VBAP-VBELN,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
MATWA TYPE VBAP-MATWA,
MATKL TYPE VBAP-MATKL,
END OF ITAB.
DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
W_FCAT TYPE SLIS_FIELDCAT_ALV,
RT TYPE SLIS_SELFIELD,
W_LAYOUT TYPE SLIS_LAYOUT_ALV .
PARAMETERS: S_VBELN TYPE VBAK-VBELN.
DATA: WA LIKE LINE OF ITAB.
DATA: G_GRID_REFERENCE TYPE REF TO CL_GUI_ALV_GRID.
DATA: BEGIN OF ITAB1 OCCURS 0,
CHK TYPE C,
VBELN TYPE VBAP-VBELN,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
MATWA TYPE VBAP-MATWA,
MATKL TYPE VBAP-MATKL,
END OF ITAB1.
DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
START-OF-SELECTION.
SELECT VBELN POSNR MATNR MATWA MATKL FROM VBAP
INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE VBELN EQ S_VBELN.
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'CHK'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-CHECKBOX = 'X'.
W_FCAT-EDIT = 'X'.
W_FCAT-SELTEXT_L = 'CHECK'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'VBELN'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'SALES'.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'POSNR'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'ITEM'.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 4.
W_FCAT-FIELDNAME = 'MATNR'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'MATERIAL'.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 5.
W_FCAT-FIELDNAME = 'MATWA'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'MATERIAL QTY'.
W_FCAT-OUTPUTLEN = 20.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 6.
W_FCAT-FIELDNAME = 'MATKL'.
W_FCAT-TABNAME = 'ITAB'.
W_FCAT-SELTEXT_L = 'MATERIAL GROUP'.
W_FCAT-OUTPUTLEN = 20.
W_FCAT-EDIT = 'X'.
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS1'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = T_FCAT[]
TABLES
T_OUTTAB = ITAB[].
*& Form STATUS1
FORM STATUS1 USING P_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STATUS1' EXCLUDING P_EXTAB.
ENDFORM. "PF_STATUS_SET
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'READ'.
R_SELFIELD-REFRESH = 'X'.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = G_GRID_REFERENCE.
CALL METHOD G_GRID_REFERENCE->CHECK_CHANGED_DATA.
LOOP AT ITAB INTO WA WHERE CHK = 'X'.
APPEND WA TO ITAB1.
ENDLOOP.
W_FCAT1-COL_POS = 1.
W_FCAT1-FIELDNAME = 'CHK'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-CHECKBOX = 'X'.
W_FCAT1-SELTEXT_L = 'CHECK'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 2.
W_FCAT1-FIELDNAME = 'VBELN'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'SALES'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 3.
W_FCAT1-FIELDNAME = 'POSNR'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'ITEM'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 4.
W_FCAT1-FIELDNAME = 'MATNR'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'MATERIAL'.
W_FCAT-OUTPUTLEN = 20.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 5.
W_FCAT1-FIELDNAME = 'MATWA'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'MATERIAL TYPE'.
W_FCAT-OUTPUTLEN = 20.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
W_FCAT1-COL_POS = 6.
W_FCAT1-FIELDNAME = 'MATKL'.
W_FCAT1-TABNAME = 'ITAB'.
W_FCAT1-SELTEXT_L = 'MATERIAL GROUP'.
W_FCAT-OUTPUTLEN = 20.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = T_FCAT1[]
IS_LAYOUT = W_LAYOUT
TABLES
T_OUTTAB = ITAB[].
CLEAR ITAB1.
CLEAR ITAB1[].
CLEAR T_FCAT1.
CLEAR T_FCAT1[].
ENDCASE.
ENDFORM. "USER_COMMAND
Edited by: dharmaji Srinivasu on Feb 6, 2009 1:22 PMHi
Check out the following links:
http://www.sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm " To obtain selected rows
http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm "To make cells editable
In the case stmt for particular button you can do:
loop at itab into wa.
if wa-sel EQ 'X'.
Process records that have been selected
endif.
endloop.
Hope this helps
Regards,
Jayanthi.K -
Return to selected row with refresh after update in edit form
Hi,
I created a database view.When selected a single row and click on button i can edit the row in a form for update.What i want, when doing some update and click on the commit button i return back on the initial row with a refresh to see the update done on this row.I succeeded to modify the form and commit.But when i return on the selected row my update is not visible.How can i return to the same selected row with a refresh.In oracle form i can do a go record with execute_query, but how to do this in ADF.Please someone can help so that i do not spend many days on it.
Thanks
Soodesh[click for the tutorial|http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&ved=0CFQQFjAF&url=http%3A%2F%2Fandrejusb.blogspot.com%2F2013%2F03%2Fadf-rollback-and-keep-current-row.html&ei=Tnl3Ucn3BoXIrQeemICQAw&usg=AFQjCNHdYcJL8kJKymqbWBT9XDGTWmeUvQ&bvm=bv.45580626,d.bmk&cad=rja]
here you go :) -
How to identify the maximum data loads done for a particular day?
Hi all,
There is huge volume of data been loaded on a last monday, and then data was deleted from the cubes on the same day. And hence i needs to see which are all the cubes which was loaded wtih lot of records for a particular day,
i happened to look at rsmo, i am unable to see the ods nor the cube data loads,
were do i seet it?
ThanksSee if the table RSSELDONE helps. This will give you the recent data load details. Based on those loads , you can search the targets.
And also check table TBTCO which will give the latest job details. You will have to analyze the same jobs to know what loads were done . Give a selection for date. -
How to disply the selected row in dataTabe in JSF
Hello Team,
I have one datatable.& in that table i have one coloumn (checkBox are present in that coloumn).when i first go on that page i select some particular row.& submit the page.but when i again revisit that page i show some selected & not selected rows.& i done print functionality on that page.
but when i am printing that page whole row is disply to print but i want to print only that row which is selected.
Please help me in this functionality.Is your print functionality opening up on a new pop up? If not, you will get all the rows. The Print button should open a pop up through a Backing bean in which you would pick up only the selected rows for display. Once the pop up is shown, onload you would fire the javascript print.
For any JSF related queries, please use the JSF forum.
Maybe you are looking for
-
16:9 or 4:3?
Hi guys, I seem to have a problem with a project I am working on. The video is all HD but when I export to QuickTime and play in full screen mode I can see black borders at either side of my movie as well as at the top. This gets me thinking that it
-
Business Objects XI 3.1 3 tier login failure
I recieve the following error message when I try using 3 tier mode to login to Desktop Intelligence. The 2 tier mode is workign fine. I have IIS as a webapp server. I can login to infoview and cmc as well. Error Message: [repo_proxy 13] HttpSessionFa
-
Extension libs in Tomcat .war
Hi all. After researching ANT for a bit, and the ins-and-outs of .war files, I'm feeling a bit more adventerous with deploying web apps via JWS. I've been studying the very good Sun/Oracle tutorials on deploying apps via Web Start, but I'm stuck on t
-
How ix_sel is calculated? Jonathan Lewis please help
There is table TETRO, partitioned by column BSTATE, and subpartitioned by column C (not present below). Also there is query: SELECT * FROM TETRO T WHERE T.BOST = 'BB810' and BSTATE = 'CLOSED'And there is global index IDX_1 on columns BOST, BSTAT
-
HT4995 Settings Location Services System Services
What do the 6 items listed in system services actually do, and do the transmit personal information to apple or anyone else. 1. Cell Network Research 2. Compass Calibration (I think this one makes sense) 3. Diagnostics & Usage 4. Location based iAds