Application Development 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: 

BAPI_BUPA_SEARCH - MAXSEL

Former Member
0 Kudos

I have an RFC that does business partner search using BAPI_BUPA_SEARCH. I want the ability to restrict the number of business partner retrieved.

The bapi has a structure OTHERS. In it there is is a field MAXSEL. I specify 20 for MAXSEL in BAPI signature but still get more than 20 BPs.

How is MAXSEL used?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Raynald,

The parameter MAXSEL has some limitations. E.g. : if you try searching for address specific attributes or communication data such as tel / fax, it doesn't always work. Reason - the modules of Address management donot support the concept of maxsel.

BUPA_SEARCH makes a call to Address management modules internally, and thus it cannot take care of this parameter for some cases.

I'd suggest that you activate the search help BUPA_ADR. Look into note 595442. This creates a new search table BUTADRSEARCH that is in control of the BP, not address, but combines the address fields requierd for a quick search. This should solve the problem.

Cheers,

Rishu.

3 REPLIES 3

Former Member
0 Kudos

Hi there

If you look in Include LBUBA_4F26 the maxsel parameter corresponds to IV_MAXPARTNERS. If nothing is passed to MAXSEL then the BAPI returns the whole list of Business Partners. IF a value is passed then there is code in the include to add 5 (this is hard-coded) more business partners to the current value of MAXSEL.

Hope this answers your question

Cheers

Salil

Former Member
0 Kudos

Hi Ryland,

Maxsel should allow you to restrict values.Try this



data: l_others type BAPIBUS1006_OTHER_DATA.

l_others-maxsel = 20.

call function 'BAPI_BUPA_SEARCH'
  EXPORTING
....................
       others = l_others

  TABLES
....................
  

George

Former Member
0 Kudos

Hi Raynald,

The parameter MAXSEL has some limitations. E.g. : if you try searching for address specific attributes or communication data such as tel / fax, it doesn't always work. Reason - the modules of Address management donot support the concept of maxsel.

BUPA_SEARCH makes a call to Address management modules internally, and thus it cannot take care of this parameter for some cases.

I'd suggest that you activate the search help BUPA_ADR. Look into note 595442. This creates a new search table BUTADRSEARCH that is in control of the BP, not address, but combines the address fields requierd for a quick search. This should solve the problem.

Cheers,

Rishu.