Dynamic Table Issues
Hello
When I do the following, Insert > Data Objects > Dynamic Data > Dynamic Table I receive this message "While executing insertObject in Dynamic Table.htm, a JavaScript error occured."
I went through the steps once again. When I came to the point of...
Remove the Dreamweaver preferences registry entries.
Dreamweaver CS6Select the Dreamweaver CS6 key, then select File > Export. In the Export Registry File dialog, enter a filename and location, and then click Save.
Ensure the Dreamweaver CS6 key is still selected, and then select Edit > Delete. In the Confirm Key Delete dialog, click Yes. I selected the highlighted directory and right clicked and chose delete. I exited the registry and restarted DW. When I tried to insert a dynamic table, I received the same warning.
Similar Messages
-
Dear Experts,
Iam filling the table node by column by column.Let us suppose first column has 10 records.Second column records starting with 11'th row.If any body have idea.Plz give rpl.
Thanks,
SanthoshHi Ayyappara,
My requirement is user select the column from itemlist box.when user click the button i have to generate report in the table format .For that i created attributes programatically and store those values in context.and access that value node and created dynamic table in wddoModify method.data is coming fine.i'm retriving column by column data from oracle with multi dimensional vector.
IWDNode node;
IWDAttributeInfo Info;
int m=0;
for(Iterator it=wdContext.getChildNode("ALERT_DATA",0).getNodeInfo().iterateAttributes();it.hasNext();Counter++)
node = wdContext.getChildNode("ALERT_DATA",0);
IWDNodeElement element;
Info=(IWDAttributeInfo)it.next();
other_data=(Vector)data.get(Counter);
int g=0;
for( g=0;g<other_data.size();g++)
element=node.createElement();
try{
if(other_data.get(g).toString()==null||other_data.get(g).toString().trim().length()==0||other_data.get(g).toString()=="")
//wdComponentAPI.getMessageManager().reportSuccess("12334");
element.setAttributeValue(Info.getName(),"N");
}else{
element.setAttributeValue(Info.getName(),other_data.get(g).toString());
}catch (Exception e) {
// TODO: handle exception
//wdComponentAPI.getMessageManager().reportException("Check",true);
node.addElement(element);
Plz give rpi ASAp.
Thanks,
Santhosh -
Dynamic table issue with special character
Hi All,
While creating a dynamic internal table if the fieldname in the fieldcatalog contains any special character like dot(.) , ot is showing the message without creating the dynamic internal table.
* Create a dynamic internal table with this structure
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table = 'X'
it_fieldcatalog = gt_dyn_fcat
IMPORTING
ep_table = gt_dyn_table
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2
gt_dyn_fcat contains fieldname with dot.
So the table gt_dyn_table is not creating.
I searched in SCN andd found another method
CALL METHOD
cl_abap_structdescr=>create
But the same issue is aslo here in this method.
Please suggest me any new method in sap to solve the issue.
Best Regards,
MunuHi,
Every programing language has its syntax rules.
If you want to use this language you have to follow the rules.
All the peoples involve with SAP ABAP must follow the rules.
and here it is: from http://help.sap.com/abapdocu_740/en/abennaming_conventions.htm
How abut using underscores (_)
Regards. -
Issue with dynamic table which has RichCommandLink and RichSparkChart
I’m running into an issue when I create a dynamic table with columns of type RichCommandLink and RichSparkChart.
If my table has both of these types of columns, then the RichCommandLink column behaves like a NOP, meaning clicking on it does not cause the link to take effect and does not navigate to the designated page.
If I remove the RichSparkChart column, then the RichCommandLink column behaves properly.
Is there something I’m supposed to be aware of when creating these types of columns? Is there a known problem with RichSparkChart column, like some exception thrown which halts proper rendering of the rest of the columns?
Thanks,
Ania.Turned out that the problem was with ids which I was dynamically assigning. There was an overlap meaning two columns/elements got the same id. Not the manifestation or behavior I would expect as a result, but once I fixed that, having these two columns side by side works well.
-
I have a dynamic table that calculates the sum of all rows, no issue. I'm struggling with pulling out a subtotal though. I would like to have a check box in each row that flags those rows and gives the sum of their total. Any help would be greatly appreciated.
Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
var subtotal=0;
for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
nfSubtotal.rawVlaue=subtotal; -
Controlling a dynamic Table with a Checkbox (InstanceManager, moveInstance issue)
Hello,
I am having some problems in using InstanceManager (dynamic tables). I try to add and delete new rows by using checkboxes. If a checkbox gets clicked a new row, with a value given from the checkbox, appears. If a checkbox gets deactivated, then the row, it has created, is going to be removed.
I use addInstance to add new lines into the table. In this case new line apperas always at the end of the table, which is just perfect! It is exactly the way I need it. But I have no idea how to pass over the value of my checkboxes right to the last line of my table.
I have tried to use moveInstance an it just messed up my form. (uploaded here: www.hs-augsburg.de/~nikg-fh/mypdf.pdf )
My Form:
My Code:
MyForm.page1.checkbox1::change - (JavaScript, client)
if (this.rawValue == "1")
var myInstance = xfa.form.MyForm.page1.MyTable._MyRow.addInstance(1);
var fromIndex = xfa.form.MyForm.page1.MyTable._MyRow.index;
var toIndex = myInstance.index;
// Value of col. "CheckBox-Value"
xfa.form.MyForm.page1.MyTable.MyRow.checkboxValue.rawValue = "CheckBox 1"; // <<<<<HERE IS THE PROBLEM!!!!!
// Value of col "fromIndex"
xfa.form.MyForm.page1.MyTable.MyRow.fromIndex.rawValue = fromIndex;
// Value of col "toIndex"
xfa.form.MyForm.page1.MyTable.MyRow.toIndex.rawValue = toIndex;
// Move Row
xfa.form.MyForm.page1.MyTable._MyRow.moveInstance(fromIndex, toIndex); // <<<< Don't need to use this Method?!
else
var rowToDelete = xfa.form.MyForm.page1.MyTable._MyRow.index;
xfa.form.MyForm.page1.MyTable._MyRow.removeInstance(rowToDelete);
xfa.form.MyForm.page1.deletedRow.rawValue = rowToDelete + 1;
it just gets messed up with this code, because of moveInstance (all checkboxes have similar coding):
any checkbox clicked:
checkbox1 klicked
checkbox 2 klicked:
checkbox 3 klicked:Hi,
I don't think checkboxes are a very intuiative way for the user to add rows.
That said, the main issue is that you are not specifying which instance of MyRow you want to set the value of checkboxValue. So this line:
xfa.form.MyForm.page1.MyTable.MyRow.checkboxValue.rawValue = "CheckBox 1"
Would become:
var i = page1.MyTable._MyRow.count - 1;
xfa.resolveNode("page1.MyTable.MyRow[" + i + "]").checkboxValue.rawValue = "CheckBox 1";
Also I would place the script in the click event of the checkbox, as the change event uses "xfa.event.newText". The click event uses "this.rawValue" as you have it.
Hope that helps,
Niall -
Issue in Dynamic table creation in userform
Hi all,
My userform displays a simpletable using an arraylist returned from the WF as data source. I have all the columns of this dynamic table displayed as labels.
Question:
Now I have added another new column to this table which I want to be editable (textfield) while the rest of the existing columns should be the same labels. How do I accomplish this task since the fieldloop for the table uses only a single arraylist?
this is how my code looks like
<FieldLoop for='abc'>
<expression>
<block>
<ref>List</ref>
</block>
</expression>
<Field name='tmptable'>
<Display class='SimpleTable'>
<Property name='noNewRow' value='true'/>
<Property name='border' value='0'/>
<Property name='align' value='center'/>
</Display>
<Field name='$(abc)'>
<Display class='Label' action='true'>
<Property name='value'>
<ref>abc</ref>
</Property>
</Display>
</Field>
</Field>
</FieldLoop>
thanks in advance
kpThat was pretty simple solution. I made a disable clause to the label control for the last column and instead displayed a textbox control.
thanks anyway -
Issues in populating dynamic table with other dynamic table records
Hi Experts,
I have a Problem here ,i need to move the records of one table into other.
Through the following code..am able to append the records ,
but there are no values in it.
FIELD-SYMBOLS:<lt_data> TYPE ANY TABLE.
FIELD-SYMBOLS:<itab_wa2> TYPE ANY.
LOOP AT <lt_data> ASSIGNING <itab_wa>.
DO lv_count TIMES.
ASSIGN COMPONENT sy-index OF STRUCTURE <itab_wa> TO <itab_wa1>.
ENDDO.
APPEND <itab_wa1> to <itab>.
help is appreciated>
Vadnalav wrote:
> Yeah the structures of both the tables are same.. referred to TYPE ANY
TYPE ANY is not a structure mate!
Anyway let me rephrase my question: Are the "run-time" structures of the 2 dynamic tables similar?
BR,
Suhas -
Hi:
- I am currently prototyping a plug-in but I have some questions:
- 1) At the 'All Metrics' table, what is the intent of the 'Last Upload' field,
and how is this field updated?
- I have created some metrics but for some metrics the 'Last Upload' field
has a timestamp but for other metrics there is no data.
As far as I know, the metrics are similar but I do not know why the behaviour is different.
- 2) Is there a maximum string length that the Oracle agent can accept?
- I have a script which just returns all the environment variables into one cell.
In emagent.trc, the Oracle agent issues the following warning:
2009-08-27 12:38:47 Thread-76336 WARN upload: Truncating value of "STRING_VALUE" from "AGENT_HOME=
- Is the truncation an issue?
- 3) I have created some dynamic tables from performing an snmp walk, but the key that I use
is the index of the SNMP table. The data is collected correctly, but I am not sure that using
the table index as the key for OEM is a good idea because the metrics are stored according to the SNMP table index.
Should the OEM key be the something like 'object name' instead of the index number from performing an SNMP walk ?
For example, when I click a metric, the metric name is: Sensor Index 1.
But should it not be something like 'Fan #1' ?
Thanks JohnMetrics are collected at certain intervals, the Last Upload field indicates the date and time of the last time a metric collection was uploaded. The quicker the interval, the more recent that date should be. If you don't specify a CollectionItem in your default collection file for your metrics, they won't be collected or uploaded.
If your metric column is a STRING type, it is stored in a VARCHAR2(4000)
I'm not sure I understand your last problem... You have a table metric with a set of columns. The column you use as the key is just some tracking index which doesn't really mean anything. As long as your key column(s) make the row unique, the agent will be satisfied. If you want something more meaningful as your key, then it's something you will have to inject into your dataset if it isn't already there. -
How to Create Check Box in Dynamic Table
Hi Friends,
I've Created one Dynamic Table there i want to display 2 columns as Check Box.
How to Add this check box as column cell variant.
Looping the columns. In this One method SET_TABLE_CELL_EDITOR is ter. But i'm getting how to use this method. Kindly help in this Issue.
Regards,
jack.Hi upendra
There are slight changes in the sivas code.Where is the data coming into the table.If its from a Model Node then iterate each element of the source node get that value compare and set the corresponding value in the element of the node binded to table.
Create a boolean attribute "select" in the table node and bind it to checked property of the check box.
for(int i=0;i<wdContext.node<tablenode>()..size();i++)
if(wdContext.node<tablenode>().get<tablenode>ElementAt(i).select())
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(true);
else
wdContext.node<tablenode>().get<tablenode>ElementAt(i).set<yourattribute>(false);
See the attribute is boolean so pass true or false as a values in setter methods.
Regards
Kalyan -
How to change the display limits of a dynamic table?
Hi folks,
I'm using DW CS4 and PHP. I've got a php page with a dynamic table and repeating region that I built for my client. This table lists our entire active member list. Initially I built the dynamic table to show only 50 records at a time because 300+ records made an overly long page. Now my client wants all the records on a single page, because he doesn't like clicking through the recordset paging of First - Next - Previous - Last list to find who he is looking for. I tried changing the Repeating Region behavior to All Records (rather than 50) but it still displays only 50. I'm sure this is because initially when I set up the dynamic table, I limited it to 50 there. Is there an easy way to change the dynamic table from 50 to All Records, without rebuilding the entire page? I've looked in several places and can't find a way to edit this. Thanks for your help,
GailGunter,
Thanks for your continued help on this forum. You have made people's
work a lot easier and stuck with them through some thorny issues.
If I may redirect you to an issue I had a few months back - the initial
posting was here at:
http://forums.adobe.com/thread/767154?tstart=300
I couldn't turn the answers I received into a workable solution. Would
you be willing to take a look at this?
Thanks again for your help,
Gail -
Dynamic Table UI Element with different data type for each cell
Hi Experts,
I have a problem with a dynamic Table UI Element in Web Dynpro ABAP. I have the following coding:
METHOD set_col_row .
TYPE-POOLS: icon.
DATA:
lv_node TYPE REF TO if_wd_context_node,
lv_node_info TYPE REF TO if_wd_context_node_info,
lv_element TYPE REF TO if_wd_context_element,
lt_attributes TYPE wdr_context_attr_info_map,
lv_table TYPE REF TO cl_wd_table,
lv_table_column TYPE REF TO cl_wd_table_column,
lv_text_view TYPE REF TO cl_wd_text_view,
lv_image TYPE REF TO cl_wd_image,
lv_text_edit TYPE REF TO cl_wd_text_edit,
lv_header TYPE REF TO cl_wd_caption,
attribute LIKE LINE OF lt_attributes,
lv_index TYPE string,
lv_cur_row TYPE i,
path TYPE string,
lv_value TYPE string,
attr_name TYPE string,
l_trc_point_id TYPE string,
l_num_cols TYPE string,
l_num_rows TYPE string,
lv_text TYPE string,
lv_index2 TYPE i,
lr_ress_selections TYPE REF TO /its/di_2_cpr_ress_selections,
lt_comp_tab TYPE cl_abap_structdescr=>component_table,
ls_comp_tab LIKE LINE OF lt_comp_tab,
lv_count TYPE i,
lv_col_count TYPE i,
lv_col_count_read TYPE i,
lv_index_read TYPE i,
lv_num_cols_minus_1 TYPE i,
lv_bind_lv_value TYPE string,
wd_standard_cell TYPE REF TO cl_wd_table_standard_cell,
lv_data_count TYPE i,
lv_data_count_str TYPE string,
wd_table_column TYPE REF TO cl_wd_table_column,
lv_column_id TYPE string.
FIELD-SYMBOLS:
TYPE ANY.
Instanz der Klasse /ITS/DI_2_CPR_RESS_SELECTIONS
lr_ress_selections = /its/di_2_cpr_ress_selections=>factory( ).
ASSIGN lr_ress_selections->gr_table->* TO gt_comp_tab.
ls_comp_tab-name = 'SUMME'.
APPEND ls_comp_tab TO lt_comp_tab.
ls_comp_tab-name = 'CELL_VARIANT'.
APPEND ls_comp_tab TO lt_comp_tab.
CLEAR ls_comp_tab.
l_num_rows = num_rows + 1.
CONDENSE l_num_rows.
l_num_cols = num_columns + 1.
CONDENSE l_num_cols.
UI-Element 'TABLE'
lv_table ?= wd_this->m_view->get_element( 'TBL_TABLE' ).
lv_table->remove_all_columns( ).
Kontext-Knoten 'TABLE'
lv_node = wd_context->get_child_node( 'TABLE' ).
lv_node_info = lv_node->get_node_info( ).
lv_node_info->remove_dynamic_attributes( ).
attribute-type_name = 'STRING'.
lv_num_cols_minus_1 = num_columns - 1.
Für jede Spalte einmal tun
DO lv_num_cols_minus_1 TIMES.
lv_index = sy-index + 1.
CONDENSE lv_index.
lv_table_column = cl_wd_table_column=>new_table_column( ).
lv_column_id = lv_table_column->id.
Spaltenüberschriften setzen
IF lv_index EQ 1. "Beim ersten Durchlauf --> erste Spalte = "Ressourcen"
lv_text = text-010.
sy-index = 0.
ELSE. "Danach für jede weitere Spalte eine Zeile aus der gt_comp_tab nehmen
lv_index_read = lv_index - 1.
READ TABLE lt_comp_tab INDEX lv_index_read INTO ls_comp_tab.
lv_text = ls_comp_tab-name.
lv_header = cl_wd_caption=>new_caption( text = lv_text ).
lv_table_column->set_header( lv_header ).
ENDIF.
CONCATENATE 'TABLE.A' lv_index INTO path.
lv_text_view = cl_wd_text_view=>new_text_view( bind_text = path ).
lv_table_column->set_table_cell_editor( lv_text_view ).
lv_table_column->bind_selected_cell_variant( 'TABLE.CELL_VARIANT' ).
lv_table->add_column( lv_table_column ).
wd_table_column ?= wd_this->m_view->get_element( lv_column_id ).
*****************Test Cell Variant*************************************************
IF lv_index GT 1.
LOOP AT .
IF sy-tabix EQ lv_cur_row.
Name zuweisen
ASSIGN COMPONENT 'NAME' OF STRUCTURE .
Zuweisen ob Blatt oder nicht
lv_element->set_attribute( name = 'NAME' value = lv_value ).
ASSIGN COMPONENT 'IS_LEAF' OF STRUCTURE set_attribute( name = attr_name value = lv_value ).
ENDIF.
ENDLOOP.
Now my problem is, that I need for every ROW of my table UI Element a different cell editor. I know how to change it for the column. But is not my issue. I want to have images (traffic lights red and green) in some rows. The other rows should have numbers. The coding works, so that I have all the data at the right place in my table, only the images are shown as a string, because the cells of these rows have the cell editor Text_View. I tried something with cell variants (with cl_wd_table_standard_cell), but it was not possible for me to get a cell variant "image" in these cells/rows were I need it.
I hope you understand my problem and now what to do here.
Thanks a lot in advance.
Best Regards,
IngmarHi Experts, I have a problem with a dynamic Table UI Element in Web Dynpro ABAP. I have the following coding: METHOD set_col_row . TYPE-POOLS: icon. DATA: lv_node TYPE REF TO if_wd_context_node, lv_node_info TYPE REF TO if_wd_context_node_info, lv_element TYPE REF TO if_wd_context_element, lt_attributes TYPE wdr_context_attr_info_map, lv_table TYPE REF TO cl_wd_table, lv_table_column TYPE REF TO cl_wd_table_column, lv_text_view TYPE REF TO cl_wd_text_view, lv_image TYPE REF TO cl_wd_image, lv_text_edit TYPE REF TO cl_wd_text_edit, lv_header TYPE REF TO cl_wd_caption, attribute LIKE LINE OF lt_attributes, lv_index TYPE string, lv_cur_row TYPE i, path TYPE string, lv_value TYPE string, attr_name TYPE string, l_trc_point_id TYPE string, l_num_cols TYPE string, l_num_rows TYPE string, lv_text TYPE string, lv_index2 TYPE i, lr_ress_selections TYPE REF TO /its/di_2_cpr_ress_selections, lt_comp_tab TYPE cl_abap_structdescr=>component_table, ls_comp_tab LIKE LINE OF lt_comp_tab, lv_count TYPE i, lv_col_count TYPE i, lv_col_count_read TYPE i, lv_index_read TYPE i, lv_num_cols_minus_1 TYPE i, lv_bind_lv_value TYPE string, wd_standard_cell TYPE REF TO cl_wd_table_standard_cell, lv_data_count TYPE i, lv_data_count_str TYPE string, wd_table_column TYPE REF TO cl_wd_table_column, lv_column_id TYPE string. FIELD-SYMBOLS: LIKE LINE OF lt_attributes, TYPE ANY TABLE, TYPE ANY, TYPE ANY, TYPE ANY. * Instanz der Klasse /ITS/DI_2_CPR_RESS_SELECTIONS lr_ress_selections = /its/di_2_cpr_ress_selections=>factory( ). ASSIGN lr_ress_selections->gr_table->* TO . lt_comp_tab = lr_ress_selections->gt_comp_tab. ls_comp_tab-name = 'SUMME'. * APPEND ls_comp_tab TO lt_comp_tab. * ls_comp_tab-name = 'CELL_VARIANT'. APPEND ls_comp_tab TO lt_comp_tab. CLEAR ls_comp_tab. l_num_rows = num_rows + 1. CONDENSE l_num_rows. l_num_cols = num_columns + 1. CONDENSE l_num_cols. * UI-Element 'TABLE' lv_table ?= wd_this->m_view->get_element( 'TBL_TABLE' ). lv_table->remove_all_columns( ). * Kontext-Knoten 'TABLE' lv_node = wd_context->get_child_node( 'TABLE' ). lv_node_info = lv_node->get_node_info( ). lv_node_info->remove_dynamic_attributes( ). attribute-type_name = 'STRING'. lv_num_cols_minus_1 = num_columns - 1. * Für jede Spalte einmal tun DO lv_num_cols_minus_1 TIMES. lv_index = sy-index + 1. CONDENSE lv_index. lv_table_column = cl_wd_table_column=>new_table_column( ). lv_column_id = lv_table_column->id. * Spaltenüberschriften setzen IF lv_index EQ 1. "Beim ersten Durchlauf --> erste Spalte = "Ressourcen" lv_text = text-010. sy-index = 0. ELSE. "Danach für jede weitere Spalte eine Zeile aus der gt_comp_tab nehmen lv_index_read = lv_index - 1. READ TABLE lt_comp_tab INDEX lv_index_read INTO ls_comp_tab. lv_text = ls_comp_tab-name. lv_header = cl_wd_caption=>new_caption( text = lv_text ). lv_table_column->set_header( lv_header ). ENDIF. CONCATENATE 'TABLE.A' lv_index INTO path. lv_text_view = cl_wd_text_view=>new_text_view( bind_text = path ). lv_table_column->set_table_cell_editor( lv_text_view ). lv_table_column->bind_selected_cell_variant( 'TABLE.CELL_VARIANT' ). lv_table->add_column( lv_table_column ). wd_table_column ?= wd_this->m_view->get_element( lv_column_id ). ******************Test Cell Variant************************************************** IF lv_index GT 1. LOOP AT ASSIGNING . ASSIGN COMPONENT 'TYPE' OF STRUCTURE TO . ADD 1 TO lv_data_count. lv_data_count_str = lv_data_count. CONCATENATE 'A' lv_index lv_data_count_str INTO path. wd_standard_cell = cl_wd_table_standard_cell=>new_table_standard_cell( view = wd_this->m_view variant_key = 'FLDATE' ). IF = '01' OR = '04'. lv_image = cl_wd_image=>new_image( bind_source = path view = wd_this->m_view ). wd_standard_cell->set_editor( lv_image ). wd_standard_cell->set_cell_design( '01' ). ELSE. lv_text_view = cl_wd_text_view=>new_text_view( bind_text = path view = wd_this->m_view ). wd_standard_cell->set_editor( lv_text_view ). wd_standard_cell->set_cell_design( '02' ). ENDIF. wd_table_column->add_cell_variant( wd_standard_cell ). ENDLOOP. ENDIF. ************************************************************************************* CONCATENATE 'A' lv_index INTO attribute-name. lv_node_info->add_attribute( attribute ). ENDDO. DO num_rows TIMES." Für jede Zeile einmal tun lv_cur_row = sy-index. lv_element = lv_node->create_element( ). lv_node->bind_element( new_item = lv_element set_initial_elements = abap_false ). DO l_num_cols TIMES. ADD 1 TO lv_col_count. IF lv_count LT 1. LOOP AT ASSIGNING . IF sy-tabix EQ lv_cur_row. * Name zuweisen ASSIGN COMPONENT 'NAME' OF STRUCTURE TO . "NAME lv_value = . * Zuweisen ob Blatt oder nicht lv_element->set_attribute( name = 'NAME' value = lv_value ). ASSIGN COMPONENT 'IS_LEAF' OF STRUCTURE TO . "NAME lv_value = . lv_element->set_attribute( name = 'IS_LEAF' value = lv_value ). ENDIF. ENDLOOP. ENDIF. IF lv_count GT 0. lv_col_count_read = lv_col_count - 1. lv_index = sy-index. LOOP AT ASSIGNING . IF sy-tabix EQ lv_cur_row. CLEAR ls_comp_tab. READ TABLE lt_comp_tab INDEX lv_col_count_read INTO ls_comp_tab. ASSIGN COMPONENT ls_comp_tab-name OF STRUCTURE TO . lv_value = . CONDENSE lv_index. CONCATENATE 'A' lv_index INTO attr_name. lv_element->set_attribute( name = attr_name value = lv_value ). ENDIF. ENDLOOP. ENDIF. lv_count = lv_count + 1. ENDDO. CLEAR lv_col_count. CLEAR lv_count. ENDDO. ENDMETHOD. I definied my table in Layout Tab of the View and create here in thos method dynamicly my columns. lv_table_column = cl_wd_table_column=>new_table_column( ). . . lv_table->add_column( lv_table_column ). In I have my data that should be shown later in my table. So I create for each row in this fieldsymbol in a loop: lv_element = lv_node->create_element( ). lv_node->bind_element( new_item = lv_element set_initial_elements = abap_false ). Later I fill every cell in my table with a different value with this loop: LOOP AT ASSIGNING . IF sy-tabix EQ lv_cur_row. CLEAR ls_comp_tab. READ TABLE lt_comp_tab INDEX lv_col_count_read INTO ls_comp_tab. ASSIGN COMPONENT ls_comp_tab-name OF STRUCTURE TO . lv_value = . CONDENSE lv_index. CONCATENATE 'A' lv_index INTO attr_name. lv_element->set_attribute( name = attr_name value = lv_value ). ENDIF. ENDLOOP. Now my problem is, that I need for every ROW of my table UI Element a different cell editor. I know how to change it for the column. But is not my issue. I want to have images (traffic lights red and green) in some rows. The other rows should have numbers. The coding works, so that I have all the data at the right place in my table, only the images are shown as a string, because the cells of these rows have the cell editor Text_View. I tried something with cell variants (with cl_wd_table_standard_cell), but it was not possible for me to get a cell variant "image" in these cells/rows were I need it. I hope you understand my problem and now what to do here. Thanks a lot in advance. Best Regards, Ingmar
-
How to pass values in dynamic structure and then dynamic table
Hi,
we have a Z structure in se11 holding 10 fields. But at run time i need to create a dynamic table with more than 10 records.
I am able to create the structure and corresponding internal table. Now the issue is i have to populate this dynamic structure with some values and then append it to dynamic internal table. Since the dynamic table type is any its not allowing an index operation like modify etc etc.
Could anyone help me in passing the values . I have searched in SDN . everyone created a dynamic table and then populated it values from some standard or custom tables.Then assigning the component of structure and displaying the output. but in my situation i have no such values stored in any tables. i populate values based on certain calculation.Hi Friends,
This is the piece of code.After creating dynamic work area and dynamic table what i should do?
TYPES: BEGIN OF STR,
ID TYPE I,
NAME(30) TYPE C,
END OF STR.
data: v_lines type i.
STR_TYPE ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'STR' ).
STR_COMP = STR_TYPE->GET_COMPONENTS( ).
APPEND LINES OF STR_COMP TO COMP_TAB.
COMP-NAME = 'NAME1'.
COMP-TYPE = CL_ABAP_ELEMDESCR=>GET_STRING( ).
APPEND COMP TO COMP_TAB.
COMP-NAME = 'VALUE1'.
COMP-TYPE = CL_ABAP_ELEMDESCR=>GET_STRING( ).
APPEND COMP TO COMP_TAB.
COMP-NAME = 'NAME2'.
COMP-TYPE = CL_ABAP_ELEMDESCR=>GET_STRING( ).
APPEND COMP TO COMP_TAB.
COMP-NAME = 'VALUE2'.
COMP-TYPE = CL_ABAP_ELEMDESCR=>GET_STRING( ).
APPEND COMP TO COMP_TAB.
COMP-NAME = 'NAME3'.
COMP-TYPE = CL_ABAP_ELEMDESCR=>GET_STRING( ).
APPEND COMP TO COMP_TAB.
COMP-NAME = 'VALUE3'.
COMP-TYPE = CL_ABAP_ELEMDESCR=>GET_STRING( ).
APPEND COMP TO COMP_TAB.
NEW_STR = CL_ABAP_STRUCTDESCR=>CREATE( COMP_TAB ).
NEW_TAB = CL_ABAP_TABLEDESCR=>CREATE(
P_LINE_TYPE = NEW_STR
P_TABLE_KIND = CL_ABAP_TABLEDESCR=>TABLEKIND_STD
P_UNIQUE = ABAP_FALSE ).
CREATE DATA DREF TYPE HANDLE NEW_TAB.
CREATE DATA DREF1 TYPE HANDLE NEW_str. -
How to identify the last instance of a dynamic table row
Hi all,
I am trying to figure out how to create an action for my form in Livecycle Designer ES2 that will affect the most recent instance of a dynamic table row. I have a table with a repeatable row where the user will enter information about a purchased part and I have buttons that allow the user to add and remove rows. I need to create an additional add row button that will add a new instance of the repeatable table row (this is not an issue) and will disable and change the background color of the first cell in the added row. The problem I am having is how to have an action that affects the last instance of a row.
If anyone knows how to do this in Javascript I would appreciate some advice/help.Hi,
I think this is beyond what an action will provide. You will a have to write some JavaScript directly. When you call the addInstance method it returns the new row, so you can do something like;
var row = Table1._Row1.addInstance();
row.TextField1.border.fill.color.value = "255,0,0";
row.TextField1.access = "protected";
To find the last row and do the same thing you can do something like;
var row = Table1.resolveNode("Row1[" + (Table1._Row1.count - 1) + "]");
row.TextField1.border.fill.color.value = "255,0,0";
row.TextField1.access = "protected";
Regards
Bruce -
Problem with Dynamic Table Name
Hello all,
I am having trouble using a dynamic table name. I have the following code.....
declare l_cur sys_refcursor;
l_ID int;
l_tableName varchar(30);
BEGIN
open l_cur for
select hkc.ColumnID, mapping from &HKAPPDB_Schema_Name..doctablemapping ddm
inner join &HKDB_Schema_Name..HKColumns hkc on hkc.doctablemappingid = ddm.id
where ddm.id > 0;
LOOP
FETCH l_cur into l_ID, l_tableName;
EXIT WHEN l_cur%notfound;
-- update missing VerbID in DocumentDocMapping table
UPDATE &HKAPPDB_Schema_Name..IndexedDocument
SET VerbID = (SELECT t.VerbID
FROM (SELECT DocRef, VerbID, DateUpdated
FROM &HKAPPDB_Schema_Name..l_tableName dd - this is where the dynamic table name is used
WHERE dd.VerbID is not NULL))
WHERE HKColumnID = l_ID AND VerbID is NULL;
END loop;
end;
/When I try to execute this i get an error
ORA-00942: table or view does not exist
What am I doing wrong?
Regards,
Tobyredeye wrote:
I only started about 6 weeks ago, with no tutorials and learning it on the fly; Same here.. only my introduction was to a 12 node Oracle OPS cluster all those years ago.. and required a whole new mind set after using SQL-Server extensively. But it was fun. Still is. :-)
but thats what you get when a company throws you in at the deep end with a ridiculous time constraint to migrate a whole MSSQL DB.Migrating SQL-Server to Oracle is not a simple thing. A lot of best practices in SQL-Server are absolutely worse practices in Oracle - they are that different. Simple example is lock escalation - an issue in SQL-Server. In Oracle, the concept of a lock being escalated into a page lock simply does not exist.
In terms of getting the migration done as quickly and painlessly as possible I try to reuse all the logic as it appears in the MSSQL code - in this case it was using dynamic table names. I do not doubt that i am probably shooting myself in the foot in the long run.....As long as you do not splatter too much blood on us here.. not a problem :D
Seriously though - just keep in mind that what works in SQL-Server may not work as well (or even at all) in Oracle. So do not hesitate to refactor (from design to code to SQL) mercilessly when you think it is warranted.
Maybe you are looking for
-
Using a variable in communication channel
Hi, I have a lot of Communication Channels looking for files in the same directory. This directory's path will be changed soon and so I assume I'll have to change all my Communication Channels. I was wondering whether there was a means of using a var
-
Locked out! PLEASE HELP!
Any help would be appreciated greatly! To start, I woke my computer screensaver and it prompted me with the login screen, as usual. However, when I typed in my password, the login screen shook as if it were wrong. Thinking I may have typed it wrong,
-
Downloading BP/Products/Conditions /transaction from R/3 to CRM
Could u pls tell me the how to Downloading BP/Products/Conditions /transaction from R/3 to CRM Business partner mapping Thanks in advance kumar
-
My macbook pro shows that I have to replace the battery, but I dont want to leave it at the apple service centre and would like to take it with me after replacement of the battery. Is this a quick action at genius bar? or should I try to replace it m
-
Can JSC support Sun App Server 9?
Does anyone know if JSC can support sun app server 9? Last I heard was that 8.2 is the max version. Along the same line, is there any word of another update to JSC that will work with app server 9 and jdk 6???