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
- Attempt to extract Company Code Data including Long Name, Short Name and Address Details using a CDS View.
- 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:
- Open the Custom CDS Views App.
- Create a new View (e.g. ZC_CompanyCodeAddress).
- Set the primary Data Source as I_CompanyCode.
- Add required fields such as CompanyCode, CompanyCodeName (Long ame) and other relevant fields.
- Add an association/join with the Data Source I_OrganizationAddress.
- Define the join condition: I_CompanyCode.AddressID = I_OrganizationAddress.AddressID.
- Apply a filter if needed: I_OrganizationAddress.AddressObjectType = '1' (Organization).
- Select fields from I_OrganizationAddress such as AddresseeFullName, StreetName, HouseNumber, PostalCode, CityName, Region, Country, PhoneNumber, and EmailAddress.
- Publish the custom CDS View.
- Preview the custom CDS View in the View Browser App and export the Data to Excel/CSV.
See Also
- Refer to: SAP Help Portal - CDS Views Documentation
- Refer to: SAP Community - View for Company Code BP Address Data
- Refer to: S4HANA Guide - CDS View I_ADDRESS
- Refer to: SAP Learners - CDS View Browser
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
SAP Knowledge Base Article - Public