How to use Save Point in Batch Execution of java transaction updates .
HI.. ALL
This is going to be very important to all and if needed history should be rewritten...
Does any one.... Any one has ever thought of Execution of a Batch - jdbc using Save Points Concept ???
If this has been ever implemented than I am sorry for my comments..
If NOT---
Then any one has idea or code or any thoughts or alternatives for this... This goes like this-->
If we have a batch file which has All Inserts , Updates and delete statements and we are reading that file in java program and executing the file in a batch execution.. Now java provides only 2 option 'START AND END' for batch execution. But ever dreamed about having Save Points in execution of a batch ?
You might be thinking why Save points needed in batch? if any one wants to have save points then they can go with normat step by step execution of the jdbc calls Why in batch ?
Trust me this is very important in various areas of development which will bring an ease of writing the program efficently..
Does any one have any idea in this regard of having SavePoints in batch execution is highly welcome.
Thanks
wahed
Edited by: wahed on Aug 8, 2008 12:53 AM
If your database supports SAVEPOINT savepoint_name sql and ROLLBACK [WORK] [ TO [ SAVEPOINT ] savepoint_name] sql, you can try to add those sqls into your sql batch.
Similar Messages
-
How to use break point in workflow to check
hi there,
how to use break point to check the values in debug mode.
if i keep one break point in method..can the conttrol will be stop there?
when work flow triggered??hi nag,
thanks for ur fast responce.
this FM will check very begining of the work flow..then it goes to aprover..then status will be updated to active.(for first time mm01 will not allow them to create mat in active status..as i configured user exit..after approving only these mat get active status). but in the case of extending materials they can create the views in active mode itself. after they r saving the material getting inactiv status in db tables...
if u want i can provide the code where mat status is updating to active for new materials.
My Q: i want to exit wf from where fm finds that the material is extending
code is:(checking for both sales and pur views--i guess!)
SELECT * INTO TABLE t_marc
FROM marc
WHERE matnr EQ objkey.
DESCRIBE TABLE t_marc LINES records.
IF records GT 1. "CHECK FOR MATERIAL EXTENSION
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 010 RAISING
check_failed.
ELSE.
LOOP AT t_marc.
IF t_marc-mmsta EQ 'G5'. "CHECK PURCHASING BLOCK
SELECT * FROM moff INTO TABLE t_moff
WHERE matnr EQ objkey AND
( werks EQ plant OR
bwkey EQ plant ).
DESCRIBE TABLE t_moff LINES records.
IF records GT 0.
SELECT SINGLE * FROM zam_mat_wf_conf
WHERE mtart EQ t_mara-mtart.
IF sy-subrc EQ 0.
LOOP AT t_moff.
FIND t_moff-statm IN zam_mat_wf_conf-pstat.
IF sy-subrc EQ 0.
DELETE t_moff.
ENDIF.
ENDLOOP.
DESCRIBE TABLE t_moff LINES records.
IF records GT 0.
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 009 RAISING
check_failed.
ENDIF.
ENDIF.
ENDIF.
ELSE.
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 013 RAISING
check_failed.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ELSEIF mstatus EQ 'V'. "FOR SALES VIEW
SELECT SINGLE * FROM tvko
WHERE vkorg EQ salesorg AND bukrs IN r_bukrs .
IF sy-subrc NE 0. "CHECK SALES ORG CONFIGURED FOR WORKFLOW
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 005 RAISING
check_failed.
ELSE.
SELECT * INTO TABLE t_mvke
FROM mvke
WHERE matnr EQ objkey.
DESCRIBE TABLE t_mvke LINES records.
IF records GT 1.
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 012 RAISING
check_failed.
ELSE.
LOOP AT t_mvke.
IF t_mvke-vmsta EQ '10'.
ELSE.
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 014 RAISING
check_failed.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ELSE. "NO SALES or PURCHASE RELATED VIEW'S CREATED
MESSAGE ID 'ZAM_MWF' TYPE 'E' NUMBER 003 RAISING
check_failed.
ENDIF. -
How to use line wrapping and line spacing in java?how to use line wrapping
how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?how to use line wrapping and line spacing in java?
Hello,
You should post your question at:
http://java.forum.sun.com
Thanks
- Rose -
How to use line wrapping and line spacing in java?
how to use line wrapping and line spacing in java?
Hi,
This is explained in the java Tutorial. Please see the link:
http://java.sun.com/docs/books/tutorial/i18n/text/line.html
and find some sample examples.
Hope this helps,
--Sun/DTS -
How to Use Methods AFTER Work Item Execution (Modal Call)
Hi,
Need to execute a piece of code after a decision based on the result.
Hope this can be done using Methods After WorkItem Execution
Can anyone give some idea about how to use this.
Regards
ImmanHi Mike,
I have a common piece of code that has to get executed irrespective of the decision made,but after the decision.
Imman -
How to use save data in Background by using standard task?
Hi,
I have worked with PD Process for PD. I try to find background process to run after manager approve. I use the standard task 17900108 but it seem does not work. What should I did before I use this standard task?
Please help me out how to use this standard task.
Thanks a lot,
Regards,
VisutHi All,
Thanks for your reply. Actually the key word of my case is I put the class in Program Exit instead of let it blank. The standard task that I use is 17900108.
I can use it to update data now....
But it seem does not update to DPF (Digital Personal File). Anyone has idea why it does not?
Thanks again.
Regards,
Visut -
How to use MICR fonts in Adobe forms (webdynpro java
Hi,
We have a requirement where we need to print some MICR codes (for checks) through Adobe Forms.
I have installed some true type MICR fonts in windows and Adobe Font Manager (in ADS) as well.
It is visible in the Adobe Form design time (Font palette) and when I use the font for text, it is visible in preview too. But when I run the web dynpro application, in the online form it is converted into Standard font (Times new Roman).
Is there anyway to handle this issue.
Please let me know.
I am using NWDS 7.0.1
Adobe Live cycle designer 7.1
SAP NW 2004s SP14
Thank you,
VasuCheck this forum post (though that is for 6i, it would be of helpful for you)
How to use unicode fonts in Oracle forms 10g?
-Arun -
How to use SQl server 2005's SQLXMLBulkLoad with JAVA
Hi All,
I am in a big problem identifying how to use xml bulk insert functionality of sql server 2005 with java.
I need to enter millions of data into the sql server 2005 database.
All the material i saw on net includes vb script or asp.net sripts to do so.
Somebody please tell how I can do this with JAVA.
Thanks.In this forum we commonly discuss connections from Oracle to foreign databases. When you want to connect with your SQL Server to Oracle it would be better to ask that in a Microsoft forum as they support their LINKED SERVER mechanism.
The linked server set up is for example described in the Microsoft knowledge base as:
280106 - HOW TO: Set Up and Troubleshoot a Linked Server to Oracle in SQL Server
In newer SQl Server releases the name changed see for example:
How to run a SQL Server 2005 Integration Services package as a SQL Server Agent job step
View products that this article applies to.
Article ID : 912911
As you can see they are commonly using OLEDB driver. So you might have to install Oracle's OLEDB driver as well. Else you might think about using OLEDB to ODBC bridge -
How to use Try Catch Block in ABAP Like JAVA
Hi Experts,
I am using BAPI to post MIGO in one of my application. If the MIGO is successfully gets posted then BAPI returns no message, but if there is some error in posting then it returns an error message. Now I want to print that error message in catch block by calling method RAISE_ERROR_MESSAGE. How to use try catch block in ABAP. Please suggest with example.
Thanks and Regards.
Vaibhav Tiwari.Hi Vaibhav
You may not catch exceptions returned by function module using try endtry block.
It works well with the exception returned by methods.
In case of function modules or BAPI what u can do is to check sy-subrc returned and give message accordingly. If it returns a structure like bapireturn then display message returned.
in case of exception returned by a method, do it like this...
data: excep type cx_root.
data: v_str type string.
try.
*any method call or division by zero (for ex)
catch cx_root into excep.
endtry.
if excep is not initial.
CALL METHOD excep->if_message~get_text
receiving
RESULT = v_str.
endif.
*display the value returned in v_str on screen -
How to use the One-to-One mapping in Java Code
Dear all:
I have set the direct mapping and named query,
and have written web service of login.
I can login successfully.
Now,I want learning about One-to-One mapping.
I have setting the One-to-One mapping,
then what can I do latter?
I do not found any paper showing how to use it in web service?
Somebody help me?thx all.Following code worked for me:
import oracle.javatools.resourcebundle.BundleFactory;
import java.util.ResourceBundle;
* This method retrieves localized strings from a given XLIF resource bundle.
* @param bundleName The XLIF bundle from which the localized string is to be retrieved.
* @param key The key of the localized string.
* @return The localized string retrieved from the given XLIF bundle.
public static String getXlifLocalizedString(String bundleName, String key) {
if (StringUtils.isEmpty(key)) {
return key;
if (StringUtils.isEmpty(bundleName)) {
return "[" + key + "]";
String localizedString = null;
ResourceBundle resourceBundle = null;
try {
resourceBundle = BundleFactory.getBundle(bundleName);
localizedString = resourceBundle.getString(key);
} catch (Exception e) {
LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
return "[" + key + "]";
return localizedString;
} -
How to use Toolkit.getDefaultToolkit().getImage in JPanel in Java Swing
Hi Sir,
I want to know how to use Toolkit.getDefaultToolkit.getImage()
in JPanel (ie) the class that extends the JPanel.There is no problem to include the Toolkit.getDefaultToolkit.getImage()in JFrame.It is displaying it without any problem.But in JPanel it is showing a problem of cannot resolve symbol.Here i can't use JFrame instead of
JPanel.So how to solve the problem.Pls.do send the code of how to do this.It is Urgent.
Thanx,
M.Ananthuyou use Toolkit.getDefaultToolkit.getImage() in a JPanel exactly the same way you do in a JFrame.
You are getting a compile message "cannot resolve symbol". You have made a programming error and since you have not included code there is no way to guess what you did wrong. -
How to use XLIFF file as resource bundle in Java code
We use xliff as resource bundle for our ADF application. it is has been no problem to have localized message displayed on UI. how ever, I'm wonderring how to use Java code to access xliff as resource bundle which similar to access properties resource bundle. for example:
Locale myLocale = new Locale("es", "ES");
ResourceBundle bundle = ResourceBundle.getBundle("HelloResourceBundle", myLocale);
System.out.println(bundle.getString("Hello"));is it posible to create "HelloResourceBundle" in xliff format?
ThanksFollowing code worked for me:
import oracle.javatools.resourcebundle.BundleFactory;
import java.util.ResourceBundle;
* This method retrieves localized strings from a given XLIF resource bundle.
* @param bundleName The XLIF bundle from which the localized string is to be retrieved.
* @param key The key of the localized string.
* @return The localized string retrieved from the given XLIF bundle.
public static String getXlifLocalizedString(String bundleName, String key) {
if (StringUtils.isEmpty(key)) {
return key;
if (StringUtils.isEmpty(bundleName)) {
return "[" + key + "]";
String localizedString = null;
ResourceBundle resourceBundle = null;
try {
resourceBundle = BundleFactory.getBundle(bundleName);
localizedString = resourceBundle.getString(key);
} catch (Exception e) {
LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
return "[" + key + "]";
return localizedString;
} -
How to use a pull down menu after the 2.0 update
Hi,
I'm looking for help on how to use a pull down menu after the latest update. The method I was using before no longer works and it's driving me crazy.
Has anyone else had this problem and figure out a new way?!
I was holding my finger down on the pull down menu and waiting for the options menu to pop up, I'd push cancel and the menu would stay. This no longer works.Also would love to know plz
-
How to use save as dialog box in swing
hello,
at the time of start the application by clicking the button, i hv to give the path to save my output file, how can i used this dialog box
thanks[http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html]
-
How to use saveas webarchive in word using OLE2
Hello,
I am using the webutil word demo (without webutil) on the client. This demo is working fine.
Now I like to save the file not as a word document, but as a WebArchive or html file. How can I pass the fileformat argument to the saveas invoke call. Or is there a other way to do this using ole2.
Below the demo code.
Thanks in advance,
Fred.
DECLARE
app OLE2.OBJ_TYPE;
docs OLE2.OBJ_TYPE;
doc OLE2.OBJ_TYPE;
selection OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
BEGIN
-- create a new document
app := OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY (app,'Visible',1);
docs := OLE2.GET_OBJ_PROPERTY(app, 'Documents');
doc := OLE2.INVOKE_OBJ(docs, 'add');
selection := OLE2.GET_OBJ_PROPERTY(app, 'Selection');
-- insert data into new document from long item
OLE2.SET_PROPERTY(selection, 'Text', 'this is a test message');
-- save document as example.tmp
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'c:\example.doc');
OLE2.INVOKE(doc, 'SaveAs', args);
OLE2.DESTROY_ARGLIST (args);
-- close example.tmp
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 0);
OLE2.INVOKE(doc, 'Close', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(selection);
OLE2.RELEASE_OBJ(doc);
OLE2.RELEASE_OBJ (docs);
Using OLE Commands
OLE2.INVOKE(app,'Quit');
END;Hi Fred,
Word's SaveAs() method takes file format as it's second argument. The following code snippet shows how to save as HTML:
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'c:\example.html');
OLE2.ADD_ARG(args, 8);
OLE2.INVOKE(doc, 'SaveAs', args);Eric Adamson
Lansing, Michigan
Maybe you are looking for
-
The Radeon X1900 XT video card went bad in my Mac Pro Dual-Core Intel Xeon. (I tried it with a good one at the office). I found one online that was $250. I don't need the gaming capacity of this card and was wondering if there were less expensive vid
-
Help! Can't email pages document in pdf
I'm trying to send a one-page letter that is to be inserted into a book. The recipient needs the document in PDF format. I saved it in PDF but when I try to attach it, the whole text prints out into the email instead of a link to an electronic pdf
-
Asset Legacy dt upld-problem in uploading fiscal year assets without value
Hi all , I am trying to upload Assets which are pertaining to current Fiscal year and for which no depreciation run is taken place , using Tcode AS91, Initially I got error : Capitalization date must be earlier than or same as transfer date. Then I c
-
Having trouble opening with some attatchments in hotmail
Since upgrading to FF4 sometimes when I open an email in hotmail the attachments that are supposed to be there aren't and when I send an email with attachments the attachments dont go. but if I open hotmail with IE8 the attachments are there and I ca
-
Hi, I am getting an error System.Management.Automation.MethodInvocationException: Exception calling "ExecuteQuery" with "0" argument(s): "$Resources:core,ImportErrorMessage;" ---> Microsoft.SharePoint.Client. ServerException: $Resources:core,ImportE