Cannot loop through values in Node
Hi Everyone,
I am using a TreeNestedInTable UI. I have 2 columns: a Master Column with a TextView Cell Editor, and a field called "Check" whereby one of the values in the Master Column can be selected. The "checked" attribute of the Check column is mapped to a isChecked attribute in my Node that contains all the data being displayed in the TreeNestedInTable (IncidentAgent Node).
I would like to loop through all the Check boxes ticked in this TreeNestedInTable and get the corresponding Value to write to a Test Node (to make sure that I am in fact reading all cheked rows).
I do not seem to, however, get all the values checked. Please see my code below and comment. I am testing and so I put a button on the screen that should loop through all the values and see which ones are checked. It should then write these checked valus to a node that is also linked to a table control on the screen. The Idea is that each time you check a few values they should be displayed in this table control when the button is pressed. This is not happening - the table stays blank.
public void onActionSeeIACollection(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionSeeIACollection(ServerEvent)
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
//New Element added each time:
ITEST_IA_NODEElement newElement;
//Incident Agent element:
IIncidentAgentElement agentElement;
//Loop through ALL the IncidentAgent Elements and see which ones hace got the "Check" value
//flagged:
for(int i=0;i<wdContext.nodeIncidentAgent().size();i++)
//Get the currently processed element:
agentElement = wdContext.nodeIncidentAgent().getIncidentAgentElementAt(i);
//If the Check value is flagged, add it to the TEST_IA_NODE node:
if(agentElement.getCheck())
newElement = wdContext.createAndAddTEST_IA_NODEElement();
newElement.setVALUE(agentElement.getVALUE());
msgMgr.reportSuccess(agentElement.getVALUE());
}//end if
}//end for
//@@end
Sure. Thank you for your help.
"Data Containing" Node:
h1 IncidentAgent(Top Level Node)
h2 RecursiveNode(Pointing to IncidentAgent as recursiveNode)
h4 Check (boolean attribute)
h4 ChildrenLoaded (boolean attribute for TreeNestedInTable)
h4 Expanded (boolean attribute for TreeNestedInTable)
h4 IsLeaf (boolean attribute for TreeNestedInTable)
h4 NODE_ID (attribute)
h4 PARENT_ID (attribute)
h4 VALUE (attribute)
Collection Cardinality: 0...N
Selection Cardinality: 0...N
Singleton: TRUE
Node that should contain VALUE attribute from node above if Check attribute above is checked
h1 TEST_IA_NODE
h4 VALUE
Collection Cardinality: 0...N
Selection Cardinality: 0...N
Singleton: TRUE
Similar Messages
-
How to loop through a Data Node
Hello,
I have an Interactive Adobe form in WebDynpro Java project.
My data View tab includes the following structure:
Bapi_test
ValueHelpData
CodeNumber
CodeDescription
Can someone please tell how I can loop through the ValueHelpData node, and get values for CodeNumber and CodeDescription
The ValueHelpData node has the cardinality of 0..n. and has approximately 100 elements.
Thanks. Your help is much appreciated.
Rob.Hi Robby,
You could try the following :
int n = wdContext.nodeValueHelpData().size();
for(int i = 0; i < n; i++)
wdContext.nodeValueHelpData().moveTo(i);
IPrivateMyDataView.IValueHelpDataElement ele = wdContext.currentValueHelpDataElement();
String codenum = ele.getCodeNumber();
String codedesc = ele.getCodeDescription();
// Any other processing logic..//
Hope this helps. -
Loop through values in rows to find faulty data
Hi all,
We have a column which is supposed to have values in increasing order.(If it doesn't comply with this rule, we want to discard the row). How do I loop through rows for a particular column, in SQL or PL.SQL?
Thanks.user12295995 wrote:
If it doesn't comply with this rule, we want to discard the rowNot sure what you mean. It looks like you want to get rid of duplicates. If so, use:
DELETE tbl WHERE ROWID NOT IN (SELECTMIN(ROWID) FROM tbl GROUP BY col)
/If you want to identify gaps, use:
with t as (
select 1 id from dual union all
select 2 id from dual union all
select 3 id from dual union all
select 4 id from dual union all
select 5 id from dual union all
select 11 id from dual union all
select 12 id from dual union all
select 13 id from dual union all
select 21 id from dual union all
select 22 id from dual union all
select 23 id from dual
select '[' || (prev_id + 1) || ' - ' || (id - 1) || ']' gap
from (
select id,
lag(id) over(order by id) prev_id
from t
where id > prev_id + 1
order by id
GAP
[6 - 10]
[14 - 20]
SQL> SY. -
Looping through all the Nodes at any Particular Level Specified
Dear Forum Members,
I have an XML File in the database in a Column of type XMLTYPE.
The Format is given below
<XML-SSDFILELIST>
<Training>
<BRKCD_STMNSWTINVIN_C Key="6707">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</BRKCD_STMNSWTINVIN_C>
<BRKCD_STREDSWTINVIN_C Key="6708">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</BRKCD_STREDSWTINVIN_C>
<VSACD_TIPER_C Key="7285">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSACD_TIPER_C>
<VSSCD_NTHRESPLA_C Key="6266">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_NTHRESPLA_C>
<VSSCD_QTHRESPLA_C Key="6267">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_QTHRESPLA_C>
<VSSCD_VDFL_C Key="6269">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VDFL_C>
<VSSCD_VMAX_C Key="6270">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VMAX_C>
<VSSCD_VMIN_C Key="6271">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VMIN_C>
<VSSCD_VTHRESPLA_C Key="6272">
<FINISHED><![CDATA[This is a Finished data ]]></FINISHED>
<CONTACT-NUMBER><![CDATA[This is a CONTACT-NUMBER data ]]></CONTACT-NUMBER>
<DEFAULT></DEFAULT>
<MIN></MIN>
<MAX></MAX>
<UNIT></UNIT>
<FORMULA></FORMULA>
<FORMULA-DESC></FORMULA-DESC>
<ADVANCED-FORMULA></ADVANCED-FORMULA>
<INTERNAL-ADAPT-DESC></INTERNAL-ADAPT-DESC>
<DATA-DESC-REPORT></DATA-DESC-REPORT>
<REV-DESC></REV-DESC>
</VSSCD_VTHRESPLA_C>
</Training>
</XML-SSDFILELIST>
Is there any way I can Loop through all the Child records at 3rd Level(Bolded Level in the File).
Regards
Madhu.check this blog,
http://www.oracleappshub.com/11i/oracleapps-responsibility-vs-sap-functions/
Re: How to change OM responsibility as read-only in oracle applications 11i
read only responsibility-user -
SSIS question - loop through values in textfile
I am new to SSIS and am trying to create SSIS package.
I have value per line in a text file. There is a table consisting of records with each of the values in the text file. The SSIS package should generate text files for each of the value in the text file with the data from the table.
Details:
Text File – abcd.txt
10
11
12
13
Table
1
10
2
11
3
12
4
13
5
10
6
11
7
12
8
13
9
10
The SSIS package should create the following text files with the records that are associated with 10, 11,12 and 13:
10.txt
11.txt
12.txt
13.txt
Thanks in advanceThe package looks like below
1. Add a data flow task to get contents from file onto a staging table (flat file source & oledb destination)
2. Execute SQL task to populate object variable with ID list from staging table
add a object variable in SSIS (@[User::IDList]), use query as below in execute sql task
SELECT ID FROM STagingTable
Set resultset option as FullResultSet and map index 0 to IDList variable in resultset tab
3. Add a ForEachLoop with ADO enumerator and map to IDList variable. Add another int variable ID to receive iterative values
4. Inside Loop add a data flow task with OLEDB Source pointing to table.
use query as
SELECT *
FROM Table
WHERE IDField = ?
map parameter0 to [User::ID] variable in parameter mapping
link to flat file destination and set connectionstring property to expression like below
"<your file folder path>\" + (DT_STR,10,1252) @[User::ID] + ".txt"
to make filename dynamic
execute the package and you'll get different files created for each ID value with related data
similar logic is also explained here with only different being data going to different tabs of excel
http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Need to loop through Recursive node
Hi Everyone,
I am having troubles looping through a node to get a boolean value called "Check".
Basically I am using the TreeNesteedInTable UI. One of the columns I display is the "Check" mentioned above. Basically the user can go through the tree structure and check his/her options. I should then be able to loop through this structure to get all the records "Checked". My application is not doing this.
At the moment I am looping through the top level node - think this is where my probelm is because this node can only be singleton! This means that I then have to loop through the Recusrsive node of this type to get the values as the recusrive is always non-singleton en must therefor contain the elements I am looking for. But, i do not know how tho get access to this node. Is this the correct way of doing it, or how should it be done otherwise?
Many thanks,
ChristiaanHI,
I got it to work like this:
public void addICAMForIncident( ) {
//@@begin addICAMForIncident()
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
try {
int count;
Bapi1240_Rc rootCause;
IPublicEhs_icam.IAbsentOrFailedControlsElement existingAbsentOrFailedControlsElement;
IPublicEhs_icam.IAbsentOrFailedControlsElement recursive;
IPublicEhs_icam.IAbsentOrFailedControlsElement recursiveChildElement;
IPublicEhs_icam.IAbsentOrFailedControlsNode recursiveChildNode;
// if(wdContext.nodeAbsentOrFailedControls() != null){
// set header data:
wdContext.currentHeader_CreateElement().setRecord_No(wdContext.currentHeader_GDElement().getRecord_No());
wdContext.currentHeader_CreateElement().setRecno_Root(wdContext.currentHeader_GDElement().getRecno_Root());
wdContext.currentHeader_CreateElement().setIncident(wdContext.currentGPInputNodeElement().getIPIncidentNum());
//Top Level Node (Singleton)
existingAbsentOrFailedControlsElement = wdContext.currentAbsentOrFailedControlsElement();
//We need to go through the values of the RECURSIVE node as that is where the values are!
//Each time we expand a node in the tree this recursive node is filled with values
for(int i = 0;i<existingAbsentOrFailedControlsElement.nodeRecursiveAbsentOrFailedControl().size();i++)
recursiveChildNode = existingAbsentOrFailedControlsElement.nodeRecursiveAbsentOrFailedControl().nodeRecursiveAbsentOrFailedControl(i);
for(int m = 0;m<recursiveChildNode.size();m++)
recursiveChildElement = recursiveChildNode.getAbsentOrFailedControlsElementAt(m);
if(recursiveChildElement.getCheck())
//New line in the "table":
rootCause = new Bapi1240_Rc();
rootCause.setFunction("009");
rootCause.setHierarchy_Key("EHS_IAL_STD");
rootCause.setNode_Key(recursiveChildElement.getNODE_ID());
rootCause.setRef_Recno(wdContext.currentHeader_GDElement().getRecord_No());
rootCause.setRef_Object("IAL");
rootCause.setRef_Recno_Smeas("0");
rootCause.setPrimarykey("00000000000000000001");
rootCause.setForeignkey("00000000000000000001");
rootCause.setFlgfrgnkey(true);
rootCause.setFlgprimkey(true);
rootCause.setFlag_Selected(true);
//add the line to the "table":
createInput.addRootcause(rootCause);
}//end if
}//end for
}// end for
// execute:
wdContext.currentBapi_Bus1240_Create_InputElement().modelObject().execute();
// invalidate the output structure:
wdContext.nodeOutput_Create().invalidate();
} catch (CMIException ex) {
msgMgr.reportException(ex.getLocalizedMessage(), true);
//@@end -
How to loop through attributes
Im trying to loop through some XML and use the two attributes
name and href for each button im creating. so far all I have been
able to do is onfuse myself, well not totally - I can pull the
first name attribute from the firstChild. But I have not been able
to successfully assign it to a button. I took out my button code as
it was probably wrong. Heres what Ive tried...The arrays are built in an event, so before that event
happens, they are undefined. After the event, you can access the
arrays as usual. The trace(menus); call is before the
myXML_xml.load("menu2.xml"); line, which triggers the loading, so
it can't trace any values. It also wouldn't trace anything when
placed directly after the load() call, because the loading will
take some time until all data is loaded and the onLoad event is
fired. That makes it a bit hard to use the data outside the event,
because you must assert that it's loaded when used. The onLoad
event is just perfect for that, so it should be done there, just
after the loop through the xml nodes.
For the submenus, the attached code will place the childnode
data in subMenus. The arrays must be declared outside the event,
otherwise they get deleted when the event finishes.
cheers,
blemmo -
I am looking for an example of how to loop through an xml structure, preferrably in VBScript, but I will take a Javascript example and try to figure out how to adapt it.
Is a FOR EACH loop possible? In normal VBScript you can do something like this...
‘strQuery = “/ProfilesInfo/Profiles/ProfileInfo/Profile/Fields/Field [Name='ProfileUri' or Name= 'Age'] /(Name|Value)”
Set colNodes = xmlDoc.selectNodes( strQuery )
If colNodes.length>0 Then
For Each objNode in colNodes
Print objNode.nodeName & “: ” & objNode.text
Next
is it possible to do something like this with XML? Maybe something like
For each node in myDocument.XMLElements.Item(1)
{do something}
Next
If there is a better way, and I am sure there is, I'll take an example of that instead.
I am sure there is probably a way to do it with XPath, but I haven't been able to find any examples of using XPath with VBScript.
If anyone has an example of how to use XPath with VBScript I would greatly appreciate it.
Thank youKasyan, thank you for the reply. I looked at that part in the book and I have tried using the example code, but I am having difficulty in understanding how it is being used, maybe you, or someone can help to explain it.
So in an example like this:
Class ProcessChildrenRule
Public Property Get name
name = "ProcessChildrenRule"
End Property
Public Property Get xpath
xpath = "//XMLElement"
End Property
Public Function apply(myXMLElement, myRuleProcessor)
glueCode_processChildren(myRuleProcessor)
With myXMLElement
myXMLElement.XMLattributes.Item(1).Value
myStory.InsertionPoints.Item(-1).Contents =
.XMLAttributes.Item(1).Value & vbCr
End With
apply = false
End Function
End Class
There are 5 things that I am not understanding.
1. How is "xpath" being used? I don't see another occurance of it other than when the variable xpath is set.
2. How is name being used? I don't see another occurance of it other than when the variable name is set.
3. Why is "Public Function apply" created in each class? In the examples in the book, that function exists in each Class. Why not just create the function outside of the class and call it from inside the class?
4. Where is the "apply" function being called from? It doesn't get called from inside or outside the class on the example pages anywhere?
5. Where are the values of myXMLElement and myRuleProcessor being set before they are used in the function?
Even in the examples you gave, once I set the xpath value, what do I do with it after that? How do I write out the value of what I am searching for with the xpath?
So going back to my original question, if I set xpath = "/devices/device", how do I loop through each "device" node and write them out? That is where it is breaking down for me. I haven't seen any examples in the book or in the downloaded example code that show how to do that. -
Loop through Query String in ASP
Hi,
I am new to ASP and am trying to loop through values in a
query string
separated by a comma, for example:
/site/search/results.asp?ids=19736a,20248a,14952a,19956a
I need to construct SQL from this something like
SELECT * FROM MyTable WHERE
ID = 19736a OR
ID = 20248a OR
ID = 14952a OR
ID = 19956a
I am just unsure on how to separate all the values from the
query string.
Thanks for your advice.Oh, in the example below there is no space between the id
numbers in the
querystring.
eg. ids=1,23,456,2
If you do have spaces then you need to adjust the split
accordingly
eg. ids=1, 23, 456, 2
you would use myIdArray=split(idStr,", ")
note the space after the comma.
just make sure you always use the same format in your
querystring
Justin
"Justin Reid" <[email protected]>
wrote in message
news:e6osem$dfj$[email protected]..
> You need to create an array of ids and then add them to
your SQL.
> Something like:
> <%
> If Request.QueryString("ids") <> "" Then
> Dim idStr, cnt, varID
> 'get the string of id'
> idStr = Request.QueryString("ids")
> 'create the array
> myIdArray=split(idStr,",")
> cnt=0
> 'loop though the array and add to a new string
> for i=o to ubound(myIdArray)
> If cnt > 0 Then varID = (varID & " OR")
> varID = (varID & " id = " & cStr(myIdArray(i)))
> cnt=cnt+1
> next
> End If
> %>
>
> Then simply add you new SQL segment to your recordset.
> Something like
>
> SELECT * FROM MyTable WHERE" + Replace(varID, "'", "''")
+ "
>
> Hope that helps
>
> Justin
>
> "Shaun" <[email protected]> wrote in
message
> news:e6ole1$56v$[email protected]..
>> Hi,
>>
>> I am new to ASP and am trying to loop through values
in a query string
>> separated by a comma, for example:
>>
>>
/site/search/results.asp?ids=19736a,20248a,14952a,19956a
>>
>> I need to construct SQL from this something like
>>
>> SELECT * FROM MyTable WHERE
>> (
>> ID = 19736a OR
>> ID = 20248a OR
>> ID = 14952a OR
>> ID = 19956a
>> )
>>
>> I am just unsure on how to separate all the values
from the query string.
>>
>> Thanks for your advice.
>>
>
> -
SSIS - Loop through files from a file path based on the value in the variable
Experts,
I have a requirement where I'll be loading multiple files in to a SQL server table and archive the files when loaded. However, the challenge is , the file path should be dynamic based on the value of a variable (say, @ProductName).
For example: If I am running the package for variable @ProductName="Product", the file path would be "\\....\Src\Product", in that case the ForEachLoop will loop through all the files in that folder, load them to the table and Archive
the files to the "\\....\Src\Product\Archive" folder.
Similarly, if the @ProductName="Product_NCP", the foreachloop container should loop through files in the "\\....\Src\Product_NCP" folder, load them to the table and archive them to the ""\\....\Src\Product_NCP\Archive"
folder.
Any suggestions? I should be able to run the package manually just by passing the "@Product" value, create Archive folder if it doesn't exist, load the data and archive the files.Yes
1. Have a variable inside SSIS to get folder path. Set path based on your rule using an expression
like
(@[User::ProductName] == "Product" ? "\\....\Src\Product" : (@[User::ProductName] == "Product_NCP" ? \\....\Src\Product_NCP:..))
similary archive
(@[User::ProductName] == "Product" ? "\\....\Src\Product\Archive" : (@[User::ProductName] == "Product_NCP" ? "\\....\Src\Product_NCP\Archive" :..))
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Loop through tables based on data dict values
Hi,
I working on an old v7.3.4 database that I'm not familiar with and I want to loop through the tables and count the occurrence of a field value based on table names i've retrieved from the data dictionary. None of the tables have relational keys defined.
In a cursor I can loop thru all_tab_columns and load variables with the table, column names, and the datatype, but then I want to use these values in a second nested cursor to loop through each table found by the first cursor.
When I do :
Select var_colname from var_tabname
i get
The following error has occurred:
ORA-06550: line 23, column 10:
PLS-00356: 'V_TABNAME' must name a table to which the user has access
ORA-06550: line 22, column 5:
PL/SQL: SQL Statement ignored
ORA-06550: line 22, column 12:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 27, column 7:
PL/SQL: SQL Statement ignored
so it would seem I can't use a variable to substitute the table name in the 'from' clause. Does anyone know of a way round this ?
Thanks in advanceHi,
You will have to use dynamic sql to create your second cursor.
DECLARE
v_sql_query VARCHAR2(400);
TYPE cur_typ IS REF CURSOR;
c1 cur_typ;
mYRec MyTable%rowtype;
BEGIN
v_sql_query := 'select * from MyTable';
OPEN c1 FOR v_sql_query;
LOOP
FETCH c1 INTO mYRec;
EXIT WHEN c1%NOTFOUND;
EXIT WHEN c1%NOTFOUND IS NULL;
/*processing here*/
END LOOP;
CLOSE c1;
END;
Regards -
Loop through tree node children recursively
Is there an easy way of looping through all the child nodes of a MutableTreeNode and the children of those children if they have any?
ThanksWith a recursive function (this is depth first):
public void traverse(Node node) {
// do something with node
for(Node child : node.getChildren()) {
traverse(child);
}You could also look at depthFirst/breathFirst/preorder/postorderEnumeration() methods on DefaultMutableTreeNode if that's what you actually got. -
Tree control loop through nodes
Hi All,
I have a tree control. I want to loop through the nodes and
add all the nodes to an array collection.
How do I do it?
Thanks in advance;
JoshIt depends on the data type of the dataProvider.
If XML, then myXML.descendants(); will return an xmlList of
all nodes. You could loop over the XMLList and build an
ArrayCollection
If the dataProvider is a collection, then you will need a
recursive function to process the dataProvider.
Tracy -
Questions reg Looping through a Node inside a Currently Selected Node.
i have the following context structure in my WD application.
Parent Customer Node A<Cardinality 1.n & Selection 1.n & Singleton True>
Child Addresses Node B<Cardinality 1.n & Selection 1.n & Singleton True>
Child Attribute B.City
Child Attribute A.Name
Child Attribute A.Age
For the currently selected Parent Customer Element, i want to read the all the addresses this customer has. How to read all the addresses of the customer and loop through it & show it.
Any inputs are appreciated.Hello Saravanan,
Please use the Singleton Concept.
Refer the following links.
http://help.sap.com/saphelp_nwce711core/helpdata/en/47/be673f79c8296fe10000000a42189b/frameset.htm
http://wiki.sdn.sap.com/wiki/display/WDJava/SupplyFunctionin+Webdynpro
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60086bd5-9301-2b10-6f97-a14366a5602b/
if you have doubt in implementation then let us know.
Regards
Nizamudeen SM -
Looping through DOM nodes ....
Hi,
I am having a problem looping through the DOM tree and inserting the nodes into my table correctly.
here is the basic structure of my XML file:
<root>
<row>
<user>
<db>
<data>A</data>
<data>B</data>
</db>
</user>
<user>
<db>
<data>A</data>
<data>B</data>
<data>C</data>
</db>
</user>
</row>
</root>
now, I need to put the text in the data-tag into a table, but since I dont know how many elements there are how in the world would one be able to insert the correct amount? Is there an Xpath-function that can count the nodes for me? I need some assistance or examples on PLSQL code for this please. I have so far just gone through with a for-loop with a delimiter=xmldom.getLength(mynodes) but that only measures the very first users data-tag, and that leaves the rest kinda in a lotto situation if the db-elements below have more or less data-elements than the first one. In addition its inserted a blank in the field in the table(not good).....
thanks for any help or assistance,
SvenHi,
I am having a problem looping through the DOM tree and inserting the nodes into my table correctly.
here is the basic structure of my XML file:
<root>
<row>
<user>
<db>
<data>A</data>
<data>B</data>
</db>
</user>
<user>
<db>
<data>A</data>
<data>B</data>
<data>C</data>
</db>
</user>
</row>
</root>
now, I need to put the text in the data-tag into a table, but since I dont know how many elements there are how in the world would one be able to insert the correct amount? Is there an Xpath-function that can count the nodes for me? I need some assistance or examples on PLSQL code for this please. I have so far just gone through with a for-loop with a delimiter=xmldom.getLength(mynodes) but that only measures the very first users data-tag, and that leaves the rest kinda in a lotto situation if the db-elements below have more or less data-elements than the first one. In addition its inserted a blank in the field in the table(not good).....
thanks for any help or assistance,
Sven
Maybe you are looking for
-
When using File Upload functionality of Servlet3 specification, other item's value(<input type="text">) was garbage characters. Need special settings? WebLgic12c(12.1.2.0)のファイルアップロード機能(Servlet3仕様の機能)にて.アップロードファイル以外の項目の値が文字化けしました. これは.何か設定が必要なのでしょうか?
-
Serious Windows Crash when updating 5G iPod
About halfway through updating the videos on my 5th gen iPod, windows displays a blue screen saying: "A problem has been detected and windows has been shut down to prevent damage to your system". Then my computer turns off. When I plug my iPod in aga
-
Dialog process time out !!!
Hi experts, I am trying to execute a function Module(with RFC) that triggers a dialog process. Now the system time out limit for a dialog process is 10 mins and my process is taking longer than that, hence its giving a "Time Out" dump. Is there a wa
-
while processing file in Indesign CS2 below problem accours, I check all components embeeded in indesign file as individual PDFs and decrease resoulation problem still preflight fails File produced the following import errors: PostScript Error: %%[ E
-
Can't seem to select clips in Canvas in FCE 3.5
For some reason, I can no longer select my individual clips to scale them, move them around or add keyframe in the canvas. I get a solid Cyan line around the clip, but no handles to drag. Probably clicked something inadvertantly & have no idea what i