Giter Site home page Giter Site logo

sap / fundamental-tools Goto Github PK

View Code? Open in Web Editor NEW
66.0 4.0 12.0 11.58 MB

Web applications with ABAP, done simple.

License: Apache License 2.0

ABAP 0.21% JavaScript 31.12% TypeScript 2.81% Dockerfile 0.74% HTML 64.40% Shell 0.07% Python 0.64% Batchfile 0.01%
abap sap sap-cloud-platform sap-cloud-sdk fiori web-components javascript typescript python fundamental-library

fundamental-tools's Introduction

Fundamental Library for ABAP

node-rfc release Node.js engines NPM REUSE status npm TypeScript code style: prettier Slack

Build powerful on-premise and cloud extensions of any ABAP system, with minimum coding efforts and maximum performance.

This repository provides two NPM packages

  • abap-api-tools design-time CLI, to enrich your ui componebts with ABAP metadata: data type, length, data binding, user defaults, Value Helps ...
  • abap-value-help run-time API for generic ABAP Value Helps

used to build cloud extensions of ABAP backend systems, using

The web frameworks "etc" under means practically any web framework because configurable by developer.

Few pre-configured docker containers with RFC connectivity are provided in docker folder

Content

Prerequisites

  • Backend: ABAP system on-premise or in the cloud (like SAP S/4HANA Cloud or Steampunk)
  • Frontend: Web app built using above mentioned frameworks
  • No run-time dependencies. Check respective web and server frameworks, mentioned above, for their dependencies and prerequisites
  • Web components "understanding" custom attributes for ABAP metadata and Value Helps are currently implemented using Aurelia web framework and can be ported to other web frameworks with much reuse.

Download and installation

npm install -g abap-api-tools

More info: abap-api-tools/README.md#download-and-installation

Usage

Deployment

Check Deployment options section in Powerful web applications with old and new ABAP systems

Known Issues

Click here to view the current issues.

Getting Support

If you encounter an issue, you can create a ticket.

Contributing

If you want to contribute, please check the CONTRIBUTING.md documentation for contribution guidelines.

Code of Conduct

See Code of Conduct

fundamental-tools's People

Contributors

bsrdjan avatar dependabot[bot] avatar droshev avatar guillaumegarcia13 avatar iamnoah1 avatar marcusnotheis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fundamental-tools's Issues

Possibility to provide abap system details in command instead of reading from config/system.yaml & sapnwrfc.ini

Hi,

Currently using sapnwrfc.ini that contains the required system details that abap-api-tools utilizes to call the BAPI function.
At present only able to use abap executable from '\node_modules.bin" (same path used inside node js script) & it tries to look for sapnwrfc.ini in the same directory.

But since due to permission issue not able to write sapnwrfc.ini in the '\node_modules.bin" & manually creation of same gets removed on every execution of SDK (due to fresh installation of npm packages)

So Is it possible to provide system details as parameters in command itself instead of checking the existence of config/system.yaml file & system details in it so the same command can be used in node script file directly.

(Like : abap get dest:QKX lang:EN user:abc passwd:abc sysnr:00 client:014 ashost:abc QKX STFC_STRUCTURE).

Or is there any way that abap tool doesn't look for sapnwrfc.ini file in the same directory but can read from other directory

Regards
Hari

rfmcall error when called without arguments

When called without any argument, the end of rfmcall output is corrupted:

$ rfmcall
TypeError:

Usage: rfmcall <abap system> <rfm name> [<option>]

where <option> can be:
-h    quick help on rfmcall
-s    save RFM call template to local .js file
-c    cache the metadata into params.json and fields.json
-q    quiet mode, no console echo
-stat echo the number of variables, structures and tables

    at Object.<anonymous> (/home/www-admin/src/NG-APPS/test/node_modules/rfmcall/dist/index.js:16:19)
    at Object.<anonymous> (/home/www-admin/src/NG-APPS/test/node_modules/rfmcall/dist/index.js:56:4)
    at Module._compile (internal/modules/cjs/loader.js:1085:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:791:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

rfmcall does not handle the RAW type properly

The RAW type initialization value is undefined:

$ node dist/index.js MME BAPI_USER_GET_DETAIL | grep undefined
  VALITYINFO                       : undefined, // RAW (16) Validity Information for External ID of a User

Error during handling ABAP function modules w/o parameters

Describe the bug

abap call fails when called for ABAP function module which does not have parameters.

To Reproduce

abap call MME RFC_PING

 MME (en) 

Error: ENOENT: no such file or directory, open 'yaml/parameters.yaml'
    at Object.openSync (node:fs:582:3)
    at Object.readFileSync (node:fs:450:35)
    at Object.fileLoad (/Users/d037732/.nvm/versions/node/v16.6.2/lib/node_modules/abap-api-tools/dist/utils.js:23:34)
    at Object.annotations_read (/Users/d037732/.nvm/versions/node/v16.6.2/lib/node_modules/abap-api-tools/dist/backend.js:645:29)
    at new Frontend (/Users/d037732/.nvm/versions/node/v16.6.2/lib/node_modules/abap-api-tools/dist/frontend.js:34:39)
    at CliHandler.run (/Users/d037732/.nvm/versions/node/v16.6.2/lib/node_modules/abap-api-tools/dist/abap.js:74:38) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'yaml/parameters.yaml'
}

rfmcall Quotation marks missing for ABAP fields with empty defaults

Example:

rfmcall MME /COE/RBP_FE_DATATYPES2
//
// /COE/RBP_FE_DATATYPES2
//

let params = {

  // IMPORT PARAMETERS

  //IV_DECF16                      :     , // DECFLOAT16 
  //IV_DECF34                      :     , // DECFLOAT34 
  //IV_INT2                        :    2, // INT2 (5) 
  //IV_INT4                        :    4, // INT4 (10) 
  //IV_INT8                        :    8, // INT8 
};

result = await client.call("/COE/RBP_FE_DATATYPES2", params);

paths_fix.sh

Describe the bug
script is trying to open non-existing files, also an "not a Mach-0 file" error thrown

To Reproduce
Describe the steps to reproduce the behavior, including:

  1. Console command or API call parameters

/usr/local/sap/nwrfcsdk
❯ sh paths_fix.sh
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: *.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: *.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: libicui18n.50.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: libicui18n.50.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: libicuuc.50.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: rfcexec is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: rfcexec is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: rfcexec is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: rfcexec is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: startrfc is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: startrfc is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: startrfc is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: startrfc is not a Mach-O file
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: ./startrfc is not a Mach-O file
2. Custom configuration, if used
no custom config

Screenshots
See point 1 above

Environment

  • OS: macos 14.1.1 (Sonoma)
  • abap --version output
    ❯ abap --version
    zsh: command not found: abap

Additional context
Not sure if abab is a requirement. I am following instructions on for mac.

Help is much appreciated!

Add ARG common_source to nodejs.Dockerfile and python.Dockerfile

Is your feature request related to a problem? Please describe.
Add ARG common_source to nodejs.Dockerfile and python.Dockerfile similar the ARG sap_source in saplibs.Dockerfile

Describe the solution you'd like
In nodejs.Dockerfile replace:
COPY --chown=${adminuser}:${adminuser} /common/bashrc_nvm.sh /tmp
by:
ARG common_source=/common
COPY --chown=${adminuser}:${adminuser} ${common_source}/bashrc_nvm.sh /tmp

In python.Dockerfile replace:
COPY --chown=${adminuser}:${adminuser} /common/bashrc_pyenv.sh /tmp/
by:
ARG common_source=/common
COPY --chown=${adminuser}:${adminuser} ${common_source}/bashrc_pyenv.sh /tmp/

Value Helps: helpOption indentation shall be fixed

helpOption indentation shall be fixed:

const helpSign = [{ id: 'I', name: 'Include' }, { id: 'E', name: 'Exclude' }];
  const helpOption = [
  { id: 'EQ', name: 'is' },
  { id: 'NE', name: 'is not' },
  { id: 'GT', name: 'greater than' },
  { id: 'LT', name: 'less than' },
  { id: 'GE', name: 'not less' },
  { id: 'LE', name: 'not greater' },
  { id: 'BT', name: 'between' },
  { id: 'NB', name: 'not between' },
  { id: 'CP', name: 'with pattern' },
  { id: 'NP', name: 'w/o pattern' }
  ];

TypeError: L.map is not a function

raised in case of malformed input catalog yaml file, like:

serviceOrder:
  - /COE/RBP_PAM_SERVICE_ORD_CREAT # Create one instance of Service Order object
  - /COE/RBP_PAM_SERV_ORD_CREAT_N # Create Service Order from Notification
  - /COE/RBP_PAM_SERVICE_ORD_GET # Get details of one Service Order object
  - /COE/RBP_PAM_SERVICE_ORD_CC # Calculate costs of one instance of Service Order object
  - /COE/RBP_PAM_SERVICE_ORD_GETL # Get a Service Orders' list
  - /COE/RBP_PAM_SERVICE_ORD_CHANG # Change one instance of Service Order object

/COE/RBP_PAM_SERVICE_ORD_GET:
  header:
    - EV_COST_SUM #

The error message should be fixed, yaml schema validation added

Catching ABAP metadata processing exceptions

Describe the bug

Exceptions from ABAP metadata processing not caught:

abap call MME stfc_connection1 

 MME (en) 

node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "RFM not found: STFC_CONNECTION1".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

To Reproduce
Run abap call MME stfc_connection1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.