Dynamically calling an XML
i have various loaded xmls in an array. i need to pass one of the xmls through to a class based on which button is clicked. I am having trouble figuring out how to do this dynamically.
here is the array:
xmlArray:Array = [xml54, xml49, xml53, xml52, xml43];
here is the class that needs the xml passed through:
var custClass:CustClass = new CustClass(); //how do i putl the xml within the parenthesis without hardcoding it?
how do you suggest i could go about this?
Have your class as something like:
package {
public class CustClass extends Object { // or extends whatever
private var _xml:XML;
public function CustClass(xml:XML){
_xml = xml; // assign the xml passed in to a private variable
Then you'd do:
var custClass:CustClass = new CustClass(xmlArray[0]); // create a class instance with a specific xml
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Similar Messages
-
Calling a xml publisher report from Ebs - question
Hi,
I know how to call a xml report from ebs using concurrent manager. But i want to open it from a form in application.
My situation is this:
There is a form in the payables modelue, where i search for all the invoices.
There is also a button action in this form wich take the id of the row in wich it is my position and open a rtf raport with this id.
What i need to do is to call my xml report in this button . To pass my raport the id of the row in wich i am and open my report with paramateres.
Can this be done? Has anyone tried this before?
Thanks in advance,
Best regardsHi,
You can use FND_REQUEST.SUBMIT_REQUEST for submitting the report. The syntax is as follows:
function FND_REQUEST.SUBMIT_REQUEST
(application IN varchar2 default NULL,
program IN varchar2 default NULL,
description IN varchar2 default NULL,
start_time IN varchar2 default NULL,
sub_request IN boolean default FALSE
argument1,
argument2, ..., argument99,
argument100) return number;
Here is the code that I used for submitting XML Report Publisher from within my Oracle Report's AfterReport trigger. The parameters are explained.
a:=FND_REQUEST.SUBMIT_REQUEST('XDO', 'XDOREPPB','Varun XML Report Printing', NULL, FALSE, :P_CONC_REQUEST_ID , 'MYONT','MY_PREPACK_XML','en-US' ,'N', 'RTF', :p_output_format,NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL );
srw.message(123,'Value of New Request : ' || a ||' Output Format :'||:p_output_format);
Hope it helps.
Thanks
Varun -
Here's the problem. Dynamically called VI becomes broken inside an executable in debug executable mode Error 1003 is occuring from "Open VI Reference" Block. The computer has all of the necessary drivers, NI-VISA and NI-DAQmx. This executable is a new release of software that currently works on the PC in question. I can using NI-VISA Remote Server control the instruments from my PC using the executable. But when I put the executable on the PC I am getting this error. The only way I have been able to get this to work properly is to build the executable from the console I believe the project was created in, note that the project file has been moved to a network drive and it still works. All of the stations I have opened the project in show the VI that is being called is runnable. I've tried building the executable from the console I am deploying to and the same thing happens.
I am honestly at a loss for ideas why this is occuring. Is this something about the way LabView works internally that may be causing this problem?
I have trolled this forum for idea's and none have made sense to me.
Any input would be greatly appreciated.
-NateTwo ideas:
Mass compile the project to ensure all linkages are ironed out
Include the dynamically launched VI's into the "Always Included" section of the build spec
Report back on if either of these actions solves your problem.
a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;} -
How to edit a program dynamically called from another program
Hi all,
Can anyone help me in coding for a program which call's another
report dynamically from selection screen(for instance z_dynam_called)
and retreive the whole content of the dynamically called program(z_dynam_called)
into an internal table and replace the contents of the internal table with some new code and put it back in z_dynam_called and save it.
Thanks in advance.
Needful will be rewarded with pointsHi,
Follow this:
1) U can pass data from one program to another in a single login using SAP memory......
2) u can create a DBtable update dat table using ur first pgm and fetch from second program.....
3) U can pass the report output using EXPORT TO MEMORY addition and get it back using IMPORT FROM MEMORY..........
Eg:
Export the selected rows to the next program
EXPORT final TO MEMORY ID 'ABC'.
CALL TRANSACTION 'XXX'.
XXX is the tcode for the other program where u want to import the values.
In the second program
INITIALIZATION.
IMPORT the internal table from the first program
IMPORT final FROM MEMORY ID 'ABC'.
Thanks and Regards,
Reward If Helpful -
Dynamic call for records in a table
hI,
Im having a ztable, the structure is as follows:
tabold fldold tabnew fldnew
The records in this table is are:
1.yvbap posnr xvbap posnr
2.yvbak auart xvbak auart
3.yvbak augru xvbak augru.
Now, i have to use this table dynamically to check each and every record in the program:mv45afzz.
So, my problem is that, i have to dynamically pass these records which contains table name and its field name.
i can write as: xvbap-posnr = yvbap-posnr for all the three records (the values will come from sales order tranx, report: mv45afzz)
but in future if the records are added then i have to again change the code, so this shouldn't happen.
It should dynamically call all the records in this table and check the condition.
Thanx
RohithHello Rohith
What is your question???
You described a few ingredients of your scenario (not all of them) and do not really explain your requirements.
Given the descriptions of the Z-table fields I assume you need to check whether OLD values are equal to NEW values.
If this assumption is correct then the solution is quite simple (except for XVBAP / YVBAP: Does this mean single entries or looping over all entries?)
DATA:
lt_ztable TYPE STANDARD TABLE OF zstructure,
ls_ztable TYPE zstructure.
FIELD-SYMBOLS:
<lt_tab> TYPE table,
<ls_struct_old> TYPE any,
<ls_struct_new> TYPE any,
<ld_old> TYPE any,
<ld_new> TYPE any.
" Read entries from z-table
SELECT * FROM ztable INTO table lt_ztable.
LOOP AT lt_ztable INTO ls_ztable.
ASSIGN (ls_ztable-tabold) TO <ls_struct_old>.
ASSIGN (ls_ztable-tabnew) TO <ls_struct_new>.
ASSIGN COMPONENT (ls_ztable-fldold) OF STRUCTURE <ls_struct_old> TO <ld_old>.
ASSIGN COMPONENT (ls_ztable-fldnew) OF STRUCTURE <ls_struct_new> TO <ld_new>.
IF ( <ld_old> = <ld_new> ).
" do something...
ENDIF.
ENDLOOP.
For the sake of simplicity I did not add the required statements for checking successful ASSIGN's.
Regards
Uwe -
Dynamic call for a ref cursor: ORA-21779
Hi,
Here is an environment:
create or replace
PACKAGE PKG_GETDATA AS
TYPE cursor_type IS REF CURSOR;
Procedure SimpleGet (cData In Out Cursor_type);
Procedure DynamicGet (cData In Out Cursor_type);
END PKG_GETDATA;
create or replace
PACKAGE BODY "PKG_GETDATA" AS
Procedure SimpleGet (cData In Out Cursor_type) As
Begin
Open cData For
Select 1 from Dual;
End SimpleGet;
Procedure DynamicGet (cData In Out Cursor_type) As
Begin
Execute Immediate 'Begin PKG_GETDATA.SIMPLEGET(:1); End;'
Using In Out cData;
End DynamicGet;
END PKG_GETDATA;
So- first simple get works fine:
Declare
cData PKG_GETDATA.Cursor_type;
aNumber Number;
Begin
PKG_GETDATA.SimpleGet (cData);
LOOP
FETCH cData INTO aNumber;
EXIT WHEN cData%ROWCOUNT > 5 OR cData%NOTFOUND;
dbms_output.put_line (aNumber);
END LOOP;
close cData;
End;
BUT dynamic call does not works at all!:
Declare
cData PKG_GETDATA.Cursor_type;
aNumber Number;
Begin
PKG_GETDATA.DynamicGet (cData);
LOOP
FETCH cData INTO aNumber;
EXIT WHEN cData%ROWCOUNT > 5 OR cData%NOTFOUND;
dbms_output.put_line (aNumber);
END LOOP;
close cData;
End;
It throws ORA-21779 exception; what is more- it does work on 10.2 db version but does not work on 11.2 version! Could anyone explain that?
Regards
Bartlomiej D.Hi,
Believe me, it may be very handful while working with handlers.
Anyway- could anyone help me on that?
Regards
Bartlomiej D. -
Dynamic call of a vi with a reference stored in a global variable
Hello,
I am trying to program a VI which calls DAQmx functions in some cases, in other cases DAQmx may not even be installed. To prevent a broken arrow on machines where DAQmx is not installed, I want to use a sub-VI containing the DAQmx function calls which is called dynamically by a main VI. For speed I want to prevent continuous opening and closing the VI reference, so I want to store the reference to the sub VI in a global variable. In this variable I also want to store the Analog Input Task. I want to use an initialization VI to write the VI reference of the sub VI and to configure and start the Analog Input Task and write the Task ID to that Global, too. In that way I was hoping to be able to improve the performance of the dynamic calls and the Task calls. BUT - when I write the refererence and task to the Global and read it out from another VI, the reference is not valid anymore and the Analog Input task is also not valid, even if both the initialization VI and the Global are still open (but not running). Does somebody have an idea how to solve that? It is a bit difficult to describe, so here is what I want to do in a shorter description :
- run a initialization VI which
defines a reference to a sub VI which will be called dynamically later on
and a AI task ID definining a DAQmx physical channel configuration to use for subsequent read cycles
and writes both (VI reference and AI task) to a global variable
- run another VI which
reads the VI reference of the VI to call dynamically from that global
runs the corresponding VI dynamically
the dynamically called VI performs an AI task corresponding to the DAQmx task ID read from that global (it reads an analog value for instance from the
physical channel configured by that AI task)
Why all that? To prevent creating and destroying the VI reference for each call of the sub VI for speed. And to use the configured DAQmx channel for subsequent read tasks only if the subVI is called dynamically - if it is not, then the application will not see the DAQmx calls and therefore no broken arrow will occur if no DAQmx is installed on the machine.
Can somebody help me with this? Why can't I store and read out the reference to the sub VI to/from a global, and why is the AI task not valid when read out from the dynamically called sub VI? I am somewhat lost with all that...
Thanks in advance,
GabsUh - I am almost getting crazy with that
Kevin, that solution is the right one for programming an application. In that case everything will work fine. But during testing, it is more convenient to call all VIs from their front panels one after another. That's how I'm doing it for everything that needs to be exchanged between such VIs: store them either in a global or in a functional global variable. In that way the user can "play around" with the VIs without wiring them together in a main VI. Therefore, after some thinking I liked Davids idea with that daemon VI (I solved that by adding a boolean in the initialization VI to choose if that daemon is necessary - during testing phase - or not - when using the VIs in a main application). BUT:
David: It does not work!!! I have exactly done what you proposed and this daemon VI is really running, having a True/False frame with a constant of False wired to the selector and holding both the functional global and the dynamically to call VI in the True frame. In that way, after initialization is finished, both VIs are still running but idle. Anyway, when I read back the value of the reference or the DAQmx task, it is invalid again!
That really costs just too much time. Does anybody have any idea what to do now? David, I was hoping that your suggestion would solve the problem, because it would be logical that it would - why then is LabVIEW destroying the reference and task anyway even if that daemon VI containing the functional global is still running???
Regards,
Gabs -
Dynamic call of a static method of an static attribute
Hi all,
is it possible to call dynamically a static method of a static attribute of a class.
The statement without dynamic call would look like this:
cl_test_class=>static_attribute=>static_method( ).
I would like to do it like this:
('CL_TEST_CLASS')=>static_attribute=>static_method( ).
Netiher the one nor the other way works for me - I'm getting the error "The notation used is reserved for business object classes".
Regards, StefanI guess, it is not possible to call method using the short form (parameters in brackets) is not possible in Dynamic Access. You may need to get the attribute first and then call the method.
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
CLASS-DATA: o_same TYPE REF TO lcl_main.
METHODS: run.
ENDCLASS. "lcl_main DEFINITION
CLASS lcl_main IMPLEMENTATION.
METHOD run.
WRITE: 'success'.
ENDMETHOD. "run
ENDCLASS. "lcl_main IMPLEMENTATION
START-OF-SELECTION.
DATA: lo_same TYPE REF TO lcl_main.
CREATE OBJECT lcl_main=>o_same.
* lcl_main=>o_same=>run( ).
TRY.
FIELD-SYMBOLS: <fs> TYPE REF TO lcl_main.
ASSIGN ('LCL_MAIN')=>('O_SAME') TO <fs>.
CALL METHOD <fs>->('RUN').
CATCH cx_root.
ENDTRY.
Regards,
Naimesh Patel -
Upgrade : Issue with Specical character being used in 4.6C ( Dynamic calls)
Hi ,
We are working on Upgrade from 4.6C to ECC6.0 . in SPAU phase we are facing an issue :
When we are trying to see the variants from the program, it says that the program contains Syntax Error
"In Unicode programs, the "&" character can not appear in names as it does here in the name 'op&xv0' "
The 'op&xv0' is a form. we tried changing the form name, but couldnt get the PERFORM stmt for the form and it might be a dynamic call. what can we do for this type of programs?
Please also suggest how we can identify the places where that particular Subroutine is being called.
Thanks & Regds
TejaThis is probably an operation defined in Tcode PE04. You can change the operation subroutine name and then modify the code accordingly in the report.
Go to PE04 and put in operation name, suposedly &xv0.
Instead of using standard name suggested by SAP use custom name (for example opYvx0) and then change in the report as well and it should be ok. -
How to dynamically call image in PDF for Acrobat ver 8.1 onwards?
Hi Experts,
I am using Web Dynpro Java. My requirement is to call the images dynamically on a PDF form. There are no of company code. I have to call different logos for different company codes/
We are now using Acrobat 8.1.1. Please refer following thread.
http://kb2.adobe.com/cps/405/kb405270.html
From Acrobat 8.*, we have to use some different method for dynamically calling the images. Earlier we were using the concept mentioned below to dynamically call images.
However this method is not applicable for Acrobat Reader 8.* onwards due to security reasons.
Click on the Layout tab and choose None for the Caption position.
u2022 Click on the Object, then the Binding tab and choose None for Default Binding.
u2022 Click on the Field tab, enter $record.SapOnlineShopUrl for the URL entry, and select Use Image Size for the Sizing field.
u2022 Click on the script editor and enter the following FormCalc script statement, which enables the dynamic integration of the image. Show: initialize Script: this.value.image.href = xfa.resolveNode(this.value.image.href).value; Language: FormCalc Run At: Client
write following code in wddoinit
try { String url = WDURLGenerator.getAbsoluteWebResourceURL( wdComponentAPI.getDeployableObjectPart(), "sap_online_shop.jpg"); wdContext.currentDataSourceElement().setSapOnlineShopUrl(url); } catch(Exception e) { throw new WDRuntimeException(e); }
Please let me know what is the alternate method for Adope ver 8.1.1
Regards,
GaryHi Gary,
First you upload the image in SAP through se78.then write the below code in your adobe form interface.
data : v_object type TDOBJECTGR value 'GRAPHICS',
v_id type TDIDGR value 'BMAP',
v_btype type TDBTYPE value 'BCOL',
V_FIELD TYPE XSTRING.
V_NAME = 'ZW_DEVMAN_LOGO'.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = v_object " 'GRAPHICS'
p_name = v_name " Name of the logo as in se78
p_id = v_id " 'BMAP'
p_btype = v_btype " 'BCOL' ( whether the image is in color or black and white )
RECEIVING
p_bmp = v_field
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
g_logo = v_field.
Declare g_logo as xstring in global data.
In context of the form make one graphic element with field g_logo and mime type BMP.It will work.
Regards,
Simi A M
Edited by: amsimi on Jan 26, 2011 5:30 AM -
Message zclass not found in Programs (possibly dynamic calls!)
Hi Experts,
When we are running MIRO transaction, Zmessage error is triggering. when i double-click on error message it is showing
"Message ZFI 002(Class) not found in Programs (possibly dynamic calls!)"
Please provide your solutions to resolve the issue.
Regards,
Bharat
Moderator message: please do some research before asking.
Edited by: Thomas Zloch on Mar 15, 2011 9:21 AMDear Miciuli,
I found the definition for the circle in the canvas class and used it to creates circles ! Thank you for jaring my brain into thinking !
Stan
Ellipse2D.Double circle = new Ellipse2D.Double(xPos, 70, 30 , 30); -
How to call the XML file as PrivateResourcePath in JSP
Hi All,
I want to call the layer-config.xml values in JSP dropdown list. How to call the XML file as PrivateResourcePath in JSP... please advise me if any solution.
locaiton: dist/PORTAL-INF/layer-config.xml
<?xml version="1.0" encoding="utf-8" ?>
- <layer-config>
- <system>
<layer>Test</layer>
<internal>true</internal>
</system>
- <system>
<layer>Test1</layer>
<internal>false</internal>
</system>
- <system>
<layer>Test3</layer>
<internal>false</internal>
</system>
</layer-config>
Thanks in advance.Hi,
The below link may help you.
[Accessing image from dist/imgaes folder inside JSPDynpage Component;
Regards,
Suresh Bachimanchi -
Hi, I am new to livecycle and wondering if there is any sample for setting up the dynamic table with XML schema so I can access the data through workbench's xpath. thanks.
Ivor,
Take a look at the samples shipped with Designer. For 8.2.1 release take a look at
C:\Program Files\Adobe\LiveCycle Designer ES\8.2\EN\Samples\Forms\Purchase Order\Schema\Schema\Purchase Order.xsd
and the form samples.
Otherwise, forward a request to [email protected] I would be happy to send you a sample XDP with a dynamic table and a schema.
Steve -
Unexpected delay when dynamically called VI closes
LV10.0 / WXP
A VI is called dynamically by Run VI Method (Wait Until Done = FALSE, Auto Dispose Ref = TRUE).
Queues are used to exchange data with the main VI.
When this VI closes ("stop" message from the main VI), LabVIEW hangs for about 25 seconds (!) with one of the CPUs of the dual core machine at 100%.
Has anyone else encountered this strange behaviour ? Any ideas ?
Many thanks in advance
Solved!
Go to Solution.Norbert B a écrit :
Can you give us a small picture of the way you are calling and releasing the subVIs?
As mentionned in my first message : Run VI Method (Wait Until Done = FALSE, Auto Dispose Ref = TRUE) is used to call the VIs.
Release : after reception of a "close" message (queue), the dynamic VIs terminate their execution
If called with Auto Dispose Ref = FALSE, the freeze appears when Close Reference is executed in the calling VI (after reception of a "I'm closing" message from the dynamic called VI).
If loading the VI takes only a short time but unloading takes long, it seems to me that those subVIs allocate many new handles/memory spaces during runtime. Is that the case?
As mentionned in a previous message : The memory usage changes from about 687 to 676 MB when the four
instances are closed. The number of handles decreases from about 272k to
61k.
This sounds like the whole application freezes for the time being. Is it a single loop architecture?
No. It is a rather big application with several VIs running independently and exchanging data through queues.
In addition: You call those subVIs dynamical with reentrant execution (at least some of them). So they should run in parallel.
Yes, they run in parallel.
Did you configure different preferred execution systems for your different subVIs?
Yes, I have tried several combinations and also changed the Priority. I also tried to replace the While Loop of the VI which communicates with the PLC by a Timed Loop in order to specify the processor. Unfortunately all my trials ended without any succes.
Did you check for reference leaks using the Execution Trace Toolkit?
Yes. There are none.
Norbert
Thank you very much for your help -
How Do i Call An xml publissher and a jsper report from ADF pages
Hi All
How Do i Call An xml publissher and a jsper report from ADF pagesI used the above links to create XML's and from there a formatted report of data from the database. I accomplish this by connecting to the database inside the XMLPublisher.java file. I also have my query hard-coded inside the DataTemplate.xml to extract the info from the database. This limits my ability on what the user can accomplish with the system.
Is it possible to run my reports based on an iterator within Jdeveloper, as opposed to having to manually enter the query and connect to the database within the XMLPublisher.java file and the template.xml?
Thanks.
Maybe you are looking for
-
ITunes Upgrade results in no access to ITunes Store
I've recently downloaded the latest version of Itunes (9.2.1.5) as since doing so I cannot access the ITunes Store. Prior to downloading this laterst version, I had no trouble with access. I've tried deleting the download and re-installing it, and I'
-
HT201272 How can i download from two different accounts without the 90 day rule?
I have two Apple IDs because I had lost the other one and made a new one. I recently bought a new computer and went I also found my old password for my first ID. I downloaded my purchased from the first one and now it is telling me I have to wait 90
-
TS1538 help! my ipod update failed now is stuck in recovery
if anybody could help id really appreciate it. i've tried all the steps on apple help but nothing is working. its stuck on the recovery screen and isnt showing in itunes, its driving me crazy! wish i hadnt bothered with the update now
-
How To Restore Deleted Table With It's Data To Specified Time Using 10g
Hello Everybody I would like to gain from your experience in the Felid of DBA so now i am not trying to restore the full database, but i have a stupid user dropped accedintaly a single table from the database. i want to restore this table after being
-
How do I activate the zoom option in my folders?
How do I activate the zoom option in my folders?