我正在尝试进行错误检查.当用户输入不存在的航空公司代码时,该页面应显示错误消息.问题是:我正在使用BAPI_FLIGHT_GETLIST BAPI,当我执行EXECUTE_BAPI_FLIGHT_GETLIST方法并尝试获取sy-subrc值时,它总是得到0.我的代码就像这样:
...
data lo_componentcontroller type ref to ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->execute_bapi_flight_getlist(
airline = lv_query " bapisflkey-airlineid
* destination_from = " bapisfldst
* destination_to = " bapisfldst
* max_rows = " bapisflaux-bapimaxrow
).
if sy-subrc <> 0.
wd_this->error_check(
).
endif.
Run Code Online (Sandbox Code Playgroud)
即使载体代码不存在,也不会显示错误消息.方法error_check()它也正常工作,因为如果我在调用之前使用if语句,则会显示消息.希望我在解释自己.谢谢.
我正在开发我的第一个webdynpro应用程序.我使用向导从我的componentcontroller调用一个功能模块.我使用另一个向导从视图方法调用componentcontroller方法.之后我尝试使用节点属性作为参数,但是我得到了标题中的错误.错误指向第一个参数(Activestatus).
这是view方法的代码.
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 = …Run Code Online (Sandbox Code Playgroud) 我需要在我的sap web dynpro中为按钮附加图像源.但我必须在运行时这样做.这样我就可以动态地从mime存储库中选择一个图像并将其附加到按钮上.
有没有办法做到这一点?我真的没有想法......
谢谢你的帮助!
问候,
多米尼克