Selected line in tableview (iterator)
Hello,
I'm using a table view built whith iterator in a MVC application.
One column is a link.
When I click on the link, I would like to know in the DO_HANDLE_EVENT method, how to get the index of the internal table source.
Thank you for your help.
Bernard Pochin.
Hi Bernard Pochin,
I've got the following code in 'on input processing':
if event_id = cl_htmlb_manager=>event_id.
ref_event = cl_htmlb_manager=>get_event( runtime->server->request ).
if ref_event is bound.
case ref_event->name.
when 'tableView'.
ref_tableview_event ?= ref_event.
rowselection = ref_tableview_event->rowselection.
endcase.
endif.
endif.
I hope this can help you!
Raoul
Similar Messages
-
Hello!
How I can copy selected lines in TableView?Hi Andrej S,
Are you asking about getting the records selected in a TABLE
CONTROL?
There should be a field for ROW SSELECTION in the internal table wich is displayed in the table control.
If you have maintain it, then in PAI, just loop the internal table with the condition that this field is set and get the required rows.
i.e. as follows,
LOOP AT IT_TC_DATA INTO WA_TC_DATA WHERE SEL = 'X'.
APPEND WA_TC_DATA TO IT_RESULT.
ENDLOOP.
Here SEL is the field dedicated for ROW SELECTION.
If no fields like this, add an integer field in the internal table.
Specify the screen field name of this field to 'ROW SELECTION' property i.e. 'w / SelColumn' property and try.
Regards,
R.Nagarajan.
We can - -
Pass selected line data of tableView from controller's method to page
Dear Friend.
Could you please suggest me How I will pass selected line data of tableView from controller's DO_HANDLE_DATA method to Page.
I have a tableview in that I am able to read "npa_sarea = table_event->row_key".
I want to pass npas_sarea to page of table view like .. you have selected this "npa_sarea-valuekey" element. please suggest me.. any help of yours will be appreciated.
Thanking you
Regards
NaeemDear Naeem,
Within the script function you have to concatenate your paramater value in the url from one page to another.
var url = "tableview.do?param=" + npas_sarea;
var m_script = window.open(url,"","top=300,left=300,height=250,width=200,status=no,toolbar=no,menubar=no,location=no");
And in the next tableview page in do_request method you have to get the parameter value like below,
lo_det = request->get_form_field( 'param' ).
Appreciate if its Helpful.
Regards,
Anita Vizhi Arasi B -
Hello,
I try the weblog OF Brian McKellar corresponding to the HTMLB TableView Iterator and as like certain people, the Dropdownlist of the column 'CURRENCY' is empty. This is cetainely due of how in the constructor the table is declared. So, for those which succeeded in replir the Dropdownlist of the column 'CURRENCY' can they give me the code of your constructor.
Thanks a lot.
Farid BERRAHello Ariel,
Thanks to your councils, i succeeded to get data in the DROPDOWNLISTBOX.
In the method RENDER_CELL_START, for CURRENCY, i have:
WHEN 'CURRENCY'.
IF P_EDIT_MODE IS NOT INITIAL.
DATA: DROP_DOWN TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
DROP_DOWN = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
ID = P_CELL_ID
SELECTION = M_ROW_REF->CURRENCY
TABLE = ME->M_CURRENCIES_REF
NAMEOFKEYCOLUMN = 'NAME'
NAMEOFVALUECOLUMN = 'VALUE' ).
GET REFERENCE OF TT_CURR INTO DROP_DOWN->TABLE.
P_REPLACEMENT_BEE = DROP_DOWN.
ENDIF.
And in the constructor:
DATA: LS_TCURT TYPE TCURT,
WA_LINE TYPE LINE OF TIHTTPNVP.
SELECT WAERS LTEXT
INTO (LS_TCURT-WAERS, LS_TCURT-LTEXT)
FROM TCURT.
CLEAR WA_LINE.
MOVE LS_TCURT-LTEXT TO WA_LINE-NAME.
MOVE LS_TCURT-WAERS TO WA_LINE-VALUE.
APPEND WA_LINE TO TT_CURR.
ENDSELECT.
And finally, I declared in the Instance Attribut:
TT_CURR TYPE REF TO TIHTTPNVP. -
Hi,
I have created a composite BSP element that outputs a matrix with two cells, the first containing an icon, the second with a description. This works fine when placed in a BSP page.
When, however, I try to use the element in a tableView iterator, it blanks the whole table. Do I need to do something special to get the element working inside a tableView?
My element code is posted here:
METHOD if_bsp_element~do_at_beginning.
* use matrix to control alignment
* <phtmlb:matrix width = "100%" >
DATA: phtmlb_matrix TYPE REF TO cl_phtmlb_matrix.
phtmlb_matrix = cl_phtmlb_matrix=>factory( width = '100%' ).
* create matrix and set alignment
WHILE m_page_context->element_process( element = phtmlb_matrix ) = co_element_continue.
CLEAR: phtmlb_matrix->mc_backgrounddesign,
phtmlb_matrix->mc_col,
phtmlb_matrix->mc_design,
phtmlb_matrix->mc_row,
phtmlb_matrix->mc_halign,
phtmlb_matrix->mc_separation.
phtmlb_matrix->mc_valign = 'MIDDLE'.
phtmlb_matrix->mc_halign = 'LEFT'.
phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
* get status info
data: ls_status type /baasow/status.
clear: ls_status.
select single * from /baasow/status
into ls_status where status = status.
DATA: html TYPE string.
* no status found
if sy-subrc ne 0.
html = status.
me->print_string( html ).
exit.
endif.
* status icon
DATA: lr_icon TYPE REF TO cl_htmlb_image.
lr_icon = cl_htmlb_image=>factory(
src = ls_status-icon ).
WHILE m_page_context->element_process( element = lr_icon )
= co_element_continue.
ENDWHILE.
CLEAR: phtmlb_matrix->mc_backgrounddesign,
phtmlb_matrix->mc_col,
phtmlb_matrix->mc_design,
phtmlb_matrix->mc_row,
phtmlb_matrix->mc_halign,
phtmlb_matrix->mc_separation.
phtmlb_matrix->mc_valign = 'MIDDLE'.
phtmlb_matrix->mc_halign = 'LEFT'.
phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
* status text
html = ls_status-TEXTSH.
me->print_string( html ).
ENDWHILE.
rc = co_element_done.
ENDMETHOD.Hi,
I have created a composite BSP element that outputs a matrix with two cells, the first containing an icon, the second with a description. This works fine when placed in a BSP page.
When, however, I try to use the element in a tableView iterator, it blanks the whole table. Do I need to do something special to get the element working inside a tableView?
My element code is posted here:
METHOD if_bsp_element~do_at_beginning.
* use matrix to control alignment
* <phtmlb:matrix width = "100%" >
DATA: phtmlb_matrix TYPE REF TO cl_phtmlb_matrix.
phtmlb_matrix = cl_phtmlb_matrix=>factory( width = '100%' ).
* create matrix and set alignment
WHILE m_page_context->element_process( element = phtmlb_matrix ) = co_element_continue.
CLEAR: phtmlb_matrix->mc_backgrounddesign,
phtmlb_matrix->mc_col,
phtmlb_matrix->mc_design,
phtmlb_matrix->mc_row,
phtmlb_matrix->mc_halign,
phtmlb_matrix->mc_separation.
phtmlb_matrix->mc_valign = 'MIDDLE'.
phtmlb_matrix->mc_halign = 'LEFT'.
phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
* get status info
data: ls_status type /baasow/status.
clear: ls_status.
select single * from /baasow/status
into ls_status where status = status.
DATA: html TYPE string.
* no status found
if sy-subrc ne 0.
html = status.
me->print_string( html ).
exit.
endif.
* status icon
DATA: lr_icon TYPE REF TO cl_htmlb_image.
lr_icon = cl_htmlb_image=>factory(
src = ls_status-icon ).
WHILE m_page_context->element_process( element = lr_icon )
= co_element_continue.
ENDWHILE.
CLEAR: phtmlb_matrix->mc_backgrounddesign,
phtmlb_matrix->mc_col,
phtmlb_matrix->mc_design,
phtmlb_matrix->mc_row,
phtmlb_matrix->mc_halign,
phtmlb_matrix->mc_separation.
phtmlb_matrix->mc_valign = 'MIDDLE'.
phtmlb_matrix->mc_halign = 'LEFT'.
phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
* status text
html = ls_status-TEXTSH.
me->print_string( html ).
ENDWHILE.
rc = co_element_done.
ENDMETHOD. -
Attributes in tableview iterator
how to retrive my inputField value in tableview iterator ?
I have a page with inputField : eno
& tableview (and onclicking the cellvalue in the column it goes to other page)
<i>
<b> here i want to get the value of my inpufield </b>
concatenate 'preview.htm?ref_no=' wf_text into wf_url.
call method cl_htmlb_link=>factory
exporting
id = p_cell_id
reference = wf_url
target = '_self'
text = wf_text
receiving
element = p_replacement_bee.
</i>
Pts Assured.
Thanks,
JBP.
I have added the field also in the row iterator and now able to get its value.
Message was edited by: P24101990Hi Mark,
Thanks for your reply. I tried that in DO_INIT and in DO_REQUEST as well. I started of this application well with the values selecting from Dropdown and then rendering the table columns. But now I have commented everything and just trying to render one column of the table....
I have one concern.
I have declared like this
tv_iterator type ref to ZITERATOR.
and in DO_INIT I have instantiated. Create Object tv_iterator.
If you have any suggestions please let me know....
Thanks -
Decode statement in Select line of a View Object Query
I attempted to create a view object in expert mode with a customized query.
The query had a decode statement in the select line of the query. The view
object compiled correctly but gave an error when run.
ex: select .... decode(CrpSchools.SCHOOLS_ID,null,CrpCustSchools.SCHOOL_NAME,CrpSchools.SCHOOL_NAME) SCHOOL_VALUE, ...
from ....
where ....
The error was that school_value does not exist in the statement. I got the error when
doing a vo.executeQuery().
When I removed the decode statement everything worked correctly. Does anyone know if
the decode statement cannont be used in the select line of a query in a view object?
Or maybe I was linking the query column (SCHOOLS_ID) up to the view attribute (SCHOOL_VALUE) incorrectly in the
Attribute Mappings tab of the VO wizard?There should be no problem using a DECODE() statement, provided that you've aliases the column as you have done.
At design time, if you click on the (Test) button, does your query test ok?
Are you by chance applying a custom where clause at runtime?
If so, are you saying:
setWhereClause("yourtable.column_alias = ?";
or are you doing:
setWhereClause("column_alias = ?";
for an expert-mode query, you'll need to use the latter syntax. -
How to select line items in recording(BDC)
Hi All,
we are trying to Recording QP02 transaction ,we have inputs like material,plant,Group,Group Counter.
after entering these inputs we will get multiful line items(inspection characteristics).we need to check one field for each item.
How can we get this?
Please help me?
Thanks,
Peddi reddy.Hi Kamesh,
Thanks.
After selecting line items i am selecting control indicators Tab.
then Pop up screen called as (Edit characteristic control indicators) will open ,..then just pressing enter..the it will show another pop up ..here i am selecting one field(Long term Inspection)..the process has to do for all line items.
In My program i have copied BDC performs which i got from Recording.
Do i need to change tha performs or will it work?
i tested in foreground with another material .... upto 3 or 4 line items its working fine.after that sytem does.t say anything.
if i need to chage performs please help me . -
Copy selected lines in the table control
Hi friends,
I Have a screen 200 in which i have a button COPY and table control.
In my table control i have 6 lines of data.
now my requirement is when i select any lines ie : let us say i ahve selected 1 , 3 , 5 lines of my table control and when i click on the button COPY of that screen. i need those 3 selected lines 1 , 3 , 5 to be copied again in the table control
example :
line 1 selected
line2
line3 selected
line4
line5 selected .
line6
now my table control should be
line1
line2
line3
line4
line5
line6
line1
line3
line5
How can i do that
Regards
Priyanka.I have similar issue...i need help how to accomplish automatic addition on every line. example (see below)
this is how it looks right now
DATE EMPLOYEE DEPT JOB LOT OPER# LX_HRS OP_SETUP LX_TYPE COMPLETE
2/23/2009 M.Paquiao NB 1960 001 10 1.50 14.00 S NO
2/24/2009 1.00 14.00 S NO
2/25/2009 4.50 14.00 S NO
2/27/2009 3.00 14.00 S NO
2/28/2009 1.50 14.00 R YES
3/1/2009 2.00 14.00 R YES
this what I need it to do when I meant automatic addition of each line:
DATE EMPLOYEE DEPT JOB LOT OPER# LX_HRS OP_SETUP LX_TYPE COMPLETE
2/23/2009 M.Paquiao NB 1960 001 10 1.50 14.00 S NO
2/24/2009 2.50 14.00 S NO
2/25/2009 7.00 14.00 S NO
2/27/2009 10.00 14.00 S NO
2/28/2009 11.50 14.00 R YES
3/1/2009 13.50 14.00 R YES
As you can see everything is the same but on column LX_HRS, the first example one is not doing anything addition but on the second example is now doing addition. This additions were done manually, how can I tell crystal to add each line, in the example above, the
first example second example: (addition is involved)
date lx_hrs date lx_hrs
2/23/09 1.50 2/23/09 1.50
2/24/09 1.00 2/24/09 2.50 (sum of : 1.50 + 1.00 was added)
2/25/09 4.50 2/25/09 7.00 (sum of 2.50 (on date 2/24/09 & 4.50 from date 2/25/09 of the first example). -
Service entry sheet creation from PO without selecting line item of PO?
Dear SAPIENTS,
While creating service entry sheet for one frame work order (PO) i do not want to select line item of PO. I want all the service of PO line item should come automatically in single service entry sheet number.
At present whenm i enter the PO number its taking line item 10 as default because of this service of that line item is coming and for every line item i have to create different service entry sheet.
Regards,
Kaushal RaiHi,
in ML81N please enter the entry sheet header data, then go to full screen services, push the button for
"service selection" and after that a popup appeares for the service selection (SAPLMLSP
0500). On the bottom of this popup you have the button "complete" = adopt all = F9. If you hit this
button all of your services within the service specification will be copied into the entry sheet
at the same time.
Regards,
Edit -
Parsing and extraction of numbers from select lines in a string
hey guys, i've been running into some issues with my code and i was wondering if you could help me out. currently what i've done is take an xml document returned from a server, put it into a string, and then select specific lines from that string, from which i will extract numbers. here's the string
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
<rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
<census1:totalPopulation>
<rdf:Description>
<dc:title>SEX BY AGE (P012001)</dc:title>
<census1:female>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
</rdf:Description>
</census1:female>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
<census1:male>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
</rdf:Description>
</census1:male>
</rdf:Description>
</census1:totalPopulation>
</rdf:Description>
</rdf:RDF>now my first attempt at pulling this off worked just fine, but only for the female demographics, since the tags for female and male are identical (only the numbers/data is different) and my parser would stop after reaching the first round of tags specified.
here's part of my code for that section, located in the main (response is the xml string returned from server):
while ((temp = in.readLine()) != null)
response += temp + "\n";
temp = null;
in.close ();
int left = response.indexOf("<census1:under5Years rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">");
int right = response.indexOf("</census1:under5Years>");
// pull out the text inside the parens
String parsed = response.substring(left+77, right);
double parseddub = Double.parseDouble(parsed);
//divide the group Under5Years into Under12Mo and 1to4Yr
double Group1Adub = parseddub*.25;//25% for Under12Mo
Group1Adub = Math.ceil(Group1Adub);
int Group1A =(int)Group1Adub;
double Group1Bdub = parseddub*.75;//75% for 1to4Yr
Group1Bdub = Math.ceil(Group1Bdub);
int Group1B =(int)Group1Bdub;
//..need to basically duplicate this for 3 other age groups
int Group1 = Group1A;
System.out.println("Server response:\n" + "Female");
System.out.println("Under 12 Months: " + Group1);now basically, everything works great for the female data, but i would like to somehow loop this or selectively parse by line and then extract information from those selected lines. any thoughts? i would really appreciate some insight thanks.lol no offense taken. sorry for the confusion, please disregard my earlier statements... :)
i actually was able to get the thing working, i just didn't quite understand what i was doing at first.
however, i noticed that the regex only handles the first four lines of each group (male and female). i was wondering if there was a way to do it that's non-sequential?
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
<rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
<census1:totalPopulation>
<rdf:Description>
<dc:title>SEX BY AGE (P012001)</dc:title>
<census1:female>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
-<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
-<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
-<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
-<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
</rdf:Description>
</census1:female>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
<census1:male>
<rdf:Description>
<census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
<census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
-<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
-<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
<census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
<census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
<census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
<census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
<census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
<census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
<census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
-<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
<census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
<census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
<census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
-<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
<census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
<census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
<census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
<census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
<census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
<census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
<census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
</rdf:Description>
</census1:male>
</rdf:Description>
</census1:totalPopulation>
</rdf:Description>
</rdf:RDF> using the regular expression, i can parse the string, but what i really need is to only parse the 8 lines designated, and they are not in sequential order, which makes it somewhat problematic.
the format of the output i want to get should be as in the following example (female: under5, 5to9, 10to14, 15to17):
[864, 949, 875, 534]
same format for male of course. i'm just not sure how to edit the regex so that it can select only the lines i'm concerned with...? thanks so much i really appreciate this. -
Problem with tableview iterator
Dear friends.
I try to adopt tableview iterator in my customer's BSP pages. So, I programmed test page.
METHOD if_htmlb_tableview_iterator~render_row_start .
m_row_ref ?= p_row_data_ref.
ENDMETHOD.
M_ROW_REF is "Static Attribute" and "Public" and "Type Ref To Z3TYDISP"
z3tydisp has structure as below
REQNO NUMC 12
VGUBUN CHAR 1
DSCOFVGUBUN STRING 0
REQDT DATS 8
RNAME CHAR 10
VCOMP CHAR 30
VNAME CHAR 10
VPLACE CHAR 5
VPLACEDSC CHAR 20
APPROVAL CHAR 1
DSCOFAPPROVAL STRING 0
AND... p_row_data_ref has structure below
REQNO N 12
VGUBUN C 1
DSCOFVGUBUN g 0
REQDT D 8
RNAME C 10
VCOMP C 30
VNAME C 10
VPLACE C 5
VPLACEDSC C 20
APPROVAL C 1
DSCOFAPPROVAL g 0
In my option, p_row_data_ref has same structure compared with z3tydisp. But there is "CX_SY_MOVE_CAST_ERROR". How I have to define "z3tydisp"????>><b>M_ROW_REF is "Static Attribute" and "Public" and "Type Ref To Z3TYDISP"</b>
instead of this make your M_ROW_REF a instantaneous attribute. since static attribute are intantiated only once when object created and are shared by all other intances. m_row_ref contains data about the table you are going to render using tableview. so it should be public, so that get different data for different iterator objects.
your p_row_data_ref must be of type ref to data which is superior class of data types.
and if you have defined iterator "IF_HTMLB_TABLEVIEW_ITERATOR" in your interfaces. then you need not to define structure for p_row_data_ref, its already there in interface.
hope this will solve your problem,
regards,
hemendra -
TableView Iterator in WebDynpro as in BSP
Hi all,
i'm planning to move from BSP to WebDynpro ABAP and have a question:
Does WD ABAP provide the same kind of <htmlb:tableView> as BSP? Especially, does it support the concept of an tableview iterator?
Thx & Regards,
DanielYes you'll find everything.
You'll find also the ALV extension of a table.
I was familiar with iterator and I like it so much; in WDA you can reach the same result but in a different way.
Basically you have to prepare, in advance, all the data in the table rows and then in the table configuration you'll describe the rules for each column (even with variants per row).
You have to study the Table UI object with table cell variant and then ALV features.
Sergio -
Nested image Tag in tableview iterator
In the past I use the tableview tag "tableViewColumn". In this tag a nested image tag inside a link tag was used.
Now I use the tableview iterator. But I can only define one p_replacement_bee in the RENDER_CELL_START method.
Does anyone knows a solution for my problem?
Example:
<htmlb:tableViewColumn columnName = "transport"
tooltipColumnKey = "transport_tooltip"
type = "user"
title = "<%= otr(zinternet/tracking) %>"
horizontalAlignment = "center" >
<htmlb:link id = "$TVCID$"
reference = "$TRANSPORT_LINK$"
target = "_blank" >
<htmlb:image src="$TVCVALUE$" />
</htmlb:link>
</htmlb:tableViewColumn>Just off hand I see one problem. In your reference you have 'www.sap.com'. This link wouldn't work (and might be causing your problem, because without the http:// on the front it would assume that was a relative path.
Other than that I don't see a problem off hand. I normally don't render my elements to BEEs and then add the BEEs to the BEE Tree. I prefer to render to elements and then use the ADD method instead of the ADD_BEE method:
data: tag_gl type ref to cl_htmlb_gridlayout,
tag_glc_if1 type ref to cl_htmlb_gridlayoutcell,
tag_glc_if2 type ref to cl_htmlb_gridlayoutcell,
tag_glc_if3 type ref to cl_htmlb_gridlayoutcell.
tag_gl = cl_htmlb_gridlayout=>factory(
columnsize = '3' rowsize = '1' ).
tag_glc_if1 = cl_htmlb_gridlayoutcell=>factory(
columnindex = '1' rowindex = '1' ).
tag_glc_if2 = cl_htmlb_gridlayoutcell=>factory(
columnindex = '2' rowindex = '1' ).
tag_glc_if3 = cl_htmlb_gridlayoutcell=>factory(
columnindex = '3' rowindex = '1' ).
data: seats_bee type ref to cl_bsp_bee_table.
create object seats_bee.
seats_bee->add( level = 1 element = tag_gl ).
seats_bee->add( level = 2 element = tag_glc_if1 ).
seats_bee->add( level = 3 element = if_first ).
seats_bee->add( level = 2 element = tag_glc_if2 ).
seats_bee->add( level = 3 element = if_bus ).
seats_bee->add( level = 2 element = tag_glc_if3 ).
seats_bee->add( level = 3 element = if_econ ).
p_replacement_bee = seats_bee. -
Composite Element in Tableview Iterator
I want to use a <phtmlb:matrix> element in a tableview iterator to arrange the content of a cell.
I tried to follow Brians Weblog on composite elements.
In my test example, I just want to combine two fields of t000 into one cell. Of course I know, that concatenation would be more easy here, but that would not answer my questions.
Thought it could look like this:
METHOD render_cell_start.
DATA:
l_o_matrix TYPE REF TO cl_phtmlb_matrix,
l_o_bsp_element TYPE REF TO cl_bsp_element,
l_string TYPE STRING.
CASE p_tableview_id.
WHEN 'TABLE_T000'.
l_o_matrix = cl_phtmlb_matrix=>factory( ).
WHILE o_page_context->element_process( element = l_o_matrix )
= cl_bsp_element=>co_element_continue.
Cell 1
CLEAR: l_o_matrix->mc_backgrounddesign,
l_o_matrix->mc_design,
l_o_matrix->mc_separation.
l_o_matrix->do_set_data( element_name = 'matrixCell' ).
l_string = me->t000-mandt.
l_o_bsp_element = cl_htmlb_textview=>factory( text = l_string ).
WHILE o_page_context->element_process( element = l_o_bsp_element )
= cl_bsp_element=>co_element_continue.
ENDWHILE.
Cell 2
CLEAR: l_o_matrix->mc_backgrounddesign,
l_o_matrix->mc_design,
l_o_matrix->mc_separation.
l_o_matrix->mc_halign = 'LEFT'.
l_o_matrix->mc_valign = 'TOP'.
l_o_matrix->do_set_data( element_name = 'matrixCell' ).
l_string = me->t000-mtext.
l_o_bsp_element = cl_htmlb_textview=>factory( text = l_string ).
WHILE o_page_context->element_process( element = l_o_bsp_element )
= cl_bsp_element=>co_element_continue.
ENDWHILE.
ENDWHILE.
p_replacement_bee = l_o_matrix.
ENDCASE.
ENDMETHOD.
However, that does not work.
First, the list of T000-MANDT fields is rendered twice:
into the tableview and into a list before the tableview.
Second: T000-MTEXT does not show up at all.
What do I do wrong?
I feel that I do not completely understand how the rendering is processed.
Thanks for our help.
JuergenThe following is the example from Brian's weblog, updated for design2003. It doesn't use the Matrix however. Perhaps it will help.
It still doesn't render quite like it did under design2002. I'm not sure if there is a good way to combine multiple input fields into one cell any longer. I know others have had a problem with this as well. I will have to look closer at your matrix attempt.
when 'SEATS'.
if p_edit_mode is initial.
data: max type string, occ type string,
value type string.
max = m_row_ref->seatsmax + m_row_ref->seatsmax_b
+ m_row_ref->seatsmax_f.
occ = m_row_ref->seatsocc + m_row_ref->seatsocc_b
+ m_row_ref->seatsocc_f.
condense: max, occ.
concatenate occ ` / ` max into value.
p_replacement_bee = cl_htmlb_textview=>factory(
text = value ).
else.
data: icon_plane2 type string.
icon_plane2 = cl_bsp_mimes=>sap_icon(
id = 'ICON_WS_PLANE' ).
data: image type ref to cl_htmlb_image.
image = cl_htmlb_image=>factory(
id = p_cell_id
src = icon_plane2 ).
data: if_first type ref to cl_htmlb_inputfield.
if_first = cl_htmlb_inputfield=>factory( id = p_cell_id
id_postfix = '_first'
type = 'INTEGER' size = '4' ).
if_first->value = m_row_ref->seatsocc_f.
data: if_bus type ref to cl_htmlb_inputfield.
if_bus = cl_htmlb_inputfield=>factory( id = p_cell_id
id_postfix = '_bus'
type = 'INTEGER' size = '4' ).
if_bus->value = m_row_ref->seatsocc_b.
data: if_econ type ref to cl_htmlb_inputfield.
if_econ = cl_htmlb_inputfield=>factory( id = p_cell_id
id_postfix = '_econ'
type = 'INTEGER' size = '4' ).
if_econ->value = m_row_ref->seatsocc.
data: tag_gl type ref to cl_htmlb_gridlayout,
tag_glc_if1 type ref to cl_htmlb_gridlayoutcell,
tag_glc_if2 type ref to cl_htmlb_gridlayoutcell,
tag_glc_if3 type ref to cl_htmlb_gridlayoutcell.
tag_gl = cl_htmlb_gridlayout=>factory(
columnsize = '3' rowsize = '1' ).
tag_glc_if1 = cl_htmlb_gridlayoutcell=>factory(
columnindex = '1' rowindex = '1' ).
tag_glc_if2 = cl_htmlb_gridlayoutcell=>factory(
columnindex = '2' rowindex = '1' ).
tag_glc_if3 = cl_htmlb_gridlayoutcell=>factory(
columnindex = '3' rowindex = '1' ).
data: seats_bee type ref to cl_bsp_bee_table.
create object seats_bee.
seats_bee->add( level = 1 element = tag_gl ).
seats_bee->add( level = 2 element = tag_glc_if1 ).
seats_bee->add( level = 3 element = if_first ).
seats_bee->add( level = 2 element = tag_glc_if2 ).
seats_bee->add( level = 3 element = if_bus ).
seats_bee->add( level = 2 element = tag_glc_if3 ).
seats_bee->add( level = 3 element = if_econ ).
p_replacement_bee = seats_bee.
endif.
Message was edited by: Thomas Jung
Maybe you are looking for
-
Displaying certain Line Items on a Sales Order
I have sales order with both line items that are populated because we have BOM Items that are marked as u201CSales Relevantu201D items from a production BOM and I also have some items that are line items generated from a true Sales BOM. The user wan
-
Hello, I have succesfully installed the SAP NetWeaver Sneak Preview ABAP Edition NSP (Windows Operating System). On the site http://www.sap.com/solutions/netweaver/minisap.epx frame System Info I can't choice the NSP system (only N4S). How can I exte
-
Syntax error in Transfer routine
Hai all, I am trying to write a routine for an object in the datasource trasnfer structure. I am getting a error. The code and the error as as follows. DATA: l_s_errorlog TYPE rssm_s_errorlog_int. SELECT SINGLE * FROM /BI0/PCOMP_CODE W
-
IPhone 3.0 and ICS files from Google Calendar
I was under the impression that ICS files would be supported in v3.0 of iPhone. The phone seems to recognize the ICS files and i can now click on them in the email but it takes me to a blank screen. I also do not get the automatic notification I woul
-
Encore 2.0 doesn´t start after using QT 7.1
I found out that i can´t start my Encore dvd 2.0 after I used QuickTime player ( 7.1). I have to reboot to be able to start it again. It doesn´t give any respons at all. Anyone had the similar problem? Mattias