vue 部署 abap BSP

How to Create a Vue.Js App with VS Code and Deploy... - SAP Community

详情见上面这个教程连接

Open VS Code and open a terminal window and run

npm install -g @vue/cli


restart vscode.

Open a terminal window again and go to your workspace folder to create the app and app folder with following command. And choose V3.

vue create vue-abap-app


if you get following error -> File C:\Users\xxx\AppData\Roaming\npm\vue.ps1 cannot be loaded
because running scripts is disabled on this system. For more information, see 

Run Set-ExecutionPolicy RemoteSigned  and re-try vue create vue-abap-app

This time you should see new folder and files in your workspace.


Now you can run Vue app. Go to vue-abap-app folder and run.

cd .\vue-abap-app\
npm run serve


You can open a browser and enter following URLS to reach Vue app.

- Local: http://localhost:8080/
- Network: http://192.168.93.237:8080/

You should see screen below.


Our app is ready and running. To stop npm server go to vscode terminal and pres ctrl + c and yes ro stop server.


Now we need to install another tool, ui5uploader, to deploy any js app to SAP Netweaver.

npm install -g nwabap-ui5uploader 


go to root folder of your app and create a '.nwabaprc' file.


Content can be like below, details of SAP connection and publication.

I will be publishing it to my SAP server which runs on Ubuntu virtualbox. That is developer edition. Here is a link with video tutorial if you want to install SAP at home 

:slightly_smiling_face:

{ "base": "./dist", "conn_usestrictssl": false, "conn_server": "http://127.0.0.1:8000/", "conn_client": "001", "conn_user": "developer", "conn_password": "Down1oad", "abap_package": "$TMP", "abap_bsp": "ZVueAbapApp", "abap_bsp_text": "Vue App for SAP" 
} 


Before we build and deploy we need to make sure, we provide production path for source files. Our app will be running on SAP with URL address of 'http://127.0.0.1:8000/sap/bc/ui5_ui5/sap/zvueabapapp/index.html?sap-client=001'. We need to tell vue to look sources under '/sap/bc/ui5_ui5/sap/zvueabapapp/'. Open vue config.js and add following code.

  publicPath: process.env.NODE_ENV === 'production'? '/sap/bc/ui5_ui5/sap/zvueabapapp/': '/'


It should look like below.


Note: that app name is determined in '.nwabaprc' file. If you change app name please change that part too.

 

Now time to build again and deploy to SAP.

npm run build


And deploy to SAP

npx nwabap upload


 

Now, we can see our app in BSPs on SAP.


And also in SICF and test it from there.


Browser will open and should like exactly same as as the page served from local server.

http://vhcalnplci:8000/sap/bc/ui5_ui5/sap/zvueabapapp/index.html?sap-client=001


That is it.

Very simply you can do Vue development and publish it to SAP Netweaver.

In next post, I will show how to create a rest api with abap and use it with vue. I personally don't like oData. I think rest is much more practical and easier to develop and extend. Read my blog on MVC1 applied rest api.  And unfortunately same is true for Fiori. Vue is much more elegant and easier to understand and develop compare to Fiori. Therefore if I can choose one, I will choose Rest + Vue combination.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/755603.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

国密算法 SM9 公钥加密 数字签名 密钥交换 基于身份的密码算法(IBC)完整高效的开源python代码

上篇文章(发布于2023-09-18)给自己挖了个坑,说是要搞定SM9。从国庆前一周开始,到现在一个月时间,这个坑终于填上了。此前信息安全数学基础太差,理解不了SM9双线性对、扩域计算等等,为此还特意选…

服务器与普通电脑的区别,普通电脑是否可以作为服务器使用

服务器在我们日常应用中非常常见,手机APP、手机游戏、PC游戏、小程序、网站等等都需要部署在服务器上,为我们提供各种计算、应用服务。服务器也是计算机的一种,虽然内部结构相差不大,但是服务器的运行速度更快、负载更高、成本更高…

NCCL报错 Bootstrap : no socket interface found 解决

报错 torch.distributed.DistBackendError: NCCL error in: ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1251, internal error - please report this issue to the NCCL developers, NCCL version 2.18.6 ncclInternalError: Internal check failed. Last error: B…

由浅到深认识C语言(6):变量的存储类型

该文章Github地址:https://github.com/AntonyCheng/c-notes 在此介绍一下作者开源的SpringBoot项目初始化模板(Github仓库地址:https://github.com/AntonyCheng/spring-boot-init-template & CSDN文章地址:https://blog.csdn…

想做好国际现货黄金行情交易 请从这样的预期开始

国际现货黄金行情以多变而著称,而这样多变的行情,又由于其趋势稳定,而深受投资者喜爱。我们看近期,国际现货黄金行情不断上涨,短线呈现出很强的上涨趋势,这正是投资者入场交易的好时机,但是要做…

目标检测——PP-YOLOE-R算法解读

PP-YOLO系列,均是基于百度自研PaddlePaddle深度学习框架发布的算法,2020年基于YOLOv3改进发布PP-YOLO,2021年发布PP-YOLOv2和移动端检测算法PP-PicoDet,2022年发布PP-YOLOE和PP-YOLOE-R。由于均是一个系列,所以放一起解…

数据库中DQL、DML、DDL、DCL的概念与区别

目录 DQL (Data Query Language) DML (Data Manipulation Language) DDL (Data Definition Language) DCL (Data Control Language) 数据库语言可以根据其功能被分为几个不同的类别:DQL(数据查询语言)、DML(数据操纵语言&…

多线程实现龟兔赛跑

pos从0到100&#xff0c;代表龟兔距离起点的长度。 兔兔一步10米&#xff0c;每次休息10s&#xff1a; public class Rabbit extends Thread {int pos0;Overridepublic void run() {while(this.pos<100){this.pos10;System.out.println("兔兔的位置&#xff1a;"…

从头手搓一台ros2复合机器人(带机械臂)

一.前言 大家好呀&#xff0c;从本小节开始我们就步入了仿真篇&#xff0c;主要对机器人仿真进行介绍与操作&#xff0c;当然仿真有优点也有缺陷&#xff0c;基于对此学习&#xff0c;我们可以对上几小节创建的小车模型模拟硬件的特性&#xff0c; 比如&#xff1a; 有多重…

洛谷[NOIP2016 提高组] 玩具谜题

[NOIP2016 提高组] 玩具谜题 题目背景 NOIP2016 提高组 D1T1 题目描述 小南有一套可爱的玩具小人&#xff0c;它们各有不同的职业。 有一天&#xff0c;这些玩具小人把小南的眼镜藏了起来。小南发现玩具小人们围成了一个圈&#xff0c;它们有的面朝圈内&#xff0c;有的面…

JetBrains学生包续期

Pycharm进入显示your license has expired 这个意思是你的许可过期了&#xff0c;重新输入最新的激活码就可以了。 1. 说明我的JetBrains学生包需要进行续期了。首先登录JetBrains官网打开个人主页&#xff0c;点击Renew my Education Pack 2. 然后填写一系列信息&#xff0c;…

面经(六)武汉超星

总体评价&#xff1a; 大意了&#xff0c;本来投完简历&#xff0c;然后对方说有没有时间聊一下&#xff0c;我以为就是聊一下技术之外的东西&#xff0c;比如待遇、离职原因之类的东西&#xff0c;没想到上来就是技术面&#xff0c;啥心理准备没有&#xff0c;一通问问给我问…

VR历史建筑漫游介绍|虚拟现实体验店|VR设备购买

VR历史建筑漫游是一种利用虚拟现实技术&#xff0c;让用户可以身临其境地参观和探索历史建筑的体验。通过VR头显和相关设备&#xff0c;用户可以在虚拟环境中自由移动和互动&#xff0c;感受历史建筑的真实氛围和文化内涵。 在VR历史建筑漫游中&#xff0c;您可以选择不同的历史…

手机备忘录怎么导出到电脑,如何将手机备忘录导出到电脑

备忘录是我们日常生活和工作中常用的工具之一&#xff0c;我们可以在手机上轻松地记录重要的事务、想法和灵感。然而&#xff0c;在某些情况下&#xff0c;我们可能需要将手机备忘录导出到电脑进行更详细的整理和管理。那么&#xff0c;手机备忘录怎么导出到电脑&#xff0c;如…

开箱即用之 windows部署jdk、设置nginx、jar自启

jdk安装 官网下载对应的安装包&#xff0c;解压之后放在本地指定的文件夹下 传送门https://www.oracle.com/java/technologies/downloads/#jdk21-windows 我比较喜欢下载zip方式的&#xff0c;解压之后直接能用&#xff0c;不需要安装了 配置环境 JAVA_HOME 添加path路径 …

Echarts折线图x轴不显示全部数据的解决办法,亲测有效

Echarts中&#xff0c;当横轴数据非常多的时候&#xff0c;这时候canvas无法渲染出全部数据的效果图来&#xff0c;可以进行以下配置&#xff0c;亲测有效。 xAxis: {type: "category",axisLabel: {interval: 0,} },type: “category” 这一行&#xff0c;不能省略&…

Solr完结版

Solr是基于Apache Lucene构建的用于搜索和分析的开源解决方案。提供可拓展索引、搜索功能、高亮显示和文字解析功能。本质是一个java web项目&#xff0c;内嵌Jetty服务器&#xff0c;安装方便。 请求Solr中的控制器&#xff0c;处理完数据后把结果相应给客户端 正向索引&#…

MySQL数据导入的方式介绍

MySQL数据库中的数据导入是一个常见操作&#xff0c;它涉及将数据从外部源转移到MySQL数据库表中。在本教程中&#xff0c;我们将探讨几种常见的数据导入方式&#xff0c;包括它们的特点、使用场景以及简单的示例。 1. 命令行导入 使用MySQL命令行工具mysql是导入数据的…

有关【指针运算】的经典笔试题

题目1&#xff1a; #include <stdio.h>int main() {int a[5] { 1, 2, 3, 4, 5 };int* ptr (int*)(&a 1);printf("%d,%d", *(a 1), *(ptr - 1));return 0; } //程序的输出结果是什么&#xff1f; 2 5解析&#xff1a; 代码的内存布局如图&#xff1a…

第二十五章 Web Gateway 管理页面概述 - 可用选项

文章目录 第二十五章 Web Gateway 管理页面概述 - 可用选项Localization 第二十五章 Web Gateway 管理页面概述 - 可用选项 下表显示了 Web Gateway 管理主菜单页面上的可用选项。 Menu ItemActionAbout Web Gateway显示有关 Web 网关的信息&#xff0c;包括 IRIS 发行版的版…