Dynamic table copy
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?
Similar Messages
-
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
-NikLook here for ideas:
http://asktom.oracle.com/pls/ask/f?p=4950:8:7186968737321877362::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:584023239495, -
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. -
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 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
>>>
>>
>>
>
> -
Decimal place in dynamic table
Hi All,
I have created a dynamic table with selected fields.
Copied data from one internal table to dynmic table. For DEC type data I am getting only integer part no decimal part, where as for CURR it is showing full (inclding decimal)
How to solve this problem.
I am using lvc_t_fcat
for RFMNG form vbap.
in lvc_t_fcat it is showing intlen = 5 and datatype = DEC inttype = P.
But the data transfering only interger part.
-- Field catalog with the fields the user selected, used as input
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_alv_cat[]
IMPORTING
ep_table = t_new_table.
*-- Create ref to the newly generated table <fs_table>
*-- Plus a new Line with the same structure as the table.
ASSIGN t_new_table->* TO <fs_table>.
IF <fs_table> IS ASSIGNED.
CREATE DATA w_new_line LIKE LINE OF <fs_table>.
ASSIGN w_new_line->* TO <fs_line>.
ENDIF.
CREATE DATA w_new_line_ori LIKE LINE OF t_datatable.
ASSIGN w_new_line_ori->* TO <fs_line_ori>.
LOOP AT t_datatable ASSIGNING <fs_line_ori>.
MOVE-CORRESPONDING <fs_line_ori> TO <fs_line>.
APPEND <fs_line> TO <fs_table>.
ENDLOOP.
Advance Thanks
Balamurugan.RHi vijay,
Thank you. It helped me.
So, to create dynamic table , the following fields are enough?.
Ref_field
ref_table
decimals
fieldname
datatype
inttype
intlen
Thanks,
Balamurugan.R -
Capturing data from a dynamic table that span multiple pages
I created a PDF form that contained a dynamic table that can span across multiple pages. Additional rows in the table can be created by the person filling the form as and when needed.
The PDF form is distributed to the receipient using Adobe LiveCycle Designer.
However, when the form is "Submitted" back to the originator of the form, only data in the first row of the table is captured in the Response file. All the other rows are left out.
I would be grateful if anyone can advise me as to how do I or what shall I do to get all the data in all the rows in the table into the Response File?
Thank you.Hi
Attached are the saved completed PDF-Form and the response file after the completed form has been submitted. I have copied this message to your gMail account.
Only data in the first row of the table is captured in the Response file.
If it is working correctly on your side, please let me know what could have gone wrong on my side.
Thank you.
Best regards,
Kim-Siang Ng
http://www.tipstoenrichyourlife.com/parenting
With the wish to help all beings, may all my thoughts,words,and actions be void of attachment and ego.
May they arise from compassion and wisdom.
May they be imbued with patience and joy.
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you received this email in error, please contact the sender immediately by reply e-mail and destroy all copies of the original message. This email is not intended as an offer or solicitation for the purchase or sale of any financial instruments.
This email is forwarded automatically to a selected list of my buddies for enjoyment. Contents come from various sources and none of the materials I claim as my property. If any belongs to you, please consider it an honor that the content was worthy enough to be shared. No copyright infringement intended!. If any material is not appealing to you DELETE immediately.
When forwarding this email, please have the courtesy to respect the privacy and confidentiality of the sender by deleting all previous email trails and addresses before you proceed to forward this email to others. -
How to assign values to dynamic table
Hi All,
I am working with a dynamic table and an internal table. My internal table looks like this.
Projno Cust Opt Status
g1234 kkkkk p1 I001
g1234 kkkkk p2 I004
g1234 kkkkk p3 I001
g1234 kkkkk p5 I002
g1256 lmnvw p1 I003
g1256 lmnvw p3 I004
g1256 lmnvw p5 I005
g1256 lmnvw p7 I001
My Dynamic table struture looks like this
Projno Cust p1 p2 p3 p4 p5 p6 p7
I need data in my dynamic table from my internal table as follows
Projno Cust p1 p2 p3 p4 p5 p6 p7
g1234 kkkkk I001 I004 I001 I002
g1256 lmnvw I003 I004 I005 I001.
The problem is these operations may vary thats why i am using dynamic table. Even i cannot use case statement as the operations may vary.
Is it possible to do using Assign component or some other way.
ThanksThis program creates dynamic internal table
copy and paste in your program and test it .. debug it to know how it is creating dynamic internal table and values into that table.
report z_dynamic.
type-pools : abap.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
selection-screen begin of block b1 with frame.
parameters: p_table(30) type c default 'T001'.
selection-screen end of block b1.
start-of-selection.
perform get_structure.
perform create_dynamic_itab.
perform get_data.
perform write_out.
form get_structure.
data : idetails type abap_compdescr_tab,
xdetails type abap_compdescr.
data : ref_table_des type ref to cl_abap_structdescr.
Get the structure of the table.
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( p_table ).
idetails[] = ref_table_des->components[].
loop at idetails into xdetails.
clear xfc.
xfc-fieldname = xdetails-name .
xfc-datatype = xdetails-type_kind.
xfc-inttype = xdetails-type_kind.
xfc-intlen = xdetails-length.
xfc-decimals = xdetails-decimals.
append xfc to ifc.
endloop.
endform.
form create_dynamic_itab.
Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = ifc
importing
ep_table = dy_table.
assign dy_table->* to <dyn_table>.
Create dynamic work area and assign to FS
create data dy_line like line of <dyn_table>.
assign dy_line->* to <dyn_wa>.
endform.
form get_data.
Select Data from table.
select * into table <dyn_table>
from (p_table).
endform.
form write_out .
Write out data from table.
loop at <dyn_table> into <dyn_wa>.
do.
assign component sy-index
of structure <dyn_wa> to <dyn_field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <dyn_field>.
else.
write: <dyn_field>.
endif.
enddo.
endloop.
endform. " write_out -
Global binding with duplicate, dynamic tables
Hi there,
Hope someone can give me a hand. I have a dynamic form that contains an invisible duplicate so that there will be two copies printed - one for the form filler and another for another dept. Only one field on the form changes on each copy -- the copy indentifier.
I have placed global binding for all fields on the "visible" form, so that the data will be ported into the invisible copy. However, there are two dynamic tables where the fields in the rows simply copy whatever is placed in the first row.
How do I (in the XML or Javascript) create a link so that each row's fields can contain different data and be copied to the invisible version?
Thanks in advance for your help.Yeah global binding won't work on repeating elements, you need to write a script to loop through the table and copy the data to another table.
Check out this sample:
http://www.assuredynamics.com/index.php/portfolio/duplicating-table-data/ -
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> -
Dynamic tables and conditional page break
I have inserted a table in my form and have included an Add New Row button to insert additonal rows. I want a maximum of 16 rows added with a subtotal field. I want the table, then to automatically go to a new page with a subtotal field. At the end of all pages I want to include a total field. The table goes to the next page after a number of rows are entered, but there is not a break; the original form continues. How do conditionally break the page and have a (new) table display in the second page?
Thanks for your help.Hi Paul,
Thanks for working with me on this. I have sent a copy to the gmail.com address. I'm new to LiveCycle, so please forgive me.
Date: Thu, 29 Jul 2010 09:18:53 -0600
From: [email protected]
To: [email protected]
Subject: dynamic tables and conditional page break
You can accomplish that with a single table and some creative script. I suggest that you get the table worked out and working correctly then we can add in the page totals and final total afterwards. Once the table is ready email the form to mailto:[email protected] and I will put together a sample for you that shows what to do. Please include a description of what you want to do with the email as the mail message and this forum are not tied together. Also if you have a data file that fills out the table that would be useful as well.
Paul
> -
Typo/error in dynamic table example
I'm talking about the on-line copy of the Spry dynamic table
example:
http://labs.adobe.com/technologies/spry/articles/dynamic_table/
In the last two code blocks, in the TR element that uses
spry:repeat, the value of spry:repeat is set to "spry:repeat"
instead of "dsEmployees". If someone copies one of those code
blocks and tweaks it to use it for their own datasets, they'll get
a tokenizeData error.Thanks for catching that!
The fixed version is now live on Labs.
Thanks,
Don
Maybe you are looking for
-
Hi All, Is it possible to determine the G/L account against which the transaction is posted in FI using asset sub number or depreciation area. I am trying to link asset transactions to 0PU_C02 - budgetting and funds mangement. Any link on this greatl
-
Relative positioning of windows
I need class B, which is called from class A to appear at the same coordinates as A when it is called. I've included code below, can anyone tell me where I'm going wrong? Which is the best way to do it? import javax.swing.JFrame; import javax.swing.J
-
Encrypting large amount of data
I need to use two sets of public and private keys to do the following: 1. PubKey1 to encrypt short array of characters 2. Use PubKey2 to encrypt PrivKey1 The problem is, PrivKey1 is huge, and when I try using RSA, I need over an 8000 bit key to encry
-
WCS/NCS: moving buildings between campuses
Hi, Is there any way to move buildings between two campuses in WCS/NCS?
-
Hello All, Company A uses a numeric employee ID (ex. 17456) for its users but presents a display name (ex. Smith,John) to users. All CUPC users show their display name at the top of CUPC when they have it open except 1 user. This user is being pres