JTextField update problem when called from PropertyChangeEvent
Hi,
I'm trying to create forms that can be dynamically loaded with Class.forname(formName).
Those forms should always inherit some methods that make it easy to pass data to
them and receive data from them. The idea is that the data comes from a table which
sends a hashmap (String column/JTextField-name + String Value pairs) with firePropertyChanged
as soon as a new row is seleceted. The JTextFields in the form are marked with setName("FieldName") that has to correspond to the name of the columns of the table.
My problem is that I can't update the fields in my form when I'm calling getRow(HashMap)
from within propertyChangeEvent but that's necessary to keep the forms flexible.
JTextFieldName.setText(newText) just won't work. But it works when I call getRow(HashMap)
from the constructor. SwingWorker and threads to update the form didn't help.
I don't need to call pack() / update() / repaint() on the JFrame, do I ??
update() / validate() / repaint() etc. didn't work on the JTextField themselves.
Below is the code for one of the test-forms (just a JPanel that is inserted in a frame)
with all of it's methods. Does anybody have a solution to this problem ??
Thanks for taking time for that !!
Benjamin
* testTable.java
* Created on 15. April 2004, 16:12
package viewcontrol.GUI;
* @author gerbarmb
import javax.swing.*;
import java.awt.*;
import java.beans.*;
import java.util.*;
public class testTable extends javax.swing.JPanel
implements
java.awt.event.KeyListener,
java.beans.PropertyChangeListener {
* public static void main(String[] argv) { testTable tt = new testTable();
* JFrame jf = new JFrame(); jf.setContentPane(tt); jf.setVisible(true); }
/** Creates new customizer testTable */
public testTable() {
initComponents();
HashMap hm = new HashMap();
* Only for debugging, to see that the method getRow() works when
* called from the constructor.
hm.put("ttext", "TEst");
this.getRow(hm);
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the FormEditor.
private void initComponents() {//GEN-BEGIN:initComponents
java.awt.GridBagConstraints gridBagConstraints;
jLabel1 = new javax.swing.JLabel();
textIn = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
intIn = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
numIn = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
dateIn = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
dateTimeIn = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jCheckBox1 = new javax.swing.JCheckBox();
keepValues = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
setLayout(new java.awt.GridBagLayout());
jLabel1.setText("Text");
add(jLabel1, new java.awt.GridBagConstraints());
textIn.setName("ttext");
textIn.setPreferredSize(new java.awt.Dimension(100, 21));
textIn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
textInActionPerformed(evt);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = 2;
add(textIn, gridBagConstraints);
jLabel2.setText("Integer");
add(jLabel2, new java.awt.GridBagConstraints());
intIn.setName("tint");
intIn.setPreferredSize(new java.awt.Dimension(50, 21));
add(intIn, new java.awt.GridBagConstraints());
jLabel3.setText("Number");
add(jLabel3, new java.awt.GridBagConstraints());
numIn.setName("tnum");
numIn.setPreferredSize(new java.awt.Dimension(50, 21));
add(numIn, new java.awt.GridBagConstraints());
jLabel4.setText("Date");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
add(jLabel4, gridBagConstraints);
dateIn.setName("tdate");
dateIn.setPreferredSize(new java.awt.Dimension(50, 21));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
add(dateIn, gridBagConstraints);
jLabel5.setText("DateTime");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
add(jLabel5, gridBagConstraints);
dateTimeIn.setName("tidate");
dateTimeIn.setPreferredSize(new java.awt.Dimension(80, 21));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(dateTimeIn, gridBagConstraints);
jLabel6.setText("Bit");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(jLabel6, gridBagConstraints);
jCheckBox1.setName("tbit");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
add(jCheckBox1, gridBagConstraints);
keepValues.setText("keep values");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 3;
add(keepValues, gridBagConstraints);
jButton1.setText("Send");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 2;
add(jButton1, gridBagConstraints);
}//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
sendRow();
}//GEN-LAST:event_jButton1ActionPerformed
private boolean sendRow() {
java.util.HashMap hm = new java.util.HashMap();
Component[] cs = this.getComponents();
for (int i = 0; i < cs.length; i++) {
if (((Component) cs).getName() != null) {
if (cs[i] instanceof JCheckBox) {
String value = ((JCheckBox) cs[i]).isSelected() ? "1" : "0";
hm.put(cs[i].getName(), value);
} else if (cs[i] instanceof JCheckBox) {
hm.put(cs[i].getName(), ((JTextField) cs[i]).getText());
} // end for
firePropertyChange("rowChanged", null, hm);
return true;
private void getRow(java.util.HashMap hm) {
//if (! this.keepValues.isSelected()) {
Component[] cs = this.getComponents();
for (int i = 0; i < cs.length; i++) {
if (cs[i].getName() != null && hm.containsKey(cs[i].getName())) {
Component component = cs[i];
String componentName = cs[i].getName();
String componentValue = (String) hm.get(component.getName());
if (cs[i] instanceof JTextField) {
// output for debugging
System.out.println("Setting " + cs[i].getName() + " = "
+ componentValue);
((JTextField) component).setText(componentValue);
} else if (cs[i] instanceof JCheckBox) {
// output for debugging
System.out.println("JCheckBox found");
JCheckBox cb = (JCheckBox) component;
boolean selected = (componentValue == null ? false : (componentValue.equals("1")
? true
: false));
((JCheckBox) component).setSelected(selected);
} // end for
/* Uncomment this code snippet to retrieve the text that has been set
for the components (that means JTextFields)
This is just for debugging !
Component[] cs = this.getComponents(); for (int i = 0; i < cs.length;
i++) { if (cs[i].getName() != null) { if (cs[i] instanceof
JTextField) { System.out.println("Value of " +cs[i].getName() + " = " +
((JTextField) cs[i]).getText()); } } } // end for
private void textInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textInActionPerformed
}//GEN-LAST:event_textInActionPerformed
public void keyPressed(java.awt.event.KeyEvent e) {
if (e.getKeyCode() == java.awt.event.KeyEvent.VK_ENTER) {
sendRow();
public void keyReleased(java.awt.event.KeyEvent e) {
public void keyTyped(java.awt.event.KeyEvent e) {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("newRow")) {
final PropertyChangeEvent finalEvt = evt;
Runnable makeChanges = new Runnable () {
public void run() {
getRow((java.util.HashMap) finalEvt.getNewValue());
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTextField dateIn;
private javax.swing.JTextField dateTimeIn;
private javax.swing.JTextField intIn;
private javax.swing.JButton jButton1;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JCheckBox keepValues;
private javax.swing.JTextField numIn;
private javax.swing.JTextField textIn;
// End of variables declaration//GEN-END:variables
The problem of the change in the form not being comitted is that
I forgot SwingUtilities.invokeLater(makeChanges); in the bottom
part in public void propertyChange(java.beans.PropertyChangeEvent evt)
after having created a new Runnable.
Changes to the UI often have to be comitted by SwingUtitlities.invokeLater()
though I don't know that much about Swing yet.
Thanks to everybody who tried to solve that problem.
Benjamin
Similar Messages
-
Reports layout/format problem when called from forms
hi,
using forms and reports builder 10g OS winxp
i have created web and paper layout report with pre-defined template gray (rdf). when i run the web layout there is no problem.
when i call this report from form using
web.show_document('http://machine:8889/reports/rwservlet?report=mail_report.rdf&destype=cache&desformat=HTML&userid=abc/xyz@dbname¶1='||:parameter1, '_blank');
the layout (cell bgcolors of the table) does not appear.
pl guide what am i missing out.
thanksHi,
that has nothing to do with forms. Your call inside web.show_document is a servlet-call. With this you get the paper layout of a report. If you want to get the web-layout, you have to call the report with a jsp-call. In your case that might look like http://machine:8889/reports/mail_report.jsp?userid=.....
If you store your report as jsp-file, you can use it for paper & web-layout, as rdf only paper-layout is possible.
http://download.oracle.com/docs/cd/B25016_08//doc/dl/bi/B14048_02/pbr_arch.htm#i1005927
http://download.oracle.com/docs/cd/B25016_08//doc/dl/bi/B14048_02/pbr_run.htm#g1022421
Regards
Rainer -
Report problem when called from menu
Hi
Im calling a report from the menu item. in the items pl/sql i have the following code
DECLARE
Report_Id REPORT_OBJECT;
Report_Job_Id VARCHAR2(20);
Report_Status VARCHAR2(80);
Report_Svr VARCHAR2(20);
BEGIN
Report_Svr := 'testserver';
Report_Id := FIND_REPORT_OBJECT('LOT_AVERAGE_REPORT');
SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_FILENAME, 'lot_average_report');
SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_DESTYPE, CACHE);
SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_SERVER, Report_Svr);
Report_Job_Id := RUN_REPORT_OBJECT(Report_Id);
Report_Status := REPORT_OBJECT_STATUS(Report_Job_Id);
WHILE Report_Status IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
Report_Status := REPORT_OBJECT_STATUS(Report_Job_Id);
END LOOP;
IF Report_Status = 'FINISHED' then
WEB.SHOW_DOCUMENT('http://<machine>:<port>/reports/rwservlet/getjobid' || substr(Report_Job_Id, length(Report_Svr) + 2, length(Report_Job_Id)) || '?server=' || Report_Svr);
END IF;
END;
it is working fine till i set the properties of report objects and it is failing when RUN_REPORT_OBJECT(Report_Id); is getting executed.
the error is like frm-10259: invalid null argument to pacaged procedure or function
Kindly helpme to come out of this...
Thanks in advance
SundarSundar,
you just need a report (*.rdf) file that serves as a placeholder for the reports object in the forms module. You can either take one of your reports, one of the sample reports or create a simple dummy report by yourselves.
Create a simple report using reports developer (e.g. "select sysdate as dummy_date from dual" as the report query). Save it as "dummy.rdf" in your reports directory (where your existing reports are stored).
Now open the form that uses your menu. In the Reports node of your forms module, add a report, select "Use existing report file" and browse to the "dummy.rdf" file previously created.
Open the property palette for that report and remove the path information of the "Filename" property, so that it reads "dummy.rdf".
Edit the "Name" property so that it reads "MY_DUMMY_REPORT".
Compile and save the form.
Now use the PL/SQL code mentioned above in your menu and see if it works.
Hope this helps
Gerald Krieger -
TS1702 iOS 6 facetime connection problem when calling from a difference country!!
Facetime having problem after iOS 6 upgrade, it can connect using the same network but fail to connect when you are in a difference network or country using wifi. Please Help!
What countries?
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime: Set-up, Use, and Troubleshooting Problems
http://tinyurl.com/32drz3d
Cheers, Tom -
Problem when calling BPEL process (WS) from APEX
I am trying to add a web service call to a BPEL process I have created (tried a few others aswell), but every time I try to add the WDSL file I get the following error:
*1 error has occurred*
The WSDL document contains multiple SOAP bindings. Application Express only supports WSDL's with one SOAP binding. Click Create Web Service Reference Manually to continue creating a reference for this service.
It is a simple BPEL process which works fine when called from the BPEL Console, however I have no success when calling it from APEX.
Am I doing something wrong, or is there a bug in BPEL/APEX?
Oracle BPEL Console v10.1.3.1.0
Apex: 3.2
The WDSL looks like this:
<definitions name="BPELProcess9" targetNamespace="http://xmlns.oracle.com/BPELProcess9">
−
<types>
−
<schema>
<import namespace="http://xmlns.oracle.com/BPELProcess9" schemaLocation="BPELProcess9.xsd"/>
</schema>
−
<schema>
<import namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" schemaLocation="http://xxx:8888/orabpel/xmllib/ws-addressing.xsd"/>
</schema>
</types>
−
<message name="BPELProcess9ResponseMessage">
<part name="payload" element="tns:BPELProcess9ProcessResponse"/>
</message>
−
<message name="BPELProcess9RequestMessage">
<part name="payload" element="tns:BPELProcess9ProcessRequest"/>
</message>
−
<message name="WSAReplyToHeader">
<part name="ReplyTo" element="wsa:ReplyTo"/>
</message>
−
<message name="WSARelatesToHeader">
<part name="RelatesTo" element="wsa:RelatesTo"/>
</message>
−
<message name="WSAMessageIDHeader">
<part name="MessageID" element="wsa:MessageID"/>
</message>
−
<portType name="BPELProcess9Callback">
−
<operation name="onResult">
<input message="tns:BPELProcess9ResponseMessage"/>
</operation>
</portType>
−
<portType name="BPELProcess9">
−
<operation name="initiate">
<input message="tns:BPELProcess9RequestMessage"/>
</operation>
</portType>
−
<binding name="BPELProcess9Binding" type="tns:BPELProcess9">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
−
<operation name="initiate">
<soap:operation style="document" soapAction="initiate"/>
−
<input>
<soap:header message="tns:WSAReplyToHeader" part="ReplyTo" use="literal" encodingStyle=""/>
<soap:header message="tns:WSAMessageIDHeader" part="MessageID" use="literal" encodingStyle=""/>
<soap:body use="literal"/>
</input>
</operation>
</binding>
−
<binding name="BPELProcess9CallbackBinding" type="tns:BPELProcess9Callback">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
−
<operation name="onResult">
<soap:operation style="document" soapAction="onResult"/>
−
<input>
<soap:header message="tns:WSARelatesToHeader" part="RelatesTo" use="literal" encodingStyle=""/>
<soap:body use="literal"/>
</input>
</operation>
</binding>
−
<service name="BPELProcess9">
−
<port name="BPELProcess9Port" binding="tns:BPELProcess9Binding">
<soap:address location="http://xxxx:8888/orabpel/default/BPELProcess9/1.1"/>
</port>
</service>
−
<service name="BPELProcess9CallbackService">
−
<port name="BPELProcess9CallbackPort" binding="tns:BPELProcess9CallbackBinding">
<soap:address location="http://set.by.caller"/>
</port>
</service>
−
<plnk:partnerLinkType name="BPELProcess9">
−
<plnk:role name="BPELProcess9Requester">
<plnk:portType name="tns:BPELProcess9Callback"/>
</plnk:role>
−
<plnk:role name="BPELProcess9Provider">
<plnk:portType name="tns:BPELProcess9"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>Allow me to reply to my own thread, for the benefit of any others who might want to invoke a BPEL WS from APEX facing the same problem:
Apex does not seem to like asynchronous BPEL processes so the trick is to make a synchronous BPEL process call the asynchronous BPEL process. -
The problem by hearing my voice when calling from iMAC
I use the latest version of OS X and iOS on all my devices (OS X and iOS 8.1.1 10.10.1). The receiving calls through iPhone 5 have a problem with hearing my voice when calling from iMAC. When make incoming, but also outgoing call through iPhone5 on my iMac, I can hear the caller, but he can not hear me, although tilde see sound when I speak to your iMac.
When the call using my iMac I can hear the caller, but he's not me.
MacBook Air while everything works smoothly, there hear me. You do not know me with this please help?
ThanksYes, my microphone works correctly, f.e. skype, record spund for my videos... no problem with microphone on my iMAC
-
Refcursor not returning rows when called from non SQL*Plus IDE or other
Hi all,
I have a very weird problem.
We have recently performed a minor upgrade to our oracle database and are now using:
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
5 rows selected.We have a crystal report selecting data from a refcursor returned by a stored procedure.
The stored procedure updates data when called as well as returning the refcursor in question.
Observe the following test scenario executed in SQL*Plus:
SQL> create table testtab (teststr varchar2(100));
Table created.
Elapsed: 00:00:00.00
SQL> insert into testtab values ('X');
1 row created.
Elapsed: 00:00:00.00
SQL> create or replace procedure testtabproc (p_listcur in out sys_refcursor)
2 as
3 begin
4
5 open p_listcur for
6 select *
7 from testtab
8 where teststr = 'X';
9
10
11 update testtab
12 set teststr = 'Y';
13
14 commit;
15
16 end;
17 /
Procedure created.
Elapsed: 00:00:00.00
SQL> declare
2
3 v_list_cur sys_refcursor;
4
5 type t_out_rec is record (teststr varchar2(100) );
6
7
8
9 v_out_rec t_out_rec;
10
11 v_rec_count number := 0;
12 v_count_limit number := 10000;
13
14 begin
15
16 dbms_output.put_line('about to call proc');
17
18 testtabproc(v_list_cur);
19
20 dbms_output.put_line('about to fetch records');
21
22 fetch v_list_cur into v_out_rec;
23 while v_list_cur%found loop
24 v_rec_count := v_rec_count + 1;
25 if v_rec_count <= v_count_limit then
26 dbms_output.put_line(v_out_rec.teststr);
27 end if;
28 fetch v_list_cur into v_out_rec;
29 end loop;
30 dbms_output.put_line('complete. selected '||v_rec_count||' records.');
31
32
33 end;
34 /
about to call proc
about to fetch records
X
complete. selected 1 records.
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> select * from testtab;
TESTSTR
Y
1 row selected.
Elapsed: 00:00:00.00
SQL> as you can see, the cursor returns data and the table is updated.
now, our problem is with crystal and also when I use the same test case via another IDE like TOAD.
No data is returned from the list but the table is still updated.
We suspect that something is happening that is causing the table to be updated before the refcursor is opened, or at least before the predicates are applied.
has anyone else encountered this problem before?Tubby wrote:
WhiteHat wrote:
nope - it works from sqlplus itermitantly (i.e. we always get the debug output but the cursor only sometimes fetches the rows).
it is almost as if the commit is being executed before the cursor is opened.
I still havn't been able to reproduce it except with the actual scenario that I am working with...Is the code you are dealing with exactly the same as the skeleton you've posted in your original post? Do you perhaps have a generic exception catcher in there somewhere (perhaps catching and hiding an ORA-01555) when the cursor is being fetched?
Not that i expect it to make any difference, but i'm curious as to why you've declared your cursor as IN / OUT ?
p_listcur in out sys_refcursor
the code structure in the real example is almost identical to that test case I produced - the exception handler is only catering for no_data_found, all other errors should be raised as normal.
edit: sorry I forgot to add - it's in/out because apparently that's what crystal reports needs in order to use the refcursor..... I'm not a crystal guy so I can't be any more specific than that sorry......
Edited by: WhiteHat on Oct 11, 2010 9:34 AM -
Bring Excel 2007 to the front when called from LabView v9 in Windows 7
I am building a duplicate system using Windows 7, LabView v9 and Excel v2007. The original system used WinXP, Excel 2007 and LabView v8.6. The issue is that the original system was able to bring Excel to the front when called from Labview using the property node -application-> visible. This new configuration runs Excel, loads the data, runs the macros but does not bring Excel to the front. The icon blinks in the Win7 taskbar and when selected displays over LabView. If I minimize the Labview window, Excel is there. This leads me to conclude that Excel is visible, as requested but will not come to the front until selected from the taskbar. The only differences, besides the versions, is the original system template files used the .xls extension in and was run in Excel in compatible mode. At the customers request, the new system uses the .xlsm extension on the Excel template files. I have tried using application.visible = True in the macro as well. Could be a setting in Labview? Could be a setting in Excel? Could be .xls vs. .xlsm? Or an issue with Windows 7 and the newer version of Labview.
HP workstation - Labview v9 - Windows 7 - Excel 2007 sp2
Thank you in advance
Stephen
Solved!
Go to Solution.I will try the windowstate change. Were these done in succession? (i.e. property node -> property node -> property node) Or were they done along the way such as call the ActiveX open and a property node then in a worksheet modification area etc. so there was some time between calls?
I am not sure about the API since the discussion there is with regard to DDE. (Taken from the link document: If you want to call a DLL that contains ActiveX
objects, use the Automation
Open VI with the Property
Node and the Invoke
Node.). I am calling Excel as an application not as a library call unless I am mistaken, which I could certainly be. Are you thinking that once Excel is active through the Automation Open VI that a DLL call to set the application visible would work? I may be trying this already but in Excel through the use of the macro I call from LabView. It contains application.visible = True at the beginning before reading files and plotting data.
I may try sprinkling Property node with application->visible in various locations in the LabView diagram as I do update cells after the call to the plot macro. The puzzle for me is the blinking Excel icon in the task bar. This means active and running but not visible or something wrong as well. There are a few #VALUE cells if not all test in the system are run. Again not a problem in Excel 2007-WinXP-LV8.6
Thank you again one and all. -
Stored Procedure Does Not Run Properly When Called From Portlet
We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
Our problem:
The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.Any Ideas?
-
HR_INFOTYPE_OPERATION not working when called from Dynamic action
Hi ,
Senario : I would like to execute a form from dynamic action which
creates a record in 0015 (Additional payment IT) .
I have writen the code as shown below am using FM HR_INFOTYPE_OPERATION
. When i execute the program from se38 it is creating a record, however it is
not created when it is called from dynamic action..when i debugged the code in
inside the FM HR_INFOTYPE_OPERATION there is a FM HR_MAINTAIN_MASTERDATA where
they are using call dialog (statement) and
sy-oncom = 'N' when called from Dynamic action and
sy-oncom = 'S' when called executed directly.
I tried to change the sy-oncom to S while run from Dynamic action it created
the record.
So Can anyone explain me abt sy-oncom and how can i resolve the issue..
code..
REPORT ZHRPYENH01 .
perFORM TERMIATION_9000.
INCLUDE DBPNPMAC.
FORM Termiation_9000 *
FORM TERMIATION_9000.
INFOTYPES : 0015.
*data : i .
*i ='c'.
*break-point.
*message i000(000) with i.
TABLES : PRELP.
DATA : P9000 TYPE PA9000." with header line.
DATA : P0000 TYPE STANDARD TABLE OF P0000 WITH HEADER LINE.
DATA : P0015 TYPE STANDARD TABLE OF P0015 WITH HEADER LINE.
DATA : HIRE_DATE LIKE SY-DATUM,
TERM_DATE LIKE SY-DATUM.
DATA : MOLGA LIKE T500L-MOLGA VALUE '25',
SEQNR LIKE PC261-SEQNR.
DATA : RGDIR TYPE STANDARD TABLE OF PC261 WITH HEADER LINE.
DATA : ACTUAL_PERIOD LIKE PA9000-RETENTION.
DATA : PNP-SW-FOUND TYPE SY-SUBRC ,
PNP-SY-TABIX TYPE SY-TABIX.
DATA : TER_PERNR LIKE PA0001-PERNR.
DATA : REF_PERNR LIKE PA0001-PERNR.
data : key type BAPIPAKEY.
data : payed_amount type p0015-BETRG.
data : future_payment_amount type p0015-BETRG.
data : p0002 like pa0002.
types : begin of t_deduction ,
deducation_date like p0015-begda,
future_payment_amount type p0015-BETRG.
types : end of t_deduction.
data : future_deduction type standard table of t_deduction with
*header line.
data : future_deduction type t_deduction .
data : RETURN type BAPIRETURN1.
*data : deduction_p0015 like standard table of p0015 with header line.
data : deduction_p0015 like p0015 .
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
****Prepare 0015 data for deduction
*deduction for payed amount
clear deduction_p0015.
*refresh deduction_p0015.
deduction_p0015-pernr = REF_PERNR.
*deduction_p0015-pernr = TER_PERNR.
deduction_p0015-lgart = 'M120'.
deduction_p0015-begda = sy-datum + 1 .
deduction_p0015-endda = sy-datum + 1 .
deduction_p0015-BETRG = payed_amount.
deduction_p0015-WAERS = 'SGD'.
deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
**deduction for future payment amount
*loop at future_deduction.
*clear deduction_p0015.
*deduction_p0015-pernr = REF_PERNR.
**deduction_p0015-pernr = TER_PERNR.
*deduction_p0015-lgart = 'M120'.
*deduction_p0015-begda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-endda = FUTURE_DEDUCTION-DEDUCATION_DATE.
*deduction_p0015-BETRG = future_deduction-future_payment_amount.
*deduction_p0015-WAERS = 'SGD'.
*deduction_p0015-ZUORD = TER_PERNR.
*append deduction_p0015.
*endloop.
Create a deduction wage type in 0015 for the employee
break-point.
CLEAR RETURN.
CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
if not return is initial.
message E000(000) with
'Referred Employee could not be locked for referal payment deducation,
please try after some time'.
endif.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = REF_PERNR
SUBTYPE = 'M120'
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = SY-DATUM
VALIDITYBEGIN = SY-DATUM
RECORDNUMBER =
RECORD = deduction_p0015
OPERATION = 'COPY'
TCLAS = 'A'
DIALOG_MODE = '2'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN = return
KEY = key
break-point.
COMMIT WORK.
if not return is initial.
*return-TYPE
*ID
*NUMBER
*MESSAGE
message I000(000) with return-MESSAGE.
endif.
CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
EXPORTING
NUMBER = REF_PERNR
VALIDITYBEGIN = '18000101'
IMPORTING
RETURN = return
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
Thanks and regards
-Senthil Bala
Message was edited by: senthil balaHi Senthil
Why at all U want a subroutine to create a record in IT0015 through Dynamic action.There are some standard codes available to update infotypes.
Let me give U an example
14 9CON BETRG 4 2 I INS,0015 This will create a record in IT0015 when IT0014 is updated with Wagetype 9CON
14 9CON BETRG 4 3 W P0015-LGART='5400' Set wagetype for IT0015(Here U can use a subroutine call to set the wagetype)
14 9CON BETRG 4 4 W P0015-BETRG=P0014-BETRG set amount for IT0015(Here U can use a subroutine call to get the amount)
14 9CON BETRG 4 5 W P0015-BEGDA=P0014-ENDDA set the dates(Here U can use a subroutine call to set the dates)
Hope this will help U.
Please award points if helpful -
Is it possible to call diff report queries when called from form
hello all
I want to know if it is possible to call different report queries when called from oracle 9i form .
i tried to use he
SET_REPORT_OBJECT_PROPERTY(REPORT_QUERY = 'q_diff' )
option and actualy called the report name
but it dint seem to work !!!
also is it possible to chng the title of the browser at runtimeSandeep,
this property is used with passing Record Groups as data parameters from Forms.
Passing the query name indicates that the values contained in the record group substitutes the result of the named query. This may work in client/server Reports, but it definitively doesn't work on teh Web because you can't pass a Record Group as a data parameter in this environment.
Te problem with changing a Reports query is that you must meet the same number of columns and column types as they exist in the Report. I didn't spend much time with XML based runtime customization in Reports. I think that you can change the Reports query through this feature. In Forms you would create the XML file using text_io and the merge it with an existing Reports. I never did this before. So it could be that all I am saying does not work in the end. Before following this idea, you may better ask in teh Reports forum on OTN if it is possible to use the runtime customization feature to modify the Reports query.
Fran -
Running BDC in 'A' mode when called from Enterprise portal
HI All,
I have created a RFC which contains a BDC program that update data in SAP R/3. The RFC is called from Enterprise portal. Is it possible to run the rfc in A(all screen display) mode while calling from EP. I have tried it but it gives following 2 errors on EP
cm_no_data_received
rfc_error_communication
what changes i have to do so that i can run the BDC in 'A ' mode when called from Enterprise portalit would not be related to EP administration issues but something to do with GUI usage. it is loggically fare enough not to give options of viewing the debug screen in as it might concern security issues inway the data could be edited at any point of time. Moreover the screens u see in R3 are ABAP but whereas in EP it is purely based on Java and the calls to SAP is done via JCO thus enabling ABAP functionalities in EP. Maybe for these technical reasons or constraints it wont be possibel to view the screen in EP eventhough u had ext.bp activated
-
SESSION EXPIRED and CPU Utilisation is 100% when called from Pro*C
Dear Colleague
We are having a production system developed using Pro*c and PL/SOL packages in HP Unix.
The system is doing the following,
A file will be decoded using Proc and data will be load into 3 temporary tables (permanent table used for temporary) using SQLLoader. Then it calls a PL/SQL package which will process the data in the temporary tables and will store the summary information in Transaction table and will returns a unique id to the calling Pro*c module. The whole process is completed in a single process/oracle session.
The PL/SQL package, join the 3 Temporary tables and retrieve the data into an Oracle object(Collection) and process it. Then the processing summary will be loaded into Transaction table and return the Primary key.
Now the problem is, when the temporary tables are loaded with more than 200,000 rows, in some cases the system is running for hours before it finish. And during the process the session shows as EXPIRED in the database and CPU utilization for the respective ProcessId in Unix is almost 100%. Then after a while the session comes alive and finishes the process.
And for some other cases, with same row count, the entire process finished in seconds.
If the same process (PL/SQL package) when run directly using a separate session inside the database(and the temporary tables are still available), rather than calling from Pro*c, it finishes in seconds, where it took hours when called from Pro*c.
It will be highly appreciated, if anyone let me know, what actually is wrong. whether it is the resource allocation or should there any known problem in calling huge PL/SQL packages from Pro*C.
we are using Oracle 10g and HP-UX ed42 B.11.31 U System.
regards
SajidDear Colleague
I just want to rephrase the problem again.
We have a Pro*C application. This will read the binary file and dump the data in ascii format to a data file. Then, within from the pro*C, 14 Dynamic tables will be created using EXEC SQL EXECUTE IMMEDIATE statement, each having almost a maximum of 45 columns. Also, created INDEXES to the tables in the same way from Pro*C.
And Control file will be created as follows
OPTIONS (SILENT=(FEEDBACK)) UNRECOVERABLE
LOAD DATA
INTO TABLE FILENAME_BCI_USED
FIELDS TERMINATED BY '|'
TRAILING NULLCOLSColumns Listed
Then Sql loader will be called using system commands (from pro*C itself) to loead the data into the table, as follows.
sprintf(syscommand,"sqlldr %s CONTROL=%s DATA=%s log=%s rows=5000 direct=true", glb_connect_string,ctl_file,data_file, log_file );
ret_value = system(syscommand);data loaded successfully.
Then the Pro*C will call a PL/SQL package for processing the data.
The PL/SQL package, to process the data, dynamically construct the below query and use it for the reference cursor to retrieve data and load into a collection.
v_sql_query := 'SELECT '|| '/*+ index(b '||p_File_Name ||'_1) index(b '||p_File_Name ||'_2) index(s '||p_File_Name ||'_3) index(s '||p_File_Name ||'_4) index(s '||p_File_Name ||'_5) index(s '||p_File_Name ||'_6) index(e '||p_File_Name ||'_7)*/' || '
iot_call_record(b.rec_no ,
b.rec_type ,
substr(b.field1,1,15) ,
nvl(substr((select s0.field1 from ' || SU_Table ||
' s0 where s0.rec_no = s.rec_no and s0.sub_rec_type = 203) ,1, 25),
substr(b.field2, 1, 25)),
substr(b.field3,1,25) ,
b.field4 ,
b.field5 ,
s.field1 ,
s.field2 ,
(select sum(s1.field1) from ' || SU_Table ||
' s1 where s1.field2 = s.rec_no and trim(s1.field2) = ''00'' ) ,
s.field3 ,
e.field2/power(10,e.field3) ,
s.field4 ,
s.field5 ,
s.field6 ,
s.field7 ,
s.field8 ,
s.field9 ,
s.field10 ,
nvl(b.field6,''F'') ,
NULL ,
s.field11 ,
(select sum(s2.field11) from ' || SU_Table || ' s2 where s2.rec_no = s.rec_no) ,
NULL)
FROM ' || BCI_Table || ' b , ' || SU_Table || ' s, ' || EXCH_Table ||
' e WHERE b.filename = s.filename
AND b.rec_no = s.rec_no
AND (b.field7 = 0 OR b.field7 = 1)
AND TRIM(s.chg_type) = ''00''
AND (s.field1 = e.field2_Code )
AND not(s.field4 = ''V'' and s.field12 > 1)
AND not(s.field4 = ''W'' and s.field12 > 1)
AND not(b.rec_type = 75 and s.field12 > 1)
AND not(b.rec_type = 75 and s.field4 =''D'')
AND s.sub_rec_type <> 203
and (s.field12 = 1 or b.rec_type not in (20,30))';
OPEN cur_call_events FOR v_sql_query;
LOOP
g_tab_call_events.DELETE;
-- Execute immediate v_sql_query bulk collect into g_tab_call_events;
FETCH cur_call_events BULK COLLECT
INTO g_tab_call_events limit 5000;
EXIT WHEN g_tab_call_events.COUNT = 0;
BEGIN
SAVEPOINT Block_Begin;
process_records(p_file_name,
g_tab_call_events);
EXCEPTION
WHEN Severe_Error THEN
Write_error('S');
ROLLBACK TO Block_Begin;
WHEN Warning THEN
Write_error('W');
WHEN NO_DATA_FOUND THEN
Write_error('S');
ROLLBACK TO Block_Begin;
END;
END LOOP;And the above module is behaving strangely.
With almost 150K or more rows in BCI_Table & SU_Table each and less than 10 rows in EXCH_Table, the application takes more than 100 minutes to complete the process.
When we checked the session activity, it is showing the same query for a very long time.
Where as files with 100K or less rows are getting processed in a minute.
And the performance for 150K+ rows is inconsistent, that when we isolate the package and run it directly calling from oracle, it is getting executed in less than 4 minutes. Whereas it takes 100+ minutes from Pro*C.
The execution plan for the above query is given below
Object Owner Object Name Cost Cardinality Bytes CPU cost IO cost
SELECT STATEMENT, GOAL = HINT: FIRST_ROWS 494 2497 494406 143334576 483
TABLE ACCESS BY INDEX ROWID SCHEMA1 FILENAME_SU_USED 4 1 21 30610 4
INDEX RANGE SCAN SCHEMA1 FILENAME_3 3 1 21764 3
SORT AGGREGATE 1 13
INDEX RANGE SCAN SCHEMA1 FILENAME_5 3 1 13 22064 3
SORT AGGREGATE 1 7
TABLE ACCESS BY INDEX ROWID SCHEMA1 FILENAME_SU_USED 4 1 7 30706 4
INDEX RANGE SCAN SCHEMA1 FILENAME_3 3 1 21764 3
CONCATENATION
HASH JOIN 355 2496 1307904 103068617 347
TABLE ACCESS FULL SCHEMA1 FILENAME_EXCH_USED 3 2 26 35987 3
HASH JOIN 352 2496 813696 96532618 344
VIEW SYS VW_NSO_1 4 20 880 12549326 3
HASH UNIQUE 4 20 220 12549326 3
TABLE ACCESS FULL SCHEMA2 IOT_SERVICE_MATRIX 3 20 220 45207 3
HASH JOIN 347 15850 2234850 76145180 341
TABLE ACCESS FULL SCHEMA1 FILENAME_SU_USED 130 16584 1111128 33625872 127
TABLE ACCESS FULL SCHEMA1 FILENAME_BCI_USED 217 23757 1758018 31405896 214
NESTED LOOPS 139 1 198 40265959 136
NESTED LOOPS 135 1 154 27716633 133
NESTED LOOPS 132 1 141 27680646 130
TABLE ACCESS FULL SCHEMA1 FILENAME_SU_USED 129 1 67 27655992 127
TABLE ACCESS BY INDEX ROWID SCHEMA1 FILENAME_BCI_USED 3 1 74 24654 3
INDEX RANGE SCAN SCHEMA1 FILENAME_1 2 1 15493 2
TABLE ACCESS FULL SCHEMA1 FILENAME_EXCH_USED 3 1 13 35987 3
VIEW SYS VW_NSO_1 4 1 44 12549326 3
SORT UNIQUE 4 20 220 12549326 3
TABLE ACCESS FULL SCHEMA2 IOT_SERVICE_MATRIX 3 20 220 45207 3Regards
Sajid
Edited by: user12039545 on Jul 11, 2010 12:05 AM
Edited by: user12039545 on Jul 11, 2010 12:15 AM
Edited by: user12039545 on Jul 11, 2010 12:32 AM
Edited by: user12039545 on Jul 11, 2010 12:34 AM
Edited by: user12039545 on Jul 11, 2010 12:37 AM -
11g preview version 3: JNDI Lookup problem when calling PL/SQL webservice
Hi,
I am experiencing a problem when calling a PL/SQL Webservice from a BPEL flow.
When I am trying to test my BPEL flow from the SOA Console I get a "Error doing JNDI lookup on target jdbc/MyDBDS"
The composite application including the BPEL flow is deployed in one application. "CompositeApp" and the web service in another Application called
"WebServiceApp".
Both applications are deployed on the same built in OC4J Application Server
If I test the webservice in isolation from the SOA console it works. It also seems to be working if the webservice and the and the BPEL flow is in the same project.
If anyone has any ideas on this one I would be very greatful.
Thanks in advancetry creating the MyDBDS connection as an application resource in both applications.
-
i deal with a itunes update problem when i try to update i get coneection has timed out error! i had the same problem when i had vista.. yesterday i formated my pc but i still have the same prommblem. i dont deal with such problems on direct downloads.i have this problem only with tunes. maybe my conection freezes for a sec idk
Sorry I gave this a 'this helped me' but after a long struggle I found some ticked box somewhere from some unauthorised chrome extension blaaa....... the link you gave was great, not only did it confirm all the bad things google is supposed to be up to it provided a better browser. Cheers man.
Anyone who find this; I disabled all extension in chrome. I then searched the word proxy in the settings section. A button came up, "change proxy settings" I clicked on it. Earlier it was greyed out as an extension was interefering.. It brought up a box with my own settings from my computer. Then I clicked LAN settings, then unchecked the 'Use a proxy server' button.
P.S. If you're using chrome, bail, and dowload Komodo Dragon. It's virtually identical, but you're not tracked, and you can use chrome extensions, and you can quickily transfer your chrome preferences into it.
Maybe you are looking for
-
Everytime I try to sync my Ipod touch I et the following message 'cannot be synced An unknown error occured (13019). Can anyone help
-
HT5622 my apple ID is not being recognized by itunes
my ipad 2 is not recognizing my ipad
-
Performance problem with transaction log
We are having some performance problem in SAP BW 3.5 system running on MS SQL server 2000.The box is sized 63,574 MB. The transaction logs gets filled up after loading data in to a transactional cube or after doing selective deletion. The size of
-
Reading Japanese Text on my C7/Astound
Hello all. I just discovered the dictionary translator feature on my phone this morning, and downloaded the Japanese translator for it from this website. While the download was successful, none of the kana or kanji are showing up under the translatio
-
Aeroflex 2975 driver for LabVIEW 8.0
Is there a way to convert the Aeroflex IFR 2975 driver for LabVIEW CVI for use in LabVIEW 8.0? OR, is there a driver already developed for this?