cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How can I change growing to scroll in a Fiori elements app?

Noel_Hendrikx
Active Contributor
0 Likes
1,303

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:

 

"controlConfiguration": {
    "_Products/@com.sap.vocabularies.UI.v1.LineItem": {
         "tableSettings": {
              "type": "ResponsiveTable",
              "selectionMode": "Multi",
              "growing" : true,
              "growingThreshold": 50
          }

Thanks in advance,

Noël

Accepted Solutions (0)

Answers (3)

Answers (3)

ArunJacob
Active Participant

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>

 

Noel_Hendrikx
Active Contributor
I did it with script by setting the threshold of the RAP table to the required lenght. No scrolling anymore. Since the page is generated, we did not extend the page. But thanks anyway for your answer!
ashraf_usmani
Participant
0 Likes

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.
ArunJacob
Active Participant
0 Likes

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,

Noel_Hendrikx
Active Contributor

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