on 2007 Feb 01 11:23 AM
Hi All,
I am trying to display the database table record field as checkbox in the BSP page.
I have used the code
data itab type ZPRODUCTS.
select single * from ZPRODUCTS into itab where PRODUCTS = SAPProduct.
%>
<td Valign="top">
<htmlb:checkbox id = "<%=itab-PRODUCTS%>"
checked ="<%=itab-PRODUCTS%>"
text = "<%=SAPProduct%>"
/>
</td>
But its not diplaying anything. can any one help me out.
Can i give the check boxes to display in the loop like no of records in the database table and to that many no of times the loop for the checkboxes should be displayed.
Please help me out.
Thank you very much in advance.
Saripalli S
Hi,
Of course you can.
Use some ABAP scripting.
I don't know the structure of your Z-table, but here is the principle
<% LOOP AT itab. %>
<htmlb:checkbox id = "<%= itab-SAPProduct %>"
checked = "<%= itab-PRODUCTS %>"
text = "<%= itab-SAPProduct %>" />
<% ENDLOOP. %>
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thank you very much for your answer.
my table structure is with Productid ,productname.
I am using itab to get the record for the table to display in the checkbox.
<%
data itab type ZPRODUCTS.
select single * from ZPRODUCTS into itab where PRODUCTS = SAPProduct.
%>
this is the statement i am using. But when I am using to display the itab content in the check box its not displaying.
but i am not getting any errors. Is there any logical error where i have to check.
I also test the above code..i dont see any issue..
Or otherway around is, put the below code in TYPE DEfinitions:
TYPES: BEGIN OF tab_products,
check TYPE xfeld,
INCLUDE TYPE ZPRODUCT.
TYPES: END OF tab_products.
Then in your Event, you can use like
<b>Structure:-</b>
Data: itab type tab_products.
<b>Internal Table:-</b>
Data: itab type table of tab_products.
<i>* Reward each useful answer</i>
Raja T
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.