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 🙏

© 2024 – Pkg Stats / Ryan Hefner

abapmerge

v0.16.6

Published

Merge ABAP INCLUDEs into single file

Downloads

2,482

Readme

npm version

abapmerge

Merge ABAP INCLUDEs into single file. Function groups are skipped

Building

  • npm install
  • npm test
  • abapmerge -h - to see the parameters

Invocation example

Take src/zabapgit.prog.abap, merge it, rename the program (report statement) to zabapgit_standalone and save to zabapgit.abap in the current directory.

  • abapmerge -f src/zabapgit.prog.abap -c zabapgit_standalone -o zabapgit.abap

How it works

Abapmerge takes a path to the main report and analyzes its code and all files stored in the same directory and all sub-directories.

The resulting code consists of the code of all found ABAP classes and interfaces, regardless of their production use in any part of the resulting report, and contents of ABAP includes found in the main report or the included reports.

Abapmerge expects that the whole directory structure should result into a single executable program and, hence, if it finds an ABAP report that is not directly or indirectly included in the main report, abapmerge terminates its processing without issuing the input.

Abapmerge requires file naming schema compatible with the schema used by abapGit.

Global classes FOR TESTING are skipped.

Pragmas

Abapmerge supports pragmas that can be written inside an abap comment. If written as " comment, then indentation before " is also used for output.

@@abapmerge command params

Currently supported pragmas:

  • include {filename} > {string wrapper}
    • {filename} - path to the file relative to script execution dir (argv[0])
    • {string wrapper} is a pattern where $$ is replaced by the include line
    • $$ is escaped - ' replaced to '' (to fit in abap string), use $$$ to skip escaping
  • include-base64 {filename} > {string wrapper}
    • same is include just that the data is encoded to base64, supposedly the data is binary.
  • include-cua {filename.xml} > {variable}
    • reads XML, presumably a serialized PROG/FUGR, and extracts GUI status (CUA) node from it. Then use it to fill variable. The variable is supposed to be of zcl_abapgit_objects_program=>ty_cua type. Required data definitions are also generated e.g. 'DATA ls_adm LIKE variable-adm'.
  • main void
    • must be included at the very first line of a ABAP program that should be treated as a standalone main report and abamerge should not die with an error if the program is never included.

Examples

...
  " @@abapmerge include somefile.txt > APPEND '$$' TO styletab.
  " @@abapmerge include-cua abapgit.prog.xml > ls_cua
...