BOBF属性
BOBF基础信息表
/BOBF/OBM_ASSOC
/BOBF/OBM_NODE
Node信息-get_nodedata:
lo_conf TYPE REF TO /bobf/if_frw_configuration,
lt_data TYPE REF TO data,
ls_data TYPE REF TO data,
ls_node TYPE /bobf/s_confro_node.
lo_conf = /bobf/cl_frw_factory=>get_configuration( iv_bo_key = is_delegation-host_bo_key ).
lo_conf->get_node(
EXPORTING iv_node_key = is_delegation-host_node_key
...
VALIDATION
校验(VALIDATION) DATA:
lt_rot TYPE ztca90_i_work_orders,
lt_messages TYPE zers_tt_msg,
ls_msg TYPE symsg,
lv_msg_lifetime TYPE i.
IF eo_message IS NOT BOUND.
eo_message = /bobf/cl_frw_factory=>get_message( ).
ENDIF.
io_read->retrieve(
EXPORTING
iv_node = is_ctx-node_key
it_key = it_key
IMPORTING
et_data = lt_rot ).
LOOP AT lt_rot INTO D ...
DETERMINATION
DETERMINATION控制字段可编辑模式
method /BOBF/IF_FRW_DETERMINATION~EXECUTE.
DATA: lt_header_data TYPE ZTCA90_I_WORK_ORDERS.
" (1) Retrieve the data of the invoice's node instance
io_read->retrieve(
EXPORTING
iv_node = is_ctx-node_key " uuid of the node instance
it_key = it_key " keys given to the determination
IMPORTING
et_data = lt_header_data ). " itab with invoice’s node data
" (2) Cre ...
retrieve
retrieve
FIELD-SYMBOLS:
<lt_data> TYPE INDEX TABLE,
<ls_data> TYPE any,
<fs_value> TYPE any.
data:
lt_key TYPE /bobf/t_frw_key,
lo_srv_mgr TYPE REF TO /bobf/if_tra_service_manager.
lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( is_delegation-host_bo_key ).
CALL METHOD lo_srv_mgr->retrieve
EXPORTING
iv_node_key = is_delega ...
BDC
BDC使用方法Simple transaction call
CALL TRANSACTION ta WITH|WITHOUT AUTHORITY-CHECK [AND SKIP FIRST SCREEN].
Transaction call using batch input table
CALL TRANSACTION ta WITH|WITHOUT AUTHORITY-CHECK
USING bdc_tab { {[MODE mode] [UPDATE upd]}
| [OPTIONS FROM opt] }
[MESSAGES INTO itab].
参数说明MODE 确定批输入的执行模式,可选值如下:
A: 显示所有输入屏幕,如果在 bdc_tab 中包含该屏幕的功能码,则会出现小窗口显示这个功能码。它也是默认值,如果指定不是下面的值,则都 ...
使用SAP标准功能撤回已经释放的请求
1.SE38输入程序RDDIT076,执行2.输入需要撤回的请求号,F8执行
3.双击下面的请求号,在跳出框里面改更改状态为D 可修改,最后保存
4.最后进入SE10或者SE09,查看此请求已经变成可以修改状态。
5.当你再次释放请求时,会发现系统会报:Request has the invalid attribute EXPTIMESTAMP。此时你可以双击请求到请求属性标签页面。删除EXPORT_TIMESTAMP属性即可。
在系统中调用本系统Odata Service
在系统中调用本系统Odata Service服务会提示要求登录,通过一下方法可以跳过登录验证
DATA: lt_request_header TYPE /iwfnd/sutil_property_t,
lv_csrf_uri TYPE string,
mv_status_code TYPE i,
mv_response_body TYPE xstring,
mv_request_body TYPE xstring.
ls_vd-ztyxydm = '913700007456935935'.
ls_vd-name1 = 'XXXX'.
ls_vd-ktokk = 'Z**1'.
ls_vd-country = 'CN'.
ls_vd-region = '1** ...
ABAP加密/解密
AES实现加密DATA: lv_base64 TYPE string,
lv_str TYPE string.
DATA: lv_data TYPE string,
lv_data_xstr TYPE xstring,
lv_key_xstr TYPE xstring,
lv_key_str TYPE string,
lv_iv_xstr TYPE xstring,
lv_iv_str TYPE string,
lv_en_xstr TYPE xstring,
lv_de_xstr TYPE xstring,
lv_de_str TYPE string,
lv_en_str TYPE string.
lv_data = '待加密字符串'.
lv_data_xstr = cl_bcs_convert=>string_to_xstring( iv_string ...
CDSView注解
UI Annotations SAP官方文档
ObjectModel@ObjectModel:{
transactionalProcessingDelegated: true,
writeActivePersistence: 'ZCA90T_001',
semanticKey: 'work_order',
representativeKey: 'db_key',
dataCategory: 'work_type',
createEnabled: true,
updateEnabled: true,
deleteEnabled: false,
draftEnabled: false,
usageType.dataClass: #TRANSACTIONAL,
...
SAP-RESTfull
SAP ERP中实现RESTfull创建类
实现接口:IF_HTTP_EXTENSION
读取Request中Header信息"get request info
lv_path_info = server->request->get_header_field( name = '~path_info' ).
*POST/GET...
lv_request_method = server->request->get_header_field( name = '~request_method' ).
读取Body中的信息lv_json = server->request->get_cdata( ) .
设置Response信息*Header
CALL METHOD server->response->set_header_field( name = 'Allow' value = 'Post ...