cancel
Showing results for 
Search instead for 
Did you mean: 

How to build and deploys Apps from BAS (after changes to folder structure in 2102)

Muthu_Prabakara
Explorer
1,066

Hello All,

Has anyone attempted to build and deploy a project from Business Application Studio to S/4 cloud anytime recently? If so, could you please guide us.
Previously the mta.yaml file was available openly in the folder structure, wherein we used to right click and build. Subsequently an .mtar would be generated which we could right click on again and deploy to the org and equivalently chosen space accordingly. But now as per the new documentation we need to just go to the “Task Explorer” and follow through accordingly to build and then subsequently deploy.

I tried following the new documentation, but in vain. It doesn’t work and always ends up in an error. I found the mta.yaml file in the path – node_modules>@sap>us-ui5-tooling>dist>templates. On opening the file I realized that the ID, description and version are some sort of variables which were the issue as being described in the terminal too. So I hard code these values. At this point I could either deploy from the “Task Explorer” or right click on the file and deploy. Both work the same way and it works too. It generated the .mtar file. It can be found in the same path almost - node_modules>@sap>us-ui5-tooling>dist>templates>mta_archives. Now I can either deploy from here (right click) or do it from the task explorer again. Till here it seemed like it works and the deploy would go through, but in vain. It just doesn’t happen. Could anyone guide where I’m going wrong?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

yuval_morad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you add a screen shot

1. Template used for project creation and structure generated

2. Deploy UI

Does the cf deploy work in terminal?

Muthu_Prabakara
Explorer
0 Kudos

The template used for project creation was – Freestyle App.

Generated project structure –

The 2 mta.yaml files available under nide_modules –

Original mta.yaml files was having below:

_schema-version: "3.2"
ID: <%- id %>
description: <%- mtaDescription %>
version: <%- mtaVersion %>

build-parameters:
before-all:
- builder: custom
commands:
- npm install

parameters:
enable-parallel-deployments: true
deploy_mode: html5-repo

modules: []

resources: []



I have edited it to look like this and The other mta.yaml, which is available under the app folder doesn't have the build parameters. That's the only difference between the two

_schema-version: "3.2"

ID: "partnerBudgetReport"

description: "Partner budget report"

version: 0.0.5

build-parameters:

before-all:

- builder: custom

commands:

- npm install

parameters:

enable-parallel-deployments: true

deploy_mode: html5-repo

modules: []

resources: []

Hence 2 options available in the task explorer (when clicked on the “+”) for build –

Terminal after clicking configure on the line item in above screenshot –

After executing the build option on both the line items (observe that the .mtar files have been now created). Not sure which to use, so ran build on both this time around.

The create task window in the task explorer now looks like this in –

Terminal after executing the deploy option (I executed the deploy option in both these items just to be sure as I didn’t know which one is to be used) –

FYI – I also tried running only the first build and deploy option. This is for the mta.yaml file which is directly under the template folder. But in vain. While looking further I found that there are two mta.yaml file and the second one still had the variable declaration of sorts. I made the changes there too and then proceeded to build and deploy from both paths.