With reference to my last blog for creating a Barcode scanner, got one complex business requirement to post it back to SAP for further processing.

I have feeling that for many of our SAP community friends in EWM/ SD/ MM we may have same kind of solution required. this can also be achieved in a way in UI5. But believe me or not SAP AppGyver can bring the solution in max 5 mins.

For the above-mentioned issue you can go ahead as following.

  1. Create an OData With Authentication. Here for quick example, I have taken a No auth V4 OData service created in free tier cloud service.
  2. Continuation to last blog (https://blogs.sap.com/2022/07/11/create-a-low-code-application-with-sap-appgyver-simple-barcode-scanner-application/), open the App View again.
  3. Then click on DATA tab from top.  Data%20Tab
  4. Then Click on “Add Data Resource”. Add%20Data%20Resource
  5. From the Dropdown select “OData Intergration” option. Select%20OData%20Integration
  6. Then a popup page will open for OData related details. You can choose No Authorization/ Bearer Token/ Basic Authentication as your created OData. Authentication%20Type For my example I have not added any authentication so choosing No authorization required. If you choose Bearer Token, then you will have to add Bearer token in the following input box. If you choose basic authentication, then provide username and password in the following box. you can have a standard user for accessing this link. Also, you can have a login page instead for security concern.
  7. Now if any Header parameter is required for the given OData, then select that by clicking add a value. you can add multiple header parameters for this. OData%20Header%20paramFor my example I have no Header param.
  8. Now the most important part comes into pic. You have to add the base URL means URL removing Entity or Entity Set. and click on VERIFY URL button. These will come with the functions in the left pane once URL is accessible. You can select any function like Get/ Create and test it. Once tested ok then SAVE DATA RESOURCE. This will save the schema as well. for accessing the OData service. Verify%20URLGet%20Function%20TestClick%20Test%20for%20GETYou can same way test for Create.Test%20Create%20FunctionIn Schema you will get all field parameters of the OData response.
  9. Finally, click on Save Data Resource. Schema
  10. Click on the SAVE button at top.
  11. Then again click on DATA and go to View. Select%20screen%20View
  12. Now open show logic for Button1 continued from last blog.Open%20Logic
  13.  Add Logic Create record for POST operation. And then Connect it as per following images. Remove existing alert connection by select and delete operation.Logic%20Component%20Create%20recordMap%20Create%20RecordData%20binding%20for%20Create%20Record%20Resource%20Name
  14. For Record binding click on edit binding. And select Output value of another Node. Then Select Scan QR/barcode and inside that select sub node Scan QR/barcode/QR barcode content and click on SAVERecord%20Binding%20step%201Record%20Binding%20step%202Record%20Binding%20step%203
  15. Then go to the Alert component. Then map the Dialog title with Create OData value. Click and map for output value of another node. Then select Create Record node and sub node Create record/Response and value ID. Then click save.Alert%20ComponentAlert%20Component%20Data%20Binding%20step1Alert%20Component%20Data%20Binding%20step2Alert%20Component%20Data%20Binding%20step3Alert%20Component%20Data%20Binding%20step4
  16. You go into the existing Header and change the content “Scan and Submit entry in SAP”(as per business requirement).
  17. Click on the Page and change the Page Name “SAP Data Post(as per business requirement).
  18. Then Finally SAVE the complete app.  SAVE
  19. Then go to launch and test as per earlier blog.
  20. Now open the mobile SAP APPGYVER PREVIEW APP. Click OPEN on the App. Mobile%20App
  21. Then Click Scanner Button and open camera to scan the Barcode.
  22. Click%20to%20ScanSample%20Bar%20Code%20Image
  23. Then get alert once it is posted in SAP successfully. Record%20Posted%20Alert

In conclusion what I can say that you can change the initial screen by adding one Logon Page to make it more interactive and secured. Also, you can show the saved records in List item. As well you can add to use OData for Search/ Filter purpose. This blog is created for you as a basic POC purpose for OData post as I didn’t find many helpful and complete solution on this. Implement it in your project with further criticality. I would be happy if people try this and let me know their thoughts on this. You are always welcome to share your questions in this blog.

Also, you can go ahead on learning from https://docs.appgyver.com/docs/articles

Thank you for following the Blog. Some more consecutive business solutions will come up in shortly for more help.

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x