cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new row to the tableview

Former Member
0 Kudos

Hi friends,

Can anybody tell me how add a new row to the tableview without using an iterator?pls help me out.

Thanks in advance.

Regards

sireesha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sireesha,

You can have a button to insert a new line on the page and then in the onInputProcessing you will need to append an initial line to the internal table. This will insert a blank line in your table view. However, once user enters some value and clicks on SAVE, you will need to have your logic in place to retrieve the user entered values.

Please search in the BSP forums. I think I read few days back some one discussing on how to handle binding logic without using the iterator.

Cheers

Message was edited by: vin

Answers (1)

Answers (1)

Former Member
0 Kudos

you can add rows using the below logic

(1)

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<htmlb:content design="design2003" >

<htmlb:page title=" " >

<htmlb:form>

<htmlb:gridLayout rowSize = "3"

columnSize = "3"

cellSpacing = "2" >

<htmlb:gridLayoutCell rowIndex = "1"

columnIndex = "1"

horizontalAlignment = "CENTER"

colSpan = "2"

width = "30" >

<htmlb:textView text = "titlecolumn"

design = "EMPHASIZED" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "1"

columnIndex = "2"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text = "Value"

design = "EMPHASIZED" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "2"

columnIndex = "1"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text="ASdmtbsdk" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "2"

columnIndex = "2"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text="ok" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "2"

columnIndex = "3"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text="120.00" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "3"

columnIndex = "1"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text="FDsa alsdf" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "3"

columnIndex = "2"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text="ok" />

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell rowIndex = "3"

columnIndex = "3"

horizontalAlignment = "CENTER"

colSpan = "1"

width = "30" >

<htmlb:textView text="345.00" />

</htmlb:gridLayoutCell>

</htmlb:gridLayout>

</htmlb:form>

</htmlb:page>

</htmlb:content>

(2)

<htmlb:form>

<htmlb:tableView id = "DOCUMENTS_R_OPEN"

visibleRowCount = "12"

fillUpEmptyRows = "<%= cl_bsp_hap_document_cs=>c_false %>"

width = "100%"

headerVisible = "FALSE"

headerText = "<%= otr(PAOC_HAP_DOCUMENT_UI/TITLE_LIST_TODO) %>"

table = "<%= APPLICATION->T_DOCUMENTS_R_OPEN %>" >

<htmlb:tableViewColumns>

<htmlb:tableViewColumn columnName = "APPRAISER_NAME"

title = "<%= otr(YP_HRPA/APPRAISER_NAME) %>"

wrapping = "true"

edit = "TRUE"

width = "300">

</htmlb:tableViewColumn>

<htmlb:tableViewColumn title = "<%= otr(YP_HRPA/APPRAISAL_DOC_NAME) %>"

columnName = "APPRAISAL_NAME"

width = "300"

wrapping = "FALSE"

onCellClick = "CellClickDocument"

type = "LINK"

onItemClick = "CellClickDocument" >

</htmlb:tableViewColumn>

</htmlb:tableViewColumns>

</htmlb:tableView>

</htmlb:form>

hope this is what you are looking for.

regards,

manasa

Former Member
0 Kudos

Manasa,

When i do some inputprocessing new empty row should be added to the tableview.S that data can be filled in the newly created row. This what my doubt. In ur code i didnt find how u r adding a new empty row to the tableview.Can u pls help me how should i do it?

Thanks in advance.

Regards

sireesha.

Former Member
0 Kudos

sireesha,

I thought that you are asking of adding rows statically.

i dont have an offhand answer of how to add rows dynamically.

sorry,

manasa