Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Only 10000 records being returned by function module?

Former Member
0 Likes
1,609

Is there a hard limit of 10000 records that can be returned in a function module export parameter? I tried looking everywhere I could think of and couldn't find any solid documentation.

We're having a problem with a function module used by our BW. It takes a range table of funds, and breaks it out into a table that lists each fund on its own line, and returns that in the export parameter. In the function, there are 11,000+ funds in the range table, but the export parameter is always returning exactly 10,000 records.

If this is a limit, does anyone know if it can be expanded. Thanks for any help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,517

Not that I know of.

Have you debugged the FM to see how many funds it is picking up?

Rob

10 REPLIES 10
Read only

Former Member
0 Likes
1,518

Not that I know of.

Have you debugged the FM to see how many funds it is picking up?

Rob

Read only

0 Likes
1,517

It's picking up 11372, but only returning the first 10000.

Read only

0 Likes
1,517

There's an internal table that is looping filling up the export parameter, it continues through the loop for all 11000+ records, but after the 10000th loop, the export table just stops growing.

Read only

0 Likes
1,517

Is this a standard R3 FM? If so, what is its name?

Rob

Read only

0 Likes
1,517

No, it's custom, but it's pretty straight forward.

FUNCTION ZBW_BPS_FILLVAR_ZFUND.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA OPTIONAL
*"     REFERENCE(I_VARIABLE) TYPE  UPC_Y_VARIABLE OPTIONAL
*"     REFERENCE(I_CHANM) TYPE  UPC_Y_CHANM OPTIONAL
*"     REFERENCE(ITO_CHANM) TYPE  UPC_YTO_CHA OPTIONAL
*"  EXPORTING
*"     VALUE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
*"----------------------------------------------------------------------
*------------------------------------------------------------------------

  data: ze_subrc type sy-subrc.
  data: xreceivers like upc_ys_api_varsel occurs 0 with header line.
  data: ls_charsel type upc_ys_charsel.


* Used to hold individual funds found in the selected range
  data: begin of it_fund occurs 0,
        zfund like /BI0/TFUND-fund,
        end of it_fund.


  call function 'API_SEMBPS_VARIABLE_GETDETAIL'
    EXPORTING
      i_area     = 'ZABCNM01'
      i_variable = 'ZFDFUNCT'
    IMPORTING
      e_subrc    = ze_subrc
    TABLES
      etk_varsel = xreceivers.


  loop at xreceivers.

* occasionally a '#' comes in as a selection, skip these records
    if ls_charsel-low <> '#'.

      select fund
      from
        /BI0/TFUND
      into it_fund-zfund
      where
        fund >= xreceivers-low
        and fund <= xreceivers-high.

        append it_fund.

      endselect.

    endif.

  endloop.


* Loop at it_fund to build list of individual funds (from range)

  loop at it_fund.

    ls_charsel-chanm = '0FUND'.
    ls_charsel-seqno = sy-tabix.
    ls_charsel-sign = 'I'.
    ls_charsel-opt = 'EQ'.
    ls_charsel-low = it_fund-zfund.
*  ls_charsel-high = xreceivers-high.

    insert ls_charsel into table eto_charsel.

    clear ls_charsel.

  endloop.

ENDFUNCTION.

The relevant part is that last loop. There are 11k+ records in the internal table. And it does the loop that many times. But the table eto_charsel never gets bigger than 10k records.

Read only

0 Likes
1,517

eto_charsel has a unique key. Are you sure there are no duplicates in it_fund or xreceivers?

Of course - seqno has a type of NUMC(4)..

Rob

Edited by: Rob Burbank on May 3, 2011 12:50 PM

Read only

0 Likes
1,517

eto_charsel has a unique key. Are you sure there are no duplicates in it_fund or xreceivers?

Of course - seqno has a type of NUMC(4)..

Rob

Read only

0 Likes
1,517

And, that explains that, thank you!

Read only

0 Likes
1,517

... or as one of my previous project managers used to put it, you are "the man"

Cheers

Thomas

Read only

ThomasZloch
Active Contributor
0 Likes
1,517

Maybe some package size that can be adjusted somewhere deep down in BW customizing? Also have a look in the BW (or is it BI?) forums, but do not cross-post, please.

Thomas