/
Customer Hierarchy SAP Privat Cloud Service Configuration

Customer Hierarchy SAP Privat Cloud Service Configuration

To retrieve Customer Hierarchy data from the SAP Private Cloud, a CDS view service specifically created for this purpose is utilized. This CDS view, developed using Eclipse, is designed to read data directly from the KNVH table. The following steps describe how to create and configure this service:

  1. Create the Root View Entity:

    • In Eclipse, create a root view entity and set the OData.publish parameter to true.

    • This root view entity should select data from the standard KNVH table.

@AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'ZDVCUSTHIERARCHY' @OData.publish: true define root view entity ZDVCUSTHIERARCHY as select from knvh { key hityp as Hityp, key kunnr as Kunnr, key vkorg as Vkorg, key vtweg as Vtweg, key spart as Spart, key datab as Datab, datbi as Datbi, hkunnr as Hkunnr, hvkorg as Hvkorg, hvtweg as Hvtweg, hspart as Hspart, grpno as Grpno, bokre as Bokre, prfre as Prfre, hzuor as Hzuor, node_guid as NodeGuid, node_id as NodeId }
  1. Activate the Root Entity View as an OData Service:

    • Use transaction n/iwfnd/maint_service to register the service.

    • Use the "Add Service" button to activate the root entity view as an OData Service.

image-20240620-125120.png
  1. Test the Service:

    • Utilize the SAP Gateway Client to test the service and ensure it is functioning correctly.

image-20240620-125226.png

 

These steps outline the process of setting up and configuring the CDS view service for accessing Customer Hierarchy data in SAP Private Cloud.