on 2025 Apr 15 4:55 AM
Hi there,
How can I change the growing of a table to scoll in a Fiori elements app? I tried it in the manifest.json, but it doesn't pick it up.
On my ObjectPage I have the following configuration for my table:
Thanks in advance,
Noël
Request clarification before answering.
ok, possible to include a custom section in Object Page Noel?
And inside that a smart table (scrollable by default)
<SmartTable id="mySmartTable"
entitySet="ProductSet"
tableType="Table"
useVariantManagement="true"
useTablePersonalisation="true"
useExportToExcel="true"
header="Products"
smartFilterId="SmartFilterBar"
demandPopin="false"
enableAutoBinding="true">
</SmartTable>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get this you need to tell framework how many records you are going to send first see below code:
DATA(lv_offset) = io_request->get_paging( )->get_offset( ).
DATA(lv_page_size) = io_request->get_paging( )->get_page_size( ).
DATA(lv_max_rows) = COND #( WHEN lv_page_size = if_rap_query_paging=>page_size_unlimited THEN 0
ELSE lv_page_size ).
"check count
SELECT COUNT( * )
FROM vbkpf AS vbkpf
WHERE vbkpf~bukrs IN @RA_bukrs
AND vbkpf~ausbk IN @RA_bukrs
AND vbkpf~belnr IN @RA_belnr
AND vbkpf~gjahr IN @RA_gjahr
AND vbkpf~budat IN @RA_budat
AND vbkpf~bldat IN @RA_bldat
AND vbkpf~blart IN @RA_blart
AND vbkpf~bktxt IN @RA_bktxt
AND vbkpf~xblnr IN @RA_xblnr
AND vbkpf~usnam IN @RA_usnam
AND vbkpf~bstat EQ 'V'
AND vbkpf~xwffr IN @RA_xwffr
AND vbkpf~xfrge IN @RA_xfrge
AND vbkpf~xprfg IN @RA_xprfg
AND ( vbkpf~awtyp IN (@awtyp_bkpf, @awtyp_space) OR
vbkpf~awtyp IS NULL ) INTO @DATA(lv_lines).
SELECT vbkpf~usnam, vbkpf~belnr, vbkpf~gjahr, vbkpf~bukrs, vbkpf~ausbk, vbkpf~blart, vbkpf~budat, vbkpf~waers, vbkpf~xblnr,
vbkpf~bktxt, vbkpf~xwffr, vbkpf~xprfg, vbkpf~xfrge
FROM vbkpf AS vbkpf
WHERE vbkpf~bukrs IN @RA_bukrs
AND vbkpf~ausbk IN @RA_bukrs
AND vbkpf~belnr IN @RA_belnr
AND vbkpf~gjahr IN @RA_gjahr
AND vbkpf~budat IN @RA_budat
AND vbkpf~bldat IN @RA_bldat
AND vbkpf~blart IN @RA_blart
AND vbkpf~bktxt IN @RA_bktxt
AND vbkpf~xblnr IN @RA_xblnr
AND vbkpf~usnam IN @RA_usnam
* AND vbkpf~waers IN @RA_waers
AND vbkpf~bstat EQ 'V'
AND vbkpf~xwffr IN @RA_xwffr
AND vbkpf~xfrge IN @RA_xfrge
AND vbkpf~xprfg IN @RA_xprfg
AND ( vbkpf~awtyp IN (@awtyp_bkpf, @awtyp_space) OR
vbkpf~awtyp IS NULL )
ORDER BY belnr, gjahr, vbkpf~bukrs
INTO CORRESPONDING FIELDS OF TABLE @INT_output
OFFSET @LV_offset UP TO @LV_max_rows ROWS.
TRY.
IF io_request->is_total_numb_of_rec_requested( ).
io_response->set_total_number_of_records( lv_lines ).
io_response->set_data( int_output ).
ELSE.
io_response->set_total_number_of_records( lv_lines ).
io_response->set_data( int_output ).
ENDIF.
CATCH cx_rap_query_response_set_twic.
ENDTRY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Noel,
In Fiori Elements-based applications, OData annotations take precedence over 'manifest.json' configurations when defining UI behavior. While certain settings can be adjusted in the 'manifest.json', the primary source for controlling table layout, field visibility, and interaction patterns remains the metadata annotations—particularly those under the 'com.sap.vocabularies.UI.v1' namespace.
Try changing type from 'ReponsiveTable' to 'Table'
"tableSettings": {
"type": "Table",
"selectionMode": "Multi"
}this would use scrollbar paging by default instead of growing
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi and thanks for your response!
Unfortunately it did not work. The first 10 records are displayed with the More option. We would like to remove the More option and fetch the data again after hitting a treshold.
Maybe it is a combination of both (backend and manifest.json)?
Cheers,
Noël
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.