-
Notifications
You must be signed in to change notification settings - Fork 8
Fix for issue #8 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
"! <p class="shorttext synchronized" lang="en">Utility Class handling CDS Parameters</p> | ||
CLASS zcl_dbbr_cds_param_util DEFINITION | ||
PUBLIC | ||
FINAL | ||
CREATE PUBLIC . | ||
|
||
PUBLIC SECTION. | ||
"! <p class="shorttext synchronized" lang="en">Concatenate parameters and its values to a string</p> | ||
"! | ||
"! @parameter it_param_values | <p class="shorttext synchronized" lang="en">List of parameters with values</p> | ||
"! @parameter iv_param_indentation | <p class="shorttext synchronized" lang="en">Number of spaces for indentation</p> | ||
"! @parameter if_sep_param_by_newline | <p class="shorttext synchronized" lang="en">Every param/value in new line</p> | ||
"! @parameter rv_params | <p class="shorttext synchronized" lang="en">Concatenated parameter/value combinations</p> | ||
CLASS-METHODS build_param_string | ||
IMPORTING | ||
it_param_values TYPE zif_sat_ty_global=>ty_t_cds_param_value | ||
iv_param_indentation TYPE int1 | ||
if_sep_param_by_newline TYPE abap_bool DEFAULT abap_true | ||
RETURNING | ||
VALUE(rv_params) TYPE string. | ||
|
||
PROTECTED SECTION. | ||
PRIVATE SECTION. | ||
ENDCLASS. | ||
|
||
|
||
|
||
CLASS zcl_dbbr_cds_param_util IMPLEMENTATION. | ||
|
||
METHOD build_param_string. | ||
|
||
DATA(lv_spaces) = ` `. | ||
DO iv_param_indentation TIMES. | ||
lv_spaces = lv_spaces && ` `. | ||
ENDDO. | ||
|
||
DATA(lv_param_seperation) = COND #( | ||
WHEN if_sep_param_by_newline = abap_true THEN |{ cl_abap_char_utilities=>cr_lf }{ lv_spaces }| | ||
ELSE | | ). | ||
|
||
DATA(lv_params) = REDUCE string( | ||
INIT value = `` sep = `` | ||
FOR param IN it_param_values | ||
NEXT value = |{ value }{ sep }{ param-name } = { cl_abap_dyn_prg=>quote( param-value ) }| | ||
sep = `,` && lv_param_seperation ). | ||
|
||
rv_params = |( { lv_params } )|. | ||
|
||
ENDMETHOD. | ||
|
||
ENDCLASS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<VSEOCLASS> | ||
<CLSNAME>ZCL_DBBR_CDS_PARAM_UTIL</CLSNAME> | ||
<LANGU>E</LANGU> | ||
<DESCRIPT>Utility Class handling CDS Parameters</DESCRIPT> | ||
<STATE>1</STATE> | ||
<CLSCCINCL>X</CLSCCINCL> | ||
<FIXPT>X</FIXPT> | ||
<UNICODE>X</UNICODE> | ||
</VSEOCLASS> | ||
<DESCRIPTIONS> | ||
<SEOCOMPOTX> | ||
<CLSNAME>ZCL_DBBR_CDS_PARAM_UTIL</CLSNAME> | ||
<CMPNAME>BUILD_PARAM_STRING</CMPNAME> | ||
<LANGU>E</LANGU> | ||
<DESCRIPT>Concatenate parameters and its values to a string</DESCRIPT> | ||
</SEOCOMPOTX> | ||
</DESCRIPTIONS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.