Last active
February 26, 2023 15:53
-
-
Save kgorin8/922e91b4223479f996e4ecf0a12b2537 to your computer and use it in GitHub Desktop.
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
data: lr_tab type ref to data. | |
field-symbols <lt_tab> type table. | |
try. | |
create data lr_tab type standard table of (iv_table_name). | |
assign lr_tab->* to <lt_tab>. | |
catch cx_sy_create_data_error. | |
ev_exmessage = 'Error in data creation' && iv_table_name. "#EC NOTEXT | |
ev_rc = 4. | |
return. | |
endtry. | |
select * from (iv_table_name) into table <lt_tab> where (iv_where). | |
call transformation id | |
source root = <lt_tab> | |
result xml ev_xml. | |
replace all occurrences of '&' in ev_xml with '&'. | |
replace all occurrences of '>' in ev_xml with '>'. | |
replace all occurrences of '<' in ev_xml with '<'. | |
replace all occurrences of '"' in ev_xml with '"'. | |
replace all occurrences of '''' in ev_xml with '''. " ''' | |
replace all occurrences of cl_abap_char_utilities=>newline in ev_xml with cl_abap_char_utilities=>cr_lf. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment