Dynamic table copy procedure
Hello,
I wanted to do a copy from one table to another, insert into foo (select * from bar), buy the tables contain a long column so it was a no-go.
Has anyone written a generic procedure for copying data from one table to another using dynamic query generation, e.g. with the signature
copyTable(in_table in varchar2, out_table in varchar2, where_clause in varchar2)?
I ran into troubles when I don't know what to fetch the matching source table rows into in the cursor. Help would be appreciated.
Thanks in advance
-Nik
Look here for ideas:
http://asktom.oracle.com/pls/ask/f?p=4950:8:7186968737321877362::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:584023239495,
Similar Messages
-
I need to dynamically copy several tables from a different system to a target system. I need to commit after a specified number of rows rather than commiting after the copy is finished. The problem I have is that the columns in each table are different and would like to dynamically copy all columns without hard-coding the column names. IE: I need something like this:
Insert into table A select * from table B@DBLINK;
Bit I would like to commit after a few hundred rows. Additionally I am implementing this in a PRO*C program. Any ideas or examples?Imp and Exp are not options. Hereâs the deal:
I have several systems that replicate certain tables to other systems using Asynchronous Replication. If one of these systems fail, I need to restore the failed system from another system. Archiving is not an option, since the database changes every second. So I would like to dynamically copy the replicated tables from a remote system to restore this system. Preventing DML on the system I am copying from is not a problem.
I know I need to use Dynamic SQL method 4, I have already coded the log to dynamically get the table data this. The only problem I have now is figuring out how to dynamically inset the data in the new table (the data extracted from the other table is placed in a structure called SQLDA). Now how do I insert it? -
Copying fields froma dynamic table
i have a dyanmic table say t1. now i have craeted another dynamic table say t2 with some fields in common with table t1. i won't be knowing which fields are in common. the common fields will be stord in another table t3. now i need to copy the common fields from t1 to t2 after reading them from t3. how do i go about it???
TYPES:
BEGIN OF s_t3.
INCLUDE TYPE A.
INCLUDE TYPE B.
TYPES:
END OF s_t3.
DATA:
t1 TYPE TABLE OF A,
t2 TYPE TABLE OF B,
ls_t3 TYPE s_t3,
t3 TYPE TABLE OF s_t3.
FIELD-SYMBOLS:
<fs_t1> TYPE A,
<fs_t2> TYPE B.
LOOP AT t1 ASSIGNING <fs_t1>.
READ TABLE t2 ASSIGNING <fs_t2>
WITH KEY
[key_t2] = [key_t1].
CHECK sy-subrc IS INITIAL.
MOVE-CORRESPONDING <fs_t1> TO <ls_t3>.
MOVE-CORRESPONDING <fs_t2> TO <ls_t3>.
APPEND ls_t3 TO t3.
ENDLOOP. -
Procedure for creating dynamic table
Hi! I'm having a problem with creating a table with the help of procedure. The thing is, I want to pass an (possibly an array of) unknown amount of values - column names, types - to the procedure, that I defined, and then be able to create a (temporary) table with the received data. Possible? Maybe you could give me some hints - any help appreciated.
899749 wrote:
Yes, not literally there are million fields, of course :) What I was trying to say -> there are too much fields to create a hidden field array each time, and honestly I don't like this because of content availability through source code.Statement does not make sense.
If there are too many "fields" (databases have tables and rows and columns - not fields), then how does introducing a new database table reduce these? It is far simpler to only select the rows required, the columns needed for display, and building a "field array" using that - assuming that your definition of such an array matches mine...
Besides the saneness and logic of using dynamic tables, there are performance considerations. The slowest and most expensive database operation is I/O.
So what is your justification to spend a lot of I/O on duplicating existing data in the database? Why read data from tables to create so-called dynamic tables? Is that the best spend of database resources?
Don't know what forms you were talking about - the idea is to possibly use some programming (like php) + html to create a dynamic form. That's why I need a dynamic temporary table to pass the content around (no sessions, please).Forms are typically not dynamic. You do not point code at some arbitrary table structure and say "+form instantiate thyself+". This code will not understand the business rules and validation rules for properly displaying a data entry form for that entity, and applying the rules and logic for processing entered data and storing that in the table.
Forms are usually (almost always) coded as static - the entry fields are known at design time. The validation rules are known. The business logic to apply is known.
That begs the question as to not only what you are trying to do (it does not make sense!), but also why? What are the business requirements that need to be met? -
Send multiple rows to database from a dynamic table.
I'm using JSP for my application. I have a table that changes
in size depending on a value a user selects in a drop down list.
They can then enter some values into the table and click the submit
button. I know for whatever reason Dreamweaver only sends the first
row to the database and I've had a hard time finding good
examples/tutorials showing how I could make it send all the rows to
the database.
Is there a way for me to just do a while/for loop taking into
account the number of rows in the table? That would be ideal for me
as it sounds like the simplest method and I'm very new to web
development.
Should I be using the Server Behavior Builder or a Stored
Procedure and if so is there any good examples for those as I've
had a hard time working with any documentation/tutorials I've found
regarding them.
Any help would be greatly appreciated.Hey Baxter, thanks for the response. I guess I should have
been more specific when I said I was new to Web Development. I am
actually in Software Development where I primarily code in Java and
other OO languages. I have worked with a database before in java by
writing my own servlet. I have also done some HTML so jsp is very
good for me as it is mostly java with the odd bit of html
structuring with tables and such.
Languages like PHP and ASP I am not very familiar with and
most of the solutions I find for this very problem revolve around
ASP. I have just found it very hard to find a solution to this
problem. It seems like it isn't talked about very much even in
Dreamweaver's own documentation. If a stored procedure is the only
way to go then I think I can handle it with some guidance if anyone
knows of some tutorials/examples available.
Also is it really not possible to just go into the code and
somehow make it loop through each row in the table and execute a
prepared statement for each row? I've included some code of the
dynamic table I have and as you can see I have a Submit button on
its own outside of the table. If i had it inside then the user
would have to submit each row individually which isn't realistic
when there are many rows of data. Since the Submit is outside of
the while it only gets called once after the table is populated
thus sending only one row of data.
You might want to copy paste the code into a text editor as
some of the lines are long and may be hard to read here. If you
notice any errors in the table itself like mismatching column
headers it is because I changed some column names before attaching
it here so just assume that the table is all built correctly.
PS: I am going to be out of town for five days or so, so if I
don't reply to you right away don't think I disappeared from this
thread. Thanks again.
<div>
<h2>TableData</h2>
<form ACTION="<%=MM_editAction%>" METHOD="POST"
name="tabledata">
<table>
<% if (!Recordset1_isEmpty ) { %>
<tr>
<td class="head">Name1</td>
<td class="head">Name2</td>
<td class="head">Name3</td>
<td class="head">Code1</td>
<td class="head">Code2</td>
<td class="head">Old Status1</td>
<td class="head">New Status1</td>
<td class="head">Old Status2</td>
<td class="head">New Status2</td>
<td class="head">Year</td>
</tr>
<% } /* end !Recordset1_isEmpty */ %>
<% while
((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) { %>
<% if (szin11 ==2) {color11 = "#ECECEC" ;szin11=(0);}
%><tr>
<td><input type="hidden"
value="<%=((((Recordset1_data =
Recordset1.getObject("Name1"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Name1"
/><%=(((Recordset1_data =
Recordset1.getObject("Name1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Name2"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Name2"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Name2"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Name3"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Name3"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Name3"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<input name="Code1" type="hidden"
value="<%=(((Recordset1_data =
Recordset1.getObject("Code1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>" />
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Code2"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Code2"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Code2"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input value="<%=((((Recordset1_data =
Recordset1.getObject("Old Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Old Status1"
type="hidden" /><%=(((Recordset1_data =
Recordset1.getObject("Old Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input size="10"
value="<%=((((Recordset1_data = Recordset1.getObject("New
Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="New Status1"
type="hidden" />
<%=(((Recordset1_data = Recordset1.getObject("New
Status1"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input name="New Status1" type="text" size="5"
/></td>
<td><input size="10"
value="<%=((((Recordset1_data = Recordset1.getObject("Old
Status2"))==null ||
Recordset1.wasNull())?"":Recordset1_data))%>" name="Old Status2"
type="hidden" />
<%=(((Recordset1_data = Recordset1.getObject("New
Status2"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><input name="New Status2" type="text" size="5"
/></td>
<td><%=(((Recordset1_data =
Recordset1.getObject("Year"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>
<input name="Year" type="hidden"
value="<%=(((Recordset1_data =
Recordset1.getObject("Year"))==null ||
Recordset1.wasNull())?"":Recordset1_data)%>"
/></td></tr>
<% if (szin11 ==0) {color11 = "#FFFFFF"; szin11=(0);}
%>
<% szin11++; %>
<%
Repeat1__index++;
Recordset1_hasData = Recordset1.next();
%>
</table>
<p>
Comments<br />
<textarea name="comments" cols="40"
rows="4"></textarea>
</p>
<p>
<input type="submit" value="Submit" />
</p>
<input type="hidden" name="MM_insert" value="tabledata"
/>
</form>
</div> -
Sum of Values from previous rows in a dynamic table
Hello,
I have a dynamic table has multiple rows (added dynamically via a button). One column in the table is a Quantity column. Another is a Total column. We do not want to keep a running total, but only wish to display a total when the rest of the cells in that row are emty and the previous row(s) has/have values in the Quantity column. The Total is the sum on the Quatnities up to a blank row. Below is a sample. How do I get teh value of the Quantities in the previous rows?
Quantity
Total
5
8
12
25
7
27
34
22
22
Another option might be to put the Total in the last row with data as opposed to the row below the data.
Any ideas?
Regards,
KarlThe script is written to achive your requirement (i.e. the second approach you have mentioned)
You can either contact me at [email protected] to get the sample form created.
Or the following is the XML Source of the form. Copy the entire content in XML source view of your form and see the result.
<?xml version="1.0" encoding="UTF-8"?>
<?xfa generator="AdobeLiveCycleDesignerES_V9.0.0.0.20091029.1.612548" APIVersion="3.1.9277.0"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2012-02-28T14:04:54Z" uuid="2c561cdf-3377-4e84-9a89-51e740bb2fea">
<template xmlns="http://www.xfa.org/schema/xfa-template/2.8/">
<?formServer defaultPDFRenderFormat acrobat9.0dynamic?>
<subform name="form1" layout="tb" locale="en_US" restoreState="auto">
<pageSet>
<pageArea name="Page1" id="Page1">
<contentArea x="0.25in" y="0.25in" w="197.3mm" h="284.3mm"/>
<medium stock="a4" short="210mm" long="297mm"/>
<?templateDesigner expand 1?></pageArea>
<?templateDesigner expand 1?></pageSet>
<subform w="197.3mm" layout="tb">
<subform name="Subform1" w="190.5mm" h="25.4mm">
<field name="Button1" y="15.875mm" x="60.325mm" w="28.575mm" h="6mm">
<ui>
<button highlight="inverted"/>
</ui>
<font typeface="Myriad Pro"/>
<caption>
<value>
<text>Add Row</text>
</value>
<para vAlign="middle" hAlign="center"/>
</caption>
<border hand="right">
<?templateDesigner StyleID apbx2?>
<edge stroke="raised"/>
<fill/>
</border>
<bind match="none"/>
<event activity="click" name="event__click">
<script contentType="application/x-javascript">
try
Subform2.Table1._Row1.addInstance(1);
//for(var i=0;i<Subform2.Table1._Row1.count;i++)
//xfa.resolveNode("Subform2.Table1.Row1["+i+"].Total").execEvent("exit");
}catch(e)
app.alert(e)
</script>
</event>
</field>
<?templateDesigner expand 1?></subform>
<subform name="Subform2" w="196.85mm">
<subform name="Table1" layout="table" columnWidths="55.916mm 44.47mm" x="38.1mm" y="12.7mm">
<border>
<edge/>
</border>
<subform layout="row" name="HeaderRow" id="HeaderRow_ID">
<assist role="TH"/>
<draw h="10mm" name="Cell1">
<border>
<edge/>
<corner thickness="0.1778mm"/>
</border>
<ui>
<textEdit/>
</ui>
<value>
<text>Quantity</text>
</value>
<font typeface="Myriad Pro"/>
<margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
<para vAlign="middle" hAlign="center"/>
</draw>
<draw h="10mm" name="Cell2">
<border>
<edge/>
<corner thickness="0.1778mm"/>
</border>
<ui>
<textEdit/>
</ui>
<value>
<text>Total</text>
</value>
<font typeface="Myriad Pro"/>
<margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
<para vAlign="middle" hAlign="center"/>
</draw>
<border>
<edge presence="hidden"/>
</border>
<occur max="-1"/>
<?templateDesigner expand 1?></subform>
<subform layout="row" name="Row1">
<assist role="TR"/>
<field name="Quantity" w="55.916mm" h="9.317mm">
<ui>
<numericEdit>
<border presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</numericEdit>
</ui
><
font typeface="Myriad Pro"/><
margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/><
para vAlign="middle"/><
border><
edge/><
corner thickness="0.1778mm"/></
border></
field><
field name="Total" w="44.47mm" h="9.317mm" access="readOnly"><
ui><
numericEdit><
border presence="hidden">
<?templateDesigner StyleID aped0?>
</border><
margin/></
numericEdit></
ui><
font typeface="Myriad Pro"/><
margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/><para vAlign="middle"/>
<border>
<edge/>
<corner thickness="0.1778mm"/>
</border>
<calculate>
<script contentType="application/x-javascript">
try
var nextRow = xfa.resolveNode("Subform2.Table1.Row1["+(this.parent.instanceIndex+1)+"]"); // Next row of the table
if((nextRow==null || nextRow.Quantity.rawValue == null || nextRow.Quantity.rawValue=="") && Quantity.rawValue!=null) // If there is no more rows OR the next row don't contain any Quantity value
var subTotal = 0;
for(var j=this.parent.instanceIndex;j>=0;j--) // Loop until the previous row has empty value OR reach start of row Index (i.e. 0)
var prevObj = xfa.resolveNode("Subform2.Table1.Row1["+j+"].Quantity"); // locate the previous row's Quantity object
if(prevObj.rawValue == null || prevObj.rawValue=="")
break; // if blank value found, skip the loop
subTotal+= prevObj.rawValue;
this.rawValue = subTotal; // Update the Total value
}else
this.rawValue = null; // Clear the total value
}catch(e)
app.alert(e)
</script>
</calculate>
</field>
<border>
<edge presence="hidden"/>
</border>
<occur max="-1"/>
<?templateDesigner expand 1?></subform>
<keep intact="contentArea"/>
<?templateDesigner rowpattern first:1, next:1, firstcolor:f0f0f0, nextcolor:ffffff, apply:0?>
<overflow leader="HeaderRow"/>
<?templateDesigner expand 1?></subform>
<?templateDesigner expand 1?></subform>
<?templateDesigner expand 1?></subform>
<proto/>
<desc>
<text name="version">9.0.0.0.20091029.1.612548.606130</text>
</desc>
<?templateDesigner expand 1?></subform>
<?templateDesigner DefaultPreviewDynamic 1?>
<?templateDesigner DefaultRunAt client?>
<?templateDesigner Grid show:1, snap:1, units:0, color:ff8080, origin:(0,0), interval:(125000,125000)?>
<?templateDesigner FormTargetVersion 28?>
<?templateDesigner DefaultLanguage JavaScript?>
<?acrobat JavaScript strictScoping?>
<?templateDesigner Zoom 62?>
<?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?>
<?templateDesigner SaveTaggedPDF 1?>
<?templateDesigner SavePDFWithEmbeddedFonts 1?></template>
<config xmlns="http://www.xfa.org/schema/xci/2.8/">
<agent name="designer">
<!-- [0..n] -->
<destination>pdf</destination>
<pdf>
<!-- [0..n] -->
<fontInfo/>
</pdf>
</agent>
<present>
<!-- [0..n] -->
<pdf>
<!-- [0..n] -->
<fontInfo/>
<version>1.7</version>
<adobeExtensionLevel>3</adobeExtensionLevel>
</pdf>
<xdp>
<packets>*</packets>
</xdp>
</present>
</config>
<localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.7/">
<locale name="en_US" desc="English (United States)">
<calendarSymbols name="gregorian">
<monthNames>
<month>January</month>
<month>February</month>
<month>March</month>
<month>April</month>
<month>May</month>
<month>June</month>
<month>July</month>
<month>August</month>
<month>September</month>
<month>October</month>
<month>November</month>
<month>December</month>
</monthNames>
<monthNames abbr="1">
<month>Jan</month>
<month>Feb</month>
<month>Mar</month>
<month>Apr</month>
<month>May</month>
<month>Jun</month>
<month>Jul</month>
<month>Aug</month>
<month>Sep</month>
<month>Oct</month>
<month>Nov</month>
<month>Dec</month>
</monthNames>
<dayNames>
<day>Sunday</day>
<day>Monday</day>
<day>Tuesday</day>
<day>Wednesday</day>
<day>Thursday</day>
<day>Friday</day>
<day>Saturday</day>
</dayNames>
<dayNames abbr="1">
<day>Sun</day>
<day>Mon</day>
<day>Tue</day>
<day>Wed</day>
<day>Thu</day>
<day>Fri</day>
<day>Sat</day>
</dayNames>
<meridiemNames>
<meridiem>AM</meridiem>
<meridiem>PM</meridiem>
</meridiemNames>
<eraNames>
<era>BC</era>
<era>AD</era>
</eraNames>
</calendarSymbols>
<datePatterns>
<datePattern name="full">EEEE, MMMM D, YYYY</datePattern>
<datePattern name="long">MMMM D, YYYY</datePattern>
<datePattern name="med">MMM D, YYYY</datePattern>
<datePattern name="short">M/D/YY</datePattern>
</datePatterns>
<timePatterns>
<timePattern name="full">h:MM:SS A Z</timePattern>
<timePattern name="long">h:MM:SS A Z</timePattern>
<timePattern name="med">h:MM:SS A</timePattern>
<timePattern name="short">h:MM A</timePattern>
</timePatterns>
<dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols>
<numberPatterns>
<numberPattern name="numeric">z,zz9.zzz</numberPattern>
<numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern>
<numberPattern name="percent">z,zz9%</numberPattern>
</numberPatterns>
<numberSymbols>
<numberSymbol name="decimal">.</numberSymbol>
<numberSymbol name="grouping">,</numberSymbol>
<numberSymbol name="percent">%</numberSymbol>
<numberSymbol name="minus">-</numberSymbol>
<numberSymbol name="zero">0</numberSymbol>
</numberSymbols>
<currencySymbols>
<currencySymbol name="symbol">$</currencySymbol>
<currencySymbol name="isoname">USD</currencySymbol>
<currencySymbol name="decimal">.</currencySymbol>
</currencySymbols>
<typefaces>
<typeface name="Myriad Pro"/>
<typeface name="Minion Pro"/>
<typeface name="Courier Std"/>
<typeface name="Adobe Pi Std"/>
<typeface name="Adobe Hebrew"/>
<typeface name="Adobe Arabic"/>
<typeface name="Adobe Thai"/>
<typeface name="Kozuka Gothic Pro-VI M"/>
<typeface name="Kozuka Mincho Pro-VI R"/>
<typeface name="Adobe Ming Std L"/>
<typeface name="Adobe Song Std L"/>
<typeface name="Adobe Myungjo Std M"/>
</typefaces>
</locale>
</localeSet>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.398682, 2009/08/10-13:00:47 ">
<
rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><
rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about=""><
xmp:MetadataDate>2012-02-28T14:04:54Z</xmp:MetadataDate><
xmp:CreatorTool>Adobe LiveCycle Designer ES 9.0</xmp:CreatorTool></
rdf:Description><
rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about=""><
pdf:Producer>Adobe LiveCycle Designer ES 9.0</pdf:Producer></
rdf:Description><
rdf:Description xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" rdf:about=""><
xmpMM:DocumentID>uuid:2c561cdf-3377-4e84-9a89-51e740bb2fea</xmpMM:DocumentID></
rdf:Description><
rdf:Description xmlns:desc="http://ns.adobe.com/xfa/promoted-desc/" rdf:about=""><
desc:version rdf:parseType="Resource"><
rdf:value>9.0.0.0.20091029.1.612548.606130</rdf:value><
desc:ref>/template/subform[1]</desc:ref></
desc:version></
rdf:Description></
rdf:RDF></
x:xmpmeta></xdp:xdp> -
Item Number in Dynamic Table Quirk
I'm a new LC user, ramping up to speed on this package, thanks to everyone for the useful information here and other places.
Using the great advice and info here,
http://www.assuredynamics.com/wp-content/uploads/2010/11/Assure-Dynamics-Building-dynamic- tables.pdf
I added a dynamic table to a form I've been working on. Most everything works, except the caption on the Row/Item number. So, I yanked out the subform with the table on it to create a simpler copy of the form to post here. Get this... it works on the simple form. So, there's something going on on my not so simple form that is preventing my Row/Item number from working.
I'm hoping that if I post both forms here, someone can help me fix this thing.
this is the form that works:
http://inthequeue.com/adobeLC/Template_excerpt.pdf
this is the form that does not work:
http://inthequeue.com/adobeLC/Template_std.pdf
Thanks in advance
John Q.Hi John,
Try changing the code in the layout:ready event from;
this.caption.value.text = (this.parent.index + 1).toString();
To;
this.caption.value.text.value = (this.parent.index + 1).toString();
That is add another ".value".
Your form that works targets Reader 8.0 or later and the one that doesn't Targets Reader 9.0 or later, I'm guessing that is the difference.
Regards
Bruce -
Dynamic Select Query including Dynamic Tables with For all Entries
Hello everyone,
I need to create a select query which involves using of Dynamic Tables.
Suppose I have a dynamic table <d1> which consist of let say 10 records.
Now i need to make a select query putting data into another dynamic table <d2>
CONCATENATE keyfield '=' '<d1>' INTO g_condition SEPARATED BY space.
CONCATENATE g_condition '-' keyfield INTO g_condition.
SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <d1>
FOR ALL ENTRIES IN <d1>
WHERE (g_condition).
But it is giving dump.
Please help me on this....Short text
A condition specified at runtime has an unexpected format.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZNG_CUSTOMWRITE" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
not caught in
procedure "WRITE_ARCHIVE_PROD" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The current ABAP program has tried to execute an Open SQL statement
which contains a WHERE, ON or HAVING condition with a dynamic part.
The part of the WHERE, ON or HAVING condition specified at runtime in
a field or an internal table, contains the invalid value "ZCOURIER-ZCOURIERID".
CONCATENATE keyfield '=' g_header INTO g_condition SEPARATED BY space.
CONCATENATE g_condition '-' keyfield INTO g_condition.
SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <dyn_table1>
FOR ALL ENTRIES IN <dyn_table>
WHERE (g_condition). -
Dynamic Table row breaks only on the first page (not on second)
Hello,
I biuld a dynamic table with Livecycle.
If the text in the last field is to long, the table grows automatically.
If the end of the first page is reached, the row breaks over from the first to the second page(= 1st break)
This works correctly.
But if the text is longer, and the field have to break from the second to the third page, the field does not break!!
Please see the attached file.
The settings should be correct, because the break ( from 1st to the 2nd page) works.
But why, is the "dynamic behaviour " limited to only ONE page ?
Can you help me please ?
Thanks....@radzmar
GERMAN
Danke für die korrigierte Datei.
Jep, bei deiner Datei funktionierts.
Ich habe alle Einstellungen genauso angeklickt wie Du, aber trotzdem funktionierts nicht in meiner Tabelle.
Kannst du Dich erinnern, was genau Du geändert hast ?
Ich lade eine Datei hoch, in der ich eine neue Tabelle in die bereits existierende Tabelle ( von Dir korrigiert und funktionierend) einfgefügt habe.
In dieser zweiten Tabelle habe ich die gleichen Einstellungen wie in deiner Tabelle. Meine Tabelle funktioniert aber nicht.
Wo ist mein Fehler ?
Danke für deine Hilfe.
Ich hatte es aber als dynamisches Formular gespeichert. Die Felder verändern sich ja, nur nicht mit dem richtigen Umbruch.
https://acrobat.com/#d=kBUbNEdmNNLTXmKuCUo84w
Ist es womöglich ein Versionsproblem ?
Teillösung:
Mit 1 Spalte anstelle von 2 Spalten funktionierts auch bei mir.
Mit 2 Spalten nicht.
Weiss jemend Rat ?
ENGLISH
thanks for the correction of the file.
It works fine in your doc.
I copied all settings from your pdf-file, but still it doesn`t work in my doc.
Do you remember, what you changed ?
I will upload a flie, where I paste a new table in the existing one. Can you tell me where the failure is ?
Thanks for your help.
I saved the origin file as a dynamic form. The fields were growing automatically (when the text is long). The problem was the overflow.
https://acrobat.com/#d=kBUbNEdmNNLTXmKuCUo84w
Is it possibly a bug within my LCD Version ?
Greetings
Dilaver
UPDATE
It works fine, when I delete 1 column.
With 2 columns -> overflow problem
With 1 column -> no problem..
Does anybody knwo why ? -
Dynamic table pulled from SQL database, Need to Search
My table results are not static, they are pulled into a
dynamic table from a SQL database. Each table displays 10 records
with an option at the bottom to display additional records
(next/previous), for my query. I also have an option set up to
allow users to click for a detail view of a record in the table. If
the table data was static, I would be able to set up a search
option and a results page for it, but I'm dealing with dynamic data
on an .ASP page. I'd like to set up a search box to limit the
records displayed in the table. I haven't found any code samples
that are designed for dynamic data.
Here is a copy of the code from my table.Hi,
I think the code on this URL will get you the solution
http://www.asp.happycodings.com/Array/code3.html
Cheers,
~Maneet -
Javascript error when inserting dynamic table in DW
Hi
Im using DW9 (CS3) and have problem.
When i klick on the 'dynamic table' button i get this error:
While executing insertObject in Dynamic Table.htm, a
Javascript error(s)
occurred:
Any sulution?
Please send me a copy fo the reply to my mail:
[email protected]
/TorbjörnIf that fails to solve the problem, then I recommend you
contact Adobe
directly and use one of your one-on-one support incidents.
http://www.adobe.com/support/programs/dreamweaver/index.html?tab:contact=1
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Torbjörn Sjögren" <[email protected]>
wrote in message
news:fa26gs$bns$[email protected]..
>I have tried several of the tips in the article. But no
luck.
> Did a reinstall of DW but no luck.
> I´m very thankful for any tips.
>
> "Murray *ACE*" <[email protected]>
skrev i meddelandet
> news:fa004o$np6$[email protected]..
>> Troubleshooting JavaScript errors in Dreamweaver
>>
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19105#dat
>>
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do
so!)
>> ==================
>>
http://www.dreamweavermx-templates.com
- Template Triage!
>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Torbjörn Sjögren"
<[email protected]> wrote in message
>> news:f9vu6c$lol$[email protected]..
>>> Hi
>>>
>>> Im using DW9 (CS3) and have problem.
>>> When i klick on the 'dynamic table' button i get
this error:
>>> ---------
>>> While executing insertObject in Dynamic
Table.htm, a Javascript error(s)
>>> occurred:
>>> ---------
>>>
>>> Any sulution?
>>>
>>> Please send me a copy fo the reply to my mail:
>>> [email protected]
>>>
>>> /Torbjörn
>>>
>>
>>
>
> -
Hi All,
I have a form where i have four dynamic tables one after
other, i want the header and body to show up atleast one even
when there is no data flowing in to the table fields, is it possible,..?
i have tried doing a dynamic table and a text field wrapped in a subform(S1) and that subform in turn wrapped in other subform(S2) to make S1 flowable.
for Table1 i have checked Repeat Table for each data item, Min count = 1, Initial count =1 ;
i did the same for all the 4 subforms,
but only the first and last subfor sshow up the tables in them the rest only show text field i have included in each subform,
does anyone have an idea on this as to how to get this done..
Thank u all in advance.
de1209Subramanian
you can achieve that with the feature in oracle called DYNAMIC SQL
for example see the following code
declare
sql_stmt varchar2(200) := '&enter_stmt';
cur_num number;
temp_num number;
begin
cur_num := dbms_sql.open_cursor;
dbms_sql.parse(cur_num,sql_stmt,dbms_sql.native);
temp_num := dbms_sql.execute(cur_num);
dbms_sql.close_cursor(cur_num);
end;
19:01:11 11 /
Enter value for enter_stmt: create table aug(n number)
old 2: sql_stmt varchar2(200) := '&enter_stmt';
new 2: sql_stmt varchar2(200) := 'create table aug(n number)';
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.22
19:01:33 SQL> desc aug
Name Null? Type
N NUMBER
with this you should get some idea .
Only thing is just you need to design your application carefully and then there you are .
hope this helps
cheers
prakash
[email protected] -
After run (or test) of procedure
create or replace procedure tmp_select_dymanic
( AInTable IN VARCHAR2,
ACount OUT NUMBER
) as
begin
EXECUTE IMMEDIATE 'BEGIN SELECT count(*) INTO :Count FROM :InTable END;'
USING ACount, AInTable;
end tmp_select_dymanic;
error message: invalid table name.
I know the table exists and contains data. I can make SELECT in SQL (not dynamic).
What a reason for error? May be privileges in database? But i make SELECT on my own table?
How can i set dynamic table name in other way?
My Oracle Version 10g.What you are asking can be done by REF_CURSOR;
look this example and try your self the rest:
CREATE OR REPLACE PROCEDURE insert_to_table_dinamic (
table1 IN VARCHAR2,
table2 IN VARCHAR2
AS
rc sys_refcursor;
v_sql VARCHAR2 (2000);
v_deptno NUMBER;
BEGIN
v_sql :=
'SELECT DEPTNO FROM '
|| table1
|| ' WHERE ROWNUM = 1 AND DEPTNO IS NOT NULL';
OPEN rc FOR v_sql;
LOOP
FETCH rc
INTO v_deptno;
EXIT WHEN rc%NOTFOUND;
v_sql :=
'UPDATE '
|| table2
|| ' SET DEPTNO = '
|| v_deptno
|| ' WHERE DEPTNO IS NULL';
EXECUTE IMMEDIATE v_sql;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
END insert_to_table_dinamic;when i give DEPT , EMP as my 2 parameters above code will set the deptno in EMP table where deptno is null;
--Just a test proc. -
Making cell non editabale (of dynamic table) in alv
Hi,
I am working on a editable alv with a dynamic table <itab> .This table gets populated during runtime.Now I want to make few cell of this table not editabale (only few cell not the full columns) I knwo that the procedure is to
declare my outtab like
TYPES: BEGIN OF gs_outtab.
TYPES: celltab TYPE lvc_t_styl. "field to switch editability
INCLUDE TYPE /npu/edmt_aa_eac.
TYPES: END OF gs_outtab.
and in the celltab i pass the information of cells which will be non editable...But the problem is as my outtab is a dynamic table I cannot INCLUDE IT IN ANOTHER types.
Please help me how to do it???? Or is there any other way of doing it???Hi Priya
Add the field of type lvc_t_styl while creating the field catalog.
Now
DATA lo_table TYPE REF TO data.
cl_alv_table_create=>create_dynamic_table(
EXPORTING
it_fieldcatalog = lt_fieldcat "the field catalog table
IMPORTING
ep_table = lo_table ). "the reference to the table gt_outtab with the style tab
FIELD-SYMBOLS <tab> TYPE ANY TABLE.
ASSIGN lo_table->* TO <tab> .
Now you can fill your <tab>.
Pushpraj -
Dynamic Table data cannot be Read.
Hello,
I have an Adobe Interactive form and I am trying to read the data from the Dynamic Table I have in the Form. The Problem is when I try to read the data using the below code, the data which is entered by user data cannot be read for some reason.
navigate from <CONTEXT> to <ADR_DATA> via lead selection
lo_nd_adr_data = wd_context->get_child_node( name = wd_this->wdctx_adr_data ).
navigate from <ADR_DATA> to <PREV_EMPLOYMENT> via lead selection
lo_nd_prev_employment = lo_nd_adr_data->get_child_node( name = wd_this->wdctx_prev_employment ).
get element via lead selection
lo_el_prev_employment = lo_nd_prev_employment->get_element( ).
get all declared attributes
"lo_el_prev_employment->get_static_attributes_table(
lo_nd_prev_employment->get_static_attributes_table(
IMPORTING
table = form_data-prev_employment ).
I have:-
1. Checked the Binding on Adobe Form
2. Checked the Context for the same.
3. Checked the Cardinality of the Nodes.
Please let me know in case i am missing something.
Regards,
Shishir.PHello,
I have tried other method as well but was unsucessful, the procedure is below:-
1. Get PDF content of online form by reading the context.
2. Convert this data to XML
l_fp = cl_fp=>get_reference( ).
l_pdf = l_fp->create_pdf_object( ).
l_pdf->set_document( pdfdata = pdf_data ).
l_pdf->set_task_extractdata( ).
l_pdf->execute( ).
l_pdf->get_data( IMPORTING formdata = l_xstring ).
CLASS cl_ixml DEFINITION LOAD.
DATA: g_ixml TYPE REF TO if_ixml,
streamfactory TYPE REF TO if_ixml_stream_factory,
istream TYPE REF TO if_ixml_istream,
document TYPE REF TO if_ixml_document,
parser TYPE REF TO if_ixml_parser.
g_ixml = cl_ixml=>create( ).
streamfactory = g_ixml->create_stream_factory( ).
wrap the table containing the file into a stream
istream = streamfactory->create_istream_xstring( l_xstring ).
document = g_ixml->create_document( ).
parser = g_ixml->create_parser( stream_factory = streamfactory
istream = istream
document = document ).
parser->parse( ).
3. Read the data from the XML. (I was able to extract other data on the form but not the one in the table. The data entered in the table row in the interactive form is not getting converted into XML or not being extracted in PDF at all).
form_data = get_adr_from_xml( document ).
The Code Wizard is an old one and does not support table operations as the new code wizard. Please let me know in case you have any other method of resolving this issue.
Please let me know your work around, I am in desparate need for a solution.
Regards,
Shishir.P
Edited by: Shishir Paltanwale on Apr 21, 2010 8:16 PM
Maybe you are looking for
-
Using Get Data From Aggregation event class in SQL Profiler - SSAS 2012
Hi, I'd like to understand better the use of the Get data from aggregation event class in SQL Profiler to monitor a MDX query and which info provide. Fe, does it return the MDX query? Is it possible to use this event class in order to monitor MDX que
-
Truncated txt files in 'Notes'?
I have a new 2g 2gig iPod Nano, and am attempting to use it to view text files via the Extras>Notes section. The files (between 16 and 30k in .txt format) show up, but are always cut off well before the end of the file. I know it's an odd question, b
-
Hi Everyone, I'm trying to create the following scenario in SAP PI 7.31 but after a lot of thinking I do not see how I can create it in PI. I have JMS queues and topics where messages are stored. I need to make a soap call from a client app to PI to
-
Using Crystal Report to create reports from ABAP
Hello, We are currently using Jetform as the designer for our outputs like Invoice, Order confirmation, etc..... We would like to switch to Crystal instead, but don't really know where to start from. - We already have crystal on our B/W instance - Th
-
I have the LabVIEW 2009 and LABVIEW 2009 SP1. Do I have to install 2009 first and then 2009 SP1? Or the 2009 SP1 also includes the full 2009. The reason I am asking is that I installed my 2009 on a computer, which took forever by the way. After t