Closed buca92 closed 1 year ago
Since data elements have no text definitions yet. I propose to modify the operation "create" to accept the same parameters as the operation "chattr", to avoid the need to issue 2 commands "create + chattr". The operations "create" and "chattr", should also have the patameter "-a|--activate" to create, define and activate a data element in a signle command. I would also add the option "--overwrite" to the operation create, so it does not fail if the created data element already exists.
We may have Data Elements text in future: https://github.com/SAP/abap-file-formats/issues/556
Since data elements have no text definitions yet. I propose to modify the operation "create" to accept the same parameters as the operation "chattr", to avoid the need to issue 2 commands "create + chattr". The operations "create" and "chattr", should also have the patameter "-a|--activate" to create, define and activate a data element in a signle command. I would also add the option "--overwrite" to the operation create, so it does not fail if the created data element already exists.
Ok, I will create the "define" action that will take care of whole DTEL lifecycle from creation to activation phase
I pushed new version of SAPCLI Data Element handling.
New command define
is introduced and covers create, change and activation phases, all that are relevant for a consumer.
See example: sapcli dataelement define Z_TEST_DTEL "Test DTEL created via SAPCLI" '$Z_PLAYGROUND' --activate --no-error-existing --type=predefinedAbapType --data_type=STRING --label_short='Tst DTEL' --label_medium='Test Label Medium' --label_long='Test Label Long' --label_heading='Test Label Heading'
Well done. I pushed these commits:
Codecov Report
Patch coverage:
100.00%
and project coverage change:+0.03%
:tada:Additional details and impacted files
```diff @@ Coverage Diff @@ ## master #120 +/- ## ========================================== + Coverage 98.25% 98.29% +0.03% ========================================== Files 84 86 +2 Lines 8315 8483 +168 ========================================== + Hits 8170 8338 +168 Misses 145 145 ``` | [Files Changed](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak) | Coverage Δ | | |---|---|---| | [sap/adt/\_\_init\_\_.py](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak#diff-c2FwL2FkdC9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [sap/adt/dataelement.py](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak#diff-c2FwL2FkdC9kYXRhZWxlbWVudC5weQ==) | `100.00% <100.00%> (ø)` | | | [sap/adt/objects.py](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak#diff-c2FwL2FkdC9vYmplY3RzLnB5) | `98.80% <100.00%> (+<0.01%)` | :arrow_up: | | [sap/cli/\_\_init\_\_.py](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak#diff-c2FwL2NsaS9fX2luaXRfXy5weQ==) | `90.32% <100.00%> (+0.10%)` | :arrow_up: | | [sap/cli/dataelement.py](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak#diff-c2FwL2NsaS9kYXRhZWxlbWVudC5weQ==) | `100.00% <100.00%> (ø)` | | | [sap/rest/gcts/sugar.py](https://app.codecov.io/gh/jfilak/sapcli/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jakub+Filak#diff-c2FwL3Jlc3QvZ2N0cy9zdWdhci5weQ==) | `100.00% <100.00%> (ø)` | |:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.