SAP Knowledge Base Article - Public

3724443 - How to extract Company Code Data including Long Name, Short Name and Address Details via CDS View

Symptom

The request involves extracting Company Code Data including Long Name, Short Name, and Address Details via a custom CDS View.

Environment

SAP S/4 Hana Cloud Public Edition

Reproducing the Issue

  1. Attempt to extract Company Code Data including Long Name, Short Name and Address Details using a CDS View.
  2. Observe that the identified CDS Views do not include Address Information.

Cause

  • The available CDS Views do not include Address Information.
  • A customized CDS view needs to be created.

Resolution

Build a Custom CDS View:

  1. Open the Custom CDS Views App.
  2. Create a new View (e.g. ZC_CompanyCodeAddress).
  3. Set the primary Data Source as I_CompanyCode.
  4. Add required fields such as CompanyCode, CompanyCodeName (Long ame) and other relevant fields.
  5. Add an association/join with the Data Source I_OrganizationAddress.
  6. Define the join condition: I_CompanyCode.AddressID = I_OrganizationAddress.AddressID.
  7. Apply a filter if needed: I_OrganizationAddress.AddressObjectType = '1' (Organization).
  8. Select fields from I_OrganizationAddress such as AddresseeFullName, StreetName, HouseNumber, PostalCode, CityName, Region, Country, PhoneNumber, and EmailAddress.
  9. Publish the custom CDS View.
  10. Preview the custom CDS View in the View Browser App and export the Data to Excel/CSV.

See Also

Keywords

company code, cds view, long name, short name, address details, I_CompanyCode, I_OrganizationAddress, odata, export data, data extraction, addressID, postal address, custom cds view , KBA , FI-GL-IS-2CL , Information System (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions