简体   繁体   中英

Cloud-SDK Filter by subfields

I'm using S4 Cloud-SDK to make queries on SAP S/4 Hana and I trying to get information about Business Partners filtering with company code. The fields that I'm looking for are:

  • Supplier FullName
  • Supplier Email
  • Tax1 Number
  • Representative Name
  • Supplier Code

For that I'm using BusinessPartnerService to get these fields. The problem is, I'm doing lots of queries to get this information and I would like to reduce the number of queries to the database. One of the queries is listed below.

List<BusinessPartner> businessPartners = businessPartnerService.getAllBusinessPartner().select(
    BusinessPartner.TO_SUPPLIER.select(Supplier.TO_SUPPLIER_COMPANY),
    BusinessPartner.TO_BUSINESS_PARTNER_CONTACT, BusinessPartner.TO_BU_PA_IDENTIFICATION, 
    BusinessPartner.TO_BUSINESS_PARTNER_ADDRESS, BusinessPartner.TO_BUSINESS_PARTNER_TAX, BusinessPartner.ALL_FIELDS)
    .execute();

Is it possible to filter the query above using an EntityLink? For example, something similar to the following:

.filter(BusinessPartner.TO_SUPPLIER.select(
        Supplier.TO_SUPPLIER_COMPANY.COMPANY_CODE.eq("ABCD")))

更新: 2.8.0和更高版本支持1:1导航属性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM