当前位置:网站首页>Introduction to T100 interface development steps
Introduction to T100 interface development steps
2022-07-18 13:56:00 【Square wood 2021】
T100 WebService Server End development :
Development process :1. Service registration ;2. Service program checkout ;3. Service program writing ;4. Service program upload
1.azzi700 Register service specification number , Then check it out and you can write the program

2. Declare JSON form Requent and Response The content of
#add-point: Customize customer specific module variables (Module Variable)
PRIVATE TYPE type_detail RECORD # Pass in the detail array
isagseq LIKE isag_t.isagseq, # item
isag001 LIKE isag_t.isag001, # Source type
isag002 LIKE isag_t.isag002, # Source number
isag003 LIKE isag_t.isag003, # Source LN
isag009 LIKE isag_t.isag009, # Item number
isag004 LIKE isag_t.isag004, # Invoice quantity
isag005 LIKE isag_t.isag005, # Invoice unit
isag101 LIKE isag_t.isag101, # Unit price in original currency
isag105 LIKE isag_t.isag105 # After tax amount in original currency
END RECORD
PRIVATE TYPE type_master RECORD # Pass in a single header array
isaf003 LIKE isaf_t.isaf003, # Account customers
isafdocdt LIKE isaf_t.isafdocdt, # Document date
isaf018 LIKE isaf_t.isaf018, # tax rate
isafud001 LIKE isaf_t.isafud001, #EDB Reconciliation No
items DYNAMIC ARRAY OF type_detail
END RECORD
PRIVATE TYPE type_return RECORD # Returns an array of
code LIKE type_t.chr20,
sqlcode LIKE type_t.chr20,
description LIKE type_t.chr1000,
orderNo LIKE type_t.chr50 #EDB Sales return doc No
END RECORD
3. from json Read from request data
# Retrieve datakey Information content
LET g_ent = cl_aws_json_getValue("datakey","EntId")
LET g_company = cl_aws_json_getValue("datakey","CompanyId")
LET l_json_obj = cl_aws_json_getParam()
# Will data Transfer in l_master record
CALL l_json_obj.toFGL(l_master)
IF l_json_obj IS NULL THEN
LET g_status.code = "wss-00216" # Read in json Something went wrong
RETURN
END IF
# Check for incoming datakey Is it empty
IF cl_null(g_ent) THEN
LET g_status.code = "wss-00138"
LET l_str = cl_replace_err_msg(cl_getmsg('wss-00138',g_dlang),'EntId')
LET g_status.description = l_str
RETURN
END IF
IF cl_null(g_company) THEN
LET g_status.code = "wss-00138"
LET l_str = cl_replace_err_msg(cl_getmsg('wss-00138',g_dlang),'CompanyId')
LET g_status.description = l_str
RETURN
END IF
4. return response Of json
# Return value
CALL cl_aws_json_addParam(util.JSONObject.fromFGL(l_return))
stay Server In the development process of the end , There are several common ways :
5. Common function interpretation
cl_aws_json_getValue() Get the field value
cl_aws_json_getParam() Get the whole param paragraph
l_json_obj.toFGL() take param The data conversion of the segment is read into predefined variables
cl_aws_json_addParam(util.JSONObject.fromFGL(l_return)) Automatically add the return variable response Of json in
T100 WebService Client End development :
Declare JSON form Request What is necessary , Refer to the following type_service Of RECORD, Declare these necessities first so that they can be called later :
type type_service RECODE
prod STRING,
name STRING,
ip STRING
END RECODE
Illustrate with examples :
The program starts by announcing that it will call the module variable , Such as type_service, Then initialize these variables , Such as preset parameter content and preset service products 、 The service name 、ip:
After declaring variables :
- initialization JSON Content , Reference resources cl_rest_json_init();
- call addParam() as well as addDatakey() function Add parameter、datakey The action of ;
- through cl_rest_json_invokeSrv() take request Send it out and get the execution status code 、 Return the contents and error messages , When the status code is 0 It means successful execution ;
- Use cl_rest_json_getParam() obtain parameter And put its content through toFGL() This function To turn into RECORD Form so that we can get the information we need , On the contrary, from l_errmsg Get the error message
T100 WebService Client End development ( Zhongtai )
Announce that the application service should be transferred to the main data of the other party's product , And receive the returned main data RECORD
边栏推荐
- Three lines (spring daily question 59)
- 解决Filter中获取body内容报错,getReader() has already been called for this request
- Abbyy finereader 15 standard OCR character recognition and PDF editing software tool
- 2018 Jiangsu Provincial Information and future programming expert competition test question -- (New) chicken and rabbit in the same cage
- [phase locked loop] design and Simulation of all digital phase locked loop based on MATLAB
- [Luogu p2151] HH go for a walk (DP) (matrix multiplication)
- 音频焦点仲裁策略
- 测试/开发程序员幽默的 “自嘲“?印象流派......
- Securities account Guotai Junan? Is it safe?
- Practice Guide for peanut shell inner net penetration
猜你喜欢

测试/开发程序员幽默的 “自嘲“?印象流派......

Golang---------小试牛刀 gin框架文件上传

MySQL - ER model

PageRank的原理和实现

基于SSH的网上商城
![[MySQL] - basic query exercise of database](/img/b3/e80ffcac1d7e0f0392147cbaf7a83a.png)
[MySQL] - basic query exercise of database

Use case interpretation: openinstall multi scenario application analysis

Reading true questions | reading true questions record 2

Installing the g2opy frame

NPM install installation error: gyp info it worked if it ends with OK how to solve it
随机推荐
SQL必知必会挑战题答案
AB控制器 L36ERM_2个处理器之间的通讯
T100接口开发步骤简介
[step on the pit] resurrect Pico go
类型的缩小
A row of "cranes" in the clear sky: Chinese flying cranes with numbers as wings
2018 Jiangsu Provincial Information and future programming expert competition test question -- (New) chicken and rabbit in the same cage
Summary of application packaging and multi terminal compatibility
Audio focus arbitration strategy
Video processing: video sampling
剑指Offer19-正则表达式匹配-字符串-动态规划
What is the master-slave replication principle of MySQL
ORA-600:[qertbGetPartitionNumber:qesma2],[],[],[]
Iptables mask access to a port of IP
自动补全(春季每日一题 58)
Ora-19625 exception handling record
应用打包及多端兼容总结
Dpdk flow filter summary (flow director/ rte_flow)
micro、M3O微服务系列(一)
文献学习(part99)--Fast unfolding of communities in large networks