Cannot deselect line of a table element
Hi all,
I use a table in my WD abap. I have a simple problem : once I've selected a line, I cannot deselect it. Is it a normal behaviour ? I want the user to be able to delesect the line, so that no line of the table is selected.
Here are my settings :
- Context node :
Cardinality : 0..n
Selection : 0..1
Initialization lead selection : blank
Singleton : blank
- Table element :
selectionChangeBehaviour : auto
selectionMode : auto
Thanks for your help.
Thanks Saud, it helped me a lot.
Finally I was forced to add some code to deselect the line. I think it's strange to have to do this, but I don't find any alternative...
Here's the code I put in the ONSELECT action of the table :
DATA : ls_old_ev_param TYPE wdr_event_parameter,
ls_new_ev_param TYPE wdr_event_parameter.
DATA : ls_old_sel TYPE wd_this->element_histo,
ls_new_sel TYPE wd_this->element_histo.
DATA : lo_element TYPE REF TO cl_wdr_context_element.
DATA : lv_index TYPE i.
FIELD-SYMBOLS : <ls_data> TYPE ANY.
DATA : lo_node_table TYPE REF TO if_wd_context_node.
READ TABLE wdevent->parameters
WITH KEY name = 'OLD_LEAD_SELECTION'
INTO ls_old_ev_param.
IF sy-subrc = 0.
ASSIGN ls_old_ev_param-value->* TO <ls_data>.
IF <ls_data> IS NOT INITIAL.
lo_element ?= <ls_data>.
CALL METHOD lo_element->if_wd_context_element~get_static_attributes
IMPORTING
static_attributes = ls_old_sel.
ENDIF.
ENDIF.
READ TABLE wdevent->parameters
WITH KEY name = 'NEW_LEAD_SELECTION'
INTO ls_new_ev_param.
IF sy-subrc = 0.
ASSIGN ls_new_ev_param-value->* TO <ls_data>.
IF <ls_data> IS NOT INITIAL.
lo_element ?= <ls_data>.
CALL METHOD lo_element->if_wd_context_element~get_static_attributes
IMPORTING
static_attributes = ls_new_sel.
ENDIF.
ENDIF.
*** Same selection -> deselection
IF ls_old_sel-objid = ls_new_sel-objid.
lo_node_table = wd_context->get_child_node( 'HISTO' ).
CALL METHOD lo_element->if_wd_context_element~get_index
RECEIVING
my_index = lv_index.
CALL METHOD lo_node_table->set_selected
EXPORTING
flag = abap_false
index = lv_index.
lo_node_table->set_lead_selection_index( lo_node_table->no_selection ).
ENDIF.
Edited by: Julien999 on May 31, 2010 3:56 PM
Similar Messages
-
Line height of table in smartforms
Hi,
I have created a table in smartform. I want to set row height in the table as it is available in template. Is there any option available to set height for the table row???
Thanks in advance.
-SAIn table node it is not possible to define the height of a table line. Please find the bold paragraphs in the following text(SAP library)...
Table tab properties minimum height is set the total table height.
The line height depends on the font height used in Paragraph format for your text element.
Line Types for Tables
The height of a table depends of the amount of data to be displayed or printed in a table. Therefore, you cannot use the line types in the Table Painter alone to describe the table layout, as you do it with line types for templates:
With templates the view in the Table Painter directly maps the output on the form. This is possible because the structure of a template does not change at runtime.
With tables the view in the Table Painter is an overview of all existing line types. However, it does not indicate which line types are used when for table output.
Dynamic Cell Height
The height of a table depends on the number of table lines and on the height of all table lines included in the output. The height of each table line depends on the highest cell, which again depends on the contents to be displayed in this cell. When filling table cells with contents, nothing is truncated, instead, the cell height is increased.
In the Table Painter, the height of the line types is displayed as a constant because it has no meaning for the output.
Unlike with line types for tables, for templates you specify a fixed line height for the line type. Any output that does not fit into a cell is truncated. -
Difference between line type and table type
hi,
can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP'shi,
Go through this blog, this might help you.
/people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp
People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.
In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.
With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi-
"InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.
class="MsoNormal"><![if !supportEmptyParas]>The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO.
Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.
In a BSP when we need to work with a table we must always do the following:
1, in the Types definitions create a structure:
types : begin of ts_reclist,
mso-bidi- style='mso-tab-count:2'> receiver type somlreci1-receiver,
mso-bidi- style='mso-tab-count:2'> style='mso-tab-count: 1'> rec_type type somlreci1-rec_type,
mso-bidi- style='mso-tab-count:2'> end of ts_reclist.
mso-bidi- <![if !supportEmptyParas]> <![endif]>
but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)
2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:
class="MsoNormal"> types : tt_reclist type table of ts_reclist.
class="MsoNormal"><![if !supportEmptyParas]> <![endif]> this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables
3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:
data: t_reclist type tt_reclist.
and creating the structure based upon the structure definiton:
<![if !supportEmptyParas]> <![endif]> data: s_reclist type ts_reclist.
as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:<![endif]>
s_reclist-receiver = '[email protected]'. "<-- change address
mso-bidi- <![if !supportEmptyParas]> <![endif]>
mso-bidi- s_reclist-rec_type = 'U'.
and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal">
append s_reclist to t_reclist.
<![if !supportEmptyParas]> <![endif]>
the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1"> style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'>
class="style1">CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
style='mso-tab-count:2'> document_data = docdata
style='mso-tab-count:2'> DOCUMENT_TYPE = 'RAW'
style='mso-tab-count:2'> PUT_IN_OUTBOX = 'X'
style='mso-tab-count:2'> COMMIT_WORK = 'X' "used from rel.6.10
TABLES
mso-bidi-font-size: style='mso-tab-count:2'> receivers = t_reclist
class="style1"> <![if !supportEmptyParas]> <![endif]>
<![if !supportEmptyParas]>F inally, a comment from Thomas Jung,
<![if !supportEmptyParas]> when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.
Hope this helps, Do reward. -
Hello all,
I created a table element which contains a column of check boxes.
I want to add to my table an option to check/uncheck all the check boxes.
I already created the events but I dont know how to call the events I created using the table?
Thanks in advance,
TomerHi Tomer,
you haven't said how your gui should look like. For example you can add two buttons ("select all" and "Unselect all") for this task. Now you add two actions, one for each button. Add the actions as eventtarget in the properties of the buttons. And in the event-methods of the actions you write your code to select/deselect the checkboxes, like
public void onActionSelectAll(...) {
for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(true);
public void onActionUnselectAll(...) {
for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(false);
HTH,
Frank -
No page break between table header and first line of the table main area
Hi all.
I'm printing a form which contains a lot of tables. Sometimes while printing the table header line remains at the bootom of the page and the lines of internal table are printed on the next page (also with header because i have marked 'at page break' in the header). How is it possible not to break header line of 'Table'-node and the first line of internal table?
Regards, Nikolai.Hello Niki,
try to use page protection......
create a folder and place the text that r to be displayed without break.........
and check the checkbox page protection.
I think you cannot put an entire table in a folder & turn "Page Protection" on simultaneously.
Any ideas?
BR,
Suhas -
Different line style in tables
I've been looking for a way to change the line style of the lines in my tables, i.e. have dashed lines, but when I select the line in question and go the line style section of the graphics tab, there is only the standard solid line. Is it the case that you just cannot change the line styles of lines in tables? I use tables to layout a lot documents that I create and this missing feature would be quite an annoyance to me when it is something I was always able to do in Word.
James,
as Frank said, you cannot change the style of the lines in tables. You could send feedback to Apple to get this feature in a future version of Pages.
As a workaround, you could mark a line and set the stroke to None. Then insert a line from the shapes menu and set it's stroke to the style you want. Set both the line and the table to "Fixed on page" in Wrap inspector. Then move the line to the place of the table you want it to be. If you group the line(s) and the table, you could set Object Placement back to "Moves with text".
Obviously, it's best to use this workaround when you're quite sure that size an position of the row don't change to which you want to add the line object.
If this information is useful to you, please mark it as "helpful" or "solved" using the little buttons in the titlebar of this message. Thank you. -
Using Numbers, I need to time-stamp each line in a table for when it was entered
I need to time-stamp each line in a table for when it was entered.
I have a formula which is
"=IF(F18="","",NOW())"
it gives me the answer I want, but every time I edit any data in the formula is recalculates the date/time to reflect the most recent edit. I do not want to do this. I am open to any and all solutions including using a script. I do not really know anything about scripts except that they are really easy to use once it's written.
I have a formula i use in excel but it requires circular references in excel. I tried using this formula in numbers but I get the error that says I cannot reference a cell that references back to the cell i’m inputting the formula into (circular reference. It is easy to use in excel just by limiting the # of iterations in preferences. I can’t seem to find any such preference in numbers. Do you know of one? here is the formula:
"=IF(D4=”",”",IF(B4=”",NOW(),B4))"
I use it to time stamp each line in a spreadsheet. It is the only way to keep all the previous line from recalculating everytime I add a new line. If I can’t use this formula, do you know of a way to timestamp each line without having it update everytime I add a line or edit the form?
Thanks in advance- I know this isn’t exaclty an easy question but I have honestly looked everywhere
emelyHi Emely,
Check the Insert menu:
The highlighted item is slightly misnamed, requiring a bit more than a simple selection (or keypress combination*) to act as a time stamp.
Simply choosing the menu item willproduce the result shown in A2: A time and date value is entered, but only the Date part is displayed.
Setting the cell format to Date and Time, with both parts displayed (as I've done in column B) does show both parts of the Date and Time value, but as you can see, the time part is set to midnight, as it is in any cell where you have entered only the Date part of a Date and Time value. The date was entered here in the same manner as in A3.
To enter both the current Date and current Time, the process has a few more steps:
Select the cell
Go Insert > Date & Time
Before confirming the entry, double-click the cell (now showing the Date) to open this small dialogue:
Click the pop-up menu under Choose Date format:
Choose the last item in the list.
Results as shown in A4 and B4 of the table above.
Regards,
Barry
•Regarding the KB shortcut shown: The Mac OS lets you define a KB shortcut for any top-level menu item. The one in the menu is a user-defined keypress combination, made to be easily remembered, not to be physically convenient to use. If doing your own, you may want to try for something eassier to get your fingers on. -
How can I do to insert a 1D array in a line of a table or a 2D array ?
I have some vectors I concatenate in a 1D array when I pushed a button. Furthermore, when I pushed the same button, I would like to insert this 1D array in a line of a 2D array or in a line of a table. How can I do ?
Thanks.
Cyril.Hi,
to insert 1D array into 2D array you must use
Functions->Array->Insert Into Array.
Wire your 2D array to array input of this vi, then specify the row index you want your 1D array will be, and then wire your 1D array to element input. The output will be what you want. The length of all 1D arrays must be the same, otherwise you may loose some data.
If you want to add data to text table then you need first to convert your numeric array to textual form with
Function->String->String/Number Coversion VIs
Good luck.
The example is attached.
Oleg Chutko.
Attachments:
Insert.vi 17 KB -
Cannot add column to flexible table when ddl autocommit is off using Procedure
Hello All,
Through procedure I am trying to insert data into the target(EX_92) table(with schema flexibility)
Source table data
ID
PRODUCT_CODE
PRODUCT_NAME
PRICE
COLOR
TYPE
1
1
rugg
101.22
2
1
rugg
101.22
3
2
book
200.32
BLUE
Y
Target table QUERY
drop table EX_P2;
CREATE COLUMN TABLE EX_P2(
ID INTEGER PRIMARY KEY,
PRODUCT_CODE VARCHAR(3),
PRODUCT_NAME NVARCHAR(20),
PRICE DECIMAL(5,2)
) WITH SCHEMA FLEXIBILITY;
Procedure to insert above records with additional columns into the target table(EX_P2)
Procedure
drop procedure "DS_O1"."PROC";
create procedure "DS_O1"."PROC"(IN max_value INTEGER, IN schema_name varchar(40), IN table_name varchar(40), IN column_list varchar(400))
LANGUAGE SQLSCRIPT AS
BEGIN
DECLARE maxid integer :=0;
DECLARE INSERT_STR VARCHAR(1000) :='';
select max(ID) into maxid from "DS_O1"."EX_P2";
select :maxid from dummy;
INSERT_STR :='insert into "' || 'DS_O1' ||'"."EX_P2" ('||:column_list||') (select ' ||:column_list||'
FROM "'||:schema_name||'"."'||:table_name||'"' || ' where ID >' || :max_value || ')';
EXECUTE immediate(:INSERT_STR);
END;
Now while executing above procedure
CALL "DS_O1"."PROC" ( 0, 'DS_O1', 'TMP_EXL2','ID,PRODUCT_CODE,PRODUCT_NAME,PRICE,COLOR,STATUS,TYPE');
I am getting the following error
Could not execute 'CALL "DS_O1"."PROC" ( 0, 'DS_O1', 'TMP_EXL2','ID,PRODUCT_CODE,PRODUCT_NAME,PRICE,COLOR,STATUS,TYPE')' in 23 ms 564 µs .
SAP DBTech JDBC: [7]: feature not supported: [7] "DS_O1"."PROC": line 18 col 1 (at pos 779): [7] (range 3): feature not supported: cannot add column to flexible table when ddl autocommit is offHi Rajnish,
I had the same issue. For what it’s worth I was able to do a workaround basically creating all the columns when I create the table. The following code works for me to create the table which is just a matrix with one Integer column as the key and the rest as type Double.
It is not ideal in all scenarios because the table columns cannot be added dynamically via a procedure at a later point. This table has 27K columns now
Of course one of the advantages of a flex table would be programmatically adding columns dynamically. This works, but maybe there is still a way to add columns dynamically from a procedure, and someone else can advise.
Apparently dynamically adding columns via procedures may have some "minor" limitations due to the need to compile the procedure with knowledge of the flex table DDL. But again, hopefully someone knows another solution.
Best regards,
Mark
DROP PROCEDURE CREATE_MATRIX;
CREATE PROCEDURE CREATE_MATRIX(
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
AS
/*********BEGIN PROCEDURE SCRIPT ************/
BEGIN
-- cursor over messages
declare cursor matrix_cursor for
select distinct TERM
from TERMS
order by term;
declare cnt INTEGER := 0;
declare temptxt NVARCHAR(500000) := 'CREATE COLUMN TABLE DOC_MATRIX ( CONTENT_ID INTEGER ';
for cur_matrix as matrix_cursor do
cnt:=:cnt + 1;
select temptxt || ', C' || cnt || ' DOUBLE' into temptxt from dummy;
end for;
temptxt:=temptxt || ' ) WITH SCHEMA FLEXIBILITY';
EXEC :temptxt;
select :temptxt from dummy;
END;
DROP TABLE DOC_MATRIX;
CALL CREATE_MATRIX(); -
It cannot reference the dynamic internal table in memory as an object.
Hi,
I am getting the syntax error in the second select. I guest it cannot reference the dynamic internal table in memory as an object.
The internal table contains different fields from multiple tables and it gets created OK. Then the first select within the loop executes OK allowing me to read the multiple tables in ITABLES.
* 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.
***OK, the dynamic tables is created here
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>.
loop at ITABLES.
***OK, no syntax errors in this select here
select * appending corresponding fields of table <dyn_table>
from (ITABLES-TABNAME).
endloop.
data: ikonp like konp occurs 0 with header line.
***NOT OK, there is syntax errors
select * into table ikonp
from KONP for all entries in <dyn_table>
where knumh = <dyn_table>-knumh.
Some of the tables in ITABLES are pooled tables which does not allow me to use INNER JOINS. Therefore I need a second select in order to read the pricing table KONP.
Thanks in advance for any hint.Hi Abel,
You must be getting the syntax error that <dyn_table> does not contain the field knumh.
try putiing the entire where clause in a char type variable say wa_char and then use in ur query as
where (wa_char) .. it may work..
concatenate 'knumh' '=' '<dyn_table>-knumh' INTO wa_char SEPARATED BY SPACES.
SELECT ... from konp...
where (wa_char).
Revert if it doesnt work. -
Star schema cannot be mapped to multiple tables
Hello!
I am mapping dimension in AWM.
When I am drawing lines from the source columns to the target objects "Member". I get the message "star schema cannot be mapped to multiple tables". Sometimes I can workaround the problem by drawing the lines in a different order. But this dose not always work
I have a dimension that have several levels and hierarchy and I always get the message "star schema cannot be mapped to multiple tables" no matter in witch order I draw the lines to "Member".
Why do I get this message and how do I do to solve the problem?
Best regards,
Tina N MörnstamHi Tina:
Is your dimension snowflaked? Are you mapping from more than one source table to the target dimension? Is the hierarchy formed over different tables?
Hazbleydi C. Verástegui -
How to handle the single line selection in table control
Hi All,
I am facing a problem in the table control of modulepool program.
I have line selection as "Single" in the table control attributes. But when i am selecting a line in the table control as long as it is in the same page,the line selection is single but when i am selecting the line in the next page,the previous selection is not deselected. So I am seeing two selection for "Single line selector" attribute.
Could any one help me solve this problem?
Thanks & Regards,
S.LakshmiHi Lakshmi,
Just Go to Table control , click on it , you can see the attributes screen , there you can see option for
<b>Line selection</b>
none
multiple selection
single selection
check the radio button single selection.
that will solve your problem..
regards
vijay -
ORA-22856: cannot add columns to object tables
Oracle 9i
==========
I tried to alter a table using a simple script.
ALTER TABLE tablename ADD col VARCHAR(50);
And it gave me the error: -
ORA-22856: cannot add columns to object tables
Can someone give me some direction on how to resolve this? The script executes fine on a test env.
Thanks in advanceThanks for replying...
exit Null? Type
BUS NUMBER
REP VARCHAR2(60)
COS NUMBER
REP VARCHAR2(50)
ACC NUMBER
ADJ VARCHAR2(2000)
BAS NUMBER
BIL VARCHAR2(360)
BIL VARCHAR2(50)
BIL VARCHAR2(3)
BIL VARCHAR2(50)
BLP VARCHAR2(240)
BLP NUMBER
BOO DATE
COM NUMBER
COM NUMBER
COM NUMBER(15)
COM NUMBER(15)
COM VARCHAR2(4000)
COM VARCHAR2(30)
CUR NUMBER
CUS VARCHAR2(240)
DEA VARCHAR2(240)
EVE VARCHAR2(240)
HEA VARCHAR2(240)
HEA VARCHAR2(240)
HEA VARCHAR2(240)
HEA VARCHAR2(240)
INC VARCHAR2(30)
INV DATE
MAN VARCHAR2(360)
ORD NUMBER
ORD VARCHAR2(240)
PAY VARCHAR2(240)
PAY NUMBER
HEL NUMBER
PEO VARCHAR2(150)
PER NUMBER
PER VARCHAR2(30)
PER NUMBER(15)
PRO VARCHAR2(240)
PRO VARCHAR2(240)
QUA NUMBER(15)
QUO NUMBER
QUO DATE
QUO DATE
QUO VARCHAR2(80)
RED VARCHAR2(240)
REP VARCHAR2(360)
REP VARCHAR2(30)
REP VARCHAR2(30)
REP VARCHAR2(150)
REP VARCHAR2(3)
REP VARCHAR2(150)
REP VARCHAR2(50)
ROL VARCHAR2(60)
SHI VARCHAR2(360)
SPL VARCHAR2(240)
STA DATE
TER DATE
TOT VARCHAR2(240)
TRX NUMBER
TRX VARCHAR2(240)
TRX VARCHAR2(20)
TRX VARCHAR2(30)
WAI VARCHAR2(240)
YEA NUMBER
MAN VARCHAR2(30)
BUF NUMBER
BUF VARCHAR2(60)
EMC NUMBER
EMC VARCHAR2(60)
INT NUMBER
INT VARCHAR2(60)
SUP NUMBER
SUP VARCHAR2(60)
BRM NUMBER
BRM VARCHAR2(60)
SUP NUMBER
SUP VARCHAR2(60)
REP NUMBER
REP VARCHAR2(60)
DIV NUMBER
DIV VARCHAR2(60)
SUP NUMBER
SUP VARCHAR2(60)
REG NUMBER
REG VARCHAR2(60)
SUP NUMBER
SUP VARCHAR2(60)
ARE NUMBER
ARE VARCHAR2(60)
DIS NUMBER
DIS VARCHAR2(60)
ROL VARCHAR2(240)
ACC NUMBER
BON NUMBER
COM VARCHAR2(240)
COM VARCHAR2(240)
REP NUMBER
BIL NUMBER
BAS NUMBER
TOT NUMBER
TOT NUMBER
OVE NUMBER
BLP NUMBER
QUO VARCHAR2(30)
FN_ NUMBER
FN_ VARCHAR2(10)
SAL NUMBER
RES NUMBER
CRE NUMBER
MAN VARCHAR2(100)
PER NUMBER
PLA NUMBER
PLA NUMBER
REV VARCHAR2(30)
REP VARCHAR2(150)
OU_ NUMBER
OU_ NUMBER
EXC VARCHAR2(1)
MAN NUMBER
INV NUMBER
REP NUMBER
UPL VARCHAR2(1)
COM NUMBER
SEQ NUMBER
QUO NUMBER
PRO VARCHAR2(10)
PRO NUMBER
PRO NUMBER
BI_ NUMBER
CUR NUMBER
YTD NUMBER
PAY NUMBER
PAY DATE
PAY VARCHAR2(1000)
PAY VARCHAR2(80)
PAI VARCHAR2(1)
HOL VARCHAR2(1)
SRP NUMBER
WAI VARCHAR2(1)
WAI VARCHAR2(1)
GBK VARCHAR2(10)
TRX DATE
PAY NUMBER(15)
FIX NUMBER
TER DATE
ADJ VARCHAR2(240)
PAY NUMBER
PRO DATE
OIC DATE
OIC NUMBER
OIC VARCHAR2(30)
OIC NUMBER
HEL NUMBER
COM NUMBER
TRA NUMBER
HDR VARCHAR2(30)
LIN VARCHAR2(30)
LIN DATE
SRC DATE
EM_ DATE
EM_ DATE
ORD VARCHAR2(30)
REP VARCHAR2(150)
BIL VARCHAR2(300)
PER VARCHAR2(240)
Excuse the incomplete column names. All datatypes are basic ones and there are no constraints defined on any of the columns (dw env). The table is partitioned. -
Multiple row selection for table element
Hi,
I have a requirement where I require to select multiple rows from a table element in a WD for abap application.
I have defined a node with cardinality and selection set to 1..n.
The contex node contains 4 fields : emp_name, pernr, manager and position.
The attributes of the table element for selectionmode is set to 'multi' and 'selectionchangebehaviour' is set to 'auto'.
I have defined an action on the 'onleadselection' event.
The code in this method also includes the statement 'lo_el_team_view->set_selected( EXPORTING flag = abap_true ).'
When I execute the application only 1 row is highlighted at any one time when I select it. You can select multiple rows by holding down the 'ctrl' key but I want to avoid having to do this. Is there anything I have missed out causing multiple row selections not to be all highlighted.
Thanks in advance for any assistance.Hi raj,
you can try the following code in the 'onleadselect' event of the table,
create one attribute ' Flag' of type WDY_BOOLEAN under the node which has been binded to the table.
DATA lo_nd_node_tab1 TYPE REF TO if_wd_context_node.
DATA lo_el_node_tab1 TYPE REF TO if_wd_context_element.
DATA lo_elements TYPE wdr_context_element_set.
DATA lo_ele_select_new TYPE REF TO if_wd_context_element.
DATA lv_deselect TYPE wdy_boolean.
DATA lv_flag TYPE wdy_boolean.
DATA lv_select TYPE wdy_boolean.
DATA lv_index TYPE i VALUE 0.
lo_nd_node_tab1 = wd_context->get_child_node( name = wd_this->wdctx_node_tab1 ).
get the current selected element
lo_ele_select_new = wdevent->get_context_element( name = 'NEW_ROW_ELEMENT' ).
CHECK lo_ele_select_new IS NOT INITIAL.
check whether it has been selected or not
CALL METHOD lo_ele_select_new->is_selected
RECEIVING
flag = lv_select.
lo_ele_select_new->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_deselect ).
check whether element has been previously selected or not,if not, set the flag to select it
IF lv_select IS NOT INITIAL AND lv_deselect IS INITIAL.
lo_ele_select_new->set_attribute( name = 'FLAG' value = 'X' ).
if selected currently and previously then set the flag as false,in order to delect it
ELSEIF lv_select IS NOT INITIAL AND lv_deselect IS NOT INITIAL..
lo_ele_select_new->set_attribute( name = 'FLAG' value = ' ' ).
ENDIF.
CALL METHOD lo_nd_node_tab1->get_elements
RECEIVING
set = lo_elements.
according to the falg, select and delect the elements
LOOP AT lo_elements INTO lo_el_node_tab1.
lo_el_node_tab1->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_flag ).
IF lv_flag = 'X'.
lo_el_node_tab1->set_selected( abap_true ).
lo_nd_node_tab1->set_lead_selection_index( lv_index ). * this statement deselects the lead selection index*
ELSE.
lo_el_node_tab1->set_selected( abap_false ).
lo_nd_node_tab1->set_lead_selection_index( lv_index ).
ENDIF.
ENDLOOP.
I hope this resolves your problem.
Thanks,
krishna -
How to display table data without using ALV and table element.
Hi,
Its possible to display table data without using ALV and table element.
Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
(every time i am fetching single row data ),
But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
settings and header data etc..things.
Give solution to display data part..
Regards,
Rakhi.Hi,
Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
* Standard Filter Function setting to FALSE
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
* Standard Filter Function setting to FALSE Ends
Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
Hope this answers your query.
Thanks.
Kumar Saurav.
Maybe you are looking for
-
I use camino and safari back and forth alot. But i've started to favor safari and now the only reason i use camino is that it actually works with my keychain to auto fill in passwords, and i have TONS of them in keychain. Safair will not, the keychai
-
The program is doing great on computer but cutting the slideshow in half on the dvd.
-
Material Replication from Multiple R/3 System to SRM
Hi, Please help me reagrding the below error.....! I am trying to replicate material from two backend (r/3) systems, i am getting an error (Exception condition "LOGSYS_FOR_GUID_CHANGED" raised.). Regards, Nish Kel
-
Java Crypto - X.509 Certificate - DER encoded to Base64
How to convert DER encoded X.509 Certificate to Base64 encoded X.509 Certificate?
-
DCexport.exe process taking a lot of cpu's power
Hi everyone! Does anyone know where DCexport.exe comes from? I believe its used by dynamic converter is this right? we use dynamic converter to get the html conversion from word documents to present the results on our intranet solution. have anyone e