Get Multiple Rows into internal Table using Webdynpro Alv Display ..
Hi guys ,
I need to find out the logic for getting all the selected rows into the internal table.
When i display the ALV Output on webdypro screen .
USer Selects multiple rows for further processing ..
Ineed to get all the rows selected by user into an internal table .
Please let me know how to achive this ...
Thanks in advance for quick reply
Regards
Saurabh Goel
Hi,
You need to use the method GET_SELECTED of IF_WD_CONTEXT_NODE to get the rows selected. Also ccheck for the paramters of that method, this retruns the element set.
This meets your requirement.
Regards,
Lekha.
Similar Messages
-
Inserting multiples rows into a table using function or procedure..
How do i insert multiples rows into a table using function or procedure?
Please provide me query..Use FORALL bulk insert statement...
eg:
procedure generate_test_data as
type cl_itab is table of integer index by pls_integer;
v_cl_itab cl_itab;
type cl_vtab is table of varchar2(25) index by pls_integer;
v_cl_vtab cl_vtab;
type cl_dtab is table of date index by pls_integer;
v_cl_dtab cl_dtab;
begin
for i in 1.. 100 loop
v_cl_itab(i):= dbms_random.value(1,1000);
v_cl_vtab (i):=dbms_random.string('a',20);
v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');
end loop;
forall i in v_cl_itab.first .. v_cl_itab.last
execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);
commit;
end; -
Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency
I need to insert multiple rows into a database table using the JDBC adapter (receiver).
I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?Hi Bhavesh/Kanwaljit,
If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
Why i am saying this?
If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
<i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
Doesnt this mean that rows are inserted one by one?
Correct me if i am wrong.
This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
Regards,
Sumit -
Inserting multiple rows into a table (using sequences)
Hi!
I want to insert multiple rows into a db table, but I don't know how.
I know how to insert 1 row using a sequence:
I put all the fields in the jsp form's page and in the submit page I put something like this:
<jbo:Row id="myRow" datasource="ds" action="Update" rowkeyparam="MyRowKey" >
<jbo:SetAttribute dataitem="*" />
</jbo:Row>
But how can I insert multiple rows like this:
Id Name
1 ana
2 monteiro
3 maria
Thanks!Hi Chris,
I think this should give you what you need: Working with a Multiple Select List Item
--Jennifer -
Inserting multiple rows into a table using a multiple-select list
I'm trying to figure out how to take the output of a multiple-select list (":" separated list of values) and use that to update a table by inserting multiple rows based on the values. Is there a straight-forward way to do that in APEX?
Thanks.
ChrisHi Chris,
I think this should give you what you need: Working with a Multiple Select List Item
--Jennifer -
Best practice for deleting multiple rows from a table , using creator
Hi
Thank you for reading my post.
what is best practive for deleting multiple rows from a table using rowSet ?
for example how i can execute something like
delete from table1 where field1= ? and field2 =?
Thank youHi,
Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
Hope this helps.
Thanks,
RK. -
How to join THREE different tables into internal table using one select statement .
How to join THREE different tables into internal table using one select statement .
Hi experts,
I would like to request your guidance in solving the problem of joining the data from three different database tables into one internal table
Scenario:
Database tables:
SPFLI
SFLIGHT
SBOOK.
Table Fields:
SPFLI - CARRID CONNID COUNTRYFR CITYFRM COUNTRYTO CITYTO
SFLIGHT - CARRID CONNID FLDATE SEATSMAX SEATSOCC SEATSMAX_C
SEATSOCC_C SEATSMAX_F SEATSOCC_F
SBOOK - CARRID CONNID CLASS
MY INTERNAL TABLE IS IT_XX.
Your help much appreciated.
Thanks in advance.
Pawan.Hi Pawan,
please check below codes. hope it can help you.
TYPES: BEGIN OF ty_xx,
carrid TYPE spfli-carrid ,
connid TYPE spfli-connid ,
countryfr TYPE spfli-countryfr,
cityfrom TYPE spfli-cityfrom ,
countryto TYPE spfli-countryto,
cityto TYPE spfli-cityto ,
fldate TYPE sflight-fldate ,
seatsmax TYPE sflight-seatsmax ,
seatsocc TYPE sflight-seatsocc ,
seatsmax_b TYPE sflight-seatsmax_b,
seatsocc_b TYPE sflight-seatsocc_b,
seatsmax_f TYPE sflight-seatsmax_f,
seatsocc_f TYPE sflight-seatsocc_f,
class TYPE sbook-class,
END OF ty_xx,
t_xx TYPE STANDARD TABLE OF ty_xx.
DATA: it_xx TYPE t_xx.
SELECT spfli~carrid
spfli~connid
spfli~countryfr
spfli~cityfrom
spfli~countryto
spfli~cityto
sflight~fldate
sflight~seatsmax
sflight~seatsocc
sflight~seatsmax_b
sflight~seatsocc_b
sflight~seatsmax_f
sflight~seatsocc_f
sbook~class
INTO TABLE it_xx
FROM spfli INNER JOIN sflight
ON spfli~carrid = sflight~carrid
AND spfli~connid = sflight~connid
INNER JOIN sbook
ON spfli~carrid = sbook~carrid
AND spfli~connid = sbook~connid.
Thanks,
Yawa -
File Format Mismatch while update into Internal table using RFC_REMOTE_FILE
Hi All,
I used RFC_REMOTE_FILE to communicate with the presentation server in Background Mode. I connected successfully and got output too.
But my requirement is to update the .csv file into internal tables.
With RFC_REMOTE_FILE i can get the data as single row. But I can't separate the fields and update into the corressponding table field.
What is the solution for the above issue. Could anyone help me.
For the above RFC Communication I followed the below link
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2&overridelayout=trueHi All,
I used RFC_REMOTE_FILE to communicate with the presentation server in Background Mode. I connected successfully and got output too.
But my requirement is to update the .csv file into internal tables.
With RFC_REMOTE_FILE i can get the data as single row. But I can't separate the fields and update into the corressponding table field.
What is the solution for the above issue. Could anyone help me.
For the above RFC Communication I followed the below link
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2&overridelayout=true -
Inserting Multiple Rows into a Table
I am having problems insert multiple rows. I am using Table1.Row1.instanceManger.addInstance(1).
I try adding another line using
Table1.Row2.Cell2.value.#text= "TEST"
and I get an error acessor is unknown. I assume this is an index issue. Can someone tell me if I am doing this wrong and discuss table indexes?The first thing I notice is that your variable, "num," isn't initialized in the FOR loop like I'm used to seeing.. The next thing I would try would be declaring my variables outside of the loop. Something like this maybe.
String query = null;
Statement stmt = null;
int rowsUpdated = 0;
for (int num = 0; num < 10; num++); {
query = "INSERT into apartment (apartmentID,blockID) VALUES ('"+num+"','"+aid+"')";
stmt = con.createStatement();
rowsUpdated += stmt.executeUpdate(query);
}Let me know how it goes.
-Aaron
http://www.WeKnowErrors.com/ A free Wiki for error codes and computer problems. -
How to get multiple rows from database table?
hello !
I need to get multiple rows from a OLEDB database table and display them on a table object.
I did "Wrap in subfrom" on the table, set subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
But I can get only one row on the table object.
I need your help.
ThanksHi,
best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
Frank -
How can i read local excel file into internal table in webdynpro for abap a
Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
thank u for your replyDeep,
File manuplations...............................
1. At the presentation level:
->GUI_UPLOAD
->GUI_DOWNLOAD
->CL_GUI_FRONTEND
2. At the application server level:
->OPEN DATASET : open a file in the application server for reading or writing.
->READ DATASET : used to read from a file on the application server that has been opened for reading
-> TRANSFER DATASET : writing data to a file.
-> CLOSE DATASET : closes the file
-> DELETE DATASET : delete file
If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
call function 'GUI_UPLOAD'
exporting
filename = p_file
filetype = 'ASC'
has_field_separator = '#'
tables
data_tab = t_data
p_file : excel file path.
t_data : internal table
<b>reward points if useful.</b>
regards,
Vinod Samuel. -
Hello, I am trying to insert 10,000 duplicate rows into a table for testing purposes. What statements can I use to do this?
Oracle 11gv2 on HP-UXHi,
You want all of the 10,000 new rows to be completely identical? Here's one way:
INSERT INTO table_x (quantity, entry_date)
SELECT 100, SYSDATE
FROM dual
CONNECT BY LEVEL <= 10000
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
If you're asking about a DML statement, such as INSERT, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished. In this problem, it could be that the only table involved has no rows before the DML. In that case, post no INSERT statements, just the CREATE TABLE statement and the results. Simplify the problem. Pretend that you only want to INSERT maybe 5 rows; we'll find a solution that works equally well for 10,000 rows.
Explain, using specific examples, how you get those results from that data. -
Displaying multiple rows of a table using smartforms
hi,
how to get multiple rows on a form from a table using smartforms.I succeded in getting only the first row of the table on the main window of the page .In order to display more than one record on the page what i have to do.You have to use LOOPS / TEMPLATES to achieve this
Here is a very good code sample for using Template,Table,Loop in smartforms with screen shot
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
Please do not post multiple threads. Kindly close them rewarding point for helpful answers,
extracting multiple records
to display multiple records in smart form
Re: extracting multiple records
Kindly reward point and close the duplicates.
Regards
Kathirvel -
How to get editable data into internal table
Hi ABAPers,
I am displaying REUSE_ALV_GRID_DISPLAY report with one editable field and i have post button in report. Once i select post button i need to get editable data to internal table which i passed to REUSE_ALV_GRID_DISPLAY.
actually i am writing below code but data is not coming to internal table.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'PF-STATUS'
i_callback_user_command = 'USER_COMMAND '
it_fieldcat = t_field[]
i_default = 'X'
TABLES
t_outtab = <fs_display1>. "t_display
FORM user_command USING g_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
g_test1 = g_ucomm.
CASE g_ucomm.
WHEN 'POST'.
READ TABLE <fs_display1> ASSIGNING <fsw_display1> INDEX 1. "Just for testing index 1
IF sy-subrc = 0.
w_display = <fsw_display1>.
APPEND w_display TO t_display.
CLEAR : w_display.
ENDIF.
PERFORM v1.
PERFORM bapi_call.
ENDCASE.
ENDFORM. "USER_COMMAND
Please help me how to get.
Regards,
Raju.Hi,
Try the following:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'PF-STATUS'
i_callback_user_command = 'USER_COMMAND '
it_fieldcat = t_field[]
i_default = 'X'
TABLES
t_outtab = <fs_display1>. "t_display
FORM user_command USING g_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
g_test1 = g_ucomm.
CASE g_ucomm.
WHEN 'POST'.
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
READ TABLE <fs_display1> ASSIGNING <fsw_display1> INDEX 1. "Just for testing index 1
IF sy-subrc = 0.
w_display = <fsw_display1>.
APPEND w_display TO t_display.
CLEAR : w_display.
ENDIF.
PERFORM v1.
PERFORM bapi_call.
ENDCASE.
ENDFORM. "USER_COMMAND
Hope it helps.
Regards,
Gilberto Li -
Delete row from internal table using field symbol.
Hi friends,
I created dynamic internal table using field symbol. I want to delete some data using where clause.
for example. i want to use like,
DELETE <FS> WHERE KUNNR = WA_KNA1-KUNNR.
Like the above statment it won't work. How i can use delete with where clause in field symbols.
Hope any one can help me.
Thanks and regards
Srikanth. Shi Srikanth,
I think you have to LOOP through the whole internal table and check each line and decide to delete or not:
LOOP at <itab> INTO <wa>.
ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <wa> TO <field>.
CHECK <field> IS ASSIGNED.
IF <field> EQ WA_KNA1-KUNNR.
DELETE ...
ENDIF.
UNASSIGN <field>.
ENDLOOP.
hope this helps
ec
Maybe you are looking for
-
One of my Macbook Pros can no longer print wirelessly to my HP 8100
Before I had AT&T U-Verse installed yesterday, I was using AT&T DSL. I had an Apple Time Capsule that I had attached my HP OfficeJet Pro 8100 to via USB. We have 2 Macbook Pros and they were able to print wirelessly to the 8100. When the technicia
-
Error while using Remote object
Badri can you please put the code that we are using
-
Quicktime will not load completely
Pop up on screen that I need to update QT to latest version. When I do this it says"info. received from the QT server is invalid". Have used QT with itunes successfully for a long time. Tried uninstalling itunes and QT and reinstalling, but the compu
-
How to use a project in another project
I am learning Java, Activiti and Vaadin - all at once. I am so new to Java I am not even sure how to ask this question. I have been searching and trying for the last couple of hours. I am following a book on Vaadin. They have example code. It needed
-
Idoc creation TCODE??
Hi I had created a IDCO,with z-segment with the Vendor Details(LFA1-table) fileds. Please tell me the TOCDE for Creating the idoc. Vipin