├── .abapgit.xml
├── LICENSE
├── LICENSES
└── Apache-2.0.txt
├── README.md
├── REUSE.toml
├── TEST_ONPREM_EXTEND_RDS_SRV
└── src
│ ├── Example_generated_source_code
│ ├── package.devc.xml
│ ├── zaf_r_extend_rds_based_service.prog.abap
│ └── zaf_r_extend_rds_based_service.prog.xml
├── readme_msft.md
└── src
├── package.devc.xml
└── zms2
├── package.devc.xml
├── z_online_shop_sdk.fugr.lz_online_shop_sdktop.abap
├── z_online_shop_sdk.fugr.lz_online_shop_sdktop.xml
├── z_online_shop_sdk.fugr.saplz_online_shop_sdk.abap
├── z_online_shop_sdk.fugr.saplz_online_shop_sdk.xml
├── z_online_shop_sdk.fugr.xml
├── zcl_ms1.clas.abap
├── zcl_ms1.clas.xml
├── zhb_i_prodcut_sql.clas.abap
├── zhb_i_prodcut_sql.clas.xml
├── zhb_i_product.ddls.asddls
├── zhb_i_product.ddls.baseinfo
└── zhb_i_product.ddls.xml
/.abapgit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | E
6 | /src/
7 | FULL
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2021 SAP
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/LICENSES/Apache-2.0.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://api.reuse.software/info/github.com/SAP-samples/abap-platform-code-samples-standard)
2 |
3 | # ABAP Platform Code Samples for On-premise Systems
4 |
5 | ## Description
6 |
7 | In this repository you will find several packages that contain the sample code of various blog posts.
8 |
9 | ### ABAP Cloud integration with Microsoft
10 |
11 |
12 |
13 | ### How to generate RAP BOs with custom entities
14 | * Blog Post: [How to redefine RDS based OData services ?](https://blogs.sap.com/2021/12/08/how-to-redefine-rds-based-odata-services/)
15 |
16 |
17 | ## Requirements
18 |
19 | This sample code can be deployed on a SAP S/4HANA system in packages that have the *ABAP language version*: **Standard ABAP**.
20 |
21 | You have to create a package (e.g. `ZABAP_STANDARD`) beforehand in software component `HOME` without specifing a super package.
22 | The code for each blog post / workshop is stored in a separate sub-package (for example `ZMS2`) of the super package `ZABAP_STANDARD`.
23 |
24 | The repository uses folder logic **FULL**. That means that the content can only be imported into packages that have exactly the same name.
25 |
26 | ## Download and Installation
27 |
28 | You can download this code and import it into an ABAP environment system using the report ZABAPGIT. Please be sure to have a package (e.g. `ZABAP_STANDARD` ) in the software component `HOME` without specifing a super package created beforehand.
29 |
30 | ## Known Issues
31 |
32 | none
33 |
34 | ## How to obtain support
35 |
36 | [Create an issue](https://github.com/SAP-samples//issues) in this repository if you find a bug or have questions about the content.
37 |
38 | For additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).
39 |
40 | ## Contributing
41 | If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).
42 |
43 | ## License
44 | Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.
45 |
--------------------------------------------------------------------------------
/REUSE.toml:
--------------------------------------------------------------------------------
1 | version = 1
2 | SPDX-PackageName = "abap-platform-code-samples-standard"
3 | SPDX-PackageSupplier = "andre.fischer@sap.com"
4 | SPDX-PackageDownloadLocation = "https://github.com/sap-samples/abap-platform-code-samples-standard"
5 | SPDX-PackageComment = "The code in this project may include calls to APIs (“API Calls”) of\n SAP or third-party products or services developed outside of this project\n (“External Products”).\n “APIs” means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project’s code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls."
6 |
7 | [[annotations]]
8 | path = "**"
9 | precedence = "aggregate"
10 | SPDX-FileCopyrightText = "2021 SAP SE or an SAP affiliate company and abap-platform-code-samples-standard contributors"
11 | SPDX-License-Identifier = "Apache-2.0"
12 |
--------------------------------------------------------------------------------
/TEST_ONPREM_EXTEND_RDS_SRV/src/Example_generated_source_code:
--------------------------------------------------------------------------------
1 | CLASS ZCL_Z_REDEF_RDS_MPC_EXT DEFINITION
2 | PUBLIC
3 | INHERITING FROM ZCL_Z_REDEF_RDS_MPC
4 | CREATE PUBLIC .
5 | PUBLIC SECTION.
6 | METHODS define REDEFINITION.
7 | METHODS if_sadl_gw_model_exposure_data~get_model_exposure REDEFINITION.
8 | PROTECTED SECTION.
9 | PRIVATE SECTION.
10 | ENDCLASS.
11 | CLASS ZCL_Z_REDEF_RDS_MPC_EXT IMPLEMENTATION.
12 | METHOD define.
13 | super->define( ).
14 | ENDMETHOD.
15 | METHOD if_sadl_gw_model_exposure_data~get_model_exposure.
16 | CONSTANTS: co_gen_timestamp TYPE timestamp VALUE '20211208223150'.
17 | DATA(lv_sadl_xml) =
18 | || &
19 | || &
20 | | | &
21 | | | &
22 | || &
23 | | | &
24 | || &
25 | || &
26 | | | &
27 | | | &
28 | || &
29 | || &
30 | | | &
31 | | | &
32 | | | &
33 | || &
34 | || &
35 | | | &
36 | | | &
37 | || &
38 | || &
39 | | | &
40 | | | &
41 | | | &
42 | || &
43 | || &
44 | || .
45 | ro_model_exposure = cl_sadl_gw_model_exposure=>get_exposure_xml( iv_uuid = CONV #( 'Z_SRC_RDS' )
46 | iv_timestamp = co_gen_timestamp
47 | iv_sadl_xml = lv_sadl_xml ).
48 | ENDMETHOD.
49 | ENDCLASS.
50 | **************************
51 | * DPC_EXT Code goes here *
52 | **************************
53 | CLASS ZCL_Z_REDEF_RDS_DPC_EXT DEFINITION
54 | PUBLIC
55 | INHERITING FROM ZCL_Z_REDEF_RDS_DPC
56 | CREATE PUBLIC .
57 | PUBLIC SECTION.
58 | METHODS if_sadl_gw_dpc_util~get_dpc REDEFINITION .
59 | METHODS /iwbep/if_mgw_appl_srv_runtime~get_entityset REDEFINITION .
60 | METHODS /iwbep/if_mgw_appl_srv_runtime~get_entity REDEFINITION .
61 | PROTECTED SECTION.
62 | METHODS I_CurrencyTex_get_entity
63 | IMPORTING
64 | !io_tech_request_context TYPE REF TO /iwbep/if_mgw_req_entity OPTIONAL
65 | EXPORTING
66 | !er_entity TYPE ZCL_Z_REDEF_RDS_MPC=>TS_ "use code completion to select correct type from MPC .
67 | !es_response_context TYPE /iwbep/if_mgw_appl_srv_runtime=>ty_s_mgw_response_entity_cntxt
68 | RAISING
69 | /iwbep/cx_mgw_busi_exception
70 | /iwbep/cx_mgw_tech_exception .
71 | METHODS I_CurrencyTex_get_entityset
72 | IMPORTING
73 | !io_tech_request_context TYPE REF TO /iwbep/if_mgw_req_entityset OPTIONAL
74 | EXPORTING
75 | !et_entityset TYPE ZCL_Z_REDEF_RDS_MPC=>TT_ "use code completion to select correct type from MPC .
76 | !es_response_context TYPE /iwbep/if_mgw_appl_srv_runtime=>ty_s_mgw_response_context
77 | RAISING
78 | /iwbep/cx_mgw_busi_exception
79 | /iwbep/cx_mgw_tech_exception .
80 | METHODS zI_currency_get_entity
81 | IMPORTING
82 | !io_tech_request_context TYPE REF TO /iwbep/if_mgw_req_entity OPTIONAL
83 | EXPORTING
84 | !er_entity TYPE ZCL_Z_REDEF_RDS_MPC=>TS_ "use code completion to select correct type from MPC .
85 | !es_response_context TYPE /iwbep/if_mgw_appl_srv_runtime=>ty_s_mgw_response_entity_cntxt
86 | RAISING
87 | /iwbep/cx_mgw_busi_exception
88 | /iwbep/cx_mgw_tech_exception .
89 | METHODS zI_currency_get_entityset
90 | IMPORTING
91 | !io_tech_request_context TYPE REF TO /iwbep/if_mgw_req_entityset OPTIONAL
92 | EXPORTING
93 | !et_entityset TYPE ZCL_Z_REDEF_RDS_MPC=>TT_ "use code completion to select correct type from MPC .
94 | !es_response_context TYPE /iwbep/if_mgw_appl_srv_runtime=>ty_s_mgw_response_context
95 | RAISING
96 | /iwbep/cx_mgw_busi_exception
97 | /iwbep/cx_mgw_tech_exception .
98 | ENDCLASS .
99 | CLASS ZCL_Z_REDEF_RDS_DPC_EXT IMPLEMENTATION.
100 | METHOD if_sadl_gw_dpc_util~get_dpc.
101 | CONSTANTS: co_gen_timestamp TYPE timestamp VALUE '20211208223150'.
102 | DATA(lv_sadl_xml) =
103 | || &
104 | || &
105 | | | &
106 | | | &
107 | || &
108 | | | &
109 | || &
110 | || &
111 | | | &
112 | | | &
113 | || &
114 | || &
115 | | | &
116 | | | &
117 | | | &
118 | || &
119 | || &
120 | | | &
121 | | | &
122 | || &
123 | || &
124 | | | &
125 | | | &
126 | | | &
127 | || &
128 | || &
129 | || .
130 | ro_dpc = cl_sadl_gw_dpc_factory=>create_for_sadl( iv_sadl_xml = lv_sadl_xml
131 | iv_timestamp = co_gen_timestamp
132 | iv_uuid = 'MM_PUR_CNTRL_CTR_MAINTAIN'
133 | io_context = me->mo_context ).
134 | ENDMETHOD.
135 | METHOD /iwbep/if_mgw_appl_srv_runtime~get_entity.
136 | DATA(my_entity_name) = io_tech_request_context->get_entity_set_name( ).
137 | case io_tech_request_context->get_entity_set_name( ).
138 | WHEN 'I_CurrencyText'.
139 | I_CurrencyTex_get_entity( EXPORTING io_tech_request_context = io_tech_request_context
140 | IMPORTING er_entity = data(I_CurrencyTex_entity)
141 | es_response_context = es_response_context ).
142 | IF I_CurrencyTex_entity IS NOT INITIAL.
143 | copy_data_to_ref( EXPORTING is_data = I_CurrencyTex_entity
144 | CHANGING cr_data = er_entity ).
145 | ENDIF.
146 | WHEN 'zI_currency'.
147 | zI_currency_get_entity( EXPORTING io_tech_request_context = io_tech_request_context
148 | IMPORTING er_entity = data(zI_currency_entity)
149 | es_response_context = es_response_context ).
150 | IF zI_currency_entity IS NOT INITIAL.
151 | copy_data_to_ref( EXPORTING is_data = zI_currency_entity
152 | CHANGING cr_data = er_entity ).
153 | ENDIF.
154 | WHEN OTHERS.
155 | super->/iwbep/if_mgw_appl_srv_runtime~get_entity( EXPORTING iv_entity_name = iv_entity_name
156 | iv_entity_set_name = iv_entity_set_name
157 | iv_source_name = iv_source_name
158 | it_key_tab = it_key_tab
159 | it_navigation_path = it_navigation_path
160 | io_tech_request_context = io_tech_request_context
161 | IMPORTING er_entity = er_entity
162 | es_response_context = es_response_context ).
163 | ENDCASE.
164 | ENDMETHOD.
165 | METHOD /iwbep/if_mgw_appl_srv_runtime~get_entityset.
166 | DATA(my_entity_name) = io_tech_request_context->get_entity_set_name( ).
167 | case io_tech_request_context->get_entity_set_name( ).
168 | WHEN 'I_CurrencyText'.
169 | I_CurrencyTex_get_entityset( EXPORTING io_tech_request_context = io_tech_request_context
170 | IMPORTING et_entityset = data(I_CurrencyTex_entityset)
171 | es_response_context = es_response_context ).
172 | IF I_CurrencyTex_entityset IS NOT INITIAL.
173 | copy_data_to_ref( EXPORTING is_data = I_CurrencyTex_entityset
174 | CHANGING cr_data = er_entityset ).
175 | ENDIF.
176 | WHEN 'zI_currency'.
177 | zI_currency_get_entityset( EXPORTING io_tech_request_context = io_tech_request_context
178 | IMPORTING et_entityset = data(zI_currency_entityset)
179 | es_response_context = es_response_context ).
180 | IF zI_currency_entityset IS NOT INITIAL.
181 | copy_data_to_ref( EXPORTING is_data = zI_currency_entityset
182 | CHANGING cr_data = er_entityset ).
183 | ENDIF.
184 | WHEN OTHERS.
185 | super->/iwbep/if_mgw_appl_srv_runtime~get_entityset( EXPORTING iv_entity_name = iv_entity_name
186 | iv_entity_set_name = iv_entity_set_name
187 | iv_source_name = iv_source_name
188 | it_filter_select_options = it_filter_select_options
189 | it_order = it_order
190 | is_paging = is_paging
191 | it_key_tab = it_key_tab
192 | it_navigation_path = it_navigation_path
193 | iv_filter_string = iv_filter_string
194 | iv_search_string = iv_search_string
195 | io_tech_request_context = io_tech_request_context
196 | IMPORTING er_entityset = er_entityset
197 | es_response_context = es_response_context ).
198 | ENDCASE.
199 | ENDMETHOD.
200 | method I_CurrencyTex_get_entity.
201 | if_sadl_gw_dpc_util~get_dpc( )->get_entity( EXPORTING io_tech_request_context = io_tech_request_context
202 | IMPORTING es_data = er_entity ).
203 | endmethod.
204 | method I_CurrencyTex_get_entityset.
205 | if_sadl_gw_dpc_util~get_dpc( )->get_entityset( EXPORTING io_tech_request_context = io_tech_request_context
206 | IMPORTING et_data = et_entityset
207 | es_response_context = es_response_context ).
208 | endmethod.
209 | method zI_currency_get_entity.
210 | if_sadl_gw_dpc_util~get_dpc( )->get_entity( EXPORTING io_tech_request_context = io_tech_request_context
211 | IMPORTING es_data = er_entity ).
212 | endmethod.
213 | method zI_currency_get_entityset.
214 | if_sadl_gw_dpc_util~get_dpc( )->get_entityset( EXPORTING io_tech_request_context = io_tech_request_context
215 | IMPORTING et_data = et_entityset
216 | es_response_context = es_response_context ).
217 | endmethod.
218 | ENDCLASS .
219 |
--------------------------------------------------------------------------------
/TEST_ONPREM_EXTEND_RDS_SRV/src/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Extend RDS based OData services
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TEST_ONPREM_EXTEND_RDS_SRV/src/zaf_r_extend_rds_based_service.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report zaf_r_extend_rds_based_service
3 | *&---------------------------------------------------------------------*
4 | *&
5 | *&---------------------------------------------------------------------*
6 | REPORT zaf_r_extend_rds_based_service.
7 |
8 | "todo's
9 | "check usage of CL_BSA_SADL_M2M_TRANSFORMER to transform the SADL XML to a structure and vice versa.
10 |
11 | CLASS cl_sadl_based_segw_project DEFINITION .
12 |
13 | PUBLIC SECTION.
14 |
15 | TYPES:
16 | BEGIN OF ts_mpc_type_of_cds_view,
17 | cds_view_name TYPE string,
18 | mpc_get_entity_type_name TYPE string,
19 | mpc_get_entityset_type_name TYPE string,
20 | END OF ts_mpc_type_of_cds_view,
21 | tt_mpc_type_of_cds_view TYPE STANDARD TABLE OF ts_mpc_type_of_cds_view WITH EMPTY KEY.
22 |
23 | METHODS: constructor IMPORTING io_segw_project_name TYPE /iwbep/i_sbd_ga-project
24 | RAISING cx_parameter_invalid,
25 | get_sadl_xml RETURNING VALUE(sadl_xml) TYPE string
26 | RAISING cx_sadl_gw_no_service_api,
27 | get_merged_sadl_xml IMPORTING sadl_xml_source_project TYPE string
28 | sadl_xml_extended_project TYPE string
29 | RETURNING VALUE(sadl_xml_merged) TYPE string,
30 | get_dpc_ext_class_name RETURNING VALUE(class_name) TYPE string,
31 | get_mpc_ext_class_name RETURNING VALUE(class_name) TYPE string,
32 | get_dpc_class_name RETURNING VALUE(class_name) TYPE string,
33 | get_mpc_class_name RETURNING VALUE(class_name) TYPE string,
34 | get_segw_project_name RETURNING VALUE(project_name) TYPE string.
35 | "methods A012345678901234567890123456789.
36 |
37 | METHODS get_mpc_type_names
38 | IMPORTING
39 | i_cds_view_names TYPE table_of_strings
40 | RETURNING VALUE(r_mpc_types_of_cds_views) TYPE tt_mpc_type_of_cds_view.
41 |
42 | METHODS insert_sadl_xml_into_dpc
43 | IMPORTING
44 | !iv_sadl_xml TYPE string
45 | iv_src_segw_project_name TYPE string
46 | CHANGING
47 | generated_code_definition TYPE rswsourcet
48 | generated_code_implementation TYPE rswsourcet
49 | RAISING
50 | /iwbep/cx_sbcm_exception .
51 |
52 | METHODS insert_sadl_xml_into_mpc_ext
53 | IMPORTING
54 | !iv_sadl_xml TYPE string
55 | iv_src_segw_project_name TYPE string
56 | CHANGING
57 | generated_code_definition TYPE rswsourcet
58 | generated_code_implementation TYPE rswsourcet
59 | RAISING
60 | /iwbep/cx_sbcm_exception .
61 |
62 |
63 | METHODS get_cds_views_from_sadl_xml
64 | IMPORTING sadl_xml TYPE string
65 | RETURNING VALUE(cds_view_names) TYPE table_of_strings.
66 |
67 | METHODS create_get_entity_set_methods
68 | IMPORTING
69 | cds_view_names TYPE table_of_strings
70 | CHANGING
71 | generated_code_definition TYPE rswsourcet
72 | generated_code_implementation TYPE rswsourcet
73 | generated_types_definition TYPE rswsourcet.
74 |
75 | METHODS create_generic_get_methods
76 | IMPORTING
77 | cds_view_names TYPE table_of_strings
78 | CHANGING
79 | generated_code_definition TYPE rswsourcet
80 | generated_code_implementation TYPE rswsourcet.
81 |
82 | PROTECTED SECTION. " Visible only in child classes
83 |
84 | PRIVATE SECTION. " Visible only internally
85 |
86 | DATA segw_project_name TYPE /iwbep/i_sbd_ga-project.
87 | DATA segw_project TYPE REF TO /iwbep/if_sbdm_project.
88 |
89 | CONSTANTS suffix_length TYPE i VALUE 3.
90 | CONSTANTS cds_view_name_length TYPE i VALUE 30.
91 |
92 | DATA dpc_ext_class_name TYPE string.
93 | DATA mpc_ext_class_name TYPE string.
94 | DATA dpc_class_name TYPE string.
95 | DATA mpc_class_name TYPE string.
96 |
97 | ENDCLASS.
98 |
99 | CLASS cl_sadl_based_segw_project IMPLEMENTATION.
100 |
101 | METHOD constructor.
102 |
103 | DATA:service_builder_dm_factory TYPE REF TO /iwbep/if_sbdm_factory,
104 | service_builder_dm_manager TYPE REF TO /iwbep/if_sbdm_manager,
105 | lt_range TYPE /iwbep/if_sbdm_manager=>ty_t_range_prjct_name.
106 |
107 | segw_project_name = io_segw_project_name.
108 |
109 | service_builder_dm_factory = /iwbep/cl_sbdm=>get_factory( ).
110 | service_builder_dm_manager = /iwbep/cl_sbdm=>get_manager( ).
111 | lt_range = VALUE #( (
112 | sign = 'I'
113 | option = 'EQ'
114 | low = segw_project_name
115 | ) ).
116 | READ TABLE service_builder_dm_manager->find_projects( lt_range ) INTO segw_project INDEX 1.
117 |
118 | IF sy-subrc NE 0.
119 | RAISE EXCEPTION TYPE cx_demo_dyn_t100
120 | MESSAGE ID '/IWBEP/SBUIP'
121 | TYPE 'E'
122 | NUMBER '001'
123 | WITH segw_project_name.
124 | ENDIF.
125 |
126 |
127 |
128 | LOOP AT segw_project->get_generated_artifacts( ) INTO DATA(generated_artifact).
129 | IF generated_artifact->get_tadir_data( )-trobj_type = 'CLAS'.
130 | DATA(class_name) = generated_artifact->get_tadir_data( )-trobj_name.
131 | DATA(mpc_ext_suffix) = substring( val = class_name len = strlen( '_MPC_EXT' ) off = strlen( class_name ) - strlen( '_MPC_EXT' ) ).
132 | DATA(dpc_ext_suffix) = substring( val = class_name len = strlen( '_DPC_EXT' ) off = strlen( class_name ) - strlen( '_DPC_EXT' ) ).
133 | DATA(mpc_suffix) = substring( val = class_name len = strlen( '_MPC' ) off = strlen( class_name ) - strlen( '_MPC' ) ).
134 | DATA(dpc_suffix) = substring( val = class_name len = strlen( '_DPC' ) off = strlen( class_name ) - strlen( '_DPC' ) ).
135 |
136 | IF mpc_ext_suffix = '_MPC_EXT'.
137 | mpc_ext_class_name = generated_artifact->get_tadir_data( )-trobj_name.
138 | ELSEIF dpc_ext_suffix = '_DPC_EXT'.
139 | dpc_ext_class_name = generated_artifact->get_tadir_data( )-trobj_name.
140 | ELSEIF dpc_suffix = '_DPC'.
141 | dpc_class_name = generated_artifact->get_tadir_data( )-trobj_name.
142 | ELSEIF dpc_suffix = '_MPC'.
143 | mpc_class_name = generated_artifact->get_tadir_data( )-trobj_name.
144 | ENDIF.
145 | ENDIF.
146 | ENDLOOP.
147 |
148 | ENDMETHOD.
149 |
150 | METHOD get_sadl_xml.
151 | DATA lo_service_api TYPE REF TO cl_sadl_gw_service_api .
152 | * TRY.
153 | lo_service_api = cl_sadl_gw_service_api=>get_service_api( io_project = segw_project ).
154 | * CATCH /iwbep/cx_sbcm_exception.
155 | * "handle exception
156 | * ENDTRY.
157 | * TRY.
158 | lo_service_api->get_and_update_sadl_xml( IMPORTING ev_sadl_xml = sadl_xml ).
159 | * CATCH /iwbep/cx_sbcm_exception.
160 | * "handle exception
161 | * ENDTRY.
162 | "lo_service_api->get_sadl( IMPORTING es_sadl = DATA(sadl_definition) ).
163 | ENDMETHOD.
164 |
165 | METHOD get_merged_sadl_xml.
166 |
167 | DATA string_1 TYPE string.
168 | DATA remaining_string TYPE string.
169 | DATA data_sources_string TYPE string.
170 | DATA data_sources_target_string TYPE string.
171 | DATA structures_string TYPE string.
172 | DATA structures_target_string TYPE string.
173 | DATA mv_sadl_xml_merged TYPE string.
174 |
175 |
176 | SPLIT sadl_xml_source_project AT '' INTO data_sources_string remaining_string.
178 | data_sources_string = '' INTO structures_string remaining_string.
180 |
181 |
182 | SPLIT sadl_xml_extended_project AT '' INTO data_sources_target_string remaining_string.
184 | data_sources_target_string = '' INTO structures_target_string remaining_string.
186 |
187 |
188 | sadl_xml_merged = string_1 &&
189 | data_sources_string &&
190 | data_sources_target_string &&
191 | '' &&
192 | structures_string &&
193 | structures_target_string &&
194 | '' &&
195 | remaining_string.
196 |
197 | WRITE : / mv_sadl_xml_merged.
198 |
199 | ENDMETHOD.
200 |
201 | METHOD insert_sadl_xml_into_dpc.
202 |
203 | DATA(lv_timestamp) = cl_sadl_gw_model_sb_gen_mpc_pr=>get_generation_timestamp( segw_project ).
204 |
205 |
206 | APPEND | METHODS if_sadl_gw_dpc_util~get_dpc REDEFINITION .| TO generated_code_definition ##NO_TEXT.
207 |
208 | APPEND | METHOD if_sadl_gw_dpc_util~get_dpc. | TO generated_code_implementation ##NO_TEXT.
209 | APPEND | CONSTANTS: co_gen_timestamp TYPE timestamp VALUE '{ lv_timestamp }'. | TO generated_code_implementation ##NO_TEXT.
210 | APPEND | DATA(lv_sadl_xml) = | TO generated_code_implementation ##NO_TEXT.
211 |
212 | * === Large SADL must be split, we split it after 50 rows
213 | SPLIT iv_sadl_xml AT '>' INTO TABLE DATA(lt_string).
214 | DATA(lv_lines) = lines( lt_string ).
215 | LOOP AT lt_string ASSIGNING FIELD-SYMBOL().
216 | = | \|{ }>\| |.
217 | IF sy-tabix = lv_lines. " Last line
218 | = |{ }.|.
219 | ELSE.
220 | IF sy-tabix MOD 50 = 0.
221 | = |{ }.|.
222 | APPEND TO generated_code_implementation .
223 | = | lv_sadl_xml = \|\{ lv_sadl_xml \}\| &| ##no_text.
224 | ELSE.
225 | = |{ } &|.
226 | ENDIF.
227 | ENDIF.
228 | APPEND TO generated_code_implementation .
229 | ENDLOOP.
230 |
231 |
232 | APPEND | ro_dpc = cl_sadl_gw_dpc_factory=>create_for_sadl( iv_sadl_xml = lv_sadl_xml | TO generated_code_implementation ##NO_TEXT.
233 | APPEND | iv_timestamp = co_gen_timestamp | TO generated_code_implementation ##NO_TEXT.
234 | APPEND | iv_uuid = CONV #( '{ iv_src_segw_project_name }' ) | TO generated_code_implementation ##NO_TEXT.
235 | APPEND | io_context = me->mo_context ). | TO generated_code_implementation ##NO_TEXT.
236 | APPEND |ENDMETHOD.| TO generated_code_implementation ##NO_TEXT.
237 |
238 | ENDMETHOD.
239 |
240 |
241 | METHOD get_cds_views_from_sadl_xml.
242 |
243 | DATA(ls_sadl_definition) = cl_bsa_sadl_m2m_transformer=>get_instance( )->xml_to_abap_structure( iv_sadl_xml = sadl_xml ).
244 |
245 | LOOP AT ls_sadl_definition-structures REFERENCE INTO DATA(lr_structure).
246 | " Entry in structures correlates to entry in data sources
247 | READ TABLE ls_sadl_definition-data_sources WITH KEY name = lr_structure->data_source
248 | type = 'CDS' TRANSPORTING NO FIELDS.
249 | IF sy-subrc EQ 0 AND lr_structure->exposure = 'TRUE'.
250 | "INSERT CONV #( lr_structure->data_source ) INTO TABLE cds_view_names.
251 | INSERT CONV #( lr_structure->name ) INTO TABLE cds_view_names.
252 | ENDIF.
253 | ENDLOOP.
254 |
255 |
256 | ENDMETHOD.
257 |
258 | METHOD create_get_entity_set_methods.
259 |
260 | * DATA generated_code_definition TYPE rswsourcet .
261 | * DATA generated_code_implementation TYPE rswsourcet .
262 | DATA method_name_get_entityset TYPE string.
263 | DATA method_name_get_entity TYPE string.
264 | DATA type_name_entity TYPE string.
265 | DATA type_name_entityset TYPE string.
266 | DATA tab_name_entity TYPE string.
267 | DATA tab_name_entityset TYPE string.
268 | "DATA generated_types_definition TYPE rswsourcet .
269 |
270 | DATA(mpc_type_names) = get_mpc_type_names( cds_view_names ).
271 |
272 | LOOP AT cds_view_names INTO DATA(cds_view_name).
273 | "leave 2 characters to generate a unique name '<...>_get_entityset'
274 |
275 | READ TABLE mpc_type_names INTO DATA(mpc_type_name) WITH KEY cds_view_name = cds_view_name.
276 |
277 | IF sy-subrc = 0.
278 | type_name_entity = mpc_type_name-mpc_get_entity_type_name .
279 | type_name_entityset = mpc_type_name-mpc_get_entityset_type_name .
280 | ELSE.
281 | type_name_entity = 'TS_' .
282 | type_name_entityset = 'TT_' .
283 | ENDIF.
284 |
285 |
286 | DATA(get_entityset_suffix) = '_get_entityset'.
287 | DATA(get_entity_suffix) = '_get_entity'.
288 | DATA(tab_entityset_suffix) = '_entityset'.
289 | DATA(tab_entity_suffix) = '_entity'.
290 | DATA(mandatory_name_components) = get_entityset_suffix.
291 |
292 | DATA(length_mandatory_name_comp) = strlen( mandatory_name_components ).
293 | DATA(remaining_num_characters) = cds_view_name_length - length_mandatory_name_comp.
294 |
295 | IF strlen( cds_view_name ) > remaining_num_characters - suffix_length.
296 | method_name_get_entityset = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && get_entityset_suffix.
297 | method_name_get_entity = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && get_entity_suffix.
298 | * type_name_entity = 'TS_' && substring( val = cds_view_name len = remaining_num_characters - suffix_length ) .
299 | * type_name_entityset = 'TT_' && substring( val = cds_view_name len = remaining_num_characters - suffix_length ) .
300 | tab_name_entityset = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && tab_entityset_suffix.
301 | tab_name_entity = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && tab_entity_suffix.
302 | ELSE.
303 | method_name_get_entityset = cds_view_name && get_entityset_suffix.
304 | method_name_get_entity = cds_view_name && get_entity_suffix.
305 | * type_name_entity = 'TS_' && cds_view_name.
306 | * type_name_entityset = 'TT_' && cds_view_name .
307 | tab_name_entityset = cds_view_name && tab_entityset_suffix.
308 | tab_name_entity = cds_view_name && tab_entity_suffix.
309 | ENDIF.
310 |
311 | APPEND | METHODS { method_name_get_entity } | TO generated_code_definition ##NO_TEXT.
312 | APPEND | IMPORTING | TO generated_code_definition ##NO_TEXT.
313 | APPEND | !io_tech_request_context TYPE REF TO /iwbep/if_mgw_req_entity OPTIONAL | TO generated_code_definition ##NO_TEXT.
314 | APPEND | EXPORTING | TO generated_code_definition ##NO_TEXT.
315 | APPEND | !er_entity TYPE { mpc_class_name }=>{ type_name_entity } "use code completion to select correct type from MPC . | TO generated_code_definition ##NO_TEXT.
316 | APPEND | !es_response_context TYPE /iwbep/if_mgw_appl_srv_runtime=>ty_s_mgw_response_entity_cntxt | TO generated_code_definition ##NO_TEXT.
317 | APPEND | RAISING | TO generated_code_definition ##NO_TEXT.
318 | APPEND | /iwbep/cx_mgw_busi_exception | TO generated_code_definition ##NO_TEXT.
319 | APPEND | /iwbep/cx_mgw_tech_exception . | TO generated_code_definition ##NO_TEXT.
320 |
321 | APPEND | METHODS { method_name_get_entityset } | TO generated_code_definition ##NO_TEXT.
322 | APPEND | IMPORTING | TO generated_code_definition ##NO_TEXT.
323 | APPEND | !io_tech_request_context TYPE REF TO /iwbep/if_mgw_req_entityset OPTIONAL | TO generated_code_definition ##NO_TEXT.
324 | APPEND | EXPORTING | TO generated_code_definition ##NO_TEXT.
325 | APPEND | !et_entityset TYPE { mpc_class_name }=>{ type_name_entityset } "use code completion to select correct type from MPC . | TO generated_code_definition ##NO_TEXT.
326 | APPEND | !es_response_context TYPE /iwbep/if_mgw_appl_srv_runtime=>ty_s_mgw_response_context | TO generated_code_definition ##NO_TEXT.
327 | APPEND | RAISING | TO generated_code_definition ##NO_TEXT.
328 | APPEND | /iwbep/cx_mgw_busi_exception | TO generated_code_definition ##NO_TEXT.
329 | APPEND | /iwbep/cx_mgw_tech_exception . | TO generated_code_definition ##NO_TEXT.
330 |
331 | " create code for implementation part
332 |
333 | APPEND | method { method_name_get_entity }. | TO generated_code_implementation ##NO_TEXT.
334 | APPEND | if_sadl_gw_dpc_util~get_dpc( )->get_entity( EXPORTING io_tech_request_context = io_tech_request_context | TO generated_code_implementation ##NO_TEXT.
335 | APPEND | IMPORTING es_data = er_entity ). | TO generated_code_implementation ##NO_TEXT.
336 | APPEND | endmethod. | TO generated_code_implementation ##NO_TEXT.
337 |
338 | APPEND | method { method_name_get_entityset }. | TO generated_code_implementation ##NO_TEXT.
339 | APPEND | if_sadl_gw_dpc_util~get_dpc( )->get_entityset( EXPORTING io_tech_request_context = io_tech_request_context | TO generated_code_implementation ##NO_TEXT.
340 | APPEND | IMPORTING et_data = et_entityset | TO generated_code_implementation ##NO_TEXT.
341 | APPEND | es_response_context = es_response_context ). | TO generated_code_implementation ##NO_TEXT.
342 | APPEND | endmethod. | TO generated_code_implementation ##NO_TEXT.
343 |
344 |
345 |
346 | ENDLOOP.
347 |
348 |
349 | ENDMETHOD.
350 |
351 | METHOD create_generic_get_methods.
352 |
353 | DATA method_name_get_entityset TYPE string.
354 | DATA method_name_get_entity TYPE string.
355 | DATA tab_name_entity TYPE string.
356 | DATA tab_name_entityset TYPE string.
357 |
358 | DATA generated_code_get_entity TYPE rswsourcet.
359 | DATA generated_code_get_entityset TYPE rswsourcet.
360 |
361 | DATA(tab_entityset_suffix) = '_entityset'.
362 | DATA(tab_entity_suffix) = '_entity'.
363 |
364 |
365 | APPEND | METHODS /iwbep/if_mgw_appl_srv_runtime~get_entityset REDEFINITION . | TO generated_code_definition ##NO_TEXT.
366 | APPEND | METHODS /iwbep/if_mgw_appl_srv_runtime~get_entity REDEFINITION . | TO generated_code_definition ##NO_TEXT.
367 |
368 | CLEAR generated_code_get_entityset.
369 | APPEND | METHOD /iwbep/if_mgw_appl_srv_runtime~get_entityset. | TO generated_code_get_entityset ##NO_TEXT.
370 | APPEND | DATA(my_entity_name) = io_tech_request_context->get_entity_set_name( ). | TO generated_code_get_entityset ##NO_TEXT.
371 | APPEND | case io_tech_request_context->get_entity_set_name( ). | TO generated_code_get_entityset ##NO_TEXT.
372 |
373 | CLEAR generated_code_get_entity .
374 | APPEND | METHOD /iwbep/if_mgw_appl_srv_runtime~get_entity. | TO generated_code_get_entity ##NO_TEXT.
375 | APPEND | DATA(my_entity_name) = io_tech_request_context->get_entity_set_name( ). | TO generated_code_get_entity ##NO_TEXT.
376 | APPEND | case io_tech_request_context->get_entity_set_name( ). | TO generated_code_get_entity ##NO_TEXT.
377 |
378 |
379 | LOOP AT cds_view_names INTO DATA(cds_view_name).
380 | "leave 2 characters to generate a unique name '<...>_get_entityset'
381 |
382 | DATA(get_entityset_suffix) = '_get_entityset'.
383 | DATA(get_entity_suffix) = '_get_entity'.
384 | DATA(mandatory_name_components) = get_entityset_suffix.
385 |
386 | DATA(length_mandatory_name_comp) = strlen( mandatory_name_components ).
387 | DATA(remaining_num_characters) = cds_view_name_length - length_mandatory_name_comp.
388 |
389 |
390 | IF strlen( cds_view_name ) > remaining_num_characters - suffix_length.
391 | method_name_get_entityset = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && get_entityset_suffix.
392 | method_name_get_entity = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && get_entity_suffix.
393 | tab_name_entityset = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && tab_entityset_suffix.
394 | tab_name_entity = substring( val = cds_view_name len = remaining_num_characters - suffix_length ) && tab_entity_suffix.
395 | ELSE.
396 | method_name_get_entityset = cds_view_name && get_entityset_suffix.
397 | method_name_get_entity = cds_view_name && get_entity_suffix.
398 | tab_name_entityset = cds_view_name && tab_entityset_suffix.
399 | tab_name_entity = cds_view_name && tab_entity_suffix.
400 | ENDIF.
401 |
402 |
403 |
404 | APPEND |WHEN '{ cds_view_name }'. | TO generated_code_get_entityset ##NO_TEXT.
405 | APPEND | { method_name_get_entityset }( EXPORTING io_tech_request_context = io_tech_request_context | TO generated_code_get_entityset ##NO_TEXT.
406 | APPEND | IMPORTING et_entityset = data({ tab_name_entityset }) | TO generated_code_get_entityset ##NO_TEXT.
407 | APPEND | es_response_context = es_response_context ). | TO generated_code_get_entityset ##NO_TEXT.
408 |
409 | APPEND | IF { tab_name_entityset } IS NOT INITIAL. | TO generated_code_get_entityset ##NO_TEXT.
410 | APPEND | copy_data_to_ref( EXPORTING is_data = { tab_name_entityset } | TO generated_code_get_entityset ##NO_TEXT.
411 | APPEND | CHANGING cr_data = er_entityset ). | TO generated_code_get_entityset ##NO_TEXT.
412 | APPEND | ENDIF. | TO generated_code_get_entityset ##NO_TEXT.
413 |
414 |
415 | APPEND |WHEN '{ cds_view_name }'. | TO generated_code_get_entity ##NO_TEXT.
416 | APPEND | { method_name_get_entity }( EXPORTING io_tech_request_context = io_tech_request_context | TO generated_code_get_entity ##NO_TEXT.
417 | APPEND | IMPORTING er_entity = data({ tab_name_entity }) | TO generated_code_get_entity ##NO_TEXT.
418 | APPEND | es_response_context = es_response_context ). | TO generated_code_get_entity ##NO_TEXT.
419 |
420 | APPEND | IF { tab_name_entity } IS NOT INITIAL. | TO generated_code_get_entity ##NO_TEXT.
421 | APPEND | copy_data_to_ref( EXPORTING is_data = { tab_name_entity } | TO generated_code_get_entity ##NO_TEXT.
422 | APPEND | CHANGING cr_data = er_entity ). | TO generated_code_get_entity ##NO_TEXT.
423 | APPEND | ENDIF. | TO generated_code_get_entity ##NO_TEXT.
424 |
425 | ENDLOOP.
426 |
427 | APPEND | WHEN OTHERS. | TO generated_code_get_entity ##NO_TEXT.
428 | APPEND | super->/iwbep/if_mgw_appl_srv_runtime~get_entity( EXPORTING iv_entity_name = iv_entity_name | TO generated_code_get_entity ##NO_TEXT.
429 | APPEND | iv_entity_set_name = iv_entity_set_name | TO generated_code_get_entity ##NO_TEXT.
430 | APPEND | iv_source_name = iv_source_name | TO generated_code_get_entity ##NO_TEXT.
431 | APPEND | it_key_tab = it_key_tab | TO generated_code_get_entity ##NO_TEXT.
432 | APPEND | it_navigation_path = it_navigation_path | TO generated_code_get_entity ##NO_TEXT.
433 | APPEND | io_tech_request_context = io_tech_request_context | TO generated_code_get_entity ##NO_TEXT.
434 | APPEND | IMPORTING er_entity = er_entity | TO generated_code_get_entity ##NO_TEXT.
435 | APPEND | es_response_context = es_response_context ). | TO generated_code_get_entity ##NO_TEXT.
436 | APPEND | ENDCASE. | TO generated_code_get_entity ##NO_TEXT.
437 | APPEND | ENDMETHOD. | TO generated_code_get_entity ##NO_TEXT.
438 |
439 |
440 | APPEND | WHEN OTHERS. | TO generated_code_get_entityset ##NO_TEXT.
441 | APPEND | super->/iwbep/if_mgw_appl_srv_runtime~get_entityset( EXPORTING iv_entity_name = iv_entity_name | TO generated_code_get_entityset ##NO_TEXT.
442 | APPEND | iv_entity_set_name = iv_entity_set_name | TO generated_code_get_entityset ##NO_TEXT.
443 | APPEND | iv_source_name = iv_source_name | TO generated_code_get_entityset ##NO_TEXT.
444 | APPEND | it_filter_select_options = it_filter_select_options | TO generated_code_get_entityset ##NO_TEXT.
445 | APPEND | it_order = it_order | TO generated_code_get_entityset ##NO_TEXT.
446 | APPEND | is_paging = is_paging | TO generated_code_get_entityset ##NO_TEXT.
447 | APPEND | it_key_tab = it_key_tab | TO generated_code_get_entityset ##NO_TEXT.
448 | APPEND | it_navigation_path = it_navigation_path | TO generated_code_get_entityset ##NO_TEXT.
449 | APPEND | iv_filter_string = iv_filter_string | TO generated_code_get_entityset ##NO_TEXT.
450 | APPEND | iv_search_string = iv_search_string | TO generated_code_get_entityset ##NO_TEXT.
451 | APPEND | io_tech_request_context = io_tech_request_context | TO generated_code_get_entityset ##NO_TEXT.
452 | APPEND | IMPORTING er_entityset = er_entityset | TO generated_code_get_entityset ##NO_TEXT.
453 | APPEND | es_response_context = es_response_context ). | TO generated_code_get_entityset ##NO_TEXT.
454 | APPEND | ENDCASE. | TO generated_code_get_entityset ##NO_TEXT.
455 | APPEND | ENDMETHOD. | TO generated_code_get_entityset ##NO_TEXT.
456 |
457 | APPEND LINES OF generated_code_get_entity TO generated_code_implementation.
458 | APPEND LINES OF generated_code_get_entityset TO generated_code_implementation.
459 |
460 |
461 | ENDMETHOD.
462 |
463 | METHOD get_dpc_ext_class_name.
464 | class_name = dpc_ext_class_name.
465 | ENDMETHOD.
466 |
467 | METHOD get_mpc_ext_class_name.
468 | class_name = mpc_ext_class_name.
469 | ENDMETHOD.
470 |
471 | METHOD get_dpc_class_name.
472 | class_name = dpc_class_name.
473 | ENDMETHOD.
474 |
475 | METHOD get_mpc_class_name.
476 | class_name = mpc_class_name.
477 | ENDMETHOD.
478 |
479 | METHOD insert_sadl_xml_into_mpc_ext.
480 |
481 | DATA(lv_timestamp) = cl_sadl_gw_model_sb_gen_mpc_pr=>get_generation_timestamp( segw_project ).
482 |
483 |
484 | APPEND | METHODS define REDEFINITION. | TO generated_code_definition ##NO_TEXT.
485 | APPEND | METHODS if_sadl_gw_model_exposure_data~get_model_exposure REDEFINITION. | TO generated_code_definition ##NO_TEXT.
486 |
487 |
488 |
489 | APPEND | METHOD define.| TO generated_code_implementation.
490 | APPEND | super->define( ).| TO generated_code_implementation.
491 | APPEND | ENDMETHOD.| TO generated_code_implementation.
492 |
493 | APPEND | METHOD if_sadl_gw_model_exposure_data~get_model_exposure.| TO generated_code_implementation.
494 | APPEND | CONSTANTS: co_gen_timestamp TYPE timestamp VALUE '{ lv_timestamp }'. | TO generated_code_implementation ##NO_TEXT.
495 | APPEND | DATA(lv_sadl_xml) = | TO generated_code_implementation ##NO_TEXT.
496 |
497 | * === Large SADL must be split, we split it after 50 rows
498 | SPLIT iv_sadl_xml AT '>' INTO TABLE DATA(lt_string).
499 | DATA(lv_lines) = lines( lt_string ).
500 | LOOP AT lt_string ASSIGNING FIELD-SYMBOL().
501 | = | \|{ }>\| |.
502 | IF sy-tabix = lv_lines. " Last line
503 | = |{ }.|.
504 | ELSE.
505 | IF sy-tabix MOD 50 = 0.
506 | = |{ }.|.
507 | APPEND TO generated_code_implementation .
508 | = | lv_sadl_xml = \|\{ lv_sadl_xml \}\| &| ##no_text.
509 | ELSE.
510 | = |{ } &|.
511 | ENDIF.
512 | ENDIF.
513 | APPEND TO generated_code_implementation .
514 | ENDLOOP.
515 |
516 |
517 | APPEND | ro_model_exposure = cl_sadl_gw_model_exposure=>get_exposure_xml( iv_uuid = CONV #( '{ iv_src_segw_project_name }' ) | TO generated_code_implementation ##NO_TEXT.
518 | APPEND | iv_timestamp = co_gen_timestamp | TO generated_code_implementation ##NO_TEXT.
519 | APPEND | iv_sadl_xml = lv_sadl_xml ). | TO generated_code_implementation ##NO_TEXT.
520 | APPEND | ENDMETHOD. | TO generated_code_implementation ##NO_TEXT.
521 |
522 |
523 |
524 |
525 |
526 |
527 | ENDMETHOD.
528 |
529 | METHOD get_segw_project_name.
530 | project_name = segw_project_name.
531 | ENDMETHOD.
532 |
533 | METHOD get_mpc_type_names.
534 |
535 | DATA et_type TYPE seoo_types_r .
536 | DATA result_tab TYPE match_result_tab.
537 |
538 | et_type = cl_sadl_gw_gen_api_access=>get_instance( )->seo_type_read_all( VALUE #( clsname = mpc_class_name ) ).
539 |
540 | LOOP AT i_cds_view_names INTO DATA(cds_view_name).
541 |
542 |
543 |
544 | LOOP AT et_type INTO DATA(ls_type).
545 |
546 | FIND ALL OCCURRENCES OF to_upper( cds_view_name ) IN
547 | ls_type-typesrc
548 | RESULTS result_tab.
549 | IF result_tab IS NOT INITIAL.
550 |
551 | LOOP AT result_tab INTO DATA(result).
552 |
553 | DATA(cds_view_name_length) = strlen( cds_view_name ).
554 | DATA(character_before) = substring( val = ls_type-typesrc off = result-offset - 1 len = 1 ).
555 | DATA(character_after) = substring( val = ls_type-typesrc off = result-offset + result-length len = 1 ).
556 |
557 | IF character_after = '.'.
558 | DATA(entity_type_name) = ls_type-cmpname.
559 | DATA(search_get_entityset_type) = |type standard table of { ls_type-cmpname }|.
560 | ENDIF.
561 | ENDLOOP.
562 | ENDIF.
563 | ENDLOOP.
564 | IF search_get_entityset_type IS NOT INITIAL.
565 | LOOP AT et_type INTO ls_type.
566 | FIND ALL OCCURRENCES OF search_get_entityset_type IN
567 | ls_type-typesrc
568 | RESULTS result_tab.
569 | IF result_tab IS NOT INITIAL.
570 | "out->write( ls_type-cmpname ).
571 | DATA(entityset_type_name) = ls_type-cmpname.
572 | ENDIF.
573 | ENDLOOP.
574 |
575 | APPEND VALUE #( cds_view_name = cds_view_name
576 | mpc_get_entity_type_name = entity_type_name
577 | mpc_get_entityset_type_name = entityset_type_name ) TO r_mpc_types_of_cds_views.
578 | ENDIF.
579 | ENDLOOP.
580 |
581 | ENDMETHOD.
582 |
583 | ENDCLASS.
584 |
585 | START-OF-SELECTION.
586 |
587 | PARAMETERS: src_proj TYPE /iwbep/i_sbd_ga-project,
588 | ext_proj TYPE /iwbep/i_sbd_ga-project.
589 |
590 |
591 | DATA filename TYPE string.
592 | DATA path_to_file TYPE string.
593 | DATA path_and_filename TYPE string.
594 | DATA useraction TYPE i.
595 | DATA gui_download_data TYPE TABLE OF string.
596 | DATA generated_dpc_code_definition TYPE rswsourcet .
597 | DATA get_entity_and_set_definition TYPE rswsourcet .
598 | DATA generated_dpc_code_implement TYPE rswsourcet .
599 | DATA generated_types_definition TYPE rswsourcet .
600 | DATA generated_mpc_code_definition TYPE rswsourcet .
601 | DATA generated_mpc_code_implement TYPE rswsourcet .
602 | DATA exception_text TYPE string.
603 | TRY.
604 |
605 | DATA(source_segw_project) = NEW cl_sadl_based_segw_project( src_proj ).
606 | DATA(extended_segw_project) = NEW cl_sadl_based_segw_project( ext_proj ).
607 |
608 | * TRY.
609 | DATA(sadl_xml_source_project) = source_segw_project->get_sadl_xml( ).
610 | DATA(sadl_xml_extended_project) = extended_segw_project->get_sadl_xml( ).
611 | * CATCH /iwbep/cx_sbcm_exception INTO DATA(get_sadl_xml_exception).
612 | * exception_text = get_sadl_xml_exception->get_text( ).
613 | * WRITE: / |Exception occured: { exception_text }|.
614 | * EXIT.
615 | * catch CX_SADL_GW_NO_SERVICE_API into data(no_service_api_exception).
616 | ** if no_service_api_exception->
617 | *
618 | * exception_text = no_service_api_exception->get_text( ).
619 | * WRITE: / |Exception occured: { exception_text }|.
620 | * EXIT.
621 | * ENDTRY.
622 |
623 | DATA(merged_sadl_xml) = extended_segw_project->get_merged_sadl_xml(
624 | sadl_xml_source_project = sadl_xml_source_project
625 | sadl_xml_extended_project = sadl_xml_extended_project
626 | ).
627 |
628 | DATA(new_cds_view_names) = extended_segw_project->get_cds_views_from_sadl_xml( sadl_xml_extended_project ).
629 |
630 | LOOP AT new_cds_view_names INTO DATA(new_cds_view_name).
631 | WRITE : / new_cds_view_name.
632 | ENDLOOP.
633 |
634 | WRITE : / |extended dpc_ext class name { extended_segw_project->get_dpc_ext_class_name( ) }|.
635 | WRITE : / |extended mpc_ext class name { extended_segw_project->get_mpc_ext_class_name( ) }|.
636 | WRITE : / |extended dpc class name { extended_segw_project->get_dpc_class_name( ) }|.
637 | WRITE : / |extended mpc class name { extended_segw_project->get_mpc_class_name( ) }|.
638 |
639 | "generated_dpc_code_definition
640 |
641 | APPEND | CLASS { extended_segw_project->get_dpc_ext_class_name( ) } DEFINITION | TO generated_dpc_code_definition ##NO_TEXT.
642 | APPEND | CLASS { extended_segw_project->get_dpc_ext_class_name( ) } IMPLEMENTATION.| TO generated_dpc_code_implement ##NO_TEXT.
643 |
644 |
645 | APPEND | PUBLIC | TO generated_dpc_code_definition ##NO_TEXT.
646 | APPEND | INHERITING FROM { extended_segw_project->get_dpc_class_name( ) } | TO generated_dpc_code_definition ##NO_TEXT.
647 | APPEND | CREATE PUBLIC . | TO generated_dpc_code_definition ##NO_TEXT.
648 | APPEND | PUBLIC SECTION. | TO generated_dpc_code_definition ##NO_TEXT.
649 |
650 | "get timestamp from extended project
651 | extended_segw_project->insert_sadl_xml_into_dpc(
652 | EXPORTING
653 | iv_sadl_xml = merged_sadl_xml
654 | iv_src_segw_project_name = source_segw_project->get_segw_project_name( )
655 | CHANGING
656 | generated_code_definition = generated_dpc_code_definition
657 | generated_code_implementation = generated_dpc_code_implement
658 | ).
659 | * CATCH /iwbep/cx_sbcm_exception.
660 |
661 | extended_segw_project->create_generic_get_methods(
662 | EXPORTING
663 | cds_view_names = new_cds_view_names
664 | CHANGING
665 | generated_code_definition = generated_dpc_code_definition
666 | generated_code_implementation = generated_dpc_code_implement
667 | ).
668 |
669 | APPEND | PROTECTED SECTION. | TO generated_dpc_code_definition ##NO_TEXT.
670 |
671 | extended_segw_project->create_get_entity_set_methods(
672 | EXPORTING
673 | cds_view_names = new_cds_view_names
674 | CHANGING
675 | generated_types_definition = generated_types_definition
676 | generated_code_definition = get_entity_and_set_definition
677 | "generated_code_definition = generated_dpc_code_definition
678 | generated_code_implementation = generated_dpc_code_implement
679 | ).
680 |
681 |
682 | APPEND LINES OF generated_types_definition TO generated_dpc_code_definition.
683 | APPEND LINES OF get_entity_and_set_definition TO generated_dpc_code_definition.
684 |
685 |
686 | APPEND | ENDCLASS . | TO generated_dpc_code_definition ##NO_TEXT.
687 | APPEND | ENDCLASS . | TO generated_dpc_code_implement ##NO_TEXT.
688 |
689 | APPEND |CLASS { extended_segw_project->get_mpc_ext_class_name( ) } DEFINITION | TO generated_mpc_code_definition ##NO_TEXT.
690 | APPEND |PUBLIC | TO generated_mpc_code_definition ##NO_TEXT.
691 | APPEND |INHERITING FROM { extended_segw_project->get_mpc_class_name( ) } | TO generated_mpc_code_definition ##NO_TEXT.
692 | APPEND |CREATE PUBLIC . | TO generated_mpc_code_definition ##NO_TEXT.
693 | APPEND | PUBLIC SECTION. | TO generated_mpc_code_definition ##NO_TEXT.
694 |
695 | APPEND |CLASS { extended_segw_project->get_mpc_ext_class_name( ) } IMPLEMENTATION. | TO generated_mpc_code_implement ##NO_TEXT.
696 |
697 | extended_segw_project->insert_sadl_xml_into_mpc_ext(
698 | EXPORTING
699 | iv_sadl_xml = merged_sadl_xml
700 | iv_src_segw_project_name = source_segw_project->get_segw_project_name( )
701 | CHANGING
702 | generated_code_definition = generated_mpc_code_definition
703 | generated_code_implementation = generated_mpc_code_implement
704 | ).
705 |
706 | APPEND | PROTECTED SECTION. | TO generated_mpc_code_definition ##NO_TEXT.
707 | APPEND | PRIVATE SECTION. | TO generated_mpc_code_definition ##NO_TEXT.
708 | APPEND |ENDCLASS. | TO generated_mpc_code_definition ##NO_TEXT.
709 |
710 | APPEND |ENDCLASS. | TO generated_mpc_code_implement ##NO_TEXT.
711 |
712 | LOOP AT generated_mpc_code_definition INTO DATA(generated_code_line).
713 | APPEND generated_code_line TO gui_download_data.
714 | ENDLOOP.
715 |
716 | LOOP AT generated_mpc_code_implement INTO generated_code_line.
717 | APPEND generated_code_line TO gui_download_data.
718 | ENDLOOP.
719 |
720 | APPEND '**************************' TO gui_download_data.
721 | APPEND '* DPC_EXT Code goes here *' TO gui_download_data.
722 | APPEND '**************************' TO gui_download_data.
723 |
724 | LOOP AT generated_dpc_code_definition INTO generated_code_line.
725 | APPEND generated_code_line TO gui_download_data.
726 | ENDLOOP.
727 |
728 | LOOP AT generated_dpc_code_implement INTO generated_code_line.
729 | APPEND generated_code_line TO gui_download_data.
730 | ENDLOOP.
731 |
732 | * Show the file download dialog
733 | CALL METHOD cl_gui_frontend_services=>file_save_dialog
734 | EXPORTING
735 | window_title = | ABAP sourcecode for { ext_proj } |
736 | default_file_name = |{ extended_segw_project->get_segw_project_name( ) }_MPC_EXT_and_DPC_EXT|
737 | default_extension = 'txt'
738 | CHANGING
739 | filename = filename
740 | path = path_to_file
741 | fullpath = path_and_filename
742 | user_action = useraction
743 | EXCEPTIONS
744 | cntl_error = 1
745 | error_no_gui = 2
746 | not_supported_by_gui = 3
747 | OTHERS = 4.
748 |
749 | IF useraction <> cl_gui_frontend_services=>action_ok.
750 | EXIT.
751 | ENDIF.
752 |
753 | CALL METHOD cl_gui_frontend_services=>gui_download
754 | EXPORTING
755 | filename = filename
756 | CHANGING
757 | data_tab = gui_download_data
758 | EXCEPTIONS
759 | OTHERS = 24.
760 |
761 | CATCH cx_sadl_gw_no_service_api INTO DATA(sadl_gw_no_service_api_exc).
762 |
763 | IF sadl_gw_no_service_api_exc->cx_sadl_gw_no_service_api-msgno = '004'.
764 | WRITE: / |Exception occured: { sadl_gw_no_service_api_exc->project_name } is not a RDS based SEGW project|.
765 | ELSE.
766 | WRITE: / |Exception occured: { sadl_gw_no_service_api_exc->get_longtext( ) } |.
767 | ENDIF.
768 |
769 | CATCH cx_root INTO DATA(sadl_merge_exception).
770 |
771 | DATA(root_exception) = cl_message_helper=>get_latest_t100_exception( sadl_merge_exception ).
772 |
773 | DATA(message_id) = root_exception->t100key-msgid.
774 | DATA(message_no) = root_exception->t100key-msgno.
775 | DATA(attribute_1) = root_exception->t100key-attr1.
776 | DATA(attribute_2) = root_exception->t100key-attr2.
777 | DATA(attribute_3) = root_exception->t100key-attr3.
778 | DATA(attribute_4) = root_exception->t100key-attr4.
779 |
780 | DATA(root_exception_text) = root_exception->if_message~get_longtext( ).
781 |
782 | WRITE: / |message_id { message_id } message_no { message_no } |.
783 | WRITE: / |Exception occured: { root_exception_text }|.
784 |
785 | ENDTRY.
786 |
--------------------------------------------------------------------------------
/TEST_ONPREM_EXTEND_RDS_SRV/src/zaf_r_extend_rds_based_service.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZAF_R_EXTEND_RDS_BASED_SERVICE
7 | S
8 | 1
9 | X
10 | D$S
11 | X
12 |
13 |
14 | -
15 | R
16 | Extend RDS based service
17 | 24
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/readme_msft.md:
--------------------------------------------------------------------------------
1 | # Online Shop Demo - MSFT integration workshop
2 |
3 | 1. Create a package TEST_ABAP
4 |
--------------------------------------------------------------------------------
/src/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Root package for ABAP Standard
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/zms2/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Call auf MS Azure SDK
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/zms2/z_online_shop_sdk.fugr.lz_online_shop_sdktop.abap:
--------------------------------------------------------------------------------
1 | FUNCTION-POOL Z_ONLINE_SHOP_SDK. "MESSAGE-ID ..
2 |
3 | * INCLUDE LZ_ONLINE_SHOP_SDKD... " Local class definition
4 |
--------------------------------------------------------------------------------
/src/zms2/z_online_shop_sdk.fugr.lz_online_shop_sdktop.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | LZ_ONLINE_SHOP_SDKTOP
7 | S
8 | D$
9 | I
10 | S
11 | X
12 | D$S
13 | X
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/zms2/z_online_shop_sdk.fugr.saplz_online_shop_sdk.abap:
--------------------------------------------------------------------------------
1 | *******************************************************************
2 | * System-defined Include-files. *
3 | *******************************************************************
4 | INCLUDE LZ_ONLINE_SHOP_SDKTOP. " Global Declarations
5 | INCLUDE LZ_ONLINE_SHOP_SDKUXX. " Function Modules
6 |
7 | *******************************************************************
8 | * User-defined Include-files (if necessary). *
9 | *******************************************************************
10 | * INCLUDE LZ_ONLINE_SHOP_SDKF... " Subroutines
11 | * INCLUDE LZ_ONLINE_SHOP_SDKO... " PBO-Modules
12 | * INCLUDE LZ_ONLINE_SHOP_SDKI... " PAI-Modules
13 | * INCLUDE LZ_ONLINE_SHOP_SDKE... " Events
14 | * INCLUDE LZ_ONLINE_SHOP_SDKP... " Local class implement.
15 | * INCLUDE LZ_ONLINE_SHOP_SDKT99. " ABAP Unit tests
16 |
--------------------------------------------------------------------------------
/src/zms2/z_online_shop_sdk.fugr.saplz_online_shop_sdk.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | SAPLZ_ONLINE_SHOP_SDK
7 | S
8 | D$
9 | F
10 | S
11 | E
12 | X
13 | D$S
14 | X
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/zms2/z_online_shop_sdk.fugr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | sdk
6 |
7 | LZ_ONLINE_SHOP_SDKTOP
8 | SAPLZ_ONLINE_SHOP_SDK
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/zms2/zcl_ms1.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_ms1 DEFINITION
2 | PUBLIC
3 | FINAL
4 | CREATE PUBLIC .
5 |
6 | PUBLIC SECTION.
7 | class-METHODS abap_sdk_read IMPORTING orderid type numc08
8 | createdby type zaonlineshop_ms1-created_by.
9 | PROTECTED SECTION.
10 | PRIVATE SECTION.
11 |
12 | ENDCLASS.
13 |
14 |
15 |
16 | CLASS zcl_ms1 IMPLEMENTATION.
17 | METHOD abap_sdk_read.
18 | * data lv_orderid type char10.
19 | *CONSTANTS: gc_interface type zinterface_id VALUE 'AZSBQ_P00',
20 | * gc_busobjtype type sbo_bo_type value 'BUS2015' , "Purchase Requistion
21 | * gc_busobjcat type sbo_type_cat value 'BO',
22 | * gc_busobjid type char10 value '0040099',
23 | * gc_eventtype type sibfevent value 'CREATED'.
24 | *
25 | *"Type Definitions
26 | *TYPES: BEGIN OF lty_event,
27 | * busobj TYPE sbo_bo_type,
28 | * busobjname TYPE SBEH_BOTYP_TEXT,
29 | * objkey TYPE SIBFBORIID,
30 | * event TYPE SIBFEVENT,
31 | * date TYPE dats,
32 | * time TYPE tims,
33 | *END OF lty_event.
34 | *
35 | *
36 | *
37 | *DATA: lv_event type lty_event,
38 | * it_headers TYPE tihttpnvp,
39 | * wa_headers TYPE LINE OF tihttpnvp,
40 | * lv_busobj_type_name type SBEH_BOTYP_TEXT,
41 | * lv_json_output type string,
42 | * lv_string TYPE string,
43 | * lv_response TYPE string,
44 | * cx_interface TYPE REF TO zcx_interace_config_missing,
45 | * cx_http TYPE REF TO zcx_http_client_failed,
46 | * cx_adf_service TYPE REF TO zcx_adf_service,
47 | * oref_servicebus TYPE REF TO zcl_adf_service_servicebus,
48 | * oref TYPE REF TO zcl_adf_service,
49 | * filter TYPE zbusinessid,
50 | * lv_http_status TYPE i,
51 | * lo_json TYPE REF TO cl_trex_json_serializer,
52 | * lv1_string TYPE string,
53 | * lv_xstring TYPE xstring.
54 | *
55 | *data: p_asdkid type zinterface_id VALUE gc_interface,
56 | * p_botype type sbo_bo_type value gc_busobjtype,
57 | * p_bocat type sbo_type_cat value gc_busobjcat,
58 | * p_bokey type char10 ,
59 | * p_boevn type sibfevent value gc_eventtype.
60 | **SELECTION-SCREEN end of BLOCK bl1.
61 | **
62 | **START-OF-SELECTION.
63 | *
64 | *SELECT SINGLE bo_type INTO lv_busobj_type_name
65 | * FROM sbo_i_bodef
66 | * WHERE object_name = p_botype
67 | * AND object_type_category = p_bocat.
68 | *p_bokey = orderid.
69 | *IF sy-subrc EQ 0.
70 | *
71 | * "Create the Event
72 | * lv_event-busobj = p_botype.
73 | * lv_event-busobjname = lv_busobj_type_name.
74 | * lv_event-event = p_boevn.
75 | * lv_event-objkey = p_bokey.
76 | * lv_event-date = sy-datlo.
77 | * lv_event-time = sy-timlo.
78 | *
79 | * "Convert to JSON
80 | * lv_json_output = /ui2/cl_json=>serialize( data = lv_event
81 | * compress = abap_true
82 | * pretty_name = /ui2/cl_json=>pretty_mode-camel_case ).
83 | *
84 | * TRY.
85 | ***Calling Factory method to instantiate eventhub client
86 | *
87 | * oref = zcl_adf_service_factory=>create( iv_interface_id = p_asdkid
88 | * iv_business_identifier = filter ).
89 | * oref_servicebus ?= oref.
90 | *
91 | ***Setting Expiry time
92 | * CALL METHOD oref_servicebus->add_expiry_time
93 | * EXPORTING
94 | * iv_expiry_hour = 0
95 | * iv_expiry_min = 15
96 | * iv_expiry_sec = 0.
97 | *
98 | *
99 | ***Convert input string data to Xstring format
100 | * CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
101 | * EXPORTING
102 | * text = lv_json_output
103 | * IMPORTING
104 | * buffer = lv_xstring
105 | * EXCEPTIONS
106 | * failed = 1
107 | * OTHERS = 2.
108 | * IF sy-subrc <> 0.
109 | * ENDIF.
110 | *
111 | ** Add message headers
112 | * CLEAR it_headers.
113 | * wa_headers-name = 'BrokerProperties'.
114 | * wa_headers-value = '{"Label":"OnlineShopEvent"}'.
115 | * APPEND wa_headers TO it_headers.
116 | * CLEAR wa_headers.
117 | *
118 | ***Sending Converted SAP data to Azure Service Bus
119 | * oref_servicebus->send( EXPORTING request = lv_xstring "Input XSTRING of SAP Business data
120 | * it_headers = it_headers "Header attributes
121 | * IMPORTING response = lv_response "Response from Service Bus
122 | * ev_http_status = lv_http_status ). "Status
123 | *
124 | * CATCH zcx_interace_config_missing INTO cx_interface.
125 | * lv_string = cx_interface->get_text( ).
126 | * MESSAGE lv_string TYPE 'E'.
127 | * CATCH zcx_http_client_failed INTO cx_http .
128 | * lv_string = cx_http->get_text( ).
129 | * MESSAGE lv_string TYPE 'E'.
130 | * CATCH zcx_adf_service INTO cx_adf_service.
131 | * lv_string = cx_adf_service->get_text( ).
132 | * MESSAGE lv_string TYPE 'E'.
133 | * ENDTRY.
134 | *
135 | * IF lv_http_status NE '201' AND
136 | * lv_http_status NE '200'.
137 | * MESSAGE 'SAP data not sent to Azure ServiceBus' TYPE 'E'.
138 | * ELSE.
139 | * MESSAGE 'SAP data sent to Azure ServiceBus' TYPE 'I'.
140 | * ENDIF.
141 | *else.
142 | * MESSAGE 'Event Data nof found' type 'E'.
143 | *endif.
144 | call FUNCTION 'Z_ONLINESHOP_SDK_BUS' IN BACKGROUND TASK
145 | EXPORTING
146 | im_order = orderid
147 | im_createdby = createdby
148 |
149 | .
150 | ENDMETHOD.
151 |
152 | ENDCLASS.
153 |
--------------------------------------------------------------------------------
/src/zms2/zcl_ms1.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_MS1
7 | E
8 | ms1
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/zms2/zhb_i_prodcut_sql.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zhb_i_prodcut_sql DEFINITION
2 | PUBLIC
3 | FINAL
4 | CREATE PUBLIC .
5 |
6 | PUBLIC SECTION.
7 |
8 | INTERFACES if_oo_adt_classrun .
9 | PROTECTED SECTION.
10 | PRIVATE SECTION.
11 | ENDCLASS.
12 |
13 |
14 |
15 | CLASS zhb_i_prodcut_sql IMPLEMENTATION.
16 |
17 |
18 | METHOD if_oo_adt_classrun~main.
19 | select * from zhb_i_product INTO table @data(lt_product) .
20 | * value #( PRODUCT = '000000000000002097' PRODUCTGROUP = 'L003' )
21 | data(a) = 1.
22 | ENDMETHOD.
23 | ENDCLASS.
24 |
--------------------------------------------------------------------------------
/src/zms2/zhb_i_prodcut_sql.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZHB_I_PRODCUT_SQL
7 | E
8 | sql product
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/zms2/zhb_i_product.ddls.asddls:
--------------------------------------------------------------------------------
1 | @AbapCatalog.viewEnhancementCategory: [#NONE]
2 | @AccessControl.authorizationCheck: #NOT_REQUIRED
3 | @EndUserText.label: 'product'
4 | @Metadata.ignorePropagatedAnnotations: true
5 | @ObjectModel.usageType:{
6 | serviceQuality: #X,
7 | sizeCategory: #S,
8 | dataClass: #MIXED
9 | }
10 | define view entity zhb_i_product as select from I_Product {
11 | key Product,
12 | // ProductExternalID,
13 | // ProductOID,
14 | // ProductType,
15 | // CreationDate,
16 | // CreationTime,
17 | // CreationDateTime,
18 | // CreatedByUser,
19 | // LastChangeDate,
20 | // LastChangedByUser,
21 | // IsMarkedForDeletion,
22 | // CrossPlantStatus,
23 | // CrossPlantStatusValidityDate,
24 | // ProductOldID,
25 | // GrossWeight,
26 | // PurchaseOrderQuantityUnit,
27 | // SourceOfSupply,
28 | // WeightUnit,
29 | // CountryOfOrigin,
30 | // CompetitorID,
31 | ProductGroup,
32 | BaseUnit,
33 | ItemCategoryGroup,
34 | // NetWeight,
35 | ProductHierarchy,
36 | Division,
37 | VarblPurOrdUnitIsActive,
38 | VolumeUnit,
39 | // MaterialVolume,
40 | SalesStatus,
41 | TransportationGroup,
42 | SalesStatusValidityDate,
43 | AuthorizationGroup,
44 | ANPCode,
45 | ProductCategory,
46 | Brand,
47 | ProcurementRule,
48 | ValidityStartDate,
49 | LowLevelCode,
50 | ProdNoInGenProdInPrepackProd,
51 | SerialIdentifierAssgmtProfile,
52 | SizeOrDimensionText,
53 | IndustryStandardName,
54 | ProductStandardID,
55 | InternationalArticleNumberCat,
56 | ProductIsConfigurable,
57 | IsBatchManagementRequired,
58 | HasEmptiesBOM,
59 | ExternalProductGroup,
60 | CrossPlantConfigurableProduct,
61 | SerialNoExplicitnessLevel,
62 | ProductManufacturerNumber,
63 | ManufacturerNumber,
64 | ManufacturerPartProfile,
65 | QltyMgmtInProcmtIsActive,
66 | IsApprovedBatchRecordReqd,
67 | HandlingIndicator,
68 | WarehouseProductGroup,
69 | WarehouseStorageCondition,
70 | StandardHandlingUnitType,
71 | SerialNumberProfile,
72 | AdjustmentProfile,
73 | PreferredUnitOfMeasure,
74 | IsPilferable,
75 | IsRelevantForHzdsSubstances,
76 | // QuarantinePeriod,
77 | TimeUnitForQuarantinePeriod,
78 | QualityInspectionGroup,
79 | HandlingUnitType,
80 | HasVariableTareWeight,
81 | // MaximumPackagingLength,
82 | // MaximumPackagingWidth,
83 | // MaximumPackagingHeight,
84 | // MaximumCapacity,
85 | OvercapacityTolerance,
86 | UnitForMaxPackagingDimensions,
87 | // BaseUnitSpecificProductLength,
88 | // BaseUnitSpecificProductWidth,
89 | // BaseUnitSpecificProductHeight,
90 | ProductMeasurementUnit,
91 | ProductValidStartDate,
92 | ArticleCategory,
93 | ContentUnit,
94 | // NetContent,
95 | ComparisonPriceQuantity,
96 | // GrossContent,
97 | ProductValidEndDate,
98 | AssortmentListType,
99 | HasTextilePartsWthAnimalOrigin,
100 | ProductSeasonUsageCategory,
101 | IndustrySector,
102 | ChangeNumber,
103 | MaterialRevisionLevel,
104 | IsActiveEntity,
105 | LastChangeDateTime,
106 | LastChangeTime,
107 | DangerousGoodsIndProfile,
108 | ProductUUID,
109 | ProdSupChnMgmtUUID22,
110 | ProductDocumentChangeNumber,
111 | ProductDocumentPageCount,
112 | ProductDocumentPageNumber,
113 | OwnInventoryManagedProduct,
114 | DocumentIsCreatedByCAD,
115 | ProductionOrInspectionMemoTxt,
116 | ProductionMemoPageFormat,
117 | GlobalTradeItemNumberVariant,
118 | ProductIsHighlyViscous,
119 | TransportIsInBulk,
120 | ProdAllocDetnProcedure,
121 | ProdEffctyParamValsAreAssigned,
122 | ProdIsEnvironmentallyRelevant,
123 | LaboratoryOrDesignOffice,
124 | PackagingMaterialGroup,
125 | ProductIsLocked,
126 | DiscountInKindEligibility,
127 | SmartFormName,
128 | PackingReferenceProduct,
129 | BasicMaterial,
130 | ProductDocumentNumber,
131 | ProductDocumentVersion,
132 | ProductDocumentType,
133 | ProductDocumentPageFormat,
134 | ProductConfiguration,
135 | SegmentationStrategy,
136 | SegmentationIsRelevant,
137 | IsChemicalComplianceRelevant,
138 | ManufacturerBookPartNumber,
139 | LogisticalProductCategory,
140 | SalesProduct,
141 | ProdCharc1InternalNumber,
142 | ProdCharc2InternalNumber,
143 | ProdCharc3InternalNumber,
144 | ProductCharacteristic1,
145 | ProductCharacteristic2,
146 | ProductCharacteristic3,
147 | DfsAmmunitionGroupCode,
148 | DfsRICIdentifier,
149 | DfsProductSensitivity,
150 | DfsManufacturerPartLongNumber,
151 | DfsMatlConditionMgmt,
152 | DfsReturnDelivery,
153 | DfsLogisticsLevel,
154 | DfsNationalItemIdnNumber,
155 | ZZ1_CustomFieldRiskMit_PRD,
156 | ZZ1_CustomFieldHighRis_PRD,
157 | ZZ1_CustomFieldRiskRea_PRD,
158 | /* Associations */
159 | _AdjustmentProfile,
160 | _AdjustmentProfileText,
161 | _AdjustmentProfileText_2,
162 | _AdjustmentProfile_2,
163 | _AssortmentListType,
164 | _AssortmentListTypeText,
165 | _BaseUnitOfMeasure,
166 | _BaseUnitOfMeasureText,
167 | _Brand,
168 | _BrandText,
169 | _BR_ANPCode,
170 | _BR_ANPCodeText,
171 | _ChemicalComplianceRelevant,
172 | _ChemicalComplianceRlvtText,
173 | _ContentUnit,
174 | _ContentUnitText,
175 | // _CreatedByUser,
176 | // _CreatedByUserContactCard,
177 | // _CrossPlantConfigurableProduct,
178 | // _Division,
179 | // _DivisionText,
180 | // _ESHCharValueAssignment,
181 | // _ESHClassAssignment,
182 | // _ESHDocInfoRecordObjectLink,
183 | // _ESHProductPlant,
184 | // _ESHProductSalesDelivery,
185 | // _ESHPurOrderQuantityUnitText,
186 | // _ESHSourceOfSupply,
187 | _ESHSupplier,
188 | _ESHTextObjectPlainLongText,
189 | _ExternalProductGroup,
190 | _ExtProdGrpText,
191 | _HandlingIndicator,
192 | _HandlingIndicatorText,
193 | _HandlingUnitType,
194 | _HandlingUnitTypeText,
195 | _IntArticleNumberText,
196 | _InternationalArticleNumberCat,
197 | _ItemCategoryGroup,
198 | _ItemCategoryGroupText,
199 | // _LastChangedByUser,
200 | // _LastChangedByUserContactCard,
201 | _MaterialRevisionLevel,
202 | _MaterialText,
203 | _MDProductHierarchyNode,
204 | _ProductCategory,
205 | _ProductCategoryText,
206 | _ProductESPP,
207 | _ProductGroup,
208 | _ProductGroupText,
209 | _ProductGroupText_2,
210 | _ProductGroup_2,
211 | _ProductHierarchy,
212 | _ProductHierarchyText,
213 | _ProductMeasurementUnit,
214 | _ProductMeasurementUnitText,
215 | _ProductProcurement,
216 | _ProductRetail,
217 | _ProductSales,
218 | _ProductSCM,
219 | // _ProductStatus,
220 | // _ProductStatusText,
221 | // _ProductType,
222 | // _ProductTypeName,
223 | _ProdUnivHierarchyNode,
224 | _QualityInspectionGroup,
225 | _QualityInspectionGroupText,
226 | _QuantityUnitText,
227 | _QuantityUnitValueHelp,
228 | _SerialNumberProfile,
229 | _SerialNumberProfileText,
230 | _StandardHandlingUnitType,
231 | _StandardHandlingUnitTypeText,
232 | _Text,
233 | _TimeUnitForQuarantinePeriod,
234 | _TimeUnitQuarantinePeriodText,
235 | _UnitForMaxPackaging,
236 | _UnitForMaxPackagingText,
237 | _WarehouseProductGroup,
238 | _WarehouseProductGroupText,
239 | _WarehouseStorageCondition,
240 | _WarehouseStorageConditionText
241 | // ,
242 | // _WeightUnitText,
243 | // _WeightUnitValueHelp
244 | }
245 |
--------------------------------------------------------------------------------
/src/zms2/zhb_i_product.ddls.baseinfo:
--------------------------------------------------------------------------------
1 | {
2 | "BASEINFO":
3 | {
4 | "FROM":
5 | [
6 | "I_PRODUCT"
7 | ],
8 | "ASSOCIATED":
9 | [
10 | "I_ASSORTMENTLISTTYPE",
11 | "I_ASSORTMENTLISTTYPET",
12 | "I_BRAND",
13 | "I_BRANDTEXT",
14 | "I_BR_ANPCODE",
15 | "I_BR_ANPCODETEXT",
16 | "I_CHANGEMSTROBJTYPEREVISIONLVL",
17 | "I_CHEMICALCOMPLIANCERELEVANT",
18 | "I_CHEMICALCOMPLIANCERLVTTEXT",
19 | "I_EWM_HANDLINGUNITTYPE",
20 | "I_EWM_HANDLINGUNITTYPET",
21 | "I_EWM_MATERIALHANDLING",
22 | "I_EWM_MATERIALHANDLINGT",
23 | "I_EWM_QTYADJUSTMENTPROFILE",
24 | "I_EWM_QTYADJUSTMENTPROFILET",
25 | "I_EWM_QUALITYINSPECTIONGROUP",
26 | "I_EWM_QUALITYINSPECTIONGROUPT",
27 | "I_EWM_SERIALNUMBERPROFILE",
28 | "I_EWM_SERIALNUMBERPROFILET",
29 | "I_EWM_WAREHOUSEMATERIALGROUP",
30 | "I_EWM_WAREHOUSEMATERIALGROUPT",
31 | "I_EWM_WHSESTORAGECONDITION",
32 | "I_EWM_WHSESTORAGECONDITIONT",
33 | "I_EXTPRODGRP",
34 | "I_EXTPRODGRPTEXT",
35 | "I_INTNTNLARTNMBCAT",
36 | "I_INTNTNLARTNMBCATTEXT",
37 | "I_ITEMCATEGORYGROUP",
38 | "I_ITEMCATEGORYGROUPTEXT",
39 | "I_MDPRODUCTHIERARCHYNODE",
40 | "I_PRODEWMADJMTPROFILE",
41 | "I_PRODEWMADJMTPROFILETEXT",
42 | "I_PRODUCTCATEGORY",
43 | "I_PRODUCTCATEGORYTEXT",
44 | "I_PRODUCTDESCRIPTION",
45 | "I_PRODUCTESPP",
46 | "I_PRODUCTGROUP",
47 | "I_PRODUCTGROUPTEXT",
48 | "I_PRODUCTGROUPTEXT_2",
49 | "I_PRODUCTGROUP_2",
50 | "I_PRODUCTHIERARCHY",
51 | "I_PRODUCTHIERARCHYTEXT",
52 | "I_PRODUCTPROCUREMENT",
53 | "I_PRODUCTRETAIL",
54 | "I_PRODUCTSALES",
55 | "I_PRODUCTSCM",
56 | "I_PRODUCTTEXT",
57 | "I_PRODUNIVHIERARCHYNODE",
58 | "I_SUPPLIER",
59 | "I_TEXTOBJECTPLAINLONGTEXT",
60 | "I_UNITOFMEASURE",
61 | "I_UNITOFMEASURETEXT"
62 | ],
63 | "BASE":
64 | [
65 | "I_PRODUCT"
66 | ],
67 | "ANNO_REF":
68 | [],
69 | "SCALAR_FUNCTION":
70 | [],
71 | "VERSION":0,
72 | "ANNOREF_EVALUATION_ERROR":""
73 | }
74 | }
--------------------------------------------------------------------------------
/src/zms2/zhb_i_product.ddls.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZHB_I_PRODUCT
7 | E
8 | product
9 | W
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------