npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

node-r3trans

v2.0.1

Published

NodeJs wrapper for SAP R3trans program

Readme

node-r3trans

npm npm

NodeJs wrapper for SAP R3trans.

Installation

  • Download the R3trans program from SAP Software Download Center
  • Create a directory and extract its content
  • Create a new PATH enviroment variable named R3TRANS_HOME, pointing at the directory that was created earlier
  • Install node-r3trans
npm install node-r3trans

Docker support

For operating systems (e.g. MacOS) that don't support R3trans, support for dockerized R3trans program is now available (since version 2.0.0).

Docker Image build

  • Download the R3trans program from SAP Software Download Center
  • Create a directory and extract its content in a folder named "r3trans"
  • Create a Dockerfile inside the root folder (you should now have Dockerfile and the r3trans folder created earlier)
  • Paste this inside the Dockerfile
FROM --platform=linux/amd64 debian:bookworm-slim AS collector

COPY r3trans /r3trans
RUN chmod +x /r3trans/R3trans

RUN set -eux; \
    mkdir -p /deps; \
    echo "Deps for R3trans:"; ldd /r3trans/R3trans; \
    ldd /r3trans/R3trans \
      | awk '($2 == "=>") {print $3} ($1 ~ /^\//) {print $1}' \
      | sort -u \
      | xargs -I '{}' cp -v --parents '{}' /deps

FROM --platform=linux/amd64 gcr.io/distroless/base-debian12

COPY --from=collector /r3trans /r3trans
COPY --from=collector /deps/ /

ENV LD_LIBRARY_PATH=/r3trans:/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu

ENTRYPOINT ["/r3trans/R3trans"]
  • Go in the root folder and run this command to build the docker image
docker buildx build --platform=linux/amd64 -t local/r3trans:latest .

Usage with dockerized R3trans

Make sure to flag the docker usage in the R3trans constructor:

import { R3trans } from "node-r3trans";
const r3trans = new R3trans({
    useDocker: true
});
r3trans.getVersion().then(version => {
    console.log(version);
}).catch(err => {
    console.error(err);
});

Getting started

Start by testing if the R3trans program is installed correctly and print out its version.

import { R3trans } from "node-r3trans";
const r3trans = new R3trans({
    r3transDirPath: "", //Optional, can be used instead of the R3TRANS_HOME enviroment variable
    tempDirPath: "", //Optional, the R3trans program will generate temporary files, and this folder indicates where they shall be generated. If left blank, defaults to the R3trans program dir path
});
r3trans.getVersion().then(version => {
    console.log(version);
}).catch(err => {
    console.error(err);
});

Transports

A transport data file can always be passed to the instance object methods as a buffer or a string file path.

To verify a transport data file is valid:

r3trans.isTransportValid(buffer).then(valid => {
    console.log("valid", valid);
}).catch(err => {
    console.error(err);
});

Get the R3trans log as a buffer

r3trans.getLogBuffer(buffer, 2).then(log => {
    console.log(log.toString());
}).catch(err => {
    console.error(err);
});

Get transport number

r3trans.getTransportTrkorr(buffer).then(trkorr => {
    console.log("trkorr", trkorr);
}).catch(err => {
    console.error(err);
});

Get table entries

r3trans.getTableEntries(buffer, "TADIR").then(tadir => {
    console.log("tadir", tadir);
}).catch(err => {
    console.error(err);
});