06-16-2009 2:45 AM
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?
06-16-2009 9:45 AM
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.
06-16-2009 6:03 AM
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
06-16-2009 6:40 AM
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
06-16-2009 9:45 AM
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.