How to read USER1 DIP-switch status of a cRIO chassis from FPGA?
How can I read the status of the DIP switches on a cRio chassis from the FPGA?
I am working with a cRIO 9022.. My idea is to set the system into a "service" mode by setting the USER1 switch to ON and communicate with the FPGA via the FPGA-GUI(VI) on the host computer instead via the RT module which is used under normal conditions.
Any ideas? Unfortunately, I do not have an unused channel left ...and (as far as I know) can't use the RS232 from the FPGA.
Many thanks in advance,
Luke
Solved!
Go to Solution.
Hi, this is the correct information. You cannot read from the FPGA the DIP switch status. The only thing you could do is to use the Read Switch.vi function located under Functions -> Real Time -> RT utilities palette
This is how you probably know only for the RT Host side and not the FPGA.
Regards Anoj
Anoj Mubarak
National Instruments
Similar Messages
-
How to read .html file and store values into oracle table from html file
Hi all ,
How to read .html file and store values into oracle table from html file using pl/sql
Please Help.....Hi,
Kindly find following sample html code ,i want to store every value in different column in database .
<html><body><p/>
<div style="position:absolute;top:47px;left:37px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:47px;left:680px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:94px;left:151px;font-family:'Times New Roman';font-size:1pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:1080px;left:115px;font-family:'Times New Roman';font-size:8pt;white-space:nowrap;">4497743
</div>
<div style="position:absolute;top:1079px;left:442px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;"> Miclyn Express Offshore Pre-Quotation Disclosure
</div>
<div style="position:absolute;top:1079px;left:680px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:1079px;left:723px;font-family:'Times New Roman';font-size:9pt;white-space:nowrap;">page 5
</div>
<div style="position:absolute;top:1083px;left:151px;font-family:'Times New Roman';font-size:1pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:107px;left:151px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Attachment 2 ¿ indicative statement of 20 largest shareholders </b>
</div>
<div style="position:absolute;top:139px;left:262px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Name </b>
</div>
<div style="position:absolute;top:131px;left:415px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Number of Shares </b>
</div>
<div style="position:absolute;top:147px;left:458px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Held </b>
</div>
<div style="position:absolute;top:131px;left:560px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>Percentage of </b>
</div>
<div style="position:absolute;top:147px;left:567px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;"><b>shares held </b>
</div>
<div style="position:absolute;top:179px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Macquarie Capital Group Limited 92,378,000
</div>
<div style="position:absolute;top:179px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:179px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">34.00%r
</div>
<div style="position:absolute;top:179px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:212px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">HSBC Custody Nominees (Australia)
</div>
<div style="position:absolute;top:227px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited
</div>
<div style="position:absolute;top:220px;left:464px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">36,458,220
</div>
<div style="position:absolute;top:220px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:220px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">13.42%
</div>
<div style="position:absolute;top:220px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:260px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Ray Rider Limited 27,170,000
</div>
<div style="position:absolute;top:260px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:260px;left:618px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">10.00%
</div>
<div style="position:absolute;top:260px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:300px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:300px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">7.96%
</div>
<div style="position:absolute;top:300px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:333px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">National Australia Bank Custodian
</div>
<div style="position:absolute;top:348px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Services
</div>
<div style="position:absolute;top:341px;left:464px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">12,866,550
</div>
<div style="position:absolute;top:341px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:341px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4.74%
</div>
<div style="position:absolute;top:341px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:381px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Citigroup Nominees Pty Ltd 6,942,541
</div>
<div style="position:absolute;top:381px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:381px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2.56%r
</div>
<div style="position:absolute;top:381px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:421px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:421px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2.14%r
</div>
<div style="position:absolute;top:421px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:462px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">UBS Securities Australia Ltd 4,806,760
</div>
<div style="position:absolute;top:462px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:462px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.77%
</div>
<div style="position:absolute;top:462px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:494px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Merrill Lynch Equities (Australia)
</div>
<div style="position:absolute;top:510px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited
</div>
<div style="position:absolute;top:502px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4,325,000
</div>
<div style="position:absolute;top:502px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:502px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.59%
</div>
<div style="position:absolute;top:502px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:550px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Equities Ltd
</div>
<div style="position:absolute;top:542px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">4,150,000
</div>
<div style="position:absolute;top:542px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:542px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.53%
</div>
<div style="position:absolute;top:542px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:575px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Bond Street Custodians Limited - A/C
</div>
<div style="position:absolute;top:590px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Institutional
</div>
<div style="position:absolute;top:583px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">2,750,000
</div>
<div style="position:absolute;top:583px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:583px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1.01%
</div>
<div style="position:absolute;top:583px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:623px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Cogent Investment Operations Pty Ltd 2,599,321
</div>
<div style="position:absolute;top:623px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:623px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.96%
</div>
<div style="position:absolute;top:623px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:663px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Skeet Nominees Pty Ltd 2,276,736
</div>
<div style="position:absolute;top:663px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:663px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.84%
</div>
<div style="position:absolute;top:663px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:704px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Diederik de Boer 1,917,561
</div>
<div style="position:absolute;top:704px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:704px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.71%
</div>
<div style="position:absolute;top:704px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:744px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Ecapital Nominees Pty Limited 1,594,736
</div>
<div style="position:absolute;top:744px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:744px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.59%
</div>
<div style="position:absolute;top:744px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:777px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Neweconomy Com Au Nominees Pty 9
</div>
<div style="position:absolute;top:792px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Limited <900 Account>
</div>
<div style="position:absolute;top:784px;left:472px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">1,594,7360
</div>
<div style="position:absolute;top:784px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:784px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.59%
</div>
<div style="position:absolute;top:784px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:825px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Sonray Capital Markets Pty Ltd 1,236,842
</div>
<div style="position:absolute;top:825px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:825px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.46%
</div>
<div style="position:absolute;top:825px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:865px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Argo Investments Limited 1,050,000
</div>
<div style="position:absolute;top:865px;left:531px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:865px;left:625px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">0.39%
</div>
<div style="position:absolute;top:865px;left:663px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">
</div>
<div style="position:absolute;top:905px;left:161px;font-family:'Times New Roman';font-size:11pt;white-space:nowrap;">Idameno (No 79) Nominees Pty Limited 724,210</div>
<div style="position:absolute;top:1103px;">
</body></html>
Thanks.......................... -
How to check Internal, Concurrent Manager status in Oracle Apps R12 from fr
Step by step how to check Internal, Concurrent Manager status in Oracle Apps R12 from front end and how to start them.
Richa wrote:
Step by step how to check Internal, Concurrent Manager status in Oracle Apps R12 from front end Concurrent Processing - Concurrent Manager Generic Platform Questions and Answers [ID 105133.1]
and how to start them1) Using adcmctl.sh (from the backend)
2) Using Activate button (from the front-end) -- http://docs.oracle.com/cd/E18727_01/doc.121/e12893/T174296T174302.htm#4334248
Thanks,
Hussein -
How to read the position in an linear encoder, model AT112 from mitutoyo?
Hello,
any one knows how to read the positon in a linear encoder, model AT112 from mitutoyo, that have the signal out in the sinusoidal form?
thanksHello Hugo,
In order to help you efficiency, please contact National Instruments (01.48.14.24.24) with the reference number 409230.
I will personnally help you to connect your linear encoder.
Regards. -
How to find out the memory status of RT PXI controller from host?
I want to find/read the memory status of the RT controller from host programmatically. Can any one have any idea about it? If yes can please share your valuable suggestion.
Regards
VijayHello Vijay,
Check out the attached example, it monitors the CPU usage as well as the memory usage. You will need to install our STM component that you can download here:
http://zone.ni.com/devzone/cda/epd/p/id/2739
Message Edited by Jimmie A. on 06-12-2008 03:08 AM
Regards,
Jimmie Adolph
Systems Engineer Manager, National Instruments Northern Region
Bring Me The Horizon - Sempiternal
Attachments:
CPU and Memory Tracker1.zip 150 KB -
Hi,
I've scheduled FX Restatement packages to run each day in two different versions (6 times a day starting at 0615) for a year or so. However when I check out the 'View Package Status' the jobs I set up in the first version doesn't run when they are supposed to. I checked out the 'Package Scheduler Status' and I found that the jobs that DIDN'T run was stuck in a status called 'scheduled' while the jobs running had status 'ready'.
So the question is how can I make sure all the jobs are running? Do I have to or can I do something about this myself? If I try to set up a package in two different versions, can the fact that I set them both to run at 0615 generate a conflict resulting in just one of them running?
Hope someone has answers to these questions, would be so great to get this out of the way. Thanks!
KHi Kristoffer,
remember to click on enable schedule when you schedule a package.
To know if a scheduled package is ok you can see first if present in the tblschedule of your appset and also if present in the windows task schedulerif with status "ready".
After you just have to check the view status if you found the package execution completed you're sure it's running. " version at the same time can cause issues also with different packages better to schedule with a sufficient delay to be sure that the first has ended, in your case 1 package is ok.
I would delete the 2 packages from bpc, checking also the windows scheduler to be sure that no packages are running and rebuild one from scratch setting repeat every 4 hours and checking "enable schedule".
Regards
Roberto -
How to read the power and status LEDs on cFP2020
Can the cFP2020 Power and Status LEDs be monitored by a host program? Also, can the Power and Ready LEDs be monitored from the other cFP Modules?
You can not directly read the Network Module Power or Status LED from a host program. Likewise, you can not directly read the Power and Ready LED of an IO module.
However, even though you can not directly ready the LED status, there are ways of finding out most of the information that the LEDs convey.
For the Network Module Power LED, you can infer the status of the Power LED by looking at the channel status for any/all items that are on the bank. If the items have errors indicating that a communication timeout has occured or an addressed item does not exist, then it is probable that the unit is offline (either because of no power or a fault). The Status LED indicates the current operating status of the Network module and in most cases, if it is flashing
, then a fault has occured that shutdown the processor. In most cases, you will not be able to determine that the Status LED is flashing, as the Status LED indicates a fault condition which will put the unit into a non-standard operating mode (e.g. firmware corruption, unassigned IP Address, or an OS fault).
For the IO modules, each channel on a module can report status, and based upon the status you can infer the state of the LEDs. If the module does not have the Power LED lit, the most likely status will be "Addressed item does not exist". If the module has the Power LED but no Ready LED, then the status will indicate that the "item is unconfigured". If the module has both a Power and Ready LED, than the channel should report either a good status, or a channel specific error (if applicable).
Regards,
Aaron -
How to update the Sent Idoc Status based on the Response From Webservice
Hi All,
I have to develop Idoc--SOAP Sync Process Scenario Using BPM .
I have configured every thing using BPM and mapped
MATMAS----SOAP Request
SOAP Resp----STATUS.SYSTAT01
In R/3 the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.
I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .
I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.
How can we make the status of the Idoc based on some response Text
iam unable to follow OR not able to clear my self on this.
Please suggest me or give some over view kind of thing on this
RegardsHi Suman,
It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."
So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).
now go in this way:
you can develop all the message Interfaces of Abstract catagory (not manditory )
MI_AA_MATMAS -> Abstract Asynchronous message interface for your Matmas IDOC
MI_AS_SOAP_ReqandResp -> Abstarct Syncronous MI for SOAP request and response.
MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc
MI_AA_SOAP_Req -> Abstarct Asyncronous MI for SOAP request .
MI_AA_SOAP_Res -> Abstarct Asyncronous MI for SOAP response .
Thats all in Message interface.
your first reciever :
(This will receive the message asynchronously from R/3)
create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS
Now in thw Propert TAB of this step: give this message name.
Step2: Synchronous call :
create container Variable psoaprequest and psoapresponse give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req resp.
Now in thw Propert TAB of this step:
Synchronous Interface : MI_AS_SOAP_ReqandResp
Request Message : psoaprequest
Response Message: psoapresponse
Transformation Step :
Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS
Let's name it as IM_ResandMatmasToStatus
create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.
In Property pan of this step :
Interface mapping :IM_ResandMatmasToStatus
Source Message :psoapresponse
preceive
(IT will ask you for two source messages as IM selected in this transformation has 2 source messages)
Target Message :pstatus
Send step:
Select a message as pstatus.
thats all in IR.
If have doubt in ID just let me know.
Thanks
Sunil Singh -
Reading 90xx configuration switches
Has anyone an example of how to read the configuration switches from the cRIO-90xx controllers. I want to read the status of the USER1 setting but haven't been able to find an example or a way to achieve this.
Thanks
TonyHi Tony,
You need to use the RT Read Switch.vi, located on the RT utilities palette. (See screen shot).
Note: You can only read the switch from the RT target, I attach an example RT VI in LV 8.2.1 format.
Regards
JamesC
NIUK and Ireland
Message Edited by JamesC on 05-01-2007 10:11 AM
Attachments:
User1_Switch_State.vi 14 KB
User1_Switch_State.PNG 100 KB -
How to read and then extract HTMl source code using java program?
Hi,
Could someone tell me how to read and then extract the content of certain tag from html source code. For example, given url http://.... , I would like to know what the <Title> content <Title> in that page is.
Any help is greatly appreciate.Use a URLConnection to make the connection to the page at the needed URL. From the URLConnection, you can get an InputStream that is the stream of data from that page. Just search through the stream and find the <title> tags (don't forget to check for case sensitivity).
-
How trust worthy are the dip switch OC for the NF980-G65
Love the idea of just flipping a switch to OC, especially for someone like me that lacks experience over clocking. Just don't know how trust worthy it is to do it this way. I did try the first level setting at 10 percent. Jumped my processor from 3.2 to 3.5 very effortlessly. Also automatically boosted my RAM. I was messing with RAM timing in the BIOS around the same time and when I restarted my computer the video wouldn't display. Had to reset the CMOS and set the dip switches back to default to get everything working again. Now I'm afraid to try them again.
Anyone else have any success using the dip switch OC method?
benHI. I have a 785gm-e65 board wht switches. I have tried all settings, but 20 % got me the blue screen right off.
I am at 15% 3.68gz. The front side bus is at 230 and the cpu multiplier at 16x. all settings did one step on the
memory speed, i did not try to change anything. I run flight simnlator FSX and it has 3 cores at 100% and am stable.
gonna leave it this way for now. Klop :smiley: -
How to read open loop status on cFP-AO-200
How to read open loop status on cFP-AO-200, i need to know which channels are open loop.
Brad Whaley
LabVIEW Certified EngineerIf you are reading a multiple channel tag and one or more channels is(are) in an Open Loop condition, then you will receive a warning from the FP Read or FP Write. However, this warning simply tells you that one or more channels has reported an Open Loop condition. If you need to figure out which channel is specifically reporting the Open Loop condition, you have to read/write each channel individually to get the channel status for a particular channel.
Regards,
Aaron -
How to read some records from a text file into java(not all records)
hello,
how to read text files into java. i need only few records from the text file not all records at a time.
If any one knows plz reply me
my id is [email protected]this snipet reads a text file line by line from line 1 to 3
try {
FileReader fr = new FileReader(directory);
BufferedReader br = new BufferedReader(fr);
int counter = 0;
while ((dbconn = br.readLine()) != null) {
switch(counter){
case 0:
status = dbconn;
break;
case 1:
userName = dbconn;
break;
case 2:
apword = dbconn;
break;
counter++;
br.close();
}catch(IOException e){
} -
How to read XKOMV-EDATU, XKOMV-KBETR fields inside java
How do get the
XKOMV-EDATU date and pass it to ItemUserExit.java for database read and filtering.
a. The code in ItemUserExit has to filter ZCPI2-ZSPMON for this date XKOMV-EDATU, the delivery date.
This does not work. prItem.getPricingTimestamp returns the current date always, NOT delivery date.
What is the method call that will grab this date.?
b. How do I have to pass this XKOMV-EDATU date to ItemUserExit.java for database read / filtering.
c. The field XKOMV-KBETR has to be read based on the KSCHL = ZCP1 and / or KSCHL =PR00.
These are abap structures. But I am not sure how to read this value inside java.
How would I extract the structure XKOMV-KBETR(the rate) for KBETR(conditionType)=PR00 .
Please note that I get an error mandatory condition PR00 is missing. (see attached error message ).
d. CPIW_A set up in ItemUserExit.java :: itemUserExitAccess.addItemAttributeBinding("CPIW_A", ZVALUE_CPIW_A );
is NOT available at PricingUserExits.java with the code:
prItem.getItemAttributeBinding("CPIW_A") ,
though they are registered in the method
determineRelevantAttributesForValueFormula as per the help html pages.
I had attached the code.
Can you scan thru the code and give feedback.
Can I call you in the morning.
Thanks.
TK
PS:
I get an error PR00 mandatory condition is missing from the log file.
======
OP="ChangeDocument" ID="34800003" STATUS="200" />objectIds[1]=07F9101FD1D0AD4686B2411E3EFB2DF1&messageTypes[1]=E&messages[1]=Pricing error: Mandatory condition PR00 is missing&areas[1]=SPE&numbers[1]=801&args1[1]=PR00&args2[1]=&args3[1]=&args4[1]=Nov 11, 2005 12:41:37... ...p.sxe.socket.server.rfc.RFCConnection JCO.ServerThread-3 Info: response time of command C
However, I get the response header as:
availableItemConditionTypeNames[1]=PR00&availableItemConditionTypeNames[2]=VA00&availableItemConditionTypeNames[3]=ZA00&availableItemConditionTypeNames[4]=ZOUT&availableItemConditionTypeNames[5]=ZCRT&availableItemConditionTypeNames[6]=K004&availableItemConditionTypeNames[7]=RA01&availableItemConditionTypeNames[8]=RB00&availableItemConditionTypeNames[9]=ZB00&availableH
CODE:
ItemUserExit.java snippet:
qrypair2[0] = new sys_query_pair("ZCPI", <b>"200501"</b>, sys_query_pair.GREATER); //
projection = new String[] { "ZCPI" } ;
sorting = new String[] { "ZCPI" } ; res resultSet = database.db_read_first_row("ZCPI2", qrypair2, projection, sorting);
I need to pass the XKOMV-EDATU date field in the above bolded date field. I think this field is available thru the API for IPricingItemUserExit inside the overwriteConditionValue method's parameter .
METHOD
overwriteConditionValue:
public BigDecimal overwriteConditionValue(IPricingItemUserExit prItem,
ILastPrice lastPrice,
IPricingConditionUserExit prCondition,
int valueFormNo) {
String sold2party = "", strCPIW_A = "", strCPIW_B = "";
BigDecimal condValue = prCondition.getConditionValue().getValue();
BigDecimal netValue = prItem.getNetValue().getValue();
String prod = (prItem.getProduct()!=null)? prItem.getProduct().toString(): "NULL";
SAPTimestamp priceTstamp = prCondition.getConditionFindingTimestamp(); //prItem.getDefaultConditionAccessTimestamp(); //getPricingTimestamp();
String strTstamp = priceTstamp.formatYYYYMMDD();
//KOMP-EDATU ??
logInfo("valueFormNo: " + valueFormNo + " Condition Table type:" + prCondition.getConditionTypeName() +
", condVal:" + condValue + ", netValue:" + netValue + ", KOMP-EDATU:" + strTstamp );
switch (valueFormNo) {
case 601:
try{
sold2party = prItem.getHeaderAttributeBinding("SOLD_TO_PARTY").getValue().getValue();
IAttributeBinding iamCPIW_B = prItem.getItemAttributeBinding("CPIW_B");
IAttributeBinding iamCPIW_A = prItem.getItemAttributeBinding("CPIW_A");
if( iamCPIW_A !=null) strCPIW_A = iamCPIW_A.getValue().getValue();
if( iamCPIW_B !=null) strCPIW_B = iamCPIW_B.getValue().getValue();
}catch(Exception e) {
logInfo("EXCEPTION @ GetAttributeBinding exception : " + e.getMessage());
logInfo("sold2party: " + sold2party + " strCPIW_A, strCPIW_B: " + strCPIW_A + ", " + strCPIW_B);
String CPIW_A = null, CPIW_B = null, BASE_PRICE = null;
logInfo("overwriteConditionValue " +
"_CPIW_A: " + _CPIW_A + ", _CPIW_B: " + _CPIW_B + ", _BASE_PRICE: " + _BASE_PRICE );
double l_cpiw_a, l_cpiw_b, l_base;
if( _CPIW_A == null || _CPIW_B == null || _BASE_PRICE == null) {
logInfo("overwriteConditionValue *tk* static _CPIW_A.... NULL. returning 999999L" );
return BigDecimal.valueOf( 0L );
}else{
l_cpiw_a = Double.valueOf(_CPIW_A).doubleValue();
l_cpiw_b = Double.valueOf(_CPIW_B).doubleValue();
l_base = Double.valueOf(_BASE_PRICE).doubleValue();
logInfo("overwriteConditionValue *tk* ???? using STATIC Class Variables" );
logInfo("overwriteConditionValue " +
"cpiw_a: " + l_cpiw_a + ", l_cpiw_b: " + l_cpiw_b + ", l_base: " + l_base );
double fraction = (l_cpiw_a - l_cpiw_b)/l_cpiw_b;
logInfo("overwriteConditionValue " +
"*tk* double fraction: " + fraction );
double result = l_base * fraction;
logInfo("overwriteConditionValue " +
"*tk* double calculated Result: " + result );
BigDecimal retValue = BigDecimal.valueOf (Math.round(result));
condValue = retValue;
try{
prCondition.setConditionRate(retValue , "USD");
}catch(Exception convEx){
logInfo("overwriteConditionValue " +
"*tk* converstion Rate Exception " + retValue );
prItem.setObjectForUserExits("XKOMV_KBETR_C", retValue);
logInfo("overwriteConditionValue: 601 conditionRate Return Value: " + retValue );
return retValue;
case 602:
/* Forecasted CPI-W value = ( ( D * ( ( A B ) / B ) ) ( D + C ) ) */
double A = Double.valueOf( PricingUserExits.ZCPI2_ZCPI ).doubleValue();
double B = Double.valueOf( PricingUserExits._CPIW_B ).doubleValue();
double C=0, D=0;
BigDecimal bdC = (BigDecimal)prItem.getObjectForUserExits("XKOMV_KBETR_C");
C = bdC.doubleValue();
D = C * 0.8; // just for calculation verification.
// C = Double.valueOf( PricingUserExits.XKMOV_KBETR_C ).doubleValue();
// D = Double.valueOf( PricingUserExits.XKMOV_KBETR_D ).doubleValue();
logInfo("overwriteConditionValue " +
"*tk* A, B, C, D: " + A + ", " + B + ", " + C + ", " + D);
double res1 = A - B ;
res1 = res1 /B ;
res1 = D * res1;
double res2 = D + C ;
double CPI_W ;
CPI_W = res1 - res2; // res2;
BigDecimal retn = new BigDecimal(CPI_W) ;
logInfo("overwriteConditionValue *tk* case 602 returning - " + retn );
return retn; // new BigDecimal(99999L);
default:
throw new FormulaNotImplementedException(prItem, "value formula", valueFormNo);Java != javascript.
You can not call java directly from javascript.
The lifecycle:
Request received
Java/JSP runs produces an HTML page
Java stops running
Javascript runs on page when page is loaded.
The only way to call java code again is to submit a request and get the result back in a response. Traditionally the response is a new JSP page to replace the old one.
Using AJAX the response can be just information that you then alter the current page with.
The first example given by skp71 will probably NOT be what you are after. The java code is executed when you load the page, NOT when you push the button which is most probably what you are after.
AJAX is a solution, as is loading a new page.
Cheers,
evnafets -
Powermac 8600 VGA adapter dip switch settings
I was running an IBM 21" CRT with a PowerMac 8600. It has an adapter with the Dip switches. Well, trying to hook up an old Powermac 7600 I got the switches out of wack now i can't view either mac? Does anyone know the settings to run a big IBM P275 21" CRT?
Is that IBM a MultiSync monitor (can change resolutions on the fly?)
Do you have a meter? If not, do you know the make&model of the adapter, and how many Dip switches?
Maybe you are looking for
-
How can I restore my contacts from a snow leopard time machine to clean instal of Lion
I recently did a clean instal of Lion (which was wayyyyy to difficult by the way--why this wasnt an easy option to begin with I do not know and am not happy about). In my sleep depravation from the previous problem I accidentally synced my contacts f
-
How Do I Use the New Adobe Forums?
I know this thread will be moved somewhere else, but I have no clue where the "forum bugs" forum is, so I'm posting here in "Premiere" since that is where I hang out most of the time. In the old forums I was able to get in, find the hot issues, eith
-
Submitting to broadcast and iTunes
This isn't so much a FCP question as it is a video production question, but with specific needs for iTunes. I'm just finishing my first music video for a record label and they will most likely be submitting it for broadcast and also to iTunes. I over
-
My Movie, My TV Shows and My Music Menu dissappeared
I recently updated my wireless to allow for better connection between my macbook and apple tv. Now the Apple Tv seems to be working properly but the menus for Moveis, Tv Shows and Music now only show "My" content as the only option. This means that I
-
Is there some software that allows one to use the MacBook Pro remote in more creative ways other than with Front Row? For instance, how about using it to snap pictures?