' &&
- '
' &&
- ms_result-obj_type && ' ' &&
- ms_result-obj_name && ' ' &&
- ms_result-filename && '
'.
-
+ " Diff header
ls_count = mo_diff->stats( ).
- lv_html = lv_html &&
- '
' && gc_newline &&
- '' && gc_newline &&
- 'Insert | ' && gc_newline &&
- '' &&
- ls_count-insert &&
- ' | ' && gc_newline &&
- '
' && gc_newline &&
- '' && gc_newline &&
- 'Delete | ' && gc_newline &&
- '' &&
- ls_count-delete &&
- ' | ' && gc_newline &&
- '
' && gc_newline &&
- '' && gc_newline &&
- 'Update | ' && gc_newline &&
- '' &&
- ls_count-update &&
- ' | ' && gc_newline &&
- '
' && gc_newline &&
- '
' && gc_newline.
- lv_html = lv_html &&
- '
' && gc_newline &&
- '' && gc_newline &&
- 'Local | ' && gc_newline &&
- |<> | | && gc_newline &&
- 'Remote | ' && gc_newline &&
- '
'.
+ h_head->add( '' ).
+ h_head->add( |+ { ls_count-insert }| ).
+ h_head->add( |- { ls_count-delete }| ).
+ h_head->add( |~ { ls_count-update }| ).
+ h_head->add( '' ).
+ h_head->add( ms_result-obj_type ).
+ h_head->add( |{ ms_result-obj_name }| ).
+ h_head->add( |({ ms_result-filename })| ).
+ h_head->add( '' ).
+ h_head->add( '
' ).
+ " Diff content
lt_diffs = mo_diff->get( ).
+ h_cont->add( '' ).
+ h_cont->add( '
' ).
+ h_cont->add( '' ).
+ h_cont->add( ' | ' ).
+ h_cont->add( '@LOCAL | ' ).
+ h_cont->add( ' | ' ).
+ h_cont->add( '@REMOTE | ' ).
+ h_cont->add( '
' ).
+
LOOP AT lt_diffs ASSIGNING .
- lv_local = escape( val = -local
- format = cl_abap_format=>e_html_attr ).
+ lv_cnt = sy-tabix.
+ lv_local = escape( val = -local
+ format = cl_abap_format=>e_html_attr ).
lv_remote = escape( val = -remote
format = cl_abap_format=>e_html_attr ).
CASE -result.
WHEN lcl_diff=>c_diff-insert.
- lv_clocal = ' style="background:lightgreen;"'. "#EC NOTEXT
- lv_cremote = ''.
+ lv_attr_local = ' class="diff_ins"'. "#EC NOTEXT
+ lv_attr_remote = ''.
WHEN lcl_diff=>c_diff-delete.
- lv_clocal = ''.
- lv_cremote = ' style="background:lightpink;"'. "#EC NOTEXT
+ lv_attr_local = ''.
+ lv_attr_remote = ' class="diff_del"'. "#EC NOTEXT
WHEN lcl_diff=>c_diff-update.
- lv_clocal = ' style="background:lightgreen;"'. "#EC NOTEXT
- lv_cremote = ' style="background:lightpink;"'. "#EC NOTEXT
+ lv_attr_local = ' class="diff_ins"'. "#EC NOTEXT
+ lv_attr_remote = ' class="diff_del"'. "#EC NOTEXT
WHEN OTHERS.
- lv_clocal = ''.
- lv_cremote = ''.
+ lv_attr_local = ''.
+ lv_attr_remote = ''.
ENDCASE.
- IF -result = lcl_diff=>c_diff-delete
- OR -result = lcl_diff=>c_diff-insert
- OR -result = lcl_diff=>c_diff-update.
- lv_anchor_count = lv_anchor_count + 1.
- lv_anchor_name = | name="diff_{ lv_anchor_count }"|.
- ELSE.
- CLEAR lv_anchor_name.
- ENDIF.
+ h_cont->add( '' ).
+ h_cont->add( |{ lv_cnt } | | ).
+ h_cont->add( |{ lv_local } | | ).
+ h_cont->add( | | | ). " TODO, ANCHOR ????
+ h_cont->add( |{ lv_remote } | | ).
+ h_cont->add( '
' ).
- lv_html = lv_html &&
- || && gc_newline &&
- '' && lv_local && ' | ' &&
- gc_newline &&
- ' ' &&
- |{ -result }| &&
- ' | ' &&
- gc_newline &&
- '' && lv_remote && ' | ' &&
- gc_newline &&
- '
' && gc_newline.
ENDLOOP.
- rv_html = lv_html && gc_newline &&
- '
' && gc_newline &&
- '
' && gc_newline &&
- lcl_gui=>footer( ).
+ h_cont->add( '
' ).
+ h_cont->add( '
' ).
+
+ " Build all together all
+* REDO
+ lv_html = lcl_gui=>header( ).
+
+ replace first occurrence of '' in lv_html
+ with '' && styles( ). "TODO: crutch, redo later after unification
+
+ "TODO: crutch, move to SAP back button (code almost ready)
+ lv_html = lv_html && '