我正在开发我的第一个 webdynpro 应用程序。我使用向导从我的组件控制器中调用了一个功能模块。我使用另一个向导从视图方法中调用 componentcontroller 方法。之后我尝试使用节点属性作为参数,但我得到了标题中的错误。错误指向第一个参数(Activestatus)。
这是视图方法的代码。
method DOREFRESHDATA .
DATA lo_nd_filternode TYPE REF TO if_wd_context_node.
DATA lo_el_filternode TYPE REF TO if_wd_context_element.
lo_nd_filternode = wd_context->get_child_node( name = wd_this->wdctx_filternode ).
lo_el_filternode = lo_nd_filternode->get_element( ).
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->execute_getorders(
activestatus = lo_el_filternode->get_attribute( name = 'ACTIVESTATUS' )
batch = GETFILTERSTRING( ATTRIBUTENAME = 'BATCH' )
cancelstatus = lo_el_filternode->get_attribute( name = 'CANCELSTATUS' )
completestatus = lo_el_filternode->get_attribute( name = 'COMPLETESTATUS' )
confirmstatus = lo_el_filternode->get_attribute( name = 'CONFIRMSTATUS' )
enddate = lo_el_filternode->get_attribute( name = 'STARTDATEENDDATE' )
endtime = lo_el_filternode->get_attribute( name = 'STARTDATEENDTIME' )
equipment = GETFILTERSTRING( ATTRIBUTENAME = 'EQUIPMENT' )
financialstatus = lo_el_filternode->get_attribute( name = 'FINANCIALSTATUS' )
materialdescription = GETFILTERSTRING( ATTRIBUTENAME = 'MATERIALDESCRIPTON' )
materialnumber = GETFILTERSTRING( ATTRIBUTENAME = 'MATERIALDESCRIPTION' )
order = GETFILTERSTRING( ATTRIBUTENAME = 'ORDERNUMBER' )
orderplopo = lo_el_filternode->get_attribute( name = 'ORDERTYPE' )
ordertype = GETFILTERSTRING( ATTRIBUTENAME = 'PROCESAREA' )
plannedstatus = GETFILTERSTRING( ATTRIBUTENAME = 'PLANNEDSTATUS' )
startdate = lo_el_filternode->get_attribute( name = 'STARTDATESTARTDATE' )
starttime = lo_el_filternode->get_attribute( name = 'STARTDATESTARTTIME' )
technicalstatus = lo_el_filternode->get_attribute( name = 'TECHNICALSTATUS' )
).
endmethod.
将函数作为参数调用是否非法,我是否必须为每个参数创建一个局部变量,或者是否有其他问题。
我是 ABAP 和 Webdynpro 的新手。感谢您的帮助。