Batch modification of SAP UI5 OData V4 table controls

A set of step-by-step learning tutorials for SAP UI5 beginners

Tutorial Directory

illustrate

Jerry has been in touch with SAP UI5 since joining the CRM Fiori development team of SAP Chengdu Research Institute in 2014. He has published many articles on the working principle and source code analysis of SAP UI5 in the SAP community and the WeChat public account "Wang Zixi".

In Jerry's article Newbies who know nothing about SAP UI5, which materials are better to start with? As I mentioned, Jerry has come all the way from SAP UI5 rookie. He knows that it is not easy for developers with only ABAP development background to transform to SAP UI5 development field, so I designed this learning tutorial for SAP UI5 beginners in my spare time. , Divide the process of developing a complete SAP UI5 application into several steps, and strive to cover all the knowledge points involved in each step. These knowledge points may not be as in-depth as my UI5 source code analysis series articles, but strive to be easy to understand and easy for SAP UI5 beginners to understand.

The source code of each step of this tutorial is stored on my Github , identified by folders 01, 02, 03, etc. For example, the source code of step 1 is here .

Each step builds on the previous step with several new features added. It is recommended for beginners with zero foundation or little knowledge of SAP UI5 to learn step by step from the first step in order, download these codes to the local, cooperate with the text explanation of the tutorial, and do it yourself to deepen your understanding.

If you have any questions about each step of the tutorial, you are welcome to comment and leave a message in the article corresponding to the steps of the tutorial.

The effect is as follows: the row item of the table is the Input control, after editing a value, press Enter:

Trigger a batch request to the remote OData server:

The batch request contains a PATCH request to persist the changes to the OData server.
PATCH request body:

--batch_id-1648985342895-62
Content-Type:application/http
Content-Transfer-Encoding:binary

PATCH People('angelhuffman') HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:en-US
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true

{
   
   "LastName":"Huffman Jerry4"}
--batch_id-1648985342895-62--

After the persistence is successful, click Refresh, you can see the latest data loaded from the OData server, which already contains the previous modifications:

Refer to this link for specific implementation steps .

Guess you like

Origin blog.csdn.net/i042416/article/details/123942924