当前位置:网站首页>OData - API using SAP API hub in SAP S4 op
OData - API using SAP API hub in SAP S4 op
2022-06-27 22:46:00 【Tab Zhu】
I've been studying recently BTP, I saw SAP API Hub There are many, many ready-made API, So I thought of using them in my own OP On , To achieve the purpose of using rapid development
stay SAP S4 OP Use in SAP API Hub Of API
First let's open up SAP API Hub - SAP API Business Hub(api.sap.com), Click on APIs
choice OData V2, Enter... In the right search box Purchase order( If you need anything else API Please modify )
Select first API Click on , stay Overview Interface selection EDMX download
stay S4 OP End SEGW Create a... In the transaction Project
Right click selection Import->Data Model from File
Choose the downloaded API file
Click on Finish, And then click Generate Generate
Generate the corresponding class
Next we ZCL_ZTAB_API_PO_PROCES_DPC_EXT double-click
Click on the way -> Inheritance method , choice A_PURCHASEORDER_GET_ENTITYSET redefinition
Then simply write a get PO Code of order information , Save activation
DATA lt_purchaseorder TYPE
zcl_ztab_api_po_proces_mpc=>tt_a_purchaseorderitemtype.
DATA ls_purchaseorder LIKE LINE OF lt_purchaseorder.
SELECT a~ebeln,b~ebelp,b~werks,b~matnr,b~menge,b~meins
FROM ekko AS a
INNER JOIN ekpo AS b ON b~ebeln = a~ebeln
INTO TABLE @DATA(lt_ekpo)
UP TO 5 ROWS.
IF sy-subrc EQ 0.
LOOP AT lt_ekpo INTO DATA(ls_ekpo).
ls_purchaseorder-purchaseorder = ls_ekpo-ebeln.
ls_purchaseorder-purchaseorderitem = ls_ekpo-ebelp.
ls_purchaseorder-material = ls_ekpo-matnr.
ls_purchaseorder-plant = ls_ekpo-werks.
ls_purchaseorder-purchaseorderitem = ls_ekpo-ebelp.
ls_purchaseorder-orderquantity = ls_ekpo-menge.
ls_purchaseorder-purchaseorderquantityunit = ls_ekpo-meins.
APPEND ls_purchaseorder TO lt_purchaseorder.
CLEAR ls_purchaseorder.
ENDLOOP.
ENDIF.
CHECK lt_purchaseorder IS NOT INITIAL.
et_entityset = lt_purchaseorder. To transaction code /n/iwfnd/maint_service, Click Add Service
We enter the system alias ( Because it was created OData The service is packaged locally , So the input LOCAL), And then do the screening , Choose services , Click add selected service
Select the package directly , Then make sure , Load service
Return to the service maintenance interface : We can see that the service has been added to it
We can click SAP Gateway To test , Click on EntitySets, Select the method we just redefined Set
Click on the perform , We can see PO The data has been retrieved
The copy address opens in the browser , You can also view the returned Json
边栏推荐
- 二维数组中修改代价最小问题【转换题意+最短路径】(Dijkstra+01BFS)
- Login credentials (cookie+session and token token)
- 99 multiplication table - C language
- Golang uses regularity to match substring functions
- 资深猎头团队管理者:面试3000顾问,总结组织出8大共性(茅生)
- Where can I set the slides on the front page of CMS applet?
- Do you know the full meaning of log4j2 configurations? Take you through all the components of log4j2
- 从学生到工程师的蜕变之路
- Basic knowledge of loop traversal and function
- 微服务之服务网关
猜你喜欢

Crontab scheduled task common commands

Consumer finance app user insight in the first quarter of 2022 - a total of 44.79 million people

Deep learning has a new pit! The University of Sydney proposed a new cross modal task, using text to guide image matting

對話喬心昱:用戶是魏牌的產品經理,零焦慮定義豪華

Azure Kinect DK 实现三维重建 (PC非实时版)

渗透学习-sql注入过程中遇到的问题-针对sort=left(version(),1)的解释-对order by后接字符串的理解

改善深层神经网络:超参数调试、正则化以及优化(三)- 超参数调试、Batch正则化和程序框架
扁平数组和JSON树的转换

PE买下一家内衣公司

《7天學會Go並發編程》第7天 go語言並發編程Atomic原子實戰操作含ABA問題
随机推荐
渗透学习-靶场篇-pikachu靶场详细攻略(持续更新中-目前只更新sql注入部分)
Educational Codeforces Round 108 (Rated for Div. 2)
netERR_ CONNECTION_ Refused solution
Basics of operators
九九乘法表——C语言
go语言切片Slice和数组Array对比panic: runtime error: index out of range问题解决
Flask application case
「R」使用ggpolar绘制生存关联网络图
这届考生,报志愿比高考更“拼命”
[suggested collection] ABAP essays-excel-4-batch import recommended
Management system itclub (Part 1)
mysql操作入门(四)-----数据排序(升序、降序、多字段排序)
The "business and Application Security Development Forum" held by the ICT Institute was re recognized for the security capability of Tianyi cloud
Structured machine learning project (II) - machine learning strategy (2)
Crontab scheduled task common commands
Fill in the blank of rich text test
对话乔心昱:用户是魏牌的产品经理,零焦虑定义豪华
资深猎头团队管理者:面试3000顾问,总结组织出8大共性(茅生)
Login credentials (cookie+session and token token)
Exclusive interview with millions of annual salary. What should developers do if they don't fix bugs?