Code: Alles auswählen.
method ONACTIONGET_ZEICHNUNG .
*TYPEDECLARATIONS
DATA input_node TYPE REF TO if_wd_context_node.
DATA materialnummer TYPE string.
*lokale persistente Objektreferenz - BOR kompatibel
DATA gs_bor TYPE sibflporb.
*navigate from CONTEXT to IDENTIFY_NODE via lead_section
input_node = wd_context->get_child_node( 'IDENTIFY' ).
*GET NOTIFACTION VALUE
input_node->get_attribute( EXPORTING name = 'MATN' IMPORTING value = materialnummer ).
*BO Key setzen
gs_bor-instid = materialnummer.
gs_bor-typeid = 'BUS1001006'.
gs_bor-catid = 'BO'.
*Links lesen
TRY.
CALL METHOD cl_binary_relation=>read_links
EXPORTING
is_object = gs_bor
it_relation_options = lt_relat
IMPORTING
et_links = t_linktabelle.
CATCH cx_root INTO lo_root.
ENDTRY.
Code: Alles auswählen.
t_linktabelle
Code: Alles auswählen.
* Such-Optionen festlegen
ls_rel-sign = 'I'.
ls_rel-option = 'NE'.
ls_rel-low = ''.
APPEND ls_rel TO lt_rel.
Code: Alles auswählen.
ls_relat-sign = 'I'.
ls_relat-option = 'EQ'.
ls_relat-low = 'ATTA'.
APPEND la_relat TO lt_relat.
ls_relat-low = 'NOTE'.
APPEND la_relat TO lt_relat.
ls_relat-low = 'URL'.
APPEND ls_relat TO lt_relat.
Code: Alles auswählen.
METHOD onactionget_zeichnung .
*TYPEDECLARATIONS
DATA input_node TYPE REF TO if_wd_context_node.
DATA materialnummer TYPE mara-matnr.
*lokale persistente Objektreferenz - BOR kompatibel
DATA gs_bor TYPE sibflporb.
* Read the links
DATA: t_linktabelle TYPE obl_t_link,
la_links LIKE LINE OF t_linktabelle.
* Selectoptions für Beziehungstypen
DATA: lt_relat TYPE obl_t_relt,
ls_relat LIKE LINE OF lt_relat.
*Exception
DATA lo_root TYPE REF TO cx_root.
*navigate from CONTEXT to IDENTIFY_NODE via lead_section
input_node = wd_context->get_child_node( 'IDENTIFY' ).
*GET NOTIFACTION VALUE
input_node->get_attribute( EXPORTING name = 'MATN' IMPORTING value = materialnummer ).
*BO Key setzen
gs_bor-instid = materialnummer.
gs_bor-typeid = 'BUS1001'.
gs_bor-catid = 'BO'.
* Suchoptionen
ls_relat-sign = 'I'.
ls_relat-option = 'NE'.
ls_relat-low = ' '.
APPEND ls_relat TO lt_relat.
*Links lesen
TRY.
CALL METHOD cl_binary_relation=>read_links
EXPORTING
is_object = gs_bor
it_relation_options = lt_relat
IMPORTING
et_links = t_linktabelle.
CATCH cx_root INTO lo_root.
ENDTRY.
*Breakpoint
Write: 'STOP'.
ENDMETHOD.