How to check a lot of conversion errors with one TRY-CATCH?
Hi,
I've to import a lot of data from a flatfile.
To avoid short dumps when there are non-numeric data's for a numeric field in the file, I load every record in a structure that have only CHAR fields.
Then I move this fields in a TRY-Catch block to the real fields like this:
TRY.
field1 = field_from_file1
field2 = field_from_file2
field3 = field_from_file3
CATCH cx_sy_conversion_no_number INTO lr_exception.
PERFORM fehler USING lr_exception.
ENDTRY.
This construct works until the first field has a conversion error. However I will test all fields to get a complete list of the errors. And I am to lazy to make a TRY-CATCH construct for hundred of move-statements.
Is there a better trick to check the success of <b>all</b> move operation?
Regards,
Stefan
Hi Stefan,
sorry, the development system is down right now, so I could not test. But I'm convinced you can figure it out:
You may specify the parameters of a method as TYPE REF TO DATA.
Then, in the calling routine you may have
data:
anyrefsource type ref to data,
anyreftarget type ref to data.
GET REFERENCE OF p_source INTO anyrefsource.
GET REFERENCE OF p_target INTO anyreftarget.
call method try_conv
exporting
source = anyrefsource
target = anyreftarget.
and in the method:
ASSIGN source->* TO <fs_source>
and so on...
BTW: I know you have to use typed parameters in OO. Can't you use "TYPE ANY"?
regards,
C.
Similar Messages
-
"catch is unreachable" compiler error with java try/catch statement
I'm receiving a compiler error, "catch is unreachable", with the following code. I'm calling a method, SendMail(), which can throw two possible exceptions. I thought that the catch statements executed in order, and the first one that is caught will execute? Is their a change with J2SE 1.5 compiler? I don't want to use a generic Exception, because I want to handle the specific exceptions. Any suggestions how to fix? Thanks
try {
SendMail(....);
} catch (MessagingException e1) {
logger.fine(e1.toString());
} catch (AddressException e2) {
logger.fine(e2.toString());
public String SendMail(....) throws AddressException,
MessagingException {....I found the problem:
"A catch block handles exceptions that match its exception type (parameter) and exception types that are subclasses of its exception type (parameter). Only the first catch block that handles a particular exception type will execute, so the most specific exception type should come first. You may get a catch is unreachable syntax error if your catch blocks do not follow this order."
If I switch the order of the catch exceptions the compiler error goes away.
thanks -
How do I fix a "medium write error" when I try to burn a MP3 CD?
how do I fix a "medium write error" when I try to burn a MP3 CD?
Thanks,
JackieFirst, update your Mac OS 10.6.8 (Apple menu Software update).
If that doesn't do it, try a different brand CD-R. -
How to check whether a field contains at least one numeric value
how to check whether a field contains at least one numeric value..
Hi,
I hope that this code will works.
constants:
c_digit_grp TYPE char11 VALUE '0123456789', " Digit group
* Data Declaration
data :
str type string.
* if you want check entire string and pass entire string
if str CA c_digit_grp.
* write your logic ---this block will execute atleast one numeric value exists in the string
Endif.
Regards
Bhupal Reddy -
How do you have multiple apple id's with one itunes
how do you have multiple apple id's with one itunes
I have multiple IDs and use the single computer sharing itunes. By 'sharing' I mean we open the pc, open itunes and log in with our individual ID as required.
While Im logged in I plug in my device. I transfer my purchases from my device as per the file menu (not the check for auto downloads). I move them as required to whichever playlist I like.
Then when my son wants to use itunes or update his device, he logs in, plugs in his device, transfers purchases from his device, puts whatever music he wants into his playlist and/or drags direct to the device regardless of who purchased it and then syncs.
Im not sure how it works associating the pc with only one ID or all that other business- I know I don't fiddle with any of that. -
I moved to new house where I have wifi base station I made extension via TP-link power line adapter and connect my Airport utility 6.3.2, but I don't now how to set up as a second network with one IP address?Could you help me please?
Urvergessen wrote:
+You may have already done this, but do you have the first AirPort Express configured to "Allow this network to be extended"?+
Could not find that setting anywhere.
It's in AirPort Utility, AirPort panel, Wireless tab.
When I'm within the range of the base station I connect normally, but further away the connection drops despite the fact that the other Airport is very close and light is green. Interestingly, my PB Pro has signal almost everywhere in the house, but my iPhone and Mac Mini don't. Most likely just a hardware difference?
In AirPort Utility with the second Express, in the AirPort panel, Wireless tab, have you checked "Allow wireless clients"?
The second AP does show an IP address: 10.0.1.3.
With a "Configure IPv4" setting of "Using DHCP", that suggests that the second Express really is connecting to the first Express. In that case I have no other explanation of your your problem. -
How to query which Tcodes specified user used with one day?
Hi guys:
How to query which Tcodes specified user used with one day?Hi
You can use transaction code ST03N.
1. Go to tx code - ST03N
2. Under "Workload" you can select your "Instance or Total" so that it expands and shows you Days, Week, Month.
3. If you want to look at the transactions executed for a particular day, lets say, then double click on any day.
4. At the bottom left you get "Analysis Views"
5. Select & expand "User and Settlement Statistics"
6. Double click on "User Profile"
7. On the right side of the window you get a list of all the users
8. Double click on a particular user you want to view the details of.
9. The new screen will display the "Transactions/Reports Utilized by User XXX"
If you wanna track which users executed a particular transacation then follow this:
10. In "Analysis Views" expand "Transaction Profile"
11. Double click on "Standard"
You can view the list of Transactions and Reports.
12. Double click on the Tx Code or Report you wanna check and it will show the Use of it.
This will help you.
Regards
Sumit Jain
[reward with points if the answer is useful] -
how do i manage multiple users and devices with one apple id without everything showing up on every device?
How to use multiple iPhone, iPad, or iPod devices with one computer
-
I have six memory cards that my computer will not download. It says there is an error with one of the photos. Has anyone had this problem and what do I do to fix it? It used to download
What version of iPhoto?
Does this message come on all six cards?
Are these Raw or Jpegs? If Raw, what camera?
Can you access the images on the cards with Image Capture (in your Applications folder?) -
I'm new to iPad mini and uv I'm trying to get a movie I purchased to where I can watch it offline but when I click the option to download and watch offline it keeps giving me and error with download try again later I have a good wifi connection ??
You have a "good WiFi connection". What does that mean exactly? Can you send and receive email and are other internet related activities working OK for you? Have you tried restarting or rebooting your iPad? Sometimes that helps. If nothing else, it's a good place to start.
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up. -
How do you overlap PDF's and finish with one PDF file? Need help ASAP
how do you overlap PDF's and finish with one PDF file?
Need help ASAPI'm not sure if you can do that with CreatePDF. Try it; you got one free use when you sign up with Acrobat.com
If not, you will have to use Adobe Acrobat; there is a full-use 30 days trial. -
How do I use adobe on 3 pcs with one account
How do I use adobe on three pcs with one account
Which Adobe product exactly?
Adobe licenses allow a maximum of two simultaneous activations. Not three.
You can install the software on three but only activate it for use on two - but not use them both at the same time.
If you really need to activate it on three then you will need to buy an extra license. -
UISelectMany - Conversion error with HashMap Property
Hi,
I have a Backing Bean with a HashMap Property.
public HashMap getItem()
public void setItem(HashMap map)
so I bind a Value of an UIInputText Component like that:
<h:inputText id="txtname" value="#{MyBean.item['myKey']}" />
this works pretty well.
But when I try to do the same with an <h:selectManyCheckbox> Component I got a "Conversion Error".
For what reason? I expected an Array or List Object.
Thanks for help
RalphI solved the problem by creating a custom converter, which checks if the current valueBinding is null.
If so, it replace the valueBinding with an empty ArrayList().
public class MultiValueConverter implements Converter {
public final static String CONVERTER_ID = "org.imixs.workflow.j2ee.faces.MultiValueConverter";
public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException {
// no changes
return value;
public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException {
// Check if current value Binding is bind to an null-Object
javax.faces.el.ValueBinding valueBinding=component.getValueBinding("value");
if (valueBinding!=null && valueBinding.getValue(context)==null) {
// replace binding with empty ArrayList
valueBinding.setValue(context,new ArrayList());
// no changes
return value.toString();
you can find the full code under www.imixs.org (an open source project for a EJB based workflow engine) -
How to check the checkbox of Adobe Installer with the Aplescript??
Hi All,
am trying to Install Adobe Flash Player thru stand alone Installer, I want to check the check box and need to click on Install button,
Whem am trying to get the entire contents of window thru UIElementInspector, am unable to get the contents of checkbox and Install buttons..
I just tried myself with the below script to click the checkbox, but did not succeed, error saying unable to get the checkbox.. Pls suggest how to check..
tell application "System Events"
tell process "Adobe Flash Player Install Manager"
set frontmost to true
click the checkbox "I have read and agree to the terms of the Flash Player License Agreement" of window "Adobe Flash Player 11.5 Installer."
end tell
end tell
Pls check the below link to view the image of the Adobe Flash Player Installer.
https://docs.google.com/document/d/1yzyBTrvi94QxjlEAlcbudOBpXiTGPEI2LA3D1iEo8Gw/ editI'm working on a similar script, but when I execute the script, I run into this error:
error "System Events got an error: Can’t make {563, 234} into type list." number -1700 from {563, 234} to list
Any ideas? Here's the background: I'm trying to click the search box on this page: http://www.alexa.com/siteinfo/payeasenet.com
Here's my UI Inspector results of said element:
<AXGroup>
<AXScrollArea: “”>
<AXWebArea: “”>
<AXGroup: “”>
<AXGroup: “”>
<AXTextField: “Enter a search query”>
Attributes:
AXRole: “AXTextField”
AXSubrole: “AXSearchField”
AXRoleDescription: “search text field”
AXChildren: “<array of size 0>”
AXHelp: “”
AXParent: “<AXGroup: “”>”
AXPosition: “x=550 y=212”
AXSize: “w=214 h=30”
AXTitle: “Enter a search query”
AXDescription: “”
AXValue (W): “”
AXFocused (W): “1”
AXEnabled: “1”
AXWindow: “<AXWindow: “Payeasenet.com Site Info”>”
AXSelectedTextMarkerRange (W): “(null)”
AXStartTextMarker: “<AXTextMarker 0x60800024af80 [0x7fff758b4eb0]>{length = 24, bytes = 0xbd040000000000006024c514010000000000000001000000}”
AXEndTextMarker: “<AXTextMarker 0x600000248a30 [0x7fff758b4eb0]>{length = 24, bytes = 0xbf0400000000000040420c17010000000100000001000000}”
AXVisited: “0”
AXLinkedUIElements: “(null)”
AXSelected: “0”
AXBlockQuoteLevel: “0”
AXTopLevelUIElement: “<AXWindow: “Payeasenet.com Site Info”>”
AXNumberOfCharacters: “0”
AXSelectedText (W): “”
AXSelectedTextRange (W): “pos=0 len=0”
AXVisibleCharacterRange (W): “pos=0 len=0”
AXInsertionPointLineNumber: “0”
AXTitleUIElement: “(null)”
AXAccessKey: “(null)”
AXRequired: “0”
AXInvalid: “false”
AXPlaceholderValue: “”
AXARIABusy: “0”
Actions:
AXPress - press
AXShowMenu - show menu
AXScrollToVisible - AXScrollToVisible -
Conversion error with non-primitive types
I'm wondering if anyone else is seeing this problem or has a potential solution.
The problem, in a nutshell:
I have beans that use non-primitive types (Float instead of float) in the getters and setters. However I keep getting conversion error problems. If I switch to primitive types, I don't get conversion errors. The built-in FloatConverter says (in the documentation at least) that it supports both primitives and boxed types. This was all working in EA4, though. I am discovering this problem as I migrate from EA4 to 1.0.
The code is pretty straightforward:
public class Bean implements Serializable {
public float getProp() {...}
public void setProp(float) {...}
public Float getPropOld() {...}
public void setPropOld(Float) {...}
<!-- works -->
<h:inputText id="floatinput" value="#{BeanInstance.prop}"/>
<!-- doesn't work -->
<h:inputText id="floatinputold" value="#{BeanInstance.propOld}"/>
Any ideas? I have tried explicitly calling the FloatConverter but that gave the same problems.Okay, I figured out my problem.
The JSF spec implies that f:convertNumber may be used inside an h:inputText tag. The early versions of Core JSF go further and show f:convertNumber being used inside an h:inputText tag in one of the examples. (Chapter 7, conversions).
However, this has been the source of my problem. When using f:convertNumber, the converter would automatically determine the data type without regard to the data type in the backing bean. Hence, it would try to pass Longs or Doubles to the bean instead of Floats.
I believe this may be an issue in the 1.0 FR release.
Maybe you are looking for
-
Creating arrows to indicate specific point on a frame
I am in the middle of a project using FCP HD and I need to create arrows to pint to specific body parts on either a photo or video. Is this something I have to do in photoshop or can I do this in FCP? I really have know idea how to go about doing thi
-
Errors on open large jpeg files in Windows 2000
Q. I am having problems opening large jpeg files (eg 40"x30" @270 ppi) after having saved them in Windows 2000 A. This is a known issue and can be resolved either by turning off thumbnails for JPEGS or by using the JPEG2000 file format. The Photoshop
-
Listener not showing the instance for informix.
Hi All, I am using oracle gateway 11g and here I just discovered that the one of the database listener not showing the instance for the informix gatways, though it has already configured. whereas on other database , the listner is showing the instanc
-
Large Mozilla file, can't uninstall from add/remove programs
The mozilla file attached in the image can't be removed from add/remove files and I am unable to find it via the Windows search function (Windows 7 Pro 64-bit) and it is apparently 28+ GB... I'd really like to get that off my hard drive as it is taki
-
Hello, my iphone 5 has been dying on around 35 to 40 percent for no reason? why?
Hello, my iphone 5 has been dying on around 35 to 40 percent for no reason? why?