Skip to content

Commit

Permalink
- CLI options' duplicates check
Browse files Browse the repository at this point in the history
- Performance improvement of translatiosn texts extraction
- README
  • Loading branch information
bsrdjan committed Feb 1, 2021
1 parent f8dc7c3 commit cda0979
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 56 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ dist
*.yaml

NWRFCSDK

# package json is not in root, only accidentally
/package.json
/package-lock.json
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

3 changes: 3 additions & 0 deletions abap-api-tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*.swp
~*

# local test files
/*.js

# folders
.env
node_modules
Expand Down
26 changes: 13 additions & 13 deletions abap-api-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ npm install -g abap-api-tools

## Usage

Create project folder and maintain ABAP system(s) destinations in `sapnwrfc.ini` file:
Create project folder and maintain ABAP system(s) destinations in `sapnwrfc.ini` file, like:

`sapnwrfc.ini`

Expand All @@ -52,7 +52,7 @@ CLIENT=620
LANG=EN
```

ABAP API for Value Input Help annotations, if implemented in backend system (see [ABAP helpers](https://github.com/SAP/fundamental-tools/tree/master/abap-helpers)), shall be maindefined in `config/system.yaml` file. Use the same destination name like in `sapnwrfc.ini`:
ABAP API for Value Input Help annotations, if exposed in backend system (see [ABAP helpers](https://github.com/SAP/fundamental-tools/tree/master/abap-helpers)), shall be defined in `config/system.yaml` file. Use the same destination name like in `sapnwrfc.ini`:

```yaml
MME:
Expand All @@ -67,11 +67,11 @@ Run `abap` command to show help:
abap
Commands:
abap call <dest> <rfm...> ABAP function module call template
abap get <dest> [rfm...] ABAP API annotations for ui elements
abap make <ui> [rfm...] Create ui elements for ABAP API
abap cp <ui> Copy ui configuration to local config folder
abap rm <ui> Remove local ui configuration
abap call <dest> <rfm...> ABAP function module call template
abap get <dest> [rfm...] ABAP API annotations
abap make <ui> [rfm...] Create ui elements
abap cp <ui> [to] Copy ui configuration to local folder ./config
abap rm <ui> Remove local ui configuration
Options:
--help Show help
Expand Down Expand Up @@ -111,7 +111,7 @@ abap call MME stfc_connection stfc_performance
### ABAP API annotations for ui elements

```shell
abap get MME stfc_connection stfc_performancr bapi_user_get_detail
abap get MME stfc_connection stfc_performance bapi_user_get_detail
```

Call templates are now saved in `api` folder and annnotations for ui elements in `api/yaml`:
Expand All @@ -132,7 +132,7 @@ api

Use `-o` option for output folder other than the default `api`.

Using `-c` option a path to yaml file with ABAP function modules' names can be provided:
Using `-c|--catalog` option a path to yaml file with ABAP function modules' names can be provided:

`my-api.yaml`

Expand Down Expand Up @@ -190,7 +190,7 @@ bapi_whse_to_get_detail.js
bapi_whse_to_get_detail.html
```

The `html` file contains ui components' templates, for each BAPI/RFM parameter and structure/table data field.
The `html` file contains ui elements, for each BAPI/RFM parameter and structure/table data field.

Annoted with:

Expand All @@ -201,7 +201,7 @@ Annoted with:
- Value Input Help: field domain values, check table, elementary or complex search help
- SU3 parameters (User SET/GET parameters)

Ui components look like this (Aurelia example):
Aurelia example:

```html
<ui-input bind="DATA_GENERAL.DISTR_CHAN" shlp.bind="{type: 'SH', id: 'CSH_TVTW'}"
Expand Down Expand Up @@ -283,7 +283,7 @@ abap rm my-ui5

## i18n

Texts for i18n translations are saved in `texts.yaml`, for the language used in `get` command:
Translations' texts are saved in `texts.yaml`, for the language used in `get` command:

```shell
abap get MME -c my-api # default lang = en
Expand All @@ -302,7 +302,7 @@ short:
SCRTEXT_S: Postl Code
```

Texts in additional languages are added using `-t|--text-only` boolean option:
Texts in additional languages are added using `-t|--text-only` flag:

```shell
abap get MME -c my-api --text-only --lang de
Expand Down
91 changes: 66 additions & 25 deletions abap-api-tools/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions abap-api-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "abap-api-tools",
"description": "ABAP api tools",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/sap/fundamental-tools",
"author": "SAP",
"license": "Apache-2.0",
Expand Down Expand Up @@ -55,10 +55,10 @@
"@types/js-yaml": "^4.0.0",
"@types/node": "^14.14.22",
"@types/sprintf-js": "^1.1.2",
"@types/yargs": "^15.0.12",
"@types/yargs": "^16.0.0",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"eslint": "^7.18.0",
"eslint": "^7.19.0",
"jest": "^26.6.3",
"typescript": "^4.1.3"
}
Expand Down
Loading

0 comments on commit cda0979

Please sign in to comment.