Reg : Passing multiple rows of table data to the RFC
Hi,
I am passing one row of data from webdynpro table to table of RFC.
How to pass multiple rows of data.
Please help me out.
Thanks
Risha
hi
Person--->node(cardinality 1..n)
FirstName-->Attribute
LastName-->Attribute.
Person1-->RFC table node.(cardinality 1..n)
FName-->Attribute
LName-->Attribute
for(int i=0;i<wdContext.nodePerson().size();i++)
//Retrieving values from table
IPrivate<View>.IPersonElement element1=wdContext.nodePerson().createPersonElement();
String fname=element1.getFirstName();
String lname= element1.getLastName();
wdContext.nodePerson().addElement(element1);
//Inserting into table of RFC
IPrivate<View>.IPerson1Element element2=wdContext.nodePerson1().createPerson1Element();
element2.setFname(fname);
element2.setLname(lname);
wdContext.nodePerson1().addElement(element2);
Regards
sowmya.
Similar Messages
-
Passing multiple rows from one action to another
Hi,
I've build a Guided Procedure Process with two actions. Both actions call a Visual Composer Model (deployed as Flex).
The Processdesign is:
Process
---Block
Action 1
CO 1 as VC Model (Flex)
Action 2
CO 2 as VC Model (Flex)
From the first vc model I want to pass multiple rows (its a vc table) to the second vc model. Therefor I've group the out-going parameters from model 1 with the in-coming parameters from model 2 at the block-level.
Now, when I start my process I have two results in the table of vc model 1 and will pass them to model 2. But only one record (always the first) is shown at model 2.
Can you say me the reason for this? Have I configured the parameter-grouping false? Or isn't it possible to pass multiple rows at guided procedures?
I'm using Visual Composer 7.0 and Guided Procedures 7.0 technology.
Thanks in advance
Claudiahi,
Do structure mapping to pass row values
Thanks
Gopal -
How can I pass multiple condition in where clause with the join table?
Hi:
I need to collect several inputs at run time, and query the record according to the input.
How can I pass multiple conditions in where clause with the join table?
Thanks in advance for any help.
Regards,
TDIf you are using SQL-Plus or Reports you can use lexical parameters like:
SELECT * FROM emp &condition;
When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
SELECT &columns FROM &tables &condition;
But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
Best of luck! -
Passing Multiple rows from one external webpart list to another
Hi Folks,
I have almost spent 1 week looking into this without any success. I have an external list "List A" (in a webpart) with one of the columns as "State".
Another external list "List B" (in a webpart ) has state and user as columns. In some case I want to pass 1 state and in another I want to pass multiple state. Passing one state from List A to List B works fine. But Multiple state does
not work because the webpart list has the property "Send First row to connected web parts when page loads". If I disable this option then the web part does not pass anything. Is there a way to pass multiple rows from one Webpart
external list to other?http://www.sharepointanalysthq.com/2010/07/bcs-external-list-limitations/
No Lookups
Unfortunatly the only thing that you can do a look up on in an external list is on the ID column, anything else and you are out of luck.
http://social.technet.microsoft.com/Forums/en-US/615771a0-ba78-4e38-9e2d-ded0204173ba/external-list-referenced-as-sharepoint-lookup?forum=sharepointgeneralprevious
Try below webpart. it should help
http://www.sparqube.com/SharePoint-Lookup-Column/
If this helped you resolve your issue, please mark it Answered -
ABAP Code for Backup the entire table data in the application server
Hello Friends,
I have to create the table data Backup and Store the entire table data in the application server and also be able to restore the data back if needed.
this should be dynamic program for any table based on the table name given on the application server.. I have developed a program for this but its having problems with the Quantity, amount. Its not writing it correctly at the application level.
ANy Suggestions on this.
Below is the program for this.
Thanks,
Ster.
* Report YWMM_TABLE_DUMP *
REPORT ywmm_table_dump .
TABLES :
dd03l.
* Type spool declaration
TYPE-POOLS:
abap, slis.
DATA: i_table_data1 TYPE REF TO data.
DATA : it_dd03l LIKE dd03l OCCURS 0 WITH HEADER LINE.
*DATA : gt_fieldcat TYPE lvc_s_fcat.
DATA : i_fcat TYPE STANDARD TABLE OF lvc_s_fcat,
l_dr_line TYPE REF TO data,
l_v_as4vers TYPE as4vers.
FIELD-SYMBOLS: <f_table_data1> TYPE STANDARD TABLE,
<f_wa_table_data1> TYPE ANY.
SELECTION-SCREEN: BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS: rb_copy RADIOBUTTON GROUP map DEFAULT 'X',
rb_rest RADIOBUTTON GROUP map.
SELECTION-SCREEN: END OF BLOCK bl1.
SELECTION-SCREEN: BEGIN OF BLOCK bl2 WITH FRAME TITLE text-002.
PARAMETERS: p_table TYPE tabname OBLIGATORY,
p_plfld TYPE dd03l-fieldname.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_bkfile TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK bl2.
PERFORM get_data.
IF rb_copy = 'X'.
PERFORM backup.
ELSEIF rb_rest = 'X'.
PERFORM database_update.
ENDIF.
*& Form get_data
FORM get_data.
CLEAR i_fcat.
REFRESH i_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_table " Table Name
CHANGING
ct_fieldcat = i_fcat
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = i_fcat
IMPORTING
ep_table = i_table_data1.
IF sy-subrc = 0.
ASSIGN i_table_data1->* TO <f_table_data1>.
ELSE.
WRITE: 'Error creating internal table'.
ENDIF.
IF rb_copy = 'X'.
SELECT * FROM (p_table) INTO CORRESPONDING FIELDS OF
TABLE <f_table_data1> UP TO 20 ROWS.
ELSEIF rb_rest = 'X'.
CREATE DATA l_dr_line LIKE LINE OF <f_table_data1>.
ASSIGN l_dr_line->* TO <f_wa_table_data1>.
*Get Data from Application Server
* Opening the dataset P_BKFILE given in the selection screen
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR INPUT IN TEXT MODE." ENCODING DEFAULT.
IF sy-subrc NE 0.
* MESSAGE:
ELSE.
DO.
* Reading the file from application server
READ DATASET p_bkfile INTO <f_wa_table_data1>.
IF sy-subrc = 0.
APPEND <f_wa_table_data1> TO <f_table_data1>.
ELSE.
EXIT.
ENDIF.
ENDDO.
* Closing the dataset
CLOSE DATASET p_bkfile.
ENDIF.
ENDIF.
ENDFORM. " get_data
*& Form backup
* text
* --> p1 text
* <-- p2 text
FORM backup.
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR OUTPUT IN TEXT MODE.
IF sy-subrc NE 0.
WRITE: text-017.
STOP.
ELSE.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
ENDIF.
CLOSE DATASET p_bkfile.
ENDFORM. " backup
*& Form database_update
FORM database_update.
DATA : i_mara_u TYPE STANDARD TABLE OF mara WITH HEADER LINE,
i_ekpo_u TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
i_eban_u TYPE STANDARD TABLE OF eban WITH HEADER LINE,
i_resb_u TYPE STANDARD TABLE OF resb WITH HEADER LINE,
i_plpo_u TYPE STANDARD TABLE OF plpo WITH HEADER LINE,
i_stpo_u TYPE STANDARD TABLE OF stpo WITH HEADER LINE,
i_vbap_u TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
i_vbrp_u TYPE STANDARD TABLE OF vbrp WITH HEADER LINE,
i_lips_u TYPE STANDARD TABLE OF lips WITH HEADER LINE,
i_afvc_u TYPE STANDARD TABLE OF afvc WITH HEADER LINE,
i_asmd_u TYPE STANDARD TABLE OF asmd WITH HEADER LINE,
* i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_qmel_u TYPE STANDARD TABLE OF qmel WITH HEADER LINE,
i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_esll_u TYPE STANDARD TABLE OF esll WITH HEADER LINE,
i_t165_u TYPE STANDARD TABLE OF t165 WITH HEADER LINE,
i_t165e_u TYPE STANDARD TABLE OF t165e WITH HEADER LINE,
i_twpko_u TYPE STANDARD TABLE OF twpko WITH HEADER LINE,
i_tpext_u TYPE STANDARD TABLE OF tpext WITH HEADER LINE,
i_ce4mxpa_u TYPE STANDARD TABLE OF ce4mxpa WITH HEADER LINE,
i_ce4mxpa_acct_u TYPE STANDARD TABLE OF ce4mxpa_acct WITH
HEADER LINE,
i_zaim_u TYPE STANDARD TABLE OF zaim WITH HEADER LINE,
i_s012_d TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_s012_i TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_dummy TYPE STANDARD TABLE OF mara.
CASE p_table.
WHEN 'MARA'.
* Non-Key
PERFORM move_to_table USING <f_table_data1>
CHANGING i_mara_u[]
i_mara_u.
PERFORM update_table USING i_mara_u[].
ENDCASE.
ENDFORM. " database_update
*& Form move_to_mara
FORM move_to_table USING p_tab_from TYPE STANDARD TABLE
CHANGING p_tab_to TYPE STANDARD TABLE
p_w_table.
DATA: l_wa_fcat TYPE lvc_s_fcat.
FIELD-SYMBOLS: <f_field_from> TYPE ANY,
<f_field_to> TYPE ANY.
LOOP AT p_tab_from ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_wa_fcat.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field_from>.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE p_w_table TO <f_field_to>.
<f_field_to> = <f_field_from>.
ENDLOOP.
APPEND p_w_table TO p_tab_to.
ENDLOOP.
ENDFORM. " move_to_mara
*& Form update_table
FORM update_table USING p_table_update TYPE STANDARD TABLE.
SELECT SINGLE *
FROM dd03l
WHERE fieldname = p_plfld
AND tabname = p_table
AND keyflag <> 'X'
AND as4local = 'A'
AND as4vers = l_v_as4vers
AND ( comptype = 'E' OR comptype = space ).
IF sy-subrc = 0.
* Do update
IF NOT p_table_update IS INITIAL.
UPDATE (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-003.
STOP.
ENDIF.
ENDIF.
ELSE.
*delete and insert.
IF NOT p_table_update IS INITIAL.
* DELETE (p_table).
IF sy-subrc = 0.
INSERT (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " update_table
Edited by: Julius Bussche on Jul 18, 2008 1:43 PM
Please use a meaningfull subject title!ARS,
I am struggling a bit to get this.
there is a syntax error,
Field "FIELDS_INT-TYPE" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement.
Again you have asked to move to a diffrent table. What is that table and how to build it.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_fcat.
IF l_fcat-inttype EQ 'P'.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type
DECIMALS fields_int-decimals.
ELSE.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type.
ENDIF.
" Move <f_field> to a new table and use this table for download
ENDLOOP.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
Ster -
I have a large number of photos imported into iPhoto with the dates wrong. How can I adjust multiple photos (with varying dates) to the same, correct, date?
If I understand you correctly, when you enter a date in the Adjust Date and Time window, the picture does not update with the date you enter. If that is the case then something is wrong with iPhoto or your perhaps your library.
How large a date change are you putting in? iPhoto currently has an issue with date changes beyond about 60 years at a time. If the difference between the current date on the image and the date you are entering is beyond that range that may explain why this is not working.
If that is not the case:
Remove the following to the trash and restart the computer and try again:
Home > Library > Caches > com.apple.iphoto
Home > Library > Preferences > com.apple.iPhoto (There may be more than one. Remove them all.)
---NOTE: to get to the "home > library" hold down option on the keyboard and click on "Go" > "Library" while in the Finder.
Let me know the results. -
How to clear the table data at the time of leaving fromt the page
Hi all,
I have requirement to clear all the table data on the page. For that i have written code like
public void clearRunCalcPage(){
System.out.println("Inside clearRunCalcPage");
this.getCmProcessView().executeEmptyRowSet();
this.getCmProcessFiveRecordsView().executeEmptyRowSet();
But for clearing i don't have any button and i don't have next button also, based on menu navigation i will move from 1 page to another. Here my problem is where can i put this login, i tried with the constructor of the page but that time i am getting errors when i came to the page.
Can any one suggest me.Call a backing bean method on click of the next page and place the below code in the backing bean
ViewCriteria vc = myView.getViewCriteria("criteriaName");
vc.setProperty(ViewCriteriaHints.CRITERIA_AUTO_EXECUTE, false);Morgan. -
Selecting multiple rows a table according to rows passed with a table valued parameter
Ive got a table, which looks like this:
CREATE TABLE MyTable (
MyChars CHAR(3) NOT NULL,
MyId INT NOT NULL,
CONSTRAINT PK__MyTable_MyChars_MyId PRIMARY KEY (MyChars, MyId),
CONSTRAINT FK__MyOtherTable_Id_MyTable_MyId FOREIGN KEY (MyId) REFERENCES MyOtherTable (Id)
Records look like i.e.:
Chars | Id
'AAA' | 1
'BBB' | 1
'CCC' | 1
'AAA' | 2
'BBB' | 2
'CCC' | 2
'DDD' | 2
'EEE' | 3
'FFF' | 3
'AAA' | 4
'DDD' | 4
'FFF' | 4
Now I have a SP, which takes a table valued parameter like:
CREATE TYPE dbo.MyTVP AS TABLE ( MyChars CHAR(3) )
This SP should return a set of Ids, which match all the rows of the parameter.
I.e.:
if the TVP contains 'AAA', 'BBB' & 'CCC', i get as result 1 & 2
if the TVP contains 'AAA' & 'FFF', i get as result 4
if the TVP contains 'BBB' & 'EEE', i get an empty result
What my SP is currently doing, is to build a query with string concatination, which is then executed with the EXEC statement. If we take my first example, the built query would look like this:
SELECT DISTINCT t0.MyId
FROM MyTable t0
INNER JOIN MyTable t1 ON t0.MyId = t1.MyId
INNER JOIN MyTable t2 ON t1.MyId = t2.MyId
WHERE t0.MyChars = 'AAA' AND t1.MyChars = 'BBB' AND t2.MyChars = 'CCC'
It works, but I'm not very fond of building the query. Maintaining such things is always a pain. And it also might not be the most efficient and elegant way to do this.
Since I can't think of any other way of doing this, I wanted to ask, if someone of you got an idea, if there is a better way to accomplish this.Let me give you a "cut and paste" I use in the SQL Server groups:
1) The dangerous, slow kludge is to use dynamic SQL and admit that any random future user is a better programmer than you are. It is used by Newbies who do not understand SQL or even what a compiled language is. A string is a string; it is a scalar value like
any other parameter; it is not code. Again, this is not just an SQL problem; this is a basic misunderstanding of programming principles.
2) Passing a list of parameters to a stored procedure can be done by putting them into a string with a separator. I like to use the traditional comma. Let's assume that you have a whole table full of such parameter lists:
CREATE TABLE InputStrings
(keycol CHAR(10) NOT NULL PRIMARY KEY,
input_string VARCHAR(255) NOT NULL);
INSERT INTO InputStrings
VALUES ('first', '12,34,567,896'),
('second', '312,534,997,896'),
etc.
This will be the table that gets the outputs, in the form of the original key column and one parameter per row.
It makes life easier if the lists in the input strings start and end with a comma. You will need a table of sequential numbers -- a standard SQL programming trick, Now, the query,
CREATE VIEW ParmList (keycol, place, parm)
AS
SELECT keycol,
COUNT(S2.seq), -- reverse order
CAST (SUBSTRING (I1.input_string
FROM S1.seq
FOR MIN(S2.seq) - S1.seq -1)
AS INTEGER)
FROM InputStrings AS I1, Series AS S1, Series AS S2
WHERE SUBSTRING (',' + I1.input_string + ',', S1.seq, 1) = ','
AND SUBSTRING (',' + I1.input_string + ',', S2.seq, 1) = ','
AND S1.seq < S2.seq
GROUP BY I1.keycol, I1.input_string, S1.seq;
The S1 and S2 copies of Series are used to locate bracketing pairs of commas, and the entire set of substrings located between them is extracted and cast as integers in one non-procedural step. The trick is to be sure that the right hand comma of the bracketing
pair is the closest one to the first comma. The relative position of each element in the list is given by the value of "place", but it does a count down so you can plan horizontal placement in columns.
This might be faster now:
WITH Commas(keycol, comma_seq, comma_place)
AS
(SELECT I1.keycol, S1.seq,
ROW_NUMBER() OVER (PARTITION BY I1.keycol ORDER BY S1.seq)
FROM InputStrings AS I1, Series AS S1
WHERE SUBSTRING (',' || I1.input_string || ','
FROM S1.seq
FOR 1) = ','
AND S1.seq <= CHARLENGTH (I1.input_string))
SELECT SUBSTRING(',' || I1.input_string || ','
FROM C1.comma_place +1
FOR C2.comma_place - C1.comma_place - 1)
FROM Commas AS C1, Commas AS C2
WHERE C2.comma_seq = C1.comma_seq + 1
AND C1.keycol = C2.keycol;
The idea is to get all the positions of the commas in the CTE and then use (n, n+1) pairs of positions to locate substrings. The hope is that the ROW_NUMBER() is faster than the GROUP BY in the first attempt. Since it is materialized before the body of
the query (in theory), there are opportunities for parallelism indexing and other things to speed up the works.
Hey, I can write kludges with the best of them, but I don't. You need to at the very least write a routine to clean out blanks, handle double commas and non-numerics in the strings, take care of floating point and decimal notation, etc. Basically, you must
write part of a compiler in SQL. Yeeeech! Or decide that you do not want to have data integrity, which is what most Newbies do in practice altho they do not know it.
A procedural loop is even worse. You have no error checking, no ability to pass local variables or expressions, etc.
CREATE PROCEDURE HomemadeParser(@input_string VARCHAR(8000))
AS
BEGIN
DECLARE @comma_position INTEGER;
CREATE TABLE #Slices
(slice_value INTEGER);
SET @input_string = @input_string + ','; --add sentinel comma
SET @comma_position = CHARINDEX(',', @input_string);
WHILE @comma_position > 1
BEGIN
INSERT INTO #Slices (slice_value)
VALUES(CAST(LEFT(@input_string, (@comma_position - 1)) AS INTEGER));
SET @input_string = RIGHT(@input_string, LEN(@input_string)-@comma_position)
SET @comma_position = CHARINDEX(',', @input_string)
END;
END;
Better answer:
http://www.simple-talk.com/sql/learn-sql-server/values()-and-long-parameter-lists/
http://www.simple-talk.com/sql/learn-sql-server/values()-and-long-parameter-lists---part-ii/
Do this with a long parameter list. You can pass up to 2000+ parameters in T-SQL, which is more than you probably will ever need. The compiler will do all that error checking that the query version and the procedural code simply do not have unless you write
a full parser with the standard error codes. You can now pass local variables to your procedure; you can pass other data types and get automatic conversions, etc. In short, this is just good software engineering.
CREATE PROCEDURE LongList
(@p1 INTEGER = NULL,
@p2 INTEGER = NULL,
@p3 INTEGER = NULL,
@p4 INTEGER = NULL,
@p5 INTEGER = NULL)
x IN (SELECT parm
FROM (VALUES (@p1), (@p2), (@p3), (@p4), (@p5)) AS X(parm)
WHERE parm IS NOT NULL;
You get all the advantages of the real compiler and can do all kinds of things with the values.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Abap logic not fetching multiple rows from master data table
Hi
I just noticed that my logic is fetching only 1 row from master data table.
ProdHier table
PRODHIERACHY Level
1000 1
1000011000 2
10000110003333 3
10000110004444 3
'10000110005555 3*
logic only fetches one row of level 3, I would like to fetch all level 3 rows.
DATA: ITAB type table of /BI0/PPROD_HIER,
wa like line of ITAB.
Select * from /BI0/PPROD_HIER INTO wa where /BIC/ZPRODHTAS = 3.
IF wa-PROD_HIER(10) = SOURCE_FIELDS-PRODH2.
RESULT = wa-PROD_HIER.
ELSEIF wa-PROD_HIER(5) = SOURCE_FIELDS-PRODH1.
RESULT = wa-PROD_HIER.
ENDIF.
ENDSELECT.
thanksHi,,
I have implemented the logic in end routine and it still reads only the first row.
I am loading only PRODH1 and PROD2 but now I want to get all values of PRODH3 from the master data table.
The first 5 values are PRODH1 and first 10 values belongs to PRODH2.
Whenever PRODH2 = 1000011000 in source I should get the following values
10000110001110
10000110001120
10000110001130
I have multiple rows of 1000011000 so my result should be
1000011000 10000110001110
1000011000 10000110001120
1000011000 10000110001130
DATA: ITAB type table of /BI0/PPROD_HIER,
wa like line of ITAB.
data rp type _ty_s_TG_1.
Select * from /BI0/PPROD_HIER INTO table itab where /BIC/ZPRODHTAS = 3.
LOOP AT RESULT_PACKAGE INTO rp.
read table itab into wa with key PROD_HIER(5) = rp-PRODH1.
IF sy-subrc EQ 0.
rp-PRODH3 = wa-PROD_HIER.
ELSE.
read table itab into wa with key PROD_HIER(10) = rp-PRODH2.
IF sy-subrc EQ 0.
rp-PRODH3 = wa-PROD_HIER.
ENDIF.
ENDIF.
MODIFY RESULT_PACKAGE FROM rp.
ENDLOOP.
Edited by: Bhat Vaidya on Sep 10, 2010 11:27 AM
Edited by: Bhat Vaidya on Sep 10, 2010 11:37 AM -
Passing multiple rows of data as an XML input to a transaction
Hi,
I have a grid with several rows and columns of data on the front-end UI. I would like to select few rows and pass the data as an XML structure to a transaction. Is this possible? If so, how could I do this?
Regards,
Chanti.Hello Chanti,
Yes, Its definitely possible, I have done it on couple of occasions and it has worked
Option 1:
1) Pass each row value in a string where each row is separated by a comma as shown,
Value1,Value2,Value3.....
2) Then within BLS use it as string input variable and parse it using String_List_To_XML XML action block.
Option 2:
1) If you are aware of the required XML structure then prepare one as string by appending reach rows something like as shown below,
var SpeedXML = "";
SpeedXML = '<?xml version="1.0" encoding="utf-8"?>'
SpeedXML = SpeedXML + '<Rowsets Version="12.1">'
SpeedXML = SpeedXML + '<Rowset>'
SpeedXML = SpeedXML + '<Columns>'
SpeedXML = SpeedXML + '<Column Description="" MaxRange="1" MinRange="0" Name="Average_Run_Speed" SQLDataType="1" SourceColumn="Average_Run_Speed" />'
SpeedXML = SpeedXML + '<Column Description="" MaxRange="1" MinRange="0" Name="Line_Stops" SQLDataType="1" SourceColumn="Line_Stops" />'
SpeedXML = SpeedXML + '</Columns>'
Here in this section you can loop through your rows and append them to structure,
Start Loop
SpeedXML = SpeedXML + '<Row>'
SpeedXML = SpeedXML + '<Average_Run_Speed>'+ Value1 +'</Average_Run_Speed>'
SpeedXML = SpeedXML + '<Line_Stops>'+ Value2 +'</Line_Stops>'
SpeedXML = SpeedXML + '</Row>'
End Loop
SpeedXML = SpeedXML + '</Rowset>'
SpeedXML = SpeedXML + '</Rowsets>'
2) Now in the Transaction, use it as String input variable and parse it using String_To_XML XML action block
Hope this helps!!
Regards,
Adarsh -
Hi Experts,
I have a requirement to have multiple rows in the table popin, that is , having a table with multiple rows as the table popin.
For further information, the exact requirement is , there is a table which will have one of the column containing a button, EXPAND , clicking which a table needs to be displayed below the row, (same as it happens for Table popins) and EXpand button becomes COLLAPSE button after it is clicked. Now clicking the Collapse button should close the table showed in Table popin.
Kindly help for the above requirement.
Thanks in Advance for help
Shilpa.LOOP AT wd_this->comp_tab INTO w_comp_tab.
lv_uielement_id_prefix = lv_uielement_id_prefix && iv_col_num.
IF w_comp_tab-name NE 'SELECTED_POPIN' .
l_new_col = cl_wd_table_column=>new_table_column(
id = w_comp_tab-name
width = '100px' ).
lr_header = cl_wd_caption=>new_caption( text = w_comp_tab-name ).
IF w_comp_tab-name EQ 'PRODUCT_ID'.
** link to action
CONCATENATE w_comp_tab-name '_LINK' INTO l_link_id.
lo_link_to_action = cl_wd_link_to_action=>new_link_to_action(
id = l_link_id
text = 'PRODUCTID'
on_action = 'SET_POPIN'
l_new_col->set_table_cell_editor( lo_link_to_action ).
DATA: lr_el_details_cont TYPE REF TO if_wd_view_element.
lr_container ?= lr_el_details_cont.
Transparent container
DATA lr_transparent_container TYPE REF TO cl_wd_transparent_container.
DATA lr_table_in_table_popin TYPE REF TO cl_wd_table.
lv_uielement_id = lv_uielement_id_prefix && '_POPIN_CNTR'. "#EC NOTEXT
lr_transparent_container = cl_wd_transparent_container=>new_transparent_container(
id = lv_uielement_id "'TRANSPARENT_CONTAINER1'
height = '100%' "#EC NOTEXT
width = '100%'
accessibility_descr = 'TRANS_ACC'
is_layout_container = 'X' "#EC NOTEXT
view = view
DATA l_popin_layout TYPE REF TO cl_wd_matrix_layout.
l_popin_layout = cl_wd_matrix_layout=>new_matrix_layout( container = lr_transparent_container ).
lr_transparent_container->set_layout( l_popin_layout ).
lr_container->add_child( the_child = lr_transparent_container ).
DATA: l_item_node TYPE REF TO if_wd_context_node.
l_item_node = l_node->get_child_node( 'SUB' ).
l_popin = cl_wd_table_popin=>new_table_popin(
id = 'POPIN'
on_close = 'CLOSE_POPIN' ).
DATA: i_the_content TYPE REF TO cl_wd_uielement.
i_the_content ?= lr_transparent_container.
IF l_item_node IS BOUND.
cl_wd_dynamic_tool=>create_table_from_node(
EXPORTING ui_parent = lr_transparent_container
table_id = 'MULTIV_TAB'
node = l_item_node
RECEIVING table = lr_table_in_table_popin ).
ENDIF.
"Add the Transparent Container to the Table Popin
l_popin->set_content( lr_transparent_container ).
" add popin to column
l_new_col->set_popin( l_popin ).
ENDIF.
l_new_col->set_header( lr_header ).
" add column to table
lr_table->add_column( l_new_col ).
ENDIF.
ENDLOOP. -
JDev 11g-Multiple Row Selection Table-Ctrl+A error
Hello All,
Jdeveloper : Studio Edition Version 11.1.1.2.0, Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
ADF Business Components : 11.1.1.55.36
Java(TM) Platform : 1.6.0_11
Oracle IDE: 11.1.1.2.36.55.36
SOA Composite Editor: 11.1.1.2.0.12.16
Versioning Support: 11.1.1.2.36.55.36
I am trying to remove the selected rows from the table with RowSelection property set to Multiple. I am able to select the rows using by holding key board Ctrl key and click on the rows. The following code in backing bean successfully deletes the rows selected using this step.
public void removeGeoSpecs(ActionEvent actionEvent)
RowKeySet rowKeySet = getGmemTbl().getSelectedRowKeys();
CollectionModel collectionModel =
(CollectionModel) getGmemTbl().getValue();
for (Object facesTreeRowKey: rowKeySet)
collectionModel.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData =
(JUCtrlHierNodeBinding) collectionModel.getRowData();
rowData.getRow().remove();
But when i select all the rows in the table using Ctrl+A, all the rows got selected. I hit the Remove button, then after deleting the first row, getting the following error.
javax.servlet.ServletException: ADFv: Could not find row: USA 548 with key: oracle.jbo.Key[] inside parent: GeoSpecTVOIterator with key: null.
Caused by: java.lang.IllegalStateException: ADFv: Could not find row: USA 548 with key: oracle.jbo.Key[] inside parent: GeoSpecTVOIterator with key: null.
Here USA 548 is my first row's data. Please let me know if you want complete error stack.
During design time, While drag and drop the table i have not selected Row Selection check box as it sets property for single row selection. Table is inside the <af:panelCollection> . Here is the table source.
<af:table value="#{bindings.GeoSpecTVO.collectionModel}" var="row"
rows="#{bindings.GeoSpecTVO.rangeSize}"
emptyText="#{bindings.GeoSpecTVO.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.GeoSpecTVO.rangeSize}"
rowBandingInterval="0" id="GmemTbl"
partialTriggers=":::AddRowsBtn :::AddRangeBtn ::RemoveBtn :::SaveBtn"
rowSelection="multiple"
binding="#{backingBeanScope.GeoGrpSpecBean.gmemTbl}">
Here GeoSpecTVO is a transient view object which is not having query and not attached with EO.
I tried to fix this issue by myself and also searched for similar issues in the FORUM and google. But no luck... I very much appreciate all your inputs/pointers. Kindly let me know if you need additional information.
Thanks
Annadurai.Hi Annadurai
I tried the same work around but still i am facing the issue, could you please help me.
public void deleteRec(ActionEvent actionEvent) {
// Add event code here...
RowKeySet rowKeySet = (RowKeySet)this.embossTB.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)this.embossTB.getValue();
Row specRow = null;
ArrayList rowList = new ArrayList();
int listLength = 0;
ArrayList<Number> printReqLST=new ArrayList<Number>();
ViewObject vo1=null;
boolean flag=false;
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
specRow = rowData.getRow();
rowList.add(specRow);
listLength++;
for (int index = 0; index < listLength; index++){
specRow = (Row)rowList.get(index);
Number printReqID = (Number)specRow.getAttribute("PrintRequestId");
String PrintState = specRow.getAttribute("PrintState").toString();
if (PrintState.equalsIgnoreCase("PRINTED")) {
System.out.println("cann't delete");
FacesContext fctx = FacesContext.getCurrentInstance();
FacesMessage message =
new FacesMessage("Cann't Delete the selected row:" + printReqID);
message.setSeverity(FacesMessage.SEVERITY_ERROR);
fctx.addMessage(null, message);
} else {
System.out.println("delete");
flag=true;
specRow.remove();
if(flag){
System.out.println("before commit");
commitRows();
} -
Delete multiple rows from table/list control
Hi,
I want to have a table control in which a user can enter different entries, like this:
My program would read each entry at a time and do something.
However, I would like to give the user ability to delete multiple entries at once, like in an Excel spreadsheet - that is, the user selects multiple rows and presses "Delete" key and those entries get deleted. The Labview table does not allow this it seems - I can only delete one entry at a time - or I have to right-click and select Data Operations->Cut Data, which is awkward.
Is there a control better suited to what I want to do? I tried a Llist control, but it behaves in the same manner.
Thanks in advance!
Solved!
Go to Solution.You could write your own routine. Use an Event Structure with a Key Down event. If the delete key was pressed and the table has focus delete the elements that are selected.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Pass multiple rows from sp to the calling prog
I have a stored procedure using cursor to get multiple rows from the db, how can I pass these rows to the calling prog? Is the out variable returns the last row only?
This is what I did:
Create or replace procedure mysp (
var1 in number,
var2 OUT number,
) as
Cursor mycor is
select * from emp;
begin
for cors in mycor loop
var2 :=cors.ename;
end;
Thanks
nullGeorge:
You can use CURSOR VARIABLE to pass this
data type among PL/SQL or Java:
create or replace package pkg_a
as
TYPE c_emp REF CURSOR;
PROCEDURE mysp (var1 IN NUMBER,
c_var2 OUT c_emp);
END package pkg_a;
CREATE OR REPLACE PACKAGE BODY pka_a
AS
PROCEDURE mysp (var1 IN NUMBER,
c_var2 OUT c_emp)
IS
BEGIN
OPEN c_var2
FOR
SELECT * FROM emp;
END mysp;
END pkg_a; -
Update multiple rows in table using ODataModel.
I have tied ODataModel with table using "TwoWay" binding. I need to allow user to edit the rows of the table at the bottom of which I have 'Save' button. Currently though the table is editable I am unable to edit the entries in multiple rows of the table.
Please find my code below:
var oTable = new sap.ui.table.Table("dprTable",{
visibleRowCount: 4,
visible: true,
navigationMode: sap.ui.table.NavigationMode.Paginator
var oColumn = new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "DBR/DPR"}),
template: new sap.m.Link({
"target": "_blank",
press:[controller.onClickDemoNo,controller]
}).bindProperty("text","DemoId"),
width: "auto",
tooltip: "DBR/DPR"
oTable.addColumn(oColumn);
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Description"}),
template: new sap.ui.commons.TextView().bindProperty("text", "DemoDesc"),
width: "auto",
tooltip: "Description"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Required Date"}),
template: new sap.ui.commons.DatePicker("",{
value:{
path:"ReqDate",
type: new sap.ui.model.type.Date({pattern: "dd-MM-yyyy"})
change: function(){
console.log('the date is changed and it\'s value is'+value);
width: "auto",
tooltip: "Required Date"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Requestor"}),
template: new sap.ui.commons.TextView().bindProperty("text", "RequestorName"),
width: "auto",
tooltip: "Requestor"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Requestor/Project Lead"}),
template: new sap.ui.commons.TextView().bindProperty("text", "LeadName"),
width: "auto",
tooltip: "Requestor/Project Lead"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Solution"}),
template: new sap.ui.commons.TextView().bindProperty("text", "SolutionText"),
width: "auto",
tooltip: "Solution"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Start Date"}),
template: new sap.ui.commons.DatePicker("",{
value:{
path:"StartDate",
type: new sap.ui.model.type.Date({pattern: "dd-MM-yyyy"})
width: "auto",
tooltip: "Start Date"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "End Date"}),
template: new sap.ui.commons.DatePicker("",{
value:{
path:"StartDate",
type: new sap.ui.model.type.Date({pattern: "dd-MM-yyyy"})
width: "auto",
tooltip: "End Date"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Estimated Duration"}),
template: new sap.ui.commons.TextView().bindProperty("text", "EstDuration"),
width: "auto",
tooltip: "Estimated Duration"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Hours"}),
template: new sap.m.Input("",{}).bindProperty("value", "ActDuration"),
width: "auto",
tooltip: "Hours"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Status"}),
template: new sap.ui.commons.ComboBox({items: [
new sap.ui.core.ListItem({text: "New",key:"1"}),
new sap.ui.core.ListItem({text: "In Process",key:"2"}),
new sap.ui.core.ListItem({text: "Completed",key:"3"})
]}).bindProperty("value","StatusText"),
width: "auto",
tooltip: "Status"
oTable.setBusyIndicatorDelay(1);
//oData service call
var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZSECENTRAL_SRV",true);
oModel.setDefaultBindingMode("TwoWay");
oModel.attachRequestSent(function (oEvent) {
console.log('request sent');
oTable.setBusy(true);
oModel.attachRequestCompleted(function () {
console.log('request completed');
oTable.setBusy(false);
});os
oModel.attachRequestFailed(function () {
oTable.setBusy(false);
oTable.setModel(oModel);
oTable.bindRows("/DEOPENDBRSet");
Is there something pending in the settings? And to update the multiple records in the table do I have to make use of some batch operations? Any help would be appreciated.
Thanks,
Supriya KaleHi Supriya,
your code is missing call of oModel.submitChanges() when Save button is called.
You can find the example here SAPUI5 SDK - Demo Kit
Regards,
Peter
Maybe you are looking for
-
ReaderX, WinXP SP3, Protected Mode for Admins
Hello, We are having an issue running Reader X on Windows XP SP3 ***IF*** the Windows user is a member of the Local Admin group, it will not open in protected mode. **IF** the Windows user is a member of the local user group, Reader will open in prot
-
Dear Hussein, I am facing error like for custom reports. Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding. So i hit this thread Invalid UTF8 encoding Could u pls tell me how to change the encoding. Is it from the browser or from repor
-
Hi, My ABAP report columns appear on two rows instead of one. I would like to keep the columns in one row with a horizontal scroll bar. How do I achieve that? Thanks, ~Mark
-
Why did iTunes suddenly become white font on black background?
For no reason I can ascertain, my iTunes window suddenly became white font on black background, VERY difficult to see! Help, please!!!
-
Search for column in all tables
I want to search for a column value(example instance_id=123456) in all the tables using one query rather than describing each table to find first if instance id exist and if so do a select from that table.