0

I need to retrieve from S4HC the following information: which plants are assigned to a sales organization (in ECC table TVKWZ). Snooping around, I found out the class SalesOrganizationLink which I believe gives me such info. However, I could not instantiate it.

Usually, I get a service class that allows me to retrieve data (i.e., sales order service). I could not find the service class for this case.

Could someone give a hint on how to use this class?

BR, Pietro

2 Answers2

0

I believe the class you're looking for is DefaultSalesOrganizationService.

Dennis H
  • 589
  • 4
  • 10
  • Hi Dennis, thanks for the info. By using such a class, it gives me the type "SalesOrganization". I need the type "SalesOrganizationLink". – Pietro Henrique Feb 05 '20 at 13:26
0

The SalesOrganizationLink class is used by the VDM to represent navigational properties of a SalesOrganization. They hold no information on their own.

If what you are looking for is a navigational property on SalesOrganization you can use the DefaultSalesOrganizationService and expand the naivgational property:

service.getSalesOrganizationByKey("MyKey")
    .select(SalesOrganization.TO_MY_NAVIGATION_PROPERTY)
    .execute(myDestination);

But I see no property related to "plants" in the SalesOrganization. Please refer to the API Hub for what is available on the services.

MatKuhr
  • 505
  • 4
  • 13