Created
March 17, 2021 09:26
-
-
Save mbtools/136fb815f3a9662e7bd1d5335dcbe82c to your computer and use it in GitHub Desktop.
abapGit form parsing
This file contains 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
REPORT zabapgit_parse_fields. | |
CONSTANTS: | |
c_query TYPE string VALUE 'key=00%2601¶m=abc%3defg&value=xxx%3fyyy&option=%25%24123%5f'. | |
DATA: | |
gv_url TYPE string, | |
gs_fields TYPE ihttpnvp, | |
gt_fields TYPE tihttpnvp. | |
* ZCL_ABAPGIT_HTML_ACTION_UTILS | |
gt_fields = zcl_abapgit_html_action_utils=>parse_fields( c_query ). | |
LOOP AT gt_fields INTO gs_fields. | |
WRITE: / gs_fields-name, gs_fields-value. | |
ENDLOOP. | |
SKIP. | |
gt_fields = zcl_abapgit_html_action_utils=>parse_fields( to_upper( c_query ) ). | |
LOOP AT gt_fields INTO gs_fields. | |
WRITE: / gs_fields-name, gs_fields-value. | |
ENDLOOP. | |
SKIP. | |
* CL_HTTP_UTILITY | |
gt_fields = cl_http_utility=>string_to_fields( c_query ). | |
LOOP AT gt_fields INTO gs_fields. | |
WRITE: / gs_fields-name, gs_fields-value. | |
ENDLOOP. | |
SKIP. | |
gt_fields = cl_http_utility=>string_to_fields( to_upper( c_query ) ). | |
LOOP AT gt_fields INTO gs_fields. | |
WRITE: / gs_fields-name, gs_fields-value. | |
ENDLOOP. | |
SKIP. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment