Friday, March 6, 2015

Siebel: SBL-DAT-00500: There were more rows than could be returned. Please refine your query to bring back fewer rows

This error can be frequently generated in Inbound Web Services using EAI Siebel Adapter or EAI UI Data Adapter Business Services.

This error occurs due to the setting of the "DSMaxFetchArraySize" subsystem parameter which controls the maximum number of records that can be retrieved from a Business Component in "ForwardBackward" cursor mode. It does not affect the maximum number of records retrieved when using "ForwardOnly" cursor mode.

By default the "DSMaxFetchArraySize" parameter is set to '0', which allows the Object manager to return a maximum of 10,000 records in "ForwardBackward" cursor mode.




The default cursor mode is "ForwardBackward" or Bidirectional.
"ForwardOnly" cursor mode is more efficient and should be used when we need to process large number of records.
"ForwardOnly" cursor mode does not restrict the number of records fetched in a query.

To implement the "ForwardOnly" cursor mode in EAI Siebel Adapter or EAI UI Data Adapter Business Services, we need to add the Argument "ExecutionMode" to the input Arguments.

Name:  ExecutionMode
Type: Literal
Value: ForwardOnly

Note:  ExecutionMode = ForwardOnly should not be used when changing the Primary of a MVG field like IsPrimaryMVG = "Y", which will result in a n error, because it cannot get back to the parent record to update the primary.

Also check for the "Maximum Cursor Size" property on the Business Component.
With this property set to some value greater than "0" and a Query is run on the BC either in Workflow or thru eScripting and a "NextRecord" Method reaches the last record in the cursor, it throws the same error.

123Siebel

Search 123Siebel