{"id":20484789,"url":"https://github.com/sap-samples/abap-platform-yy","last_synced_at":"2025-04-13T14:52:32.585Z","repository":{"id":74142494,"uuid":"172287826","full_name":"SAP-samples/abap-platform-yy","owner":"SAP-samples","description":"YY Data Service: A Poor Man's RTTI for the ABAP Environment on SAP Cloud Platform","archived":false,"fork":false,"pushed_at":"2025-03-10T13:05:28.000Z","size":45,"stargazers_count":12,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-27T05:51:12.637Z","etag":null,"topics":["abap","sample","sample-code","sap-cloud-platform"],"latest_commit_sha":null,"homepage":null,"language":"ABAP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-24T02:38:39.000Z","updated_at":"2025-03-15T00:25:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"98e5c4d6-93ba-4a3c-9b67-6bf82b6c3041","html_url":"https://github.com/SAP-samples/abap-platform-yy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fabap-platform-yy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fabap-platform-yy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fabap-platform-yy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fabap-platform-yy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-samples","download_url":"https://codeload.github.com/SAP-samples/abap-platform-yy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732509,"owners_count":21152851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abap","sample","sample-code","sap-cloud-platform"],"created_at":"2024-11-15T16:25:44.015Z","updated_at":"2025-04-13T14:52:32.557Z","avatar_url":"https://github.com/SAP-samples.png","language":"ABAP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YY Data Service\n\n[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/abap-platform-yy)](https://api.reuse.software/info/github.com/SAP-samples/abap-platform-yy)\n\n\u003chr /\u003e\n\n**Attention: This is sample code!** \n\nThis repository contains sample code which should not be used in production. It only shows the capabilities of [APACK - the ABAP package and dependency manager](https://blogs.sap.com/2019/05/06/introducing-apack-a-package-and-dependency-manager-for-abap/).\n\n\u003chr /\u003e\n\n**A Poor Man's RTTI for the ABAP Environment on SAP Cloud Platform**\n\nThis small library - called the YY Data Service - is an alternative approach towards RTTI on an ABAP system running on the SAP Cloud Platform. Keep in mind that this is just a demo. In production, you better use the officially supported RTTI...\n\n## Prerequisites\nPlease make sure to fulfill the following requirements:\n* You have access to an SAP Cloud Platform ABAP Environment instance (see [here](https://blogs.sap.com/2018/09/04/sap-cloud-platform-abap-environment) for additional information)\n* You have downloaded and installed [ABAP Development Tools for SAP NetWeaver](https://tools.hana.ondemand.com/#abap) (ADT)\n* You have created an ABAP Cloud Project in ADT that allows you to access your SAP Cloud Platform ABAP Environment instance\n* You have installed the [abapGit](https://github.com/abapGit/eclipse.abapgit.org) plug-in for Eclipse [via the updatesite](https://eclipse.abapgit.org/updatesite/)\n\n## Download and Installation\nUse the abapGit plug-in to install the YY Data Service by executing the following steps:\n* In ADT create the package `/DMO/YY` as a subpackage under `/DMO/SAP` (keep the defaulted values)\n* In ADT click on `Window` \u003e `Show View` \u003e `Other...` and choose the entry `abapGit Repositories` to open the abapGit view\n* Make sure to have the correct ABAP Cloud Project selected (See the little headline in the abapGit view for the current project)\n* Click on the `+` icon to clone an abapGit repository\n* Provide the URL of this repository: `https://github.com/SAP/abap-platform-yy.git`\n* On the next page choose the master branch and provide the package `/DMO/YY`\n* Provide a valid transport request and choose `Finish`. This starts the cloning of the repository - which might take a few minutes\n* Once the cloning has finished, refresh your project tree\n* Usually, the imported objects are not activated after cloning. Use the mass activation feature in ADT to activate those artifacts.\n\n## Usage\nIf you want to get some information about ABAP data in the Cloud, YY makes it really easy for you. The service is ready-to-use, no configuration is necessary. Simply get an instance of the service class by calling `ZCL_YY_ABAP_DATA_SERVICE=\u003eCREATE_INSTANCE`. The one and only parameter `I_DATA` expects the data which you want to investigate.\n\nThe resulting object of type `ZIF_YY_DATA_ELEMENT` has two methods, `GET_DESCRIPTOR` and `GET_VALUE`.\n\n### ZIF_YY_DATA_ELEMENT=\u003eGET_DESCRIPTOR\nThis method returns an object of type `ZIF_YY_DATA_DESCRIPTOR` which describes the metadata of the respective element. If the element has a name (e.g. as a structure element), you'll find this name by calling the method `GET_NAME`. If there was no name, it will return the value of `ZIF_YY_DATA_DESCRIPTOR=\u003eCO_UNNAMED_OBJECT`. The more important information is probably the type of the data element which you can get by calling `GET_TYPE`. This one returns an instance of the interface `ZIF_YY_DATA_ELEMENT_TYPE`. It's currently one and only method `GET_TYPE_NAME` returns a textual representation of the data type. Constants for currently supported ones can be found in the interface `ZIF_YY_DATA_ELEMENT_TYPE` as well. Depending on this format you need to decide which format your variable needs to have which you use to get the actual data from `GET_VALUE`...\n\n### ZIF_YY_DATA_ELEMENT=\u003eGET_VALUE\nIf you have a simple data type such as a number or text, you get it directly back using this method. For structures and tables it's slightly more difficult. There you get the full information about the structure or the table in a nice format, either `ZIF_YY_DATA_ELEMENT=\u003eTY_STRUCTURE` or `ZIF_YY_DATA_ELEMENT=\u003eTY_TABLE`. They feature the structure elements  or the table lines with their corresponding data element objects in their original order of sequence.\n\n## Limitations\nCurrently no support for objects (reference types), only simple data types, structures and tables. And it's not even guaranteed that it works for them as you might expect... It's sample code!\n\n## Known Issues\nAs mentioned before, after cloning a abapGit repository some objects might not be active. Use the mass activation feature in ADT to activate those artifacts.  \n\n## License\nCopyright (c) 2019-2024 SAP SE or an SAP affiliate company.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use any file of this project except in compliance with the License.\n\nYou may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fabap-platform-yy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap-samples%2Fabap-platform-yy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fabap-platform-yy/lists"}