Skip to content

Commit

Permalink
fix xml_header
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp committed Aug 7, 2024
1 parent 717102e commit 13266cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ CLASS kernel_call_transformation IMPLEMENTATION.
WRITE '@KERNEL }'.
WRITE '@KERNEL }'.
IF lv_result = abap_true.
lv_result = lcl_string_to_string=>run( lv_dummy ).
lv_result = lcl_string_to_string=>run(
source = lv_dummy
options = ms_options ).
WRITE '@KERNEL INPUT.resultXML.set(lv_result);'.
RETURN.
ENDIF.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ CLASS lcl_string_to_string DEFINITION.
CLASS-METHODS run
IMPORTING
source TYPE any
options TYPE kernel_call_transformation=>ty_options
RETURNING
VALUE(result) TYPE string.
ENDCLASS.
Expand All @@ -549,5 +550,9 @@ CLASS lcl_string_to_string IMPLEMENTATION.
METHOD run.
* this is not right, but works for the unit test
WRITE '@KERNEL result.set(INPUT.source.get());'.

IF options-xml_header = 'no'.
REPLACE FIRST OCCURRENCE OF REGEX '<?.*?>' IN result WITH ''.
ENDIF.
ENDMETHOD.
ENDCLASS.

0 comments on commit 13266cc

Please sign in to comment.