Y R Eitan Test 31 08
Y R Eitan Test 31 08
Y R Eitan Test 31 08
TYPE-POOLS: abap .
TABLES: ssfscreen .
DATA: text255 TYPE text255 .
*----------------------------------------------------------------------*
TYPES: BEGIN OF tp_tech_1 .
TYPES: it_styl
TYPE salv_t_int4_column .
TYPES: END OF tp_tech_1 .
*----------------------------------------------------------------------*
TYPES: BEGIN OF tp_stxf_1 .
TYPES: formname TYPE stxfadm-formname .
TYPES: END OF tp_stxf_1 .
*----------------------------------------------------------------------*
TYPES: BEGIN OF tp_node_1 .
TYPES: name TYPE ssfscreen-iname ,
value TYPE text255 .
TYPES: ob_ixml_node TYPE REF TO if_ixml_node .
TYPES: END OF tp_node_1 .
*----------------------------------------------------------------------*
TYPES: BEGIN OF tp_alv_data_1 .
INCLUDE TYPE tp_tech_1 AS tech_1 RENAMING WITH SUFFIX _tech_1 .
INCLUDE TYPE tp_stxf_1 AS stxf_1 RENAMING WITH SUFFIX _stxf_1 .
INCLUDE TYPE tp_node_1 AS node_1 RENAMING WITH SUFFIX _node_1 .
TYPES: END OF tp_alv_data_1 .
TYPES: tp_alv_data_1_tab TYPE TABLE OF tp_alv_data_1 .
DATA: it_alv_data_1 TYPE tp_alv_data_1_tab .
*----------------------------------------------------------------------*
TYPES: BEGIN OF tp_alv_data_2 .
INCLUDE TYPE tp_node_1 AS node_1 RENAMING WITH SUFFIX _node_1 .
TYPES: END OF tp_alv_data_2 .
TYPES: tp_alv_data_2_tab TYPE TABLE OF tp_alv_data_2 .
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
CLASS cl_event_receiver DEFINITION .
PUBLIC SECTION.
METHODS: link_click FOR EVENT link_click OF cl_salv_events_table
IMPORTING row column.
PRIVATE SECTION.
METHODS: show_parents
IMPORTING ob_ixml_node_1 TYPE REF TO if_ixml_node .
METHODS: popup
IMPORTING
start_line TYPE i
end_line
TYPE i
start_column TYPE i
end_column TYPE i
value(t_table) TYPE
DEFAULT
DEFAULT
DEFAULT
DEFAULT
table .
2
15
25
150
ENDCLASS .
"cl_event_receiver DEFINITION
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
CLASS cl_event_receiver IMPLEMENTATION.
*----------------------------------------------------------------------*
METHOD: link_click .
FIELD-SYMBOLS: <st_alv_data_1> TYPE tp_alv_data_1 .
FIELD-SYMBOLS: <cell> TYPE ANY .
READ TABLE it_alv_data_1 INDEX row ASSIGNING <st_alv_data_1> .
ASSIGN COMPONENT column OF STRUCTURE <st_alv_data_1> TO <cell> .
CASE column .
WHEN 'NAME_NODE_1' .
me->show_parents( <st_alv_data_1>-node_1-ob_ixml_node ) .
ENDCASE .
ENDMETHOD .
"on_link_click
*----------------------------------------------------------------------*
METHOD: show_parents .
DATA: ob_ixml_node_t TYPE REF TO if_ixml_node .
ob_ixml_node_t = ob_ixml_node_1->get_parent( ) .
DATA: it_alv_data_2 TYPE tp_alv_data_2_tab .
DATA: st_alv_data_2 LIKE LINE OF it_alv_data_2 .
WHILE ob_ixml_node_t IS NOT INITIAL .
st_alv_data_2-node_1-name = ob_ixml_node_t->get_name( ) .
st_alv_data_2-node_1-value = ob_ixml_node_t->get_value( ) .
APPEND st_alv_data_2 TO it_alv_data_2 .
ob_ixml_node_t = ob_ixml_node_t->get_parent( ) .
ENDWHILE .
me->popup( EXPORTING t_table = it_alv_data_2 ) .
ENDMETHOD .
"show_parents
*----------------------------------------------------------------------*
METHOD: popup .
IF t_table IS INITIAL .
MESSAGE s801(dh).
RETURN .
ENDIF .
DATA: ob_salv_table TYPE REF TO cl_salv_table.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = ob_salv_table
CHANGING
t_table
= t_table ).
CATCH cx_salv_msg.
ENDTRY.
CHECK ob_salv_table IS BOUND.
ob_salv_table->set_screen_popup(
start_column = start_column
end_column = end_column
start_line = start_line
end_line
= end_line ).
ob_salv_table->display( ) .
ENDMETHOD .
"popup
*----------------------------------------------------------------------*
ENDCLASS .
"cl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK block04 WITH FRAME.
SELECT-OPTIONS: s_fname FOR ssfscreen-fname
NO INTERVALS OBLIGATORY .
SELECT-OPTIONS: s_devcl FOR ssfscreen-devclass NO INTERVALS .
SELECTION-SCREEN SKIP .
SELECT-OPTIONS: s_name FOR ssfscreen-iname .
SELECT-OPTIONS: s_value FOR text255 NO INTERVALS.
SELECTION-SCREEN END OF BLOCK block04.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
INITIALIZATION .
PERFORM at_initialization .
START-OF-SELECTION.
PERFORM at_start_of_selection .
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
FORM at_initialization .
* APPEND 'IEQSF_EXAMPLE_01' TO s_fname .
* APPEND 'IEQSF_EXAMPLE_02' TO s_fname .
APPEND 'IEQSF_EXAMPLE_03' TO s_fname .
APPEND 'IEQTDLINE ' TO s_name .
APPEND 'ICP*madam*' TO s_value .
DATA: it_seltexts TYPE TABLE OF rsseltexts .
DATA: st_seltexts LIKE LINE OF it_seltexts .
st_seltexts-name =
st_seltexts-kind =
st_seltexts-text =
APPEND st_seltexts
'S_NAME' .
'S' .
'Node name' .
TO it_seltexts .
st_seltexts-name =
st_seltexts-kind =
st_seltexts-text =
APPEND st_seltexts
'S_VALUE' .
'S' .
'Node value' .
TO it_seltexts .
im_formname = st_stxfadm-formname
im_language = 'E'.
DATA: ob_ixml
TYPE REF TO if_ixml .
DATA: ob_ixml_document TYPE REF TO if_ixml_document .
ob_ixml
= cl_ixml=>create( ).
ob_ixml_document = ob_ixml->create_document( ) .
ob_smart_form->xml_init( ) .
CALL METHOD ob_smart_form->xml_download
EXPORTING
parent = ob_ixml_document
CHANGING
document = ob_ixml_document.
* DATA: ob_ixml_stream_factory TYPE REF TO if_ixml_stream_factory.
* DATA: ob_ostream TYPE REF TO if_ixml_ostream .
*
*
*
*
*
ob_ixml_node = ob_ixml_node_iterator->get_next( ).
ENDWHILE .
ENDFORM.
"scan_form
*----------------------------------------------------------------------*
FORM display_results
CHANGING
t_table TYPE table .
DATA: ob_salv_table TYPE REF TO cl_salv_table .
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = ob_salv_table
CHANGING
t_table
= t_table ).
CATCH cx_salv_msg.
ENDTRY.
DATA: ob_salv_functions_list TYPE REF TO cl_salv_functions_list.
ob_salv_functions_list = ob_salv_table->get_functions( ).
ob_salv_functions_list->set_default( ) .
DATA: st_fcat TYPE lvc_s_fcat .
DATA: ob_salv_columns TYPE REF TO cl_salv_columns_table .
ob_salv_columns = ob_salv_table->get_columns( ) .
ob_salv_columns->set_cell_type_column( 'IT_STYL_TECH_1' ) .
DATA: it_column_ref TYPE salv_t_column_ref .
FIELD-SYMBOLS: <st_column_ref> LIKE LINE OF it_column_ref .
it_column_ref = ob_salv_columns->get( ) .
DATA: ob_salv_column TYPE REF TO cl_salv_column_table .
LOOP AT it_column_ref ASSIGNING <st_column_ref> .
CASE <st_column_ref>-columnname .
WHEN 'NAME_NODE_1' .
st_fcat-scrtext_s = st_fcat-scrtext_m = st_fcat-scrtext_l = 'Node Name'(
011) .
<st_column_ref>-r_column->set_short_text( value = st_fcat-scrtext_s ) .
<st_column_ref>-r_column->set_medium_text( value = st_fcat-scrtext_m ) .
<st_column_ref>-r_column->set_long_text( value = st_fcat-scrtext_l ) .
ob_salv_column ?= ob_salv_columns->get_column( <st_column_ref>-columnnam
e ) .
ob_salv_column->set_cell_type( if_salv_c_cell_type=>hotspot ).
WHEN 'VALUE_NODE_1' .
st_fcat-scrtext_s = st_fcat-scrtext_m = st_fcat-scrtext_l = 'Node Value'
(012) .
<st_column_ref>-r_column->set_short_text( value = st_fcat-scrtext_s ) .
"display_results