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

BAPI for searching a customer?

Former Member
0 Likes
349

Hi all,

I have to search for customers in the KNA1 table, e.g. using name, customer number... (all optional, multiple search parameters count as "AND" search), incl. wildcards (--> potentially multiple customers as result).

As the search is initiated from a Java-based web application, I need a BAPI or at least an RFC FM.

Unfortunately, I found no fitting one so far. The next best is BAPI_CUSTOMER_FIND, but it seems to work on individiual fields only, and it only supports OR searches, no AND searches.

Is there a function module already in the system, or do I have to write it myself?

Thanks in advance!

Kind regards,

Dennis

Hi all,

I have to search for customers in the KNA1 table, e.g. using name, customer number... (all optional, multiple search parameters count as "AND" search), incl. wildcards (--> potentially multiple customers as result).

As the search is initiated from a Java-based web application, I need a BAPI or at least an RFC FM.

Unfortunately, I found no fitting one so far. The next best is BAPI_CUSTOMER_FIND, but it seems to work on individiual fields only, and it only supports OR searches, no AND searches.

Is there a function module already in the system, or do I have to write it myself?

Thanks in advance!

Kind regards,

Dennis

1 REPLY 1
Read only

Former Member
0 Likes
286

I realized that BAPI_CUSTOMER_FIND returns the customer number as well, so I can use it in general.

But there is still some problems remaining, such as the missing AND operator and the need to afterwards get some details about each customer via JCo calls...

I guess it's best when I develop a custom range selection BAPI.

Kind regards,

Dennis