How to generate a program counter
Hi, buddies.
I face this situation that I want to make a counter to count how many user run a special program(report or function module) in R/3 which will consume lots of resourses during the operating. I hope to utilize the counter to limit the numbers of the user.
I am wondering whether there is global parameter I can use or there is another method to realize my requirment.
Looking forward your replies.
Thanks in advance.
Alex
Hi,
Use IMPORT, EXPORT statement to achieve this..
Have this code at the end of the program..
DATA: V_RUN TYPE INT4.
Get the counter..
IMPORT V_RUN FROM DATABASE INDX(ST) ID 'PGM_RUN'.
Increment by 1 to know to how many times this program has been executed.
V_RUN = V_RUN + 1.
Update the country
EXPORT V_RUN FROM DATABASE INDX(ST) ID 'PGM_RUN'.
Thanks,
Naren
Similar Messages
-
How to use the program "Generate test data for BAI bank statement" ?
Hi all,
I use the program RFEBKAT5 to create an Electronic Bank Statement file in BAI format ,but it doesn't generate the file .
I don't know how to generate the file.
Please help me !
Thanks all !You need to suitably adjust your GL accounts for "Posting Offset Account" (Whisch is defaulted as ++++++++19" and Checkout/Funds Out/Funds IN GL accounts to your configuration.
Once you do this try generating the file again. -
How do I configure a counter to generate pulses using DAQmx?
How do I configure a counter to generate pulses using DAQmx?
Is says in the DAQmx C reference help
"CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
int ret = 0;
ret = DAQmxCreateTask("",&task_);
errorMsg(ret);
if (ret != 0)
throw ret;
// Configure the counter
ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
errorMsg(ret);
ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
errorMsg(ret);
// Change to pulse mode
ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
errorMsg(ret);
// Start the counter
ret = DAQmxStartTask(task_);
errorMsg(ret);
The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
HELP!!!
StefanThe problem is due to the DAQmxExportSignal call. By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire. The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally). Using the line
ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin. Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations.
If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function. However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals. For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default. This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz). By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling. However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal. I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width. I hope this information helps. -
How to generate the DNS_VERIFY program
I�d like to prevent form the spam mails from internet. I edited the mappings table of orig_mail_access segment, but I couldn't find the DNS_verify program in the iPlanet Messaging Server 5.1. Not knowing how to generate the DNS_VERIFY program in the iPlanet Messaging Server 5.1. Could you please kindly check and let me know the way to solve? Thank you very much!
ps. system info.: solaris8.0,iPlanet Messaging Server 5.1 Patch 1 (built Jun 6 2002)look at this link
http://www.stylusstudio.com/docs/v2006/d_help30.html
I read sometime back that castor has a tool to do
conversion. You might have a look into casto as well. -
How to generate an Interupt for DMA transfer from Counter on NI-PCI-6602
dear guys:
how to generate an Interupt for DMA transfer from Counter on NI-PCI-6602,and I have set the DMA and DMA_INT, and also the global interrupt register.
but there is no Interupt generated in the Interupt callback function.And when I have set the DMA_INT and global interrupt register ,and then read the relevant register,the relevant bit is also 0.
I suspect there is an Interupt register contral, like the MITE, you must write the value to 0xc4 for opening .
there is some codes In my enclosure .What can I do?
Attachments:
TEST.C 21 KBdear Steven_T:
the registers are In my enclosure ,if you have some ideas,please reply me first time.thank you !
Attachments:
PCI6602.pdf 818 KB -
How to generate an OUTBOUND INVOICE IDOC from the ABAP Program?
How to generate an OUTBOUND INVOICE IDOC from the ABAP Program? Any Function Module that can be used for this?
Hi
This is more of configuration
(1) Create a Output type with Medium 6 ( Check with your functional consultant)
(2) Maintain Partner Profiles using WE20 transaction
Idoc type - INVOIC02
Message type - INVOIC
Process Code - SD09
Regards
Madhan D -
How to import 6602's counter output to PFI3 of the 6534 board?
Dear friends,
I have the following problem:
I am trying to import the output of one of the counters of the 6602 board (counter 4) to
the REQ2 (PFI3) line of the 6543 board (please see the VI attached). But I do
not see any signal on the PFI3 line though the VI runs without errors.
The situation is the same if I connect output of the counter to the PFI3 directly in the "Connect Terminals" VI instead of connecting it via PXI_Trig4 line.
I need your help to understand why is it so and how can I accomplish the
"import" task.
Thanks in advance!
Attachments:
counterImport.vi 28 KBHi Andrew,
You are absolutely right - there should be PFI20 instead of PFI26.
It works now. Thank you!
.....I hope you can give some ideas with regard to the following problem:
In a program I used four 6602's counters (counters 0-3) to generate single trigger
pulses on the backplane of the PXI.
It worked fine.
Now I want to incorporate the fifth counter into the program (counter 4) to
generate a finite pulse sequence on the PFI3 line of the 6534 board.
And I can not do this.
Code example is in the VI attached.
When I try to run this VI it gives error:
Error -89137 occurred at DAQmx Connect Terminals.vi:4
Possible reason(s):
Specified route cannot be satisfied, because it requires resources that are
currently in use by another route.
Source Device: TimingIO
Source Terminal: PFI36
Destination Device: TimingIO
Destination Terminal: PXI_Trig0
Required Resources in Use by
Source Device: TimingIO
Source Terminal: PFI20
Destination Device: TimingIO
Destination Terminal: PXI_Trig4
I do not understand why it happens and how to correct this....
Thanks!
Attachments:
counterImport 2.vi 79 KB -
How to Generate Statistic Graph in Report??
Hi, i am developing an questionnaire program together with 19 question... i am able to get value for each value..
Now my problem is how to generate a statistic graph whenever user can check their report ??
Can anyone help?? Thank you very much......
from bscsThe easy way is to use your values to set the width or height of an image dynamically in HTML, but you can only do bar charts using this method.
For real reports and measures have a look at
http://www.jfree.org/jfreechart/index.php
http://www.jfree.org/jfreereport/index.php -
How to generate interactive report in alv
hi,
how to generate interactive report in alv,for this what are the requirements,
give me one sample report.
thankyou.Hi,
Chk these helpful links..
ALV
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Regards
Anversha -
How to generate MT100 file in XML ?
How to generate MT100 file in XML ?
Dear All,
Base: We are working on ECC 6.0 version and developing B2B with bank.
Requirement: For B2B bank requires payment orders in MT100 format wrapped in XML.
At Present: I am using PMW format MT100(standard) in payment method. With the use of this format system is generating MT100 text file.
In this standard PMW format MT100, check box for u201Dmapping using DME engineu201D is not selected.
My Try: I change in format output from file to XML in Payment Media Format (T. Code OBPM1), but it doesnu2019t work.
In data medium display (T. Code FDTA) system is showing the following error.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
XML document must have a top level element. Error processing resource 'file:///C:/Users/888881/AppData/Local/Microsoft/Wind...
In view source system is showing only this,
<?xml version="1.0" encoding="utf-8"?>
My Question: How to generate MT100 file in XML ?
Should I have to create DME Format Tree in ( T. Code DMEE ) and create new Payment Media Format (T. Code OBPM1), with the mapping using DME engine ?
Please give your valuable suggesions,
Thank you,
RonyHi Prabhu,
The program SAPFPAYM generates the payment Medium on the basis of your configuration and background settings, this program does not bydefault give the output in the XML.
Varient creation for the PMW in T. Code OBPM4, use the same program, which i already done it, even without this it is not be possible to create any payment Medium.
Regards,
Rony -
How to generate classical report
Hi guys,
I need a help from you. how to generate classical report can you guide me please.
Thanks guys.Vijay,
To generate a report, follow the steps below
1) Determine the desired output for End-user
2) Based on the desired output, write a program with data declarations for all the variales u will display in the report
3) Write extraction routines to fetch data from the DB tables
4) Read extracted data and bind the data for final output
5) Output data
here's a simple example for your ref
report ztest.
Table declaration
data: it_mara type table of mara with header line.
SELECTION SCREEN
parameters: p_matnr like mara-matnr.
start-of-selection.
select * from mara into table it_mara where matnr = p_matnr.
end-of-selection.
loop at it_mara.
write: it_mara-matnr, it_mara-mtart, it_mara-mbrsh.
endloop.
reward if helpful,
Karthik
Message was edited by:
Karthik -
Hello, I'm a beinnger apple scripter, and I have 2 questions. First, im trying to find the code to generate a page count for the front document of preview. I tried something like this:
choose file with prompt "Count the number of pages in this PDF file:" without invisibles
do shell script "/usr/bin/mdls -name kMDItemNumberOfPages " & quoted form of POSIX path of result & " | /usr/bin/grep -o '[0-9]\\+$'"
But I dont want to have to choose a file with the prompt, and Im not sure how to get the path or POSIX path of an open pdf that is the front document in prievew to then use that directory to select the file to run the shell script on. This is one step in a much larger sequence of automator/apple script commands for large print jobs.
The large scale view is:
1. seleting a group .musx Finale 2014 files and creating pdfs of all the documents
-Achieved with Automator stuff: [Get selected finder items] [open finder items with Finale 2014] [run applescript to convert to pdf all the open files] (which I have working but without a proper repeat condition)
2. sorting those those exports into even/odd groups
3. making the even pages 2 up with a create booklet plugin
3. combinging even/odd group pdfs in their respective folders
4. sending the 2 up evens to 1 printer, and the singes to another printer.
but at this stage in the code/automator this is what i'll need to be doing:
1. Several pdf documents will be open and I need to determine the page count of the front document.
2. With that result I need to determine if the pagecount is even or odd.
3. If its even, I need to save as pdf in a file folder /desktop/PDF Export/Doubles
- if its odd, I need to save as pdf pages from 1 to (pageCount -1) to /desktop/PDF Export/Doubles, and pages (pageCount) to (pageCount) to desktop/PDF Export/Singles. (example: A 5 page pdf will send pages 1-4 to folder "Doubles", and pages from 5 to 5 to Singles, A 1 page pdf will only send a copy to the folder "Singles." A 2 page pdf will send both pages to "doubles"
4. once the even/odd pages have had pdfs made in the either or both of the folders, Im going to close the document and repeat for all other open pdfs.
Which also brings me to my 2nd repeat condition question: how can I repeat (print, save as pdf, close) commands for open files and end the script once all files are closed? This can help me both at this stage, as well the coding stage before in creating the pdfs from open Finale/sibelius .sib/.musx files
would it be something like this?:
If front document exists
try
tell application "preview"
<bla bla>
end try
end tell
At stage 1 of the large scale i've gotten the files to export pdfs and close multiple files, but if i say "repeat 4 times" and i have 3 files it can do those commands but it gets stuck trying to repeat the code one more time. I need the repeat amount x to be the # of items in selection from the the original finder window.
Thanks for the help!The following AppleScript will get the POSIX path and filename of the current PDF file. It will just return the integer value for page count. Note: The path retrieved is the actual path to the PDF file, unless it is on the Desktop. In the latter case, the path will be ~/Library/Containers/com.apple.Preview/Data/Desktop/filename.pdf.
The script assumes that the following folders exist, otherwise you will need a try block to test for their presence.
The AppleScript dictionary for Preview does not provide a page dictionary entry, that would make a repeat loop and page range possible for saving individual page ranges.
set pdfDoubles to POSIX path of ((path to desktop) & "PDF Export" & Doubles)
set pdfSingles to POSIX path of ((path to desktop) & "PDF Export" & Singles)
tell application "Preview"
-- gets quoted POSIX path and filename
set pdfFile to (get path of front document)
set pdfName to (get name of front document)
log pdfName
set cmdArg to "/usr/bin/mdls -name kMDItemNumberOfPages " & pdfFile ¬
& " | egrep -o \"(\\d+)\""
set pageCnt to do shell script cmdArg
display dialog pageCnt
if pageCnt mod 2 is 0 then
-- even
-- save pdfName in pdfDoubles
else
-- save pdfName in pdfDoubles
-- save individual pages in pdfSingles
end if
end tell -
How do i reset a counter in crio scan interface mode
Hai,
I am using cRIO 9104 with NI 9421(DI SINKING) module for my counter application in scan mode.
I have a doubt that how do i reset my counter previous value when my system is in idle mode(i.e stable mode).I tried to use a timeout in property node, But i am not able to put a timeout in my code ,herewith I have attached the printscreen of my program.You can see the timeout option is in hide mode.Any other option is there to reset a counter.Kindly solve this problem and let me know the details.
Thanks and Regards
Jayanthi.K
Attachments:
Untitled.png 292 KBYou need to get a refnum for the module. The simplest way to do this is to drag the module in the project onto your block diagram. It will drop a refnum constant for the module. You will find all kinds of useful properties and methods on this refnum. In this case the refnum is of a class named "SD Module" (where "SD" stands for "Specialty Digital") and it has a method on it for resetting counters. See the attached screenshot of the block diagram.
Ross Houston
Senior Software Engineer
RIO Software R&D
Attachments:
reset_counter.png 3 KB -
How to use java programe in oracle form
Hello Expert,
My Config is : -
Forms [32 Bit] Version 11.1.1.3.0 (Production)
Jdeveloper - 10.1.3
I want to use the java programe in form builder. I create the one java class in Jdeveloper -
package demo;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
public class get_info{
public static void main(String[] args){
ch_add();
public static void ch_add()
InetAddress ip;
try {
ip = InetAddress.getLocalHost();
/*System.out.println("Current IP address : " + ip.getHostAddress()); */
NetworkInterface network = NetworkInterface.getByInetAddress(ip);
byte[] mac = network.getHardwareAddress();
/*System.out.print("Current MAC address : "); */
StringBuilder sb = new StringBuilder();
for (int i = 0; i < mac.length; i++)
sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
System.out.println(sb.toString());
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (SocketException e){
e.printStackTrace();
and this into Formweb.cfg and default.env and also add into Form_class_path. After that i import this java into forms.
Code genertated -
PACKAGE BODY get_info IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
END;
-- Method: main ([Ljava/lang/String;)V
PROCEDURE main(
a0 ORA_JAVA.JARRAY) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
END;
-- Method: ch_add ()V
PROCEDURE ch_add IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
END;
-- Method: wait (J)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_LONG_ARG(args, a0);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
END;
-- Method: wait ()V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
END;
-- Method: wait (JI)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER,
a1 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_LONG_ARG(args, a0);
JNI.ADD_INT_ARG(args, a1);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
END;
-- Method: equals (Ljava/lang/Object;)Z
FUNCTION equals(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
END;
-- Method: toString ()Ljava/lang/String;
FUNCTION toString(
obj ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
BEGIN
args := NULL;
RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
END;
-- Method: hashCode ()I
FUNCTION hashCode(
obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
BEGIN
args := NULL;
RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
END;
-- Method: getClass ()Ljava/lang/Class;
FUNCTION getClass(
obj ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
END;
-- Method: notify ()V
PROCEDURE notify(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
END;
-- Method: notifyAll ()V
PROCEDURE notifyAll(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
END;
BEGIN
NULL;
END;
Now i want to call the o/p of Java programe in oracle text item. Please help me. It's very urgent. I am not good in Java.Sir i use java importer.
PACKAGE BODY get_info IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
END;
-- Method: main ([Ljava/lang/String;)V
PROCEDURE main(
a0 ORA_JAVA.JARRAY) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
END;
-- Method: ch_add ()V
PROCEDURE ch_add IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
END;
-- Method: wait (J)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_LONG_ARG(args, a0);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
END;
-- Method: wait ()V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
END;
-- Method: wait (JI)V
PROCEDURE wait(
obj ORA_JAVA.JOBJECT,
a0 NUMBER,
a1 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_LONG_ARG(args, a0);
JNI.ADD_INT_ARG(args, a1);
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
END;
-- Method: equals (Ljava/lang/Object;)Z
FUNCTION equals(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
END;
-- Method: toString ()Ljava/lang/String;
FUNCTION toString(
obj ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
BEGIN
args := NULL;
RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
END;
-- Method: hashCode ()I
FUNCTION hashCode(
obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
BEGIN
args := NULL;
RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
END;
-- Method: getClass ()Ljava/lang/Class;
FUNCTION getClass(
obj ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
END;
-- Method: notify ()V
PROCEDURE notify(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
END;
-- Method: notifyAll ()V
PROCEDURE notifyAll(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
END;
BEGIN
NULL;
END;
I read both document which is given by you.
Basicaly i don't know how to call java program in form builder.
I wrote this code on When-button-pressed
DECLARE
jo ora_java.jobject;
rv varchar2(1500);
ex ora_java.jobject;
BEGIN
jo := get_info.new;
rv:=get_info.ch_add(jo );
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message (' Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR );
message('');
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
END;
No error comes and no output comes. I want the client MAC ID. please guide me where i need to change the code. -
How to generate this output?URGENT
how to generate using DOM or SAX to get this output?
<project>
<process name = " Process1 " >
</project>
i am stuck here ... may i know how to continued coding from here.. must add in wat ? can any one tell me thank....
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.w3c.dom.DOMException;
import java.io.*;
import java.util.*;
public class TestVector
private Vector m_vProcess;
String strProjectName;
public static void main(String[] args)
TestVector pThis = new TestVector();
pThis -> WriteToXML(m_vProcess);
public void TestVector {
strProjectName ="Project1";
m_vProcess = new Vector();
m_vProcess.add("Process1");
m_vProcess.add("Process2");
public void WriteToXML(Vector vProcess)
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = facory.newDocumentBuilder();
Document builder = builder.parse("Project.xml");
Node rootNode = document.getDocumentElement();
NodeList list = document.getElementsByTagName("Project");
// Loop through the list.
for (int i=0; i < list.getLength(); i++) {
thisProjectNode = list.item(i);
Node thisName1Node = thisProjectNode.getFirstChild();
if (thisName1Node == null) continue;
if (thisName1Node.getFirstChild() == null) continue;
if (! thisName1Node.getFirstChild() instanceof
org.w3c.dom.Text) continue;
String data = thisName1Node.getFirstChild().getNodeValue();
if (! data.equals("Process1")) continue;
//We're at the Mocha Java node. Create and insert the new
//element.
Node newCoffeeNode = document.createElement("Project");
Node newName1Node = document.createElement("Process");
Text tnNode = document.createTextNode("Process1");
newName1Node.appendChild(tnNode);
Node newName2Node = document.createElement("Process");
Text tpNode = document.createTextNode("Process2");
newName2Node.appendChild(tpNode);
newProjectNode.appendChild(newName1Node);
newProjectNode.appendChild(newName2Node);
rootNode.insertBefore(newProjectNode, thisProjectNode);
break;i am not good in programming..wat ever i read b4 ,i wlll forget easily ..and y the output nv come out after i type these...
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import org.w3c.dom.DOMException;
import java.io.*;
import java.util.*;
public class TestVector
private Vector m_vProcess;
String strProjectName;
public static void main(String[] args)
TestVector pThis = new TestVector();
pThis -> WriteToXML(m_vProcess);
public void TestVector {
strProjectName ="Project1";
m_vProcess = new Vector();
m_vProcess.add("Process1");
m_vProcess.add("Process2");
public void WriteToXML(Vector vProcess)
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = facory.newDocumentBuilder();
Document builder = builder.parse("Project.xml");
TransformerFactory tfac = TransformerFactory.newInstance();
FileWriter fileWtr = new FileWriter("output.xml");
StreamResult strResult = new StreamResult(fileWtr);
Transformer trans = tfac.newTransformer();
trans.transform(new DOMSource(document.getDocumentElement()),strResult);
Node rootNode = document.getDocumentElement();
NodeList list = document.getElementsByTagName("Project");
// Loop through the list.
for (int i=0; i < list.getLength(); i++) {
thisProjectNode = list.item(i);
Node thisName1Node = thisProjectNode.getFirstChild();
if (thisName1Node == null) continue;
if (thisName1Node.getFirstChild() == null) continue;
if (! thisName1Node.getFirstChild() instanceof
org.w3c.dom.Text) continue;
String data = thisName1Node.getFirstChild().getNodeValue();
if (! data.equals("Process1")) continue;
Node newCoffeeNode = document.createElement("Project");
Node newName1Node = document.createElement("Process");
Text tnNode = document.createTextNode("Process1");
newName1Node.appendChild(tnNode);
Node newName2Node = document.createElement("Process");
Text tpNode = document.createTextNode("Process2");
newName2Node.appendChild(tpNode);
newProjectNode.appendChild(newName1Node);
newProjectNode.appendChild(newName2Node);
rootNode.insertBefore(newProjectNode, thisProjectNode);
break;
Maybe you are looking for
-
Reports - output to Excel - does not format the "Broken by" rows correctly
Choosing the "break by" column clause while building one of the wizard based reports works great when you are displaying the reports in the default HTML mode. So, my query actually returns a denormalized return set with multiple rows containing the s
-
My calendar does not show map or weather
I installed Mavericks, but Calendar does not show weather, map, or travel time.
-
Vertical blue line is displaying on the screen.
In my iphone4 the vertical blue line is displaying on the screen.please provide the solution. the running ios is 6.1.3.
-
Setting component attributes through viewhandler
We need to tag each component in a view with a specific attribute. We are not allowed to inherit and customize the encoding of the components through custom renderer. Is it possible to tag the components in the tree ,through a custom viewhandler or p
-
SOAP attachments :: Error while downloading attachments more than 10MB
Hi, We are getting the below error when downloading the attachments of size > 10mb. Client details: Java version: 1.6.0_05 OS: SunOS OS version: 5.10 OS architecture: sparc java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays