根据选取不同的TAB标签进行设置数据,参考下图:
1)首先定义一个属性;
2)给TAB组件设置事件;
代码:
METHOD ONACTIONTAB_SELECT .
DATA: LO_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
LW_NAME TYPE STRING.
DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
DATA LV_TABCHOOSE TYPE WD_THIS->ELEMENT_CONTEXT-TABCHOOSE.
* GET ELEMENT VIA LEAD SELECTION
LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
* @TODO HANDLE NOT SET LEAD SELECTION
IF LO_EL_CONTEXT IS INITIAL.
ENDIF.
* @T