Web Dynpro for ABAP(8):Service Calls
3.12 Service Calls
调用已经存在的function以及Class的方法。
1.创建Service Call
2.使用Service Call
选择Component->右键->Create->Service call
使用已有Component Controller
这里可以选择将function的参数创建为method的parameter或者controller的attributes或者context node,context attributes。
默认创建完成Component Controller会创建一个method: EXECUTE_BAPI_FLIGHT_GETLIST
示例代码:
* declarations for context navigation DATA lo_element TYPE REF TO if_wd_context_element. DATA lt_elements TYPE wdr_context_element_set. * declarations for parameters * get all involved child nodes * get input from context * the invocation - errors are always fatal !!! CALL FUNCTION 'BAPI_FLIGHT_GETLIST' " EXPORTING " airline = wd_this->airline " destination_from = wd_this->destination_from " destination_to = wd_this->destination_to " max_rows = wd_this->max_rows " TABLES " date_range = " extension_in = " flight_list = " extension_out = " return = . * store output to context
本文来自博客园,作者:渔歌晚唱,转载请注明原文链接:https://www.cnblogs.com/tangToms/p/16365445.html