cancel
Showing results for 
Search instead for 
Did you mean: 

How to query Customer data by CustomerGroupCode

former_member195790
Participant
0 Kudos

Hi expert

I'm beginner for sap by design development.

I need to query Customer data from Standard Business Object (AP/FO/BusinessPartner/Global  --> Customer) by using CustomerGroupCode as a

criteria. But there is no any query with suitable to my requirements.



Is it possible to create custom query over on Standard Business Object ?

or another ways to accomplish this.

Thanks in advance

Krit R.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Krit,

We can Query Customer BO with the below mentioned parameters.

1.BusinessPartnerAdditionalName 

2.BusinessPartnerName

3.EmailURI

4.InternalID                 --> CustomerID

If any of these fields are available in current BO, then we can Query Customer BO.

After getting the result we can filter that by using CustomerGroupCode.

Regards,

SHIVA G

former_member195790
Participant
0 Kudos

Hi SHIVA G,

Thanks for your reply.

However , My goal is to display list of customers in OWL. And each of customer  have

CustomerGroupCode value ( I mean CustomerGroupCode must not empty).

I don't want to show any of customers with empty value of  CustomerGroupCode.

But there are no any standard query of Customer BO that enable me to do that.

Best Regards,

Krit R.

Former Member
0 Kudos

Hi Krit,

If you want to get CustomerGroupCode related Customers, i have written some code check in attachment.

I hope it will help you.

Regards,

SHIVA G

former_member195790
Participant
0 Kudos

Hi SHIVA G,



Your code look nice and so close to my requirement (for what I need).


I have few questions below. ( sorry If I ask a lot .  )


1 . Where can I put your code ?        Because I didn't create any custom BO.


2. After get the result list.  How can I move it to display  in DataList ?   (table in screen).




Users  does not prefer to filter the column by them self.




Best Regards,

Krit R.

Former Member
0 Kudos

Hi Krit,

I don't know about your business requirement.

If you want to store those records.

1. Create 1 custom BO, and declare required elements.

2. And create Custom BO instance inside last "if condition" in the above code.

Later you can see that records in Custom Bo OWL screen.

Regards,

SHIVA G