Division Error
Hi All,
i am getting Error while running the report. how to over come this problem.
Please help on this.
for example:
<?xdoxslt:set_variable($_XDOCTX,’1’,’10’)?>
<?xdoxslt:set_variable($_XDOCTX,’2’,’20’)?>
<?xdoxslt:set_variable($_XDOCTX,’3’,’0’)?>
<?xdoxslt:set_variable($_XDOCTX,'3',xdoxslt:get_variable($_XDOCTX, ’1’) div xdoxslt:get_variable($_XDOCTX, ’2’))?>
<?xdoxslt:get_variable($_XDOCTX,'3')?>
o/p:- 0.5
10/20=0.5
i am getting correct value.
<?xdoxslt:set_variable($_XDOCTX,’1’,’10’)?>
<?xdoxslt:set_variable($_XDOCTX,’2’,’0’)?>
<?xdoxslt:set_variable($_XDOCTX,’3’,’0’)?>
<?xdoxslt:set_variable($_XDOCTX,'3',xdoxslt:get_variable($_XDOCTX, ’1’) div xdoxslt:get_variable($_XDOCTX, ’2’))?>
<?xdoxslt:get_variable($_XDOCTX,'3')?>
10/0=error
i am getting error.....
As you cannot divide by zero, keep an if condition...
<?xdoxslt:set_variable($_XDOCTX,’1’,’10’)?>
<?xdoxslt:set_variable($_XDOCTX,’2’,’0’)?>
<?xdoxslt:set_variable($_XDOCTX,’3’,’0’)?>
<?if:xdoxslt:get_variable($_XDOCTX,’2’)!=0?>
<?xdoxslt:set_variable($_XDOCTX,'3',xdoxslt:get_variable($_XDOCTX, ’1’) div xdoxslt:get_variable($_XDOCTX, ’2’))?>
<?end if?>
<?xdoxslt:get_variable($_XDOCTX,'3')?>
Similar Messages
-
DPC enabled schema in Gas division error during billing
Hi,
We are implementing IS-U/CCS for a gas utility company. Schema for domestic customer is DPC enabled.
Here I am getting following error while executing billing.
'Message no. E9890 Internal error: Error when reading internal table x_ithg in isu_quantity_prorate_prepare'
We have applied relevant note 1113188 and note is correctly applied.
Same DPC config works very well for electricity division.
Does anyone has any idea about this?
Regards,
Jayant DabholkarWhat version are you on? Do you see the following code segment that is raising this error message? If not, see if you can apply the note mentioned in the comments of this code. If it is already there, see why those conditions are met and trace back to its rootcause.
* Falls es sich um ein Gaszählwerk handelt, müssen die
* Gasfaktoren bestimmt werden
IF WABLT-SPARTYP = CO_SPARTYP_GAS.
* >>>>> Note 156533
* if wthg-logikzw <> wabn-logikzw or
* wthg-ab > wablt-ab or wthg-bis < wablt-ab.
* loop at x_ithg into wthg
* where logikzw = wabn-logikzw
* and ab <= wablt-ab
* and bis >= wablt-ab.
* exit.
* endloop.
IF WTHG-LOGIKZW <> WABN-LOGIKZW OR
WTHG-AB > S_ZUGRIFFSDAT OR WTHG-BIS < S_ZUGRIFFSDAT.
LOOP AT X_ITHG INTO WTHG
WHERE LOGIKZW = WABN-LOGIKZW
AND AB <= S_ZUGRIFFSDAT
AND BIS >= S_ZUGRIFFSDAT.
EXIT.
ENDLOOP.
* <<<<< Note 156533
MAC_ERR_READ 'x_ithg' 'isu_quantity_prorate_prepare' SPACE.
ENDIF. -
Nothing has changed, the system is not on any network, and has run without issue about a year now. About a week ago, these errors just started popping up. About once an hour. It doesn't seem to cause any problems, except you have to click the OK button to continue.
I am a complete stranger to NI and labview systems, but I am am familiar with control system in general and this seems strange to me. As far as I know, they are not doing any sort of logging or historical recording, so its not like they are running out of room.
There is plenty of HDD space available. The system has 1 GB of physical ram, with virtual mem settings of 1.5min - 3 max.
I just don't understand what would cause this problem suddenly after almost a year with no issues??
Any suggestions as to what I can try. I've read through about a thousand forums here, but none seem to match this issue with the "all of a sudden" type of error.
One said to try to delete labview.ini, which is the only thing that I would try at this point...
Help??Hi All,
Thanks for the replys. I'll do my best to answer the questions. The system is running Labview 8.5 (I think), or at least a current version. The Labview program is controlling a NI 7350 Motion Controller for (2) Gemini 6 axis maching stations.
All I really know at this point, is that it has been running for about a year with no issues, then suddently last week, this error started to pop up. At this point, nothing seems to be affected as far as functionality, you just have to click ok to close the error screen.
I haven't tried anything yet. I'll probably go there tomorrow or Monday to try to correct the problem, but I thought I would try to get a clue before I did.
I don't have any of the code at this point, I'm hoping to have this later today.
How can I find out which operation is actually running out of memory?? This would certainly help to figure out what is happening.
I guess the only thing that has me baffled with regard to handling errors or a large array, or division error is why all of a sudden, if nothing has changed?
I read one post that said a power failure caused major problems and Vis had to be reloaded. I thought this had potential, but the fact that the system seems to run without any problems other than the nuisance error, makes me think this is not the case.
Anyway, I realize this doesn't shed any new light on the subject, but I'll post more information as soon as I have it.
Thanks to everyone and have a great day. -
FM 12: How do I create a .ps file of a book? (errors prevent PDF generation)
There's probably a graphic on one of your pages that is causing a postscript division error (i.e. divide by zero?) See also: PostScript error offending command div
As Jeff suggests, track down the errant graphic to see what's wrong. If you print to file, you should get an idea of roughly where in the docs the error occurs by watching the print thermometer display. -
Hi Friends(Pcr X013 Gives Error)
Hi Friends,
Error in Pcr x013 how to solve it..pls suggest me....
zero not occurs division error..
Regards
PriyaDoes this happen for the ee who's in-active for the whole pay period ? If yes, more than likeky it's the cause of SAP note 1171721 and 1290357 (SAP changes the way it calculates partial period parameters for ee inactive for the whole pay period). Take a look at note 1295367 on how SAP suggested you should change your rule to handle this issue.
-
Dear Friends.
My internal table have a field which gets sometimes '0'.
And after the execution of progran my field could't be filled and program gave error.How can I get rid of this division errors .
for example
loop at itab_mara
itab-div = itab-a / itab-b .
*itab-b sometimes 0 or itab-a .
endloop.
Dear Rich
I also tried this
catch system-exceptions COMPUTE_INT_ZERODIVIDE = 1.
result = value1 / value2.
endcatch.
but it gets all fields filled with 0 also if it's not zero.May be I am wrong.
Message was edited by: yusuf tunay çilesizIn this code, the VALUE1 holds its value, of course VALUE2 will be 0, and the result will be 0, because the division never took place.
report zrich_0003.
data: result type i.
data: value1 type i value '10'.
data: value2 type i value '0'.
data: oref type ref to cx_root.
try.
result = value1 / value2.
catch cx_sy_zerodivide into oref.
endtry.
write:/ result, value1, value2.
Regards,
Rich Heilman -
I have a problem I haven't seen the answer to. Just built a PC with MSI KT3 Ultra 2, 2000XP processor, GeForce4 Ti 4200 64 MB vid card, 256MB, Windows ME. System has been stable for about 2 weeks now, but yesterday and today it has locked up the keyboard while web browsing (no other programs running). Not sure what is occurring. I have an intake and 2 exhaust fans and temps appear to be well with in acceptable ranges. After this occurs, windows will lock-up on reboot at the ME splash screen. Then sometimes, the pc wil reboot on the following restart fine. Other times, it locks up again with an illegal division error after the splash. No programs or hardware added lately that would have caused this.
The second system has a 330 watt enermax power supply. With the new system I put together, I put virtually the same board (MSI KT3 Ultra 2 with bluetooth and RAID), everything is the same as my first system (except the KT3 Ultra-ARU) and the stability is fine. So, I'm reasonably confident its not the power supply.
-
Mountain lion kernel panic using wifi
I have a very repeatable kernel panic running the latest mountain lion build 10.8.1 (occured in 10.8.0 as well, but I couldn't trace it to a certain behavior yet)
- enable Wifi, connects to home network (close, excellent connection)
- start iTunes (latest), run music over Airplay (doesn't run well at all, i.e. stops after the 0.5s of music)
- open airport utility => kernel panic, always a division error, always called by the atheros driver
anyone experiencing a similar issue?
if I disable WiFi and do the same over ethernet -> no problem.
here the panic report excerpt .... reported to apple as well.
thanks
Ruedi
Interval Since Last Panic Report: 10488 sec
Panics Since Last Report: 3
Anonymous UUID: 049AC8FF-43FF-43F4-9832-ACE879D17F14
Sat Aug 25 16:35:31 2012
panic(cpu 1 caller 0xffffff800d0b7b95): Kernel trap at 0xffffff7f8e596a39, type 0=divide error, registers:
CR0: 0x000000008001003b, CR2: 0x00007f838e649000, CR3: 0x000000000f82c000, CR4: 0x0000000000000660
RAX: 0x0000000000002345, RBX: 0x00000000000000ff, RCX: 0x0000000000000000, RDX: 0x0000000000000000
RSP: 0xffffff80a38fbab0, RBP: 0xffffff80a38fbab0, RSI: 0xffffff7f8e62f260, RDI: 0xffffff8077b4b004
R8: 0x0000000000000000, R9: 0x0000000000000000, R10: 0x00000000000000ff, R11: 0xffffff7f8e6639f0
R12: 0x0000000000000016, R13: 0xffffff8077b4b004, R14: 0xffffff80a38fbb48, R15: 0xffffff808c88d4fc
RFL: 0x0000000000010246, RIP: 0xffffff7f8e596a39, CS: 0x0000000000000008, SS: 0x0000000000000010
Fault CR2: 0x00007f838e649000, Error code: 0x0000000000000000, Fault CPU: 0x1
Backtrace (CPU 1), Frame : Return Address
0xffffff80a38fb750 : 0xffffff800d01d5f6
0xffffff80a38fb7c0 : 0xffffff800d0b7b95
0xffffff80a38fb990 : 0xffffff800d0ce4ad
0xffffff80a38fb9b0 : 0xffffff7f8e596a39
0xffffff80a38fbab0 : 0xffffff7f8e595214
0xffffff80a38fbbd0 : 0xffffff7f8e52f8f2
0xffffff80a38fbcf0 : 0xffffff7f8e595cea
0xffffff80a38fbe10 : 0xffffff7f8e596193
0xffffff80a38fbe80 : 0xffffff7f8e58ac15
0xffffff80a38fbec0 : 0xffffff7f8e5365c2
0xffffff80a38fbef0 : 0xffffff800d447078
0xffffff80a38fbf30 : 0xffffff800d445b8a
0xffffff80a38fbf80 : 0xffffff800d445cb9
0xffffff80a38fbfb0 : 0xffffff800d0b2677
Kernel Extensions in backtrace:
com.apple.driver.AirPort.Atheros40(600.70.23)[D4BB89B5-CB49-303F-87AB-5DDBDE7F59 83]@0xffffff7f8e528000->0xffffff7f8e670fff
dependency: com.apple.iokit.IOPCIFamily(2.7)[8C9E06A4-13D0-33F5-A377-9E36F0ECC229]@0xffffff 7f8d6f9000
dependency: com.apple.iokit.IO80211Family(500.15)[3CA3EBF7-D5C1-3819-9346-BE648FC7644E]@0xf fffff7f8e4bc000
dependency: com.apple.iokit.IONetworkingFamily(3.0)[4DB5B398-8957-33F6-9EC1-0D45D80769DD]@0 xffffff7f8df57000
BSD process name corresponding to current thread: kernel_task
Mac OS version:
12B19
Kernel version:
Darwin Kernel Version 12.1.0: Tue Aug 14 13:29:55 PDT 2012; root:xnu-2050.9.2~1/RELEASE_X86_64
Kernel UUID: 3005059E-270B-3B9F-940D-7A66C05DDC9D
Kernel slide: 0x000000000ce00000
Kernel text base: 0xffffff800d000000
System model name: MacBookPro3,1 (Mac-F4238BC8)
System uptime in nanoseconds: 566161256816
last loaded kext at 87823077404: com.apple.filesystems.afpfs 10.0 (addr 0xffffff7f8f217000, size 348160)
last unloaded kext at 156916166893: com.apple.driver.AppleFileSystemDriver 3.0.1 (addr 0xffffff7f8f09b000, size 8192)You have far too many third-party system modifications. There's no way that setup is going to be stable.
Back up all data to at least two different storage devices, if you haven't already done so. The backups can be made with Time Machine or with a mirroring tool such as Carbon Copy Cloner. Preferably both. You must be certain that you can restore everything to the state it's in now.
Boot into Recovery (command-R at startup), and reinstall OS X. Test. If the problem is gone, you're done.
Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with networks that require any kind of authentication other than a WPA or WPA2 Personal password.
If the problem persists, boot into Recovery again, launch Disk Utility, and erase the startup volume with the default options. This operation will destroy all data on the volume, so you had be better be sure of your backups. Quit Disk Utility and install the OS again. When you reboot, you'll be prompted to go through the initial setup process. That’s when you import the data from one of your backups. For details of how this works, see here:
Using Setup Assistant
Import only "Users" and "Settings" – not "Applications" or "Other files." Don't import the Guest account, if it was enabled on the old system. Test. If the problem is still there, you have a hardware fault. Take the machine to an Apple Store for diagnosis.
If the problem is resolved, reinstall your third-party software cautiously. Self-contained applications that install into the Applications folder by drag-and-drop or download from the App Store are safe. Anything that comes packaged as an installer or that prompts for an administrator password is suspect, and you must test thoroughly after reinstalling each such item to make sure you haven't restored the problem. -
!!! ATENTION HERE !!! - MS-6117 with P2_Celeron_433MHz
IMPORTANT; PLEASE HELP!..
I have MICRO-STAR Model MS-6117 VER 1.1 LX6 Motherboard. I am using Pentium II processor at 266 MHz in Slot 1.
I didn't want to change everything (motherboard, and all...), so I decided to try to change only processor (to buy a better one...) - I was thinking to buy Pentium II at 433 MHz, because I discovered that there is a BIOS update for that processor speed (for my motherboard). I assumed that it should work completely correct... (and it does with my old processor)
I bought Pentium II Celeron 433 MHz, put it in my motherboard, started my computer, and... well... I wasn't very happy... at all...
SYMPTOMS:
1.) When I start computer it goes excellent until it reaches "Windows 98" screen, then it completely stops responding...
2.) When I exit in DOS via F8 button (during computer startup) OR via Startup disc, programs that I use in DOS enviroment run well until they become more complex (e.g. start using sound, or starting a movie (with QV.exe program for example), etc) then - the same thing - it stucks...
QUESTION:
What is the problem? What to do next?
Memory seems to be (is!) fast enough, I set the SW jumpers to ratio of 6.5 (processor speed selection)...
If anyone there knows how to solve this problem or point me where to look for solution or give me an advice, then - speak man, speak...Yes... Well... First: thank you REILLY875 for a fast reply. I must say that I appreciate it very much not only because of traditional reasons, but also because of practical reasons - as I bought that processor from someone over the ad, and I want to solve this problem or give it back as soon as posible... So, thanks once again...
About your suggestions:
I have Windows 98 Second Edition installed; but it seems it (the problem) doesn't have to do anything with Windows, as it stops responding even in DOS enviroment.
About "INTEL INF (Chipset) Drivers" - I didn't install it but I'll try to find it over the Internet...
I upgraded BIOS to support Celeron at 433 MHz, and I assume that when my motherboard was produced there wasn't such silly thing as Celeron 433MHz as it displayed the message that this (new) version of BIOS isn't known (they mentioned that it would happen in README file, and they said that it works anyway). My motherboard is supposed to support only processors on up to 333 MHz, BUT IF THEY TELL THAT IT CAN SUPPORT 433 MHz Celeron THEN I ASSUMED THAT IT IS BOUND TO WORK FLAWLESSLY!!!!.. ...Otherwise I wouldn't bother to buy the stinkin' Pentium II Celeron at 433 MHz...
How do I know whether my BIOS is 1MB or not? How do I know whether my BIOS is FlashMemory/WinBond or EPROM (or something)? (this must not be a problem as my BIOS works without problems with previous processor)
About RAM memory: I have 32MB (doesn't work well - 16MB) - year 1998, and 64MB of RAM I bought few years ago (seller told me that it's good that I bought it because it's faster than my old RAM, and that it might come in handy if I would buy faster processor)... I already tried my new processor using only the newer memory... So... That doesn't seem to be the problem either...
...Let's say that I have 80 MB of RAM...
I assume that processor (new one) should not be damaged as it always reports on computer startup...
Also - in previous post I forgot to mention one symptom - first time I tried new processor hard-disk was on ScanDisk check as I obviously didn't shut down computer properly the time before that. During checking - program reported unhandled error message (you know - the spooky ones that overwrite DOS text already on screen... It reported integer division error or something... And probably mentioned some processor's register... But I assumed that I solved that problem when I rememberd to change jumpers on motherboard to 6.5 ratio...
(I didn't try to confirm that - as after that I mostly used startup disc instead of hard-disk; (smart move - a?)) Probably it would do so again anyway...
I will try latest "INTEL INF (Chipset) Drivers" (if I find them)...
What can be problem beside that? Maybe I should set something in BIOS SETUP? Maybe I should change some jumpers on Processors adapter or my motherboard?.. Or pay atention to some other stuff?.. -
Error while creating sales order for material with another DIVISION
Hello Friends,
I have a problem with my sales order creation.
I have defined a new sales area 0010 / 10 / 01. I have the sales order type assigned to this sales area. (in VOV8 for the sales order type, in the 'General Control' the 'item division' is flagged.
Now, I have created the sold to party XYZ with all the partner functions defaulted same as the sold to party for the sales area 0010 / 10 / 01.
NOW, I have the material ABC with the DIVISION 10 in the basic data. I have extended the material to my sales org & dist. channel & plant.
Now, while creating the sales order for my sales area 0010 / 10 / 01 , I enter the sold to party XYZ - it is OK. But when I enter the material ABC, I get the error - "SHIP TO PARTY IS NOT DEFINED FOR SALES AREA 0010 / 10 / 10"
Please help to resolve the issue.
Edited by: Vivek on Aug 13, 2009 9:04 AMHi
Common division for Material Master data will not work
Because in the material master Division is a field not an organizational unit
Means when you create MMR you will give sales org, DC, Plant as organizational units and then enter but not division
Division is a field maintained in basic data and sales org data 1
This is the reason in t code you will find in t code VOR2 Common division only customer and conditions but not materials
But in t code VOR1 Common DC ,customer conditions and materials all there are available (you can check these t codes)
Coming to your issue Item div is clecked in your order type
This means the division in MMR has the priority or control for that order type
Your header division is 01 ( taken from customers sales area) and item division is 10 (taken from MMR as per your post)
So it differs
To process this order with Item div is clecked in your order type you need to extend your Sold to party ABC to the sales area 0010/10/10 (the sales area where the division of the material falls)
or alternatively
There should be a customer say DEF created in sales area 0010/10/10 who will be a ship to party ( your error is also the same)
for your ABC that is sold to party in sales area 0010/10/01 where the order is registered
Hope yopu are getting it
ABC in sales area 0010/10/01 will have or should have ship to paty DEF in sales area 0010/10/10
or
ABC should operate in in sales area 0010/10/10 too
If item division is not ticked then these are not necessary as the header division 01 will be valid for all items and syatem will not look MMR at all for division
Regards
Raja -
While creating a device category i'm getting an error "enter a valid division via eg01,how can the error be overcome?
Neha,
you can do in two ways.
1. Enter a valid Division which you configured in the system.
2. Remove the Division as required field. However I suggest it should have a valid division. Why can not you check with your Functional owner?
Linganna Katigiri -
get error message when trying to sync iphone to puter that says"cannot connect because apple mobile divise is not started? what do i do?
Restart your computer and the iPhone. Press & hold the Power and Home buttons together for 10+ seconds, ignoring the red power-off slider, until you see the Apple logo. It is safe to do, there should be no content loss. It is the same as rebooting your computer.
-
Oracle 10g GetMetricData Division by Zero Error
Windows Server 2000 (SP4)
Oracle 10gR1 (10.1.0.2.0)
ASM enabled
Using advice found:
http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-17.7657940139
http://www.dbazine.com/blogs/blog-cf/chrisfoot/10goemlessons
on this forum and other places, I have more or less restored functionality to my 10g EM console. The upload process appears to be working normally and the web interface works for just about everything except the "Home" tab. I also cannot reach the ASM page to perform ASM functions.
Here are the most recent entries from the emagent.trc file.
2006-03-22 08:25:54 Thread-3020 WARN upload: FxferSend: received http error in header from repository: http://MYSERVER.MYDOMAIN.lcl:5500/em/upload/
ERROR-400|ORA-20206: Target does not exist: Agent does not exist for http://MYSERVER.MYDOMAIN.LCL:1830/emd/main
ORA-06512: at "SYSMAN.EMD_LOADER", line 1662
ORA-06512: at line 1
2006-03-22 08:25:54 Thread-3020 ERROR upload: Failed to upload file A0000001.xml, ret = -2
2006-03-22 08:25:54 Thread-3020 ERROR upload: 3 Failures in a row for A0000001.xml, we give up
2006-03-22 08:25:54 Thread-3020 ERROR upload: Error in uploadXMLFiles. Trying again in 300.00 seconds.
2006-03-22 08:26:13 Thread-3528 WARN http: 392,-1: nmehl_httpListener: signaled to exit from emctl
== Restarted ===
2006-03-22 08:30:17 Thread-3376 WARN command: Job Subsystem Timeout set at 600 seconds
2006-03-22 08:30:17 Thread-3376 WARN upload: Upload manager has no Failure script: disabled
2006-03-22 08:30:17 Thread-3376 WARN upload: Recovering left over xml files in upload directory
2006-03-22 08:30:17 Thread-3376 WARN upload: Recovered 0 left over xml files in upload directory
2006-03-22 08:30:17 Thread-3376 WARN metadata: Metric collectSnapshot does not have any data columns
2006-03-22 08:30:23 Thread-3376 WARN TargetManager: Regenerating all Metadata
2006-03-22 08:30:24 Thread-3376 ERROR util.files: ERROR: nmeufis_new: failed in lfiopn on file: E:\oracle\product\10.1.0\db_1\MYSERVER.MYDOMAIN.lcl_SID\sysman\emd\agntstmp.txt. error = 2 (No such file or directory)
2006-03-22 08:30:24 Thread-3376 WARN collector: the column name tabscanall_ps in this condition does not exist
2006-03-22 08:30:24 Thread-3376 WARN collector: the column name tabscanall_pt in this condition does not exist
2006-03-22 08:30:24 Thread-3376 ERROR recvlets: Inserted target oracle_database SID.pcs.url.com into hash table
2006-03-22 08:30:56 Thread-3816 ERROR util.files: nmeufile_getLength: Error in lfilen. Error = 2 (No such file or directory)
2006-03-22 08:32:20 Thread-3416 ERROR fetchlets.oslinetok: Process stderr = Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144.
2006-03-22 08:32:20 Thread-3416 ERROR engine: [oracle_database,SID.pcs.url.com,dumpFull] : nmeegd_GetMetricData failed : Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144.
2006-03-22 08:32:24 Thread-3416 ERROR fetchlets.oslinetok: Process stderr = Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144, <STDIN> line 2.
2006-03-22 08:32:24 Thread-3416 ERROR engine: [oracle_database,SID.pcs.url.com,archFull] : nmeegd_GetMetricData failed : Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144, <STDIN> line 2.
2006-03-22 08:47:20 Thread-3476 ERROR fetchlets.oslinetok: Process stderr = Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144.
2006-03-22 08:47:20 Thread-3476 ERROR engine: [oracle_database,SID.pcs.url.com,dumpFull] : nmeegd_GetMetricData failed : Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144.
2006-03-22 08:47:23 Thread-3476 ERROR fetchlets.oslinetok: Process stderr = Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144, <STDIN> line 2.
2006-03-22 08:47:23 Thread-3476 ERROR engine: [oracle_database,SID.pcs.url.com,archFull] : nmeegd_GetMetricData failed : Illegal division by zero at E:\oracle\product\10.1.0\db_1\sysman\admin\scripts/semd_common.pl line 144, <STDIN> line 2.
And here are the entries from the emoms.log file.
2006-03-22 08:28:55,562 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ias.ias.IASIntegration
2006-03-22 08:28:56,000 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.eml.target.slb.common.SLBIntegration
2006-03-22 08:28:56,187 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.eml.ssl.intg.SSLIntegration
2006-03-22 08:28:56,343 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.tip.oem.central.domain.ProcessConnectDomainIntg
2006-03-22 08:28:56,343 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.tip.oem.central.instance.ProcessConnectInstanceIntg
2006-03-22 08:28:56,359 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.webdb.admin.em.PortalIntegration
2006-03-22 08:28:56,359 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.webdb.admin.em.SSOIntegration
2006-03-22 08:28:56,375 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.reports.em.RepIntg
2006-03-22 08:28:56,375 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsEmailIntegration
2006-03-22 08:28:56,375 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOidIntegration
2006-03-22 08:28:56,390 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOvfIntegration
2006-03-22 08:28:56,390 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWebconfIntegration
2006-03-22 08:28:56,406 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWirelessIntg
2006-03-22 08:28:56,406 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.256 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsCalGrpIntegration
2006-03-22 08:31:28,171 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:31:28,218 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:32:28,218 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:32:28,218 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:33:28,218 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:33:28,218 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:34:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:34:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:35:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:35:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:36:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:36:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:37:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:37:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:38:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:38:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:39:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:39:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:40:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:40:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:41:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:41:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:42:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:42:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:43:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:43:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:44:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:44:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:45:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:45:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:46:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:46:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:47:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:47:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:48:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:48:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:49:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:49:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:50:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:50:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:51:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:51:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:52:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:52:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:53:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:53:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:54:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:54:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:55:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:55:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:56:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:56:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:57:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:57:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:58:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:58:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 08:59:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 08:59:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 09:00:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 09:00:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 09:01:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 09:01:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 09:02:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 09:02:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
2006-03-22 09:03:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.476 - Number of HB error responses received = 1
2006-03-22 09:03:28,281 [PingHeartBeatRecorder] ERROR emdrep.pingHBRecorder updateEMDListHeartBeat.485 - ERROR 0 EMD_URL = http://MYSERVER.MYDOMAIN.lcl:1830/emd/main CODE = 0 MSG = ORA-01403: no data found
Here is the status from the sysman.emd_ping table:
Agent is Unreachable (REASON = Connection refused: connect). Host is unreachable (REASON = Internal Error pinging the host for EMD_URL http://MYSERVER.MYDOMAIN.lcl:1830/emd/main.CreateProcess: /usr/sbin/ping MYSERVER.MYDOMAIN.lcl error=3)
Finally, from the SYSMAN.MGMT_TARGETS table, I see the following statuses for the various target types
Target_type; Last_load_time
oracle_emrep; 22-MAR-06
oracle_emd; 22-MAR-06
host; 13-OCT-04
oracle_database; 13-OCT-04
oracle_listener; 13-OCT-04
osm_instance; 13-OCT-04
Any thoughts or additional suggestions?? I have been working on getting the EM console back up and fully functional for several days. I am more of a 9i type, not 10g.
Yes, it's been 18 months since this last worked; what can I say? I inherited this server from a vendor.
Regards,
hmscott
Does anyone haveA couple of updates:
1. I found a perl script file in the sysman\admin\scripts folder called semd_common.pl. I found the line number referenced in the log file. Apparently, the $total variable (representing disk space, I think) is not set properly. When I hard coded it to a fixed value and restarted the dbConsole, I stopped getting the division by zero error.
Not a good solution, but maybe a step sideways. I'd like to remove my edit, but one thing at a time.
2. I found another error message in the OracleDBConsoleSIDwebsrvc.log file:
03/22/06 14:44:23 Received exitCode 1 from emctl istatus
Googling this particular message did not reveal a whole lot to me.
Any more ideas? Anyone?
Regards,
hmscott -
Error en Query : [SQL Server] Error de Division entre 0
Maestros !!
Tengo este problema:
Al ejecutar una query me figura este error " [SQL Server] Error de Division entre 0 ". Entiendo el error, cualquier numero divido por 0 arroja este problema, mi pregunta es como lo hago para no considerar las operaciones con resultado 0. Al revisar las operaciones que esta resumiendo la funcion AVG existen operaciones con resultado 0.
La query es la siguiente:
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 01'
INTO #FV01 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='01'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 02'
INTO #FV02 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='02'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 03'
INTO #FV03 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='03'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 04'
INTO #FV04 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='04'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 05'
INTO #FV05 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='05'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 06'
INTO #FV06 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='06'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 07'
INTO #FV07 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='07'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 08'
INTO #FV08 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='08'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 09'
INTO #FV09 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='09'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 11'
INTO #FV11 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='11'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 12'
INTO #FV12 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode IN('12','12A','12B','12C')
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 14'
INTO #FV14 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='14'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 20'
INTO #FV20 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='20'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 221'
INTO #FV21 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='221'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 22'
INTO #FV22 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='22'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT T3.FirmCode, T3.FirmName, SUM(T1.Quantity) as 'Cantidades', AVG(T1.Price) as 'Precio Venta Promedio', AVG(T1.StockPrice) as 'Costo Promedio', SUM(T1.LineTotal) as 'Venta Neta', AVG((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100) as 'Margen Almacen 23'
INTO #FV23 FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T1.ItemCode LEFT OUTER JOIN OMRC T3 ON T3.FirmCode = T2.FirmCode
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]' and ISNULL(T0.Indicator,'') <> 'NL' and T0.DocType ='I' and T1.WhsCode ='23'
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
---SELECCION DE DATOS
SELECT T3.FirmCode, T3.FirmName as 'Proveedor',
(Select T201.[Margen Almacen 01] From #FV01 T201 where T201.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 01',
(Select T202.[Margen Almacen 02] From #FV02 T202 where T202.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 02',
(Select T203.[Margen Almacen 03] From #FV03 T203 where T203.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 03',
(Select T204.[Margen Almacen 04] From #FV04 T204 where T204.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 04',
(Select T205.[Margen Almacen 05] From #FV05 T205 where T205.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 05',
(Select T206.[Margen Almacen 06] From #FV06 T206 where T206.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 06',
(Select T207.[Margen Almacen 07] From #FV07 T207 where T207.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 07',
(Select T208.[Margen Almacen 08] From #FV08 T208 where T208.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 08',
(Select T209.[Margen Almacen 09] From #FV09 T209 where T209.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 09',
(Select T211.[Margen Almacen 11] From #FV11 T211 where T211.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 11',
(Select T212.[Margen Almacen 12] From #FV12 T212 where T212.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 12',
(Select T214.[Margen Almacen 14] From #FV14 T214 where T214.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 14',
(Select T220.[Margen Almacen 20] From #FV20 T220 where T220.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 20',
(Select T221.[Margen Almacen 221] From #FV21 T221 where T221.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 221',
(Select T222.[Margen Almacen 22] From #FV22 T222 where T222.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 22',
(Select T223.[Margen Almacen 23] From #FV23 T223 where T223.[FirmCode] = T3.FirmCode) as 'Margen Venta Local 23'
INTO #RESULT FROM OITM T2 LEFT OUTER JOIN OMRC T3 ON T3.FirmCode =T2.FirmCode
GROUP BY T3.FirmCode, T3.FirmName
ORDER BY T3.FirmName
SELECT * FROM #RESULT where isnull([Margen Venta Local 01],0) <> 0
or isnull([Margen Venta Local 02], 0) <> 0
or isnull([Margen Venta Local 03], 0) <> 0
or isnull([Margen Venta Local 04], 0) <> 0
or isnull([Margen Venta Local 05], 0) <> 0
or isnull([Margen Venta Local 06], 0) <> 0
or isnull([Margen Venta Local 07], 0) <> 0
or isnull([Margen Venta Local 08], 0) <> 0
or isnull([Margen Venta Local 09], 0) <> 0
or isnull([Margen Venta Local 11], 0) <> 0
or isnull([Margen Venta Local 12], 0) <> 0
or isnull([Margen Venta Local 14], 0) <> 0
or isnull([Margen Venta Local 20], 0) <> 0
or isnull([Margen Venta Local 221], 0) <> 0
or isnull([Margen Venta Local 22], 0) <> 0
or isnull([Margen Venta Local 23], 0) <> 0
---FIN
Agradeciendo vuestra ayuda.Buenas Tardes Eloy
Al revisar todas las transacciones una a una, ninguna de ellas en el campo T1.LineTotal tiene como resultado el valor 0 ya que el campo T1.LineTotal es el monto neto de la venta (sin impuestos) y este nunca es 0 ya que tenemos validaciones antes de crear el documento.
El valor 0 aparece como resultado de esta operación ((1-((T1.Quantity*T1.StockPrice)/T1.LineTotal))*100), ya que en varios ventas se vendió al mismo precio del costo del producto debido a promociones o liquidaciones de stock, por lo tanto el resultado 0 en dicha operación es correcto.
Cuando a estas operación le aplico la función AVG para resumir datos comienza el problema.
Que me sugieres que realice?
Agradeciendo tu ayuda. -
Function to replace division by zero error cells with blank cells when calculating a numeric average
Hi everyone,
I have a five sheet spreadsheet that uses data from four sheets to calculate numeric averages in the fifth. The problem is that there is not always data in all four sheets which produces a division by zero error in the averages sheet. Is there a function or setting in Numbers 2.3 (not yet ready to upgrade to Numbers 3) that will allow these division by zero cells to be replaced by blank cells.
I have tried using statements of the form =AVERAGE(IFERROR(Sheet 1::Table 1:: B4,""),IFERROR(Sheet 2:: Table 1:: B4,""),Sheet 3:: Table 1:: B4,""), Sheet 4:: Table 1:: B4,"")). however instead of a division by zero error this produces an error telling me "the function AVERAGE expects that a number, date or duration but found "." ". It looks as though I will have to make about 400 changes to my sheet as these errors are in this and approximately 100 other cells!
I am hoping that there is some way if possible of correcting these errors without having to manually edit each cell individually.
Thanks,
HughHugh,
You may want to consider an intermediate sheet to handle the errors and then pass the result on to the main sheet.
In the following mockup, I've created a small interposing table the consists of a list of sources in column A and the result from each table. In the example, I perform some operation on those intermediate results, to be passed on to the main table. This may not be a good example, and since I don't know the overall goal of your project it's just a surrogate. (In real life we probably wouldn't be interested in finding the average of averages.)
The expression in Summary::B2 is:
=IFERROR(INDIRECT(A&"::B4"), "SourceError")
Regards,
Jerry
Maybe you are looking for
-
Windows XP Pro, SP3. Firefox 3.6.3. Ever since updating to this version a few weeks ago I can no longer do a right click of the mouse and check the properties of an active url link on webpages. I've always had the option before. I want this feature b
-
My update won't verify. What do I need to do? I have enough space for the update.
-
Hi All, I am testing some Windows 7 builds with IE10 installed and when I do a Resultant Set of Policies on them they all have an error in the user section of the GPOs as shown in the image. To investigate I unlinked all the IE policies from the OU a
-
Hi Sap Guru, I have problem on this side "removal of imported material as such on payment /reversal of appropriate duties .Under the present scenario ,SAP does not permit the removal of the imported material as such on the duties where particularly A
-
can any one provide me PL/SQL Best practice document link ? Thsnks...