How to use linktoaction in table
Hi,
How can I use linktoaction in a table for each row where I need to give a remove option with linktoaction each row by clicking the linktoaction that row should delete from table.
Thanks in advance
Regards
Raj
Dear Raj,
After creating your table UI, right click and select Create Binding.
After Selecting your node and attributes in the pop- up, select the Cell Editor of the Table Column as LinkToAction.
Then go to this Table Cell and provide the action for the LinkToAction UI say OnActionRemove.
Now, double click on OnActionRemove and write the following code.
* Local Data
DATA: lfd_clicked_index TYPE i.
DATA: lfd_xfeld TYPE xfeld.
* Get the clicked index
lfd_clicked_index = context_element->get_index( ).
* Read the row on which the LinkToAction to Remove clicked
DATA lo_nd_your_node TYPE REF TO if_wd_context_node.
DATA lo_el_your_node TYPE REF TO if_wd_context_element.
* navigate from <CONTEXT> to <YOUR_NODE> via lead selection
lo_nd_your_node = wd_context->get_child_node( name = wd_this->wdctx_your_node ).
* alternative access via index
lo_el_your_node = lo_nd_your_node->get_element( index = lfd_clicked_index ).
* Remove the row.
lfd_xfeld = lo_nd_your_node->remove_element( element = lo_el_your_node ).
CHECK lfd_xfeld = abap_true.
* Give successful removal message
* get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
* Report message
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text = 'row removed successfully.'.
Please note that you have to provide
CONTEXT_ELEMENT Importing IF_WD_CONTEXT_ELEMENT, as action parameter.
Hope it helps!.
Warm regards,
Upendra Agrawal
Similar Messages
-
How to use a Sybase table in Oracle SQL statement?
How to use a Sybase table in Oracle SQL statement?
Sybase version : 11.9.2.4
Oracle version : 10.2.05
Thanks.user12088323 wrote:
How to use a Sybase table in Oracle SQL statement?
Sybase version : 11.9.2.4
Oracle version : 10.2.05
Thanks.Any Oracle client connected to the Oracle database can access Sybase data through the <font style="background-color: #FFFFCC">Database Gateway for Sybase</font> (it requires an additional license) or the <font style="background-color: #FFFFCC">Database gateway for ODBC</font> (it's free).
The Oracle client and the Oracle database can reside on different machines. The gateway accepts connections only from the Oracle database.
A connection to the gateway is established through a database link when it is first used in an Oracle session. In this context, a connection refers to the connection between the Oracle database and the gateway. The connection remains established until the Oracle session ends. Another session or user can access the same database link and get a distinct connection to the gateway and Sybase database.
Database links are active for the duration of a gateway session. If you want to close a database link during a session, you can do so with the ALTER SESSION statement.
To access the Sybase server, you must create a <font style="background-color: #FFFFCC">database link</font>. A public database link is the most common of database links.
SQL> CREATE PUBLIC DATABASE LINK dblink CONNECT TO
2 "user" IDENTIFIED BY "password" USING 'tns_name_entry';
--dblink is the complete database link name.
--tns_name_entry specifies the Oracle Net connect descriptor specified in the tnsnames.ora file that identifies the gatewayAfter the database link is created you can verify the connection to the Sybase database, as follows:
SQL> SELECT * FROM DUAL@dblink;
Configuring Oracle Database Gateway for Sybase
<font style="background-color: #FFFFCC">{message:id=10649126}</font> -
How to use a SAP table in Validation Look Up
Hi Experts,
I my job for every record in the input data set I need to check for the value of the data set column in the SAP table.
I am using a validation transform and am using the "Exists in Table" option, where I am specifying the column in the SAP table to look up.
It is giving me an error BODI-1112468 saying that SAP table cannot be used in Validation Look up.
Please suggest any other way to resolve it.
Thanks in advance.user12088323 wrote:
How to use a Sybase table in Oracle SQL statement?
Sybase version : 11.9.2.4
Oracle version : 10.2.05
Thanks.Any Oracle client connected to the Oracle database can access Sybase data through the <font style="background-color: #FFFFCC">Database Gateway for Sybase</font> (it requires an additional license) or the <font style="background-color: #FFFFCC">Database gateway for ODBC</font> (it's free).
The Oracle client and the Oracle database can reside on different machines. The gateway accepts connections only from the Oracle database.
A connection to the gateway is established through a database link when it is first used in an Oracle session. In this context, a connection refers to the connection between the Oracle database and the gateway. The connection remains established until the Oracle session ends. Another session or user can access the same database link and get a distinct connection to the gateway and Sybase database.
Database links are active for the duration of a gateway session. If you want to close a database link during a session, you can do so with the ALTER SESSION statement.
To access the Sybase server, you must create a <font style="background-color: #FFFFCC">database link</font>. A public database link is the most common of database links.
SQL> CREATE PUBLIC DATABASE LINK dblink CONNECT TO
2 "user" IDENTIFIED BY "password" USING 'tns_name_entry';
--dblink is the complete database link name.
--tns_name_entry specifies the Oracle Net connect descriptor specified in the tnsnames.ora file that identifies the gatewayAfter the database link is created you can verify the connection to the Sybase database, as follows:
SQL> SELECT * FROM DUAL@dblink;
Configuring Oracle Database Gateway for Sybase
<font style="background-color: #FFFFCC">{message:id=10649126}</font> -
How to use customer extension table for schedule line for shopping cart ?
Dear Experts,
One of our client wants to have schedule lines in shopping cart item. I am thinking of using customer extension table at item level for shopping cart. Could you please help me on how I should proceed with the appending the structures so that the end user can fill the shopping cart schedule line details?
Which fields should I consider in such cases?
Thanks and regards,
RanjanHi.
I guess you use SRM 7.0. Please go to IMG.
SRM -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Create Table Extensions and Supply with Data
Regards,
Masa -
Hi all,
can you guys suggest me how can I use pl/sql tables for the below query to incresing the performance.
DECLARE
TYPE cur_typ IS REF CURSOR;
c cur_typ;
total_val varchar2(1000);
sql_stmt varchar2(1000);
freeform_name NUMBER;
freeform_id NUMBER;
imgname_rec EMC_FTW_PREVA.EMC_Image_C_Mungo%rowtype;
imgval_rec EMC_FTW_PREVA.EMC_Content_C_Mungo%rowtype;
CURSOR imgname_cur IS
select * from EMC_FTW_PREVA.EMC_Image_C_Mungo
where cs_ownerid in (
select id from EMC_FTW_PREVA.EMC_Image_C
where updateddate > '01-JUN-13'
and path is not null
and createddate != updateddate)
and cs_attrid = (select id from EMC_FTW_PREVA.EMC_ATTRIBUTE where name = 'Image_Upload');
BEGIN
OPEN imgname_cur;
LOOP
FETCH imgname_cur INTO imgname_rec;
EXIT WHEN imgname_cur%NOTFOUND;
total_val := 'EMC_Image_C_' || imgname_rec.cs_ownerid;
sql_stmt := 'SELECT instr(textvalue,''' || total_val || '''), cs_ownerid FROM EMC_FTW_PREVA.EMC_Content_C_Mungo a Where cs_attrid = (select id from EMC_FTW_PREVA.EMC_ATTRIBUTE where name = ' || '''' || 'Body_freeform' || '''' || ')';
OPEN c FOR sql_stmt;
LOOP
FETCH c INTO freeform_id,freeform_name;
EXIT WHEN c%NOTFOUND;
IF freeform_id > 0 THEN
dbms_output.put_line (imgname_rec.cs_ownerid || ',' || total_val || ',' || freeform_id || ',' || freeform_name);
END IF;
END LOOP;
CLOSE c;
END LOOP;
CLOSE imgname_cur;
END;
Thanks in Advance.can you guys suggest me how can I use pl/sql tables for the below query to incresing the performance.
There would be absolutely no point at all in improving the performance of code that has NO benefit.
The only result of executing that code is to possibly produce some lines of output AFTER the entire procedure if finished:
dbms_output.put_line (imgname_rec.cs_ownerid || ',' || total_val || ',' || freeform_id || ',' || freeform_name);
So first you need to explain:
1. what PROBLEM you are trying to solve?
2. why you are trying to use PL/SQL code to solve it.
3. why are you using 'slow by slow' (row by row) processing and then, for each row, opening a new cursor to query more data?
You should be using a single query rather than two nested cursors. But that begs the question of what the code is even supposed to be doing since the only output is going to a memory buffer. -
How to use dynamic internal table with FOR ALL ENTRIES
Hello SDNers,
I am having a dynamic internal table & want to use FOR ALL ENTRIES(FAE) using this dyn. table.
This works fine for me:
IF <lt_tmp> IS NOT INITIAL. "<lt_tmp> is my dyn. internal table
SELECT field1 field2
FROM TABLE ztable
INTO TABLE itab "Itab is a static table
FOR ALL ENTRIES IN <lt_tmp>
WHERE (lv_dynwhere). "lv_dynwhere -> dynamic where clause
ENDIF.
SAP documentation says:
"The logical expression sql_cond of the WHERE condition can be comprised of several logical expressions using AND and OR. However, if FOR ALL ENTRIES is specified, there must be at least one comparison with a column of the internal table itab that can be specified statically or dynamically. "
How do we specify the column of the internal table dynamically ? Can we do something like this:
IF <lt_tmp> IS NOT INITIAL. "<lt_tmp> is my dyn. internal table
SELECT field1 field2
FROM TABLE
INTO TABLE itab "Itab is a static table
FOR ALL ENTRIES IN <lt_tmp>
WHERE key_field1 = (dynamic token for column1 of <lt_tmp>)
key_field2 = (dynamic token for column2 of <lt_tmp>)
ENDIF.
ENDIF.
Let me know if i am not clear about my requirement.
BR,
SuhasHello Thomas,
What i meant was something like this:
WHERE key_field1 = ('<LT_TMP-COL1>') AND
key_field2 = ('<LT_TMP-COL2>')
I am confused by what SAP means with "dynamic representation of internal table columns" in FAE ?
@Rob: I was referring to SAPNW 7.0 documentation & the phrase (release 6.40 & higher) is missing. Anyways fyi i am on ECC5.0 ABAP release 6.40.
@Subhankar: This is what Marcin had proposed in For all entries and dynamic table.
Thanks,
Suhas
Edited by: Suhas Saha on Apr 6, 2010 11:53 AM -
How to Use and Filter Table contents after execution of Bapi
Can anybody guide me how to Use and Filter the table Contents which i got after successful execution of a Bapi
I used Component Controller in my Project
Ex: My table contains Redundant data for a single column but i want to display the column contents with out Redundancy
Name
Raghu
Raghu
Raghu
Debasish
Debasish
I want to filter the table contents and i want to display the table with out Redundancy
and Even when i am using a Dropdown i selected a Column from a Table as the values for that Dropdown but that table is having redundant data and the same data is getting displayed in that Dropdown i want the Dropdown to display data with out redundancy
ThanksI also got that problem recently and after debuging for a while I figured out, that it was resulting from an error in my table's model: When the model received new items to display I
1.) Fired an delete event for the old items
2.) Fired an insert event for the new items
Problem was that when firing the delete event I didn't already assigned the new items to the model. Therefore it had still the old row count.
Maybe you have also a faulty table model?... -
How to use linktoaction and linktourl ui elements
Hi All,
I am working with the ui elements of a webdynpro.In that i am unable to understand the linktoaction and linktourl ui elements.Can anybody tel me how to use those ui elements with simple steps of coding.
Thanks in Advance,Those are fairly basic UI elements. They are just hyperlinks. LinkToURL works just like a normal HTML hyperlink and fires clientside navigation to the URL you specify. LinkToAction looks the same to the user (hyperlink), but instead fires a server side event triggering ABAP logic when clicked. Consider reading the online help for more details and the listed samples applications:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/49/e8884118aa1709e10000000a155106/content.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0f/e8884118aa1709e10000000a155106/content.htm -
How to use one hash table inside another hash table
Hi everyone,
Any example of hash table inside another hash table.
Can one here help me how to write one hash table inside another with repeating keys for the first hash table.
Thanks,
kanty.Do you mean you want the 'value' entries in a hash table to themselves be hash tables? Easy but this often indicates a design flaw.
Hashtable<String,<Hashtable<String,Value>> fred = new Hashtable<String,<Hashtable<String,Value>> ();But what do you mean by "with repeating keys for the first hash table"?
Edited by: sabre150 on Jul 2, 2010 10:11 PM
Looks like you have already handled the declaration side in your other thread. I suspect you should be writing your own beans that hold the information and these beans would then be stored in a Map. The problem I have is that your description is too vague so I can't be certain. -
How to use single buffered table with FOR ALL ENTRIES KEYWORD
Hai,
I'm Using TJ02T Database table, It is single buffered table but at the same time I want to use FOR ALL ENTRIES KEYWORD , Please Help me.
Regards,
S.JananiHi,
FOR ALL ENTRIES will not depend on the buffering nature of the table. The single buffered table will only only buffer one record into memory. You can still use the statement to query the values, but it may have performance problems if the data volume is high since the records are not completely buffered into memory, the time will spent in getting data from DB.
Thanks..
Preetham S -
How to use an internal table of a calling program in to a called program
Hi Experts,
I am calling a report in another report through SUBMIT .
I want to use the internal table of calling prog into
called prog but problem is i have to do it without exporting to memory id and importing it.
Plz provide me any soln..Check for more information on SUBMIT
[http://www.sapdevelopment.co.uk/reporting/rep_submit.htm] -
How to use a checkbox table cell in FXML
I've figured out how to make a column in a TableView render as a checkbox rather then just text when the UI is written in Java. Now I'm trying to figure out how to do the same thing with FXML. I've tried a couple experiments which have all failed, usually with an exception complaining that it can't coerce a table cell class type (or extension) to an interface (i.e. Callback).
Right now I'm just trying to make one of the columns be a checkbox. I'm not trying to use any custom type. In other words, in Java I would have done the following:
TableColumn<MyModel, Boolean> col1 = new TableColumn<MyModel, Boolean>();
col1.setCellValueFactory(new PropertyValueFactory<MyModel, Boolean>("col1Field"));
col1.setCellFactory(CheckBoxTableCell.forTableColumn(col1));This works when I build the UI using Java API calls. Does anyone know how to do this in FXML?Thank you both.
I used Luca's suggestion as a first step.
You'll find attached my v.i. that enables me to do what I wanted. It finally works as I expected. It would have been much simpler if my DAQ was able to measure directly a resistance!
Loris
Attachments:
banc_de_test_température.vi 205 KB -
How to use full qualified table names in RPD
Hi,
We are implementing the BI Financial Analytics, we have a requirement to use diffrent user accounts for DAC , ETL and OBIEE
DAC, ETL we are using user as XXOBI
For OBIEE RPD we have to use user with read only access such as XXOBI_APP
How can i make the changed to BI server / RPD to use full qualified names.
I have tried to select the Full Qualified table name property in Oracle Datawarehouse connection pool setting.
If i enable that all my sql query is showing tables as catalog.dbo.w_party_d ( my tables in physical layer showing under catalaog -> dbo -> all tables and joins)
Any help in this is appreciated.
Thanks
Kriskmangamuri wrote:
Hi,
We are implementing the BI Financial Analytics, we have a requirement to use diffrent user accounts for DAC , ETL and OBIEE
DAC, ETL we are using user as XXOBI
For OBIEE RPD we have to use user with read only access such as XXOBI_APP
How can i make the changed to BI server / RPD to use full qualified names.
I have tried to select the Full Qualified table name property in Oracle Datawarehouse connection pool setting.
If i enable that all my sql query is showing tables as catalog.dbo.w_party_d ( my tables in physical layer showing under catalaog -> dbo -> all tables and joins)
Any help in this is appreciated.
Thanks
KrisAre you saying you just need to access the database using different accounts? If that is the case, why dont you just update the connection pool settings like username and password with XXOBI_APP account which you are supposed to be using for OBIEE? -
How to use CheckBox in Table to do mulit-selection in Creator2 Update1?
Hi.
I put CheckBox(checkbox1) into Table to do a multi-selection effect..
and I set checkbox1's selected to true to make default selection.
however checkbox1 doesn't show selected in at Design Time in Creator2 , and also at Runtime in Firefox.
then I put another CheckBox(checkbox2) outside the Table, and set selected to ture.
chekcbox2 is default selected both in Designtime and Runtime.
I am confused about that
And, more troubles is, I can't know which Row datas were checked.
I call CheckBox.getSelected(checkbox1.getID()) got NULL.
I call checkbox1.getSelected() got NULL.
Then I write a TableDataProvider to handle this Table and always return Boolean.TRUE at selection field
But still no work.
Does anyone know how to do multi-selection in Table?
Thanks a lot.Hi,
I also test RadioBox in Table and set RadioBox named 'rbSelection' , the table is bind to a dataprovider.
But, It does't work, too.
I can't get the selection from any API I know in a Button action (outside of Table)
RadioButton.getSelected(rbSelection.getName())) return null
rbSelection.getSelectedValue() return true
rbSelection.getSelected()) return null
rbSelection.getSubmittedValue()) return null
tableRowGroup1.getSelectedRowKeys().length size is 0
But when I use ((HttpServletRequest)this.getFacesContext().getExternalContext().getRequest()).getParameter("rbSelection")
I can get the correct selection result.
Is this a Creator2 bug or my mistake?
THANKS~ -
How to use dynamic internal table when using gui_upload?
Hi Experts,
my scenario is like i have header data, item data and serial numbers.
so with respect to the quantity in unit of measure ,there will be number of serial numbers..
i have declared the dynamic internal table,but i am not getting the logic to change the structure accordingly with respect to the flat file entries..
is it possible to do or its not possible....any suggestion!!!!i have declared like this....
TYPES: BEGIN OF ty_final,
bldat TYPE string, "Document Date
budat TYPE string, "Psting Date
bktxt TYPE string, "Document Header Text
werks TYPE string, "Plant
lgort TYPE string, "Storage Location
matnr TYPE string, "Material Number
erfmg TYPE string, "Quantity in Unit Of Entry
anln1 TYPE string, "Asset Number
anln2 TYPE string, "Asset Subnumber
sernr TYPE string, "serial Number
END OF ty_final.
DATA : it_final TYPE TABLE OF ty_final,
wa_final TYPE ty_final.
FIELD-SYMBOLS : <fs_final> TYPE table.
ASSIGN it_final TO <fs_final>.
after this i called gui upload and passed internal table it_final..
but i have to change the internal table structure dynamically before the upload function.so that it will match with the flat file...
Regards
KarthickThere are at least two approaches you can use to change/generate new dynamic-structured table. Either with [RTTI + RTTS|https://wiki.sdn.sap.com/wiki/display/Snippets/CreatingFlatandComplexInternalTablesDynamicallyusingRTTI] or using [CL_ALV_TABLE_CREATE|http://www.sdn.sap.com/irj/scn/advancedsearch?query=cl_alv_table_create] . In this one just determine fieldcatalog of current table and change it accordingly, then regenarate table.
There are plenty of examples in SCN for this. You should not face difficulties applying this.
Regards
Marcin
Maybe you are looking for
-
"unable to open project file" after importing layered Photoshop file
After spending a day of work, I saved and closed my 720p project. Today, I can't open it. I get a message saying: "Unable to open project file." Same thing happens with the auto-saved copy. I have narrowed down the problem to this: I made a new 720p
-
Using Spry Data Set Variable in Recordset
I have a page that contains a spry data set and a recordset. The recordset uses one of the variables from the spry data set to filter its results. how do I apply the spry data set variable to the recordset?
-
Update a column for a subset of data
Hi all, I hope you can help me with some suggestions in how to solve the issue i have for the table below SQL> select * from table1; NAME ID CONCAT SAME_GR A 10 100|200|300 B
-
Interview qstns..??
Hi Gurus, i am posting some of the interview qstns aked in one of the top MNC's last week... pls any one reply me answers to these qstns... full points will be assigned .... a little explanation will be highly appreciated.. here are the questions...
-
7.0 question on IMG entry Define Acct Ident for Multi BP
IMG t-code CRMC_IC_BPPROFMUL in the Profile Default select Search Tabs "Account Roles" choosing Account BP Business Partner (sequence 10) then choosing account roles are config entries CRM000 Sold-To Party seq 10 CRM006 Consumer seq