Limiting ADF table number of rows is not working
Dear All,
I know this question might seems to be a little bit trivial but I have been going in circles for a long time now and can't figure out where I'm going wrong, I'm using Jdeveloper 11g TP4 and developing an ADF RC application, I have a table that I need to limit the number of rows displayed in this table to X number of records and incase the result is more than X navigation buttons should be displayed, I changed the rows attribute in the af:table tag to say 2 but the table is still being displayed with all the rows, could someone please explain where is the missing piece?
The code looks like the following:
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<af:document>
<af:messages/>
<af:form>
<af:panelStretchLayout>
<f:facet name="center">
<af:table value="#{bindings.allOperators.collectionModel}" var="row"
emptyText="#{bindings.allOperators.viewable ? 'No rows yet.' : 'Access Denied.'}"
fetchSize="#{bindings.MnpRequest.rangeSize}" rows="2" first="0"> <f:facet name="detailStamp">
<af:panelFormLayout>
<af:inputText value="#{bindings.operatorCode.inputValue}"
label="#{bindings.operatorCode.label}"
required="#{bindings.operatorCode.mandatory}"
columns="#{bindings.operatorCode.displayWidth}">
<f:validator binding="#{bindings.operatorCode.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.operatorId.inputValue}"
label="#{bindings.operatorId.label}"
required="#{bindings.operatorId.mandatory}"
columns="#{bindings.operatorId.displayWidth}">
<f:validator binding="#{bindings.operatorId.validator}"/>
<af:convertNumber groupingUsed="false"
pattern="#{bindings.operatorId.format}"/>
</af:inputText>
<af:inputText value="#{bindings.operatorName.inputValue}"
label="#{bindings.operatorName.label}"
required="#{bindings.operatorName.mandatory}"
columns="#{bindings.operatorName.displayWidth}">
<f:validator binding="#{bindings.operatorName.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.routeId.inputValue}"
label="#{bindings.routeId.label}"
required="#{bindings.routeId.mandatory}"
columns="#{bindings.routeId.displayWidth}">
<f:validator binding="#{bindings.routeId.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.mmcCode.inputValue}"
label="#{bindings.mmcCode.label}"
required="#{bindings.mmcCode.mandatory}"
columns="#{bindings.mmcCode.displayWidth}">
<f:validator binding="#{bindings.mmcCode.validator}"/>
</af:inputText>
</af:panelFormLayout>
</f:facet>
<af:column sortProperty="operatorCode" sortable="false"
headerText="#{bindings.allOperators.hints.operatorCode.label}">
<af:outputText value="#{row.operatorCode}"/>
</af:column>
<af:column sortProperty="operatorId" sortable="false"
headerText="#{bindings.allOperators.hints.operatorId.label}">
<af:outputText value="#{row.operatorId}">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.allOperators.hints.operatorId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="operatorName" sortable="false"
headerText="#{bindings.allOperators.hints.operatorName.label}">
<af:outputText value="#{row.operatorName}"/>
</af:column>
<af:column sortProperty="routeId" sortable="false"
headerText="#{bindings.allOperators.hints.routeId.label}">
<af:outputText value="#{row.routeId}"/>
</af:column>
<af:column sortProperty="mmcCode" sortable="false"
headerText="#{bindings.allOperators.hints.mmcCode.label}">
<af:outputText value="#{row.mmcCode}"/>
</af:column>
</af:table>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
Thanks,
Amr.
Hi Frank,
is there any other solution to this problem?
Thank you
Similar Messages
-
My number 5 key is not working and my password has a number 5 in it. How can I change my password when I'm signed in on another account or as guest user? I need help
- If the "other" account has administrative privileges then just try changing the PW for your account.
- Forgot Mac Password? How to Reset Your Mac Password (with or without CD)
Change the Admin Password with Mac OS X Single User Mode
Reset mac mini admin password: Apple Support Communities
- If the problem is due to a bad KB just get a new KB -
Since installing Yosemite and Photos I can now no longer drag and drop a photo in an email, as I have always done. I repaired permission and restarted a number of times. still not working... Help?! Thanks, Michael
What happens if you use the Share button and select Mail?
What happens when you try? I had to hold there photo there for a short period before it would load. -
"Number of bands" toggle not working
A few of us on this board have noticed that when using the Apple AuGraphic equalizer that the "number of bands" toggle at the bottom of the viewer that switches it from 31 to 10 bands does not seem to work. It remains 31 bands no matter what.
Has anyone else experienced that? Is it a bug or are we missing something?
ThanksI wanted to ask here first to see if I was doing something wrong before I reported it.
Did you happen to see my other thread also about the Apple Eq? In addition to the "number of bands" toggle not working, I can't get the eq to have any effect on audio clips. Could these things be related? -
hi, i need some help to activate lightroom 5.7 i bought in november 2014, the serial number i've is not working, thanks
Hi, i'm very glad for your support, i'm installing through direct
dowmload in november 2014, we still use the classic program, is not the
cloud program, the version is 5.7.1.
Thanks.
Tai Vinh.
Le 27/04/2015 18:56, Atul_saini a écrit :
>
hi, i need some help to activate lightroom 5.7 i bought in
november 2014, the serial number i've is not working, thanks
created by Atul_saini <https://forums.adobe.com/people/Atul_saini> in
/Downloading, Installing, Setting Up/ - View the full discussion
<https://forums.adobe.com/message/7485938#7485938> -
The front row is not working. Remote control not triger,
Front row is not working, Remote control no response, command-esc not triger as well.
check keyboard shortcut from system preference, there is no front row.
anyone know why?Ok first try it in another Account.
1. Open the account system pref window (System Preferences > Accounts)
2. Click the plus button at the bottom
3. Specify an account name (ex: test)
4. Add account
5. Logout of your current account, and login to the newly created one
If it works, then something was wrong with your account, move your files to the new account, and delete the old one.
If it did not work:
1. Try the reinstall again (DO NOT DO "ARCHIVE AND REINSTALL", as this may keep some file that is hindering FR from operating correctly
2. Make sure the FR file is in the Core Services Folder (Macintosh HD/System/Library/CoreServices/Front Row.app)
3. Make sure that you do not have the IR sensor turned off on your computer (System Prefs > Security > Uncheck "Disable Remote Control IR Sensor")
4. Make sure that your remote is paired (http://docs.info.apple.com/article.html?artnum=302545)
5. Make sure that the Command + Esc key is setup to respond by opening front row:
(1) Open system prefs
(2) Open keyboard & mouse prefs
(3) Click keyboard shortcuts
(4) Scroll down until you see front row
(5) Assign the Command + Esc key if it is not mapped
6. Finally, if all else fails, call AppleCare while your computer is still under warranty
Hope this helps,
Cory -
HI my name is Ehab Hejazeen. Im from Mapusa goa india.i have lost my iphone some time back. i recieved it as a gift from my uncle from dubai so i dont hav the imei number and he does not work there anymore. Please track my iphone . I will be waiting for your response. please help me..
yours sincerely,
Ehab hejazeen
<Email Edited By Host>As already stated, no one but the police can help you. I suggest you follow Apple's recommendations as quickly as possible: http://support.apple.com/kb/HT5668
-
I need to re-install CS5.5 on my new hard drive. Serial number from disk package not working.
if there's a problem with the number of installations, you'll see a message about an excess activation problem.
if that's what you're seeing, contact adobe support for an activation count reset, https://helpx.adobe.com/contact.html
otherwise, attach a screenshot of the error message or quote it. -
I have installed the latest OS Lion and now a number of applications do not work. How and where do I go to get back to Snow Leopard 10.6.8
Restore from the backups you made before upgrading.
-
My headphone model number "MDR-XB30EX" is not working properly can it be repair?
My headphone model number "MDR-XB30EX" is not working properly can it be repair? One of its head jack is not working, no sound at al.
Hi kashiffriends10,
For further assistance regarding your concern, please contact the Sony offices/Sony representative offices nearest to your place of residence in Asia Pacific region http://www.sony-asia.com/countryselector.html?hpid=countryselector:AsiaPacific. Due to proximity, they are in a better position to respond to your questions or concerns.
Thanks,
>Joffrey
If my post answers your question, please mark it as "Accept as Solution" -
Refresh adf table and selection row
Hi,
I create web application. I have created entity Users from MySQL database and managed Bean. In this managed Bean (sessionScope) is method for connection to database and method for adding new row (data) in database. It works.
I have 2 problems.
The first.
I have form for adding User and commandButton Add.
How I can refresh (update) adf table after executing SQL command (in commandButton Add) ? Now I must reconnect session.
The second problem:
I want to show a panel with data from one row from adf table.
How I can selection this row in popup ?
My table:
<af:table var="user" rowBandingInterval="0" id="t2"
inlineStyle="margin:20px 30px; width:578pt; height:160pt;"
value="#{userController.users}"
rows="15"
emptyText="#{bindings.UsersprototypView11.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.UsersprototypView11.rangeSize}"
editingMode="clickToEdit" rowSelection="single"
selectedRowKeys="#{userController.selectedUser}"
selectionListener="#{userController.selectedUser}"> ---- Here I have problem.
<af:column sortProperty="#{user.user_id}"
sortable="false"
headerText="ID"
id="c11" width="33">
<af:commandLink id="ot34" text="#{user.user_id}">
<af:showPopupBehavior popupId="p4" triggerType="action"/>
</af:commandLink>
</af:column>
<af:column sortProperty="#{user.firstname}"
sortable="false"
headerText="Firstname"
id="c20" width="111">
<af:outputText value="#{user.firstname}" id="ot27"/>
</af:column>
<af:column sortProperty="#{user.lastname}"
sortable="false"
headerText="Lastname"
id="c12">
<af:outputText value="#{user.lastname}" id="ot31"/>
</af:column>
<af:column sortProperty="#{user.address}"
sortable="false"
headerText="Address"
id="c9" width="95">
<af:outputText value="#{user.address}" id="ot32"/>
</af:column>
<af:column sortProperty="#{user.city}"
sortable="false"
headerText="#City"
id="c10" width="76">
<af:outputText value="#{user.city}" id="ot33"/>
</af:column>
<af:column sortProperty="#{user.username}"
sortable="false"
headerText="Username"
id="c7" width="102">
<af:outputText value="#{user.username}" id="ot29"/>
</af:column>
<af:column sortProperty="#{user.email}"
sortable="false"
headerText="E-mail"
id="c21" width="106">
<af:outputText value="#{user.email}" id="ot28"/>
</af:column>
<af:column sortProperty="#{user.regdate}"
sortable="false"
headerText="Registration"
id="c8" width="108">
<af:outputText value="#{user.regdate}" id="ot30">
<af:convertDateTime pattern="#{user.regdate}"/>
</af:outputText>
</af:column>
</af:table>userController is name managed Bean.
users is list of users.
My panel window (popup):
<af:popup childCreation="deferred" autoCancel="disabled" id="p4">
<af:panelWindow id="pw9" title="Delete user">
<af:panelFormLayout id="pfl6">
<af:panelLabelAndMessage label="ID:"
id="plam16">
<af:outputText value="#{userController.selectedUser.user_id}" id="ot50"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Firstname:"
id="plam17">
<af:outputText value="#{userController.selectedUser.firstname}" id="ot51"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Lastname:"
id="plam18">
<af:outputText value="#{userController.selectedUser.lastname}" id="ot52"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Address:"
id="plam19">
<af:outputText value="#{userController.selectedUser.address}" id="ot53"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="City:" id="plam20">
<af:outputText value="#{userController.selectedUser.city}" id="ot54"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Username:"
id="plam21">
<af:outputText value="#{userController.selectedUser.username}" id="ot55"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="E-mail:" id="plam22">
<af:outputText value="#{userController.selectedUser.email}" id="ot56"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Registration:"
id="plam23">
<af:outputText value="#{userController.selectedUser.regdate}" id="ot57">
<af:convertDateTime pattern="#{userController.selectedUser.regdate}"/>
</af:outputText>
</af:panelLabelAndMessage>
</af:panelFormLayout>
<af:commandButton text="Delete" id="cb18"
inlineStyle="width:80pt; margin:10px 0px 0px 0px;"/>
</af:panelWindow>
</af:popup>When I cut out row: selectionListener="#{userController.selectedUser}
Popup (for deleting user) looks like this:
http://imageshack.us/photo/my-images/404/popupc.jpg/
I need to get the outputs from <af:outputText> in this popup.
Thanks for help.
Edited by: user9202624 on 26.2.2013 7:52thanks for answer.
I added partialTriggers in af:table
<af:table var="user" rowBandingInterval="0" id="t2"
inlineStyle="margin:20px 30px; width:578pt; height:160pt;"
value="#{userController.users}"
rows="15"
emptyText="#{bindings.UsersprototypView11.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.UsersprototypView11.rangeSize}"
editingMode="clickToEdit" rowSelection="single"
selectedRowKeys="#{userController.selectedUser}"
partialTriggers="::t1" >What next ? What should I do next ? Sry, I'm newbie in adf and jDev.
Edited by: user9202624 on 26.2.2013 8:55 -
Constraint for insertion in a table if inserted rows should not more than 2
Problem: A Teacher only can assigned for maximum 2 Subjects in the same class Standard.
actually i want to create a table like following
create table teaches
teacherid int,
standard varchar(10),
subjectcode varchar(10),
constraint cpk_teaches primary key(teacherid, standard, subjectcode)
and i want that when any data inserted in the table,
a constraint will work in the manner that there is
NO POSSIBILITY TO INSERT the data for
(teacherid, standard) columns THRICE (3rd time)
actually i want that only maximum of 2 different data will insert in
(subjectcode) for the same (teacherid, standard)Thanks for the suggestion,
But, my original problem remains on the same stage.
Actually this table has all the keys as foreign key of other tables.
Why?, is not necessary this time.
If you don't mind kindly give me the code of constraint, if any to solve my problem.
Problem: I want to insert only maximum of two different Subjects for same Teacher and Standard and not more.
In real life like following.
Mr. TCHR-1 is teaching subject SUB-1 in standard STD-1.
Mr. TCHR-1 is teaching subject SUB-2 in standard STD-1.
But, can't Mr. TCHR-1 is teaching subject SUB-3 in standard STD-1.
My table structure is not in the state of changing due to some reasons.
It is, as previously described.
create table teaches
tchrid int,
std varchar(10),
subcode varchar(10),
constraint cpk_teaches primary key(tchrid, subcode, std)
) -
Why table getWidth and setWidth is not working when resize column the table
hi all,
i want to know why the setWidth is not working in the following code,
try to uncomment the code in columnMarginChanged method and run it wont resize the table.
i cont set width(using setWidth) of the other table column using getWidth of the main table column.
and i want to resize the right side columns only (you can check when you resize the any column the left and right side columns also resizing)
any suggestions could be helpful.
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.TableColumnModelEvent;
import javax.swing.event.TableColumnModelListener;
import javax.swing.table.TableColumnModel;
public class SynTableResize extends JFrame implements TableColumnModelListener, ActionListener
JTable table1 = new JTable(5, 5);
JTable table2 = new JTable(5, 5);
JTable table3 = new JTable(5, 5);
JButton btn = new JButton("refresh");
JPanel pnlcontainer = new JPanel();
public SynTableResize()
setLayout(new BorderLayout());
pnlcontainer.setLayout(new BoxLayout(pnlcontainer, BoxLayout.Y_AXIS));
pnlcontainer.add(table1.getTableHeader());
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(table2);
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(table3);
table2.setTableHeader(null);
table3.setTableHeader(null);
table1.getColumnModel().addColumnModelListener(this);
table3.setColumnModel(table1.getColumnModel());
table2.setColumnModel(table1.getColumnModel());
table2.getColumnModel().addColumnModelListener(table1);
table3.getColumnModel().addColumnModelListener(table1);
btn.addActionListener(this);
getContentPane().add(pnlcontainer, BorderLayout.CENTER);
getContentPane().add(btn, BorderLayout.SOUTH);
setSize(new Dimension(400, 400));
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public static void main(String[] args)
new SynTableResize();
public void columnAdded(TableColumnModelEvent e)
public void columnMarginChanged(ChangeEvent e)
TableColumnModel tcm = table1.getColumnModel();
int columns = tcm.getColumnCount();
for (int i = 0; i < columns; i++)
table2.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getWidth());
table3.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getWidth());
// the following commented code wont work.
// table2.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getPreferredWidth());
// table3.getColumnModel().getColumn(i).setPreferredWidth(tcm.getColumn(i).getPreferredWidth());
// table2.getColumnModel().getColumn(i).setWidth(tcm.getColumn(i).getWidth());
// table3.getColumnModel().getColumn(i).setWidth(tcm.getColumn(i).getWidth());
SwingUtilities.invokeLater(new Runnable()
public void run()
table2.revalidate();
table3.revalidate();
public void columnMoved(TableColumnModelEvent e)
public void columnRemoved(TableColumnModelEvent e)
public void columnSelectionChanged(ListSelectionEvent e)
public void actionPerformed(ActionEvent e)
JTable table = new JTable(5, 5);
table.setColumnModel(table1.getColumnModel());
table.getColumnModel().addColumnModelListener(table1);
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(table);
pnlcontainer.validate();
pnlcontainer.repaint();
}thanks
dayananda b vhi,
thanks for your replay,
yes i know that, you can check the following code it works fine.
actually what i want is, when i resize table column it shold not automaticaly reszie when table resized and i dont want horizontal scroll bar, meaning that all table columns should resize with in the table size(say width 300)
if i make table autoresize off than horizontal scroll bar will appear and the other columns moved and i want scroll to view other columns.
please suggest me some way doing it, i tried with doLayout() no help,
doLayout() method only can be used when table resizes. first off all i want to restrict table resizing with in the limited size
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableColumnModel;
public class TempSycnTable extends JFrame
JTable table1 = new JTable(5, 5);
MyTable table2 = new MyTable(5, 5);
MyTable table3 = new MyTable(5, 5);
JPanel pnlcontainer = new JPanel();
public TempSycnTable()
JScrollPane src2 = new JScrollPane(table2);
JScrollPane src3 = new JScrollPane(table3);
// table1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// table2.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// table3.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// src2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
// src3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
table2.setTableHeader(null);
table3.setTableHeader(null);
table3.setColumnModel(table1.getColumnModel());
table2.setColumnModel(table1.getColumnModel());
table2.getColumnModel().addColumnModelListener(table1);
table3.getColumnModel().addColumnModelListener(table1);
table2.setTableHeader(null);
table3.setTableHeader(null);
setLayout(new BorderLayout());
pnlcontainer.setLayout(new BoxLayout(pnlcontainer, BoxLayout.Y_AXIS));
pnlcontainer.add(table1.getTableHeader());
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(src2);
pnlcontainer.add(Box.createVerticalStrut(5));
pnlcontainer.add(src3);
getContentPane().add(pnlcontainer, BorderLayout.CENTER);
setSize(new Dimension(300, 300));
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public static void main(String[] args)
new TempSycnTable();
class MyTable extends JTable
public MyTable()
super();
public MyTable(int numRows, int numColumns)
super(numRows, numColumns);
public void columnMarginChanged(ChangeEvent event)
final TableColumnModel eventModel = table1.getColumnModel();
final TableColumnModel thisModel = getColumnModel();
final int columnCount = eventModel.getColumnCount();
for (int i = 0; i < columnCount; i++)
thisModel.getColumn(i).setWidth(eventModel.getColumn(i).getWidth());
repaint();
}thanks
daya -
Temporary Table In SAP Query - Does not Work?
DECLARE @date DATE
DECLARE @delrows INT
DECLARE @delquan INT
DECLARE @a INT
DECLARE @recrows INT
DECLARE @recquan INT
SET @a=0
IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
CREATE TABLE ##tab
[Date] date,
[Delivery Rows] varchar(40),
[Delivery Total Units] varchar(40),
[Receipts Rows] varchar(40),
[Receipts Total Units] varchar(40),
WHILE @a!=7
BEGIN
SET @date=DATEADD(day,-@a, getdate())
SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
FROM ODLN
INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
WHERE ODLN.[CreateDate] = @date
SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
FROM OPCH
INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
WHERE OPCH.[DocDate]=@date
SET @a=@a+1
INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
END
SELECT * FROM ##tab
{/code}
Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
Edited by: Chris Candido on Feb 2, 2011 8:38 PMChris,
There are several areas in your code which needed changes.
1. On the field name for your temp table you had spaces.
2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
[dbo].[ODLN]
3. You really need not have ## in front of your temp table, it could just be #
The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result. I would suggest you put the whole code into a Stored Procedure and call the SP from SAP. Corrected SQL below. If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
DECLARE @date DATE
DECLARE @delrows INT
DECLARE @delquan INT
DECLARE @a INT
DECLARE @recrows INT
DECLARE @recquan INT
SET @a=0
IF object_id('tempdb..#tab') IS NOT NULL
BEGIN
DROP TABLE #tab
END
CREATE TABLE #tab
[Date] date,
DeliveryRows varchar(40),
DeliveryTotalUnits varchar(40),
ReceiptsRows varchar(40),
ReceiptsTotalUnits varchar(40),
WHILE @a!=7
BEGIN
SET @date=DATEADD(day,-@a, getdate())
SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
FROM [dbo].[ODLN]
INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
WHERE [dbo].[ODLN].CreateDate = @date
SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
FROM [dbo].[OPCH]
INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
WHERE [dbo].[OPCH].DocDate=@date
SET @a=@a+1
INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
END
SELECT * FROM #tab
Suda Sampath -
Dynamic table in webdynpro interactive form not working. Urgent
Hi guys,
I am facing a problem when trying to retreive data entered in interactive form dynamic table.i can get the data entered in non dynamic fields no problem.
I have a node structure like this
Root
Data 1...1 singleton and non tried both
Table 1...n singleton and non tried both
In my adobe form i tried adding rows using add instance, and also using add button in webdynpro native. In the same method that adds row i simulated the submit button to create row in WD context! It adds rows but any data entered later is lost. One more thing i have noticed is it sometimes works after adding just one row! Data is passed to context but from next row it doesnt work! What am i missing?
I also tried adding a button in webdynpro tray and adding the row directly to the context. new row is created in form but any data entered in new rows is lost!
I am unable to obtain the data entered in Dynamic fields. I thought i would try the xml reading method but the problem is after crating a couple of rows dynamically if i go save pdf locally the new rows are not showing up in the pdf!
I have seen a post which said using the if_wd_iactive handler to set the form as dynamic but that method is not available in our system! Sorry i am not in front of an SAP system so i cant type exact names!
I tried using zci update program/ etc etc but i am still struggling at the moment. Any help would be much appreciated! Pls ask if you need more info.
Regards
Naresh
Edited by: naresh dwadasi on Oct 7, 2011 9:05 PMproblem solved! I had to recreate the form. not sure if i corrupted the webdynpro scripts etc by mistake.
Maybe you are looking for
-
Lightroom installed but can't find it
Hi, I just subscribed to lightroom + photoshop CC plan. I then installed photoshop and lightroom on OsX Maverick from the creative cloud application but can't find the Lightroom app... I tried to re-install it from the lightroom disk image but it kee
-
Hi everyone I want to calculate the balance quantity from the purchase order According to receiving document and display it in the report , is there global variable in the report this my script function CF_BALANCEFormula return Number is LOC_RECE NUM
-
Java Font Error Message???????
I am in desparate need of help. I am trying to print screen from my Explorer browser from a SCT Banner financial program so that I can document steps in setting up university grant accounts. I keep getting this error message on my desktop and it clos
-
How do i get to the tool bar choices for safari
Where do i find the choices to add to the tool bar for safari in Lion how do i get to it? also anyone know how we can customize the left side panel on mail??
-
MacBook Pro Calendar + To Do
How do I sync my iCal "to do" list, the one that is actually attached to the calendar, to my iPod Touch? Do I have to reenter the to-dos in the calendar notes section at the bottom of the card? That would mean I would have to go through the calendar