Giter Site home page Giter Site logo

zap's Introduction

ZAP

Tiny DSL in ABAP for rapid report prototyping

Installation

Please visit https://app.assembla.com/spaces/saplink/wiki for installing the NUGG_ZAP.nugg file or simply copy the files in src/ into your system.

Usage

SELECT Syntax

_select '<table name> : <table fields | *> [+ <where condition1> + <where condition2> ...]' <reference variable> <reference variable | zap_null>.

DISPLAY Syntax

_display <reference variable>

Example: Displaying data from table SFLIGHT

INCLUDE zap.

START-OF-SELECTION.
  DATA: r_sflight TYPE REF TO DATA.

  _select 'sflight : carrid connid fldate price currency + carrid = ''AC'' + connid = 820' r_sflight zap_null.
  _display r_sflight.

Example: Displaying data from table SCARR based on data from table SFLIGHT

INCLUDE zap.

START-OF-SELECTION.
  DATA: r_sflight TYPE REF TO DATA,
        r_scarr   TYPE REF TO DATA.

  _select 'sflight : *' r_sflight zap_null.
  _select 'scarr : * + carrid = <t>-carrid' r_scarr r_sflight.
  _display r_scarr.

ZAP supports custom ALV fieldcatalog and layout settings for fine-grained control over report display using the fields defined in the structures slis_fieldcat_alv and slis_layout_alv.

DEFINE FIELD CATALOG Syntax

_deffcat '<field1> <field2> ...'.

ADD FIELD CATALOG Syntax

_addfcat '''<field1>'' ''<field2>'' ...'.

DEFINE LAYOUT Syntax

_deflayout '<field1> <field2> ...'.

ADD LAYOUT Syntax

_addlayout '''<field1>'' ''<field2>'' ...'.

Example: Displaying data from table SFLIGHT using custom field catalog and layout

INCLUDE ZAP.

START-OF-SELECTION.
  DATA: R_SFLIGHT TYPE REF TO DATA.

  _SELECT 'sflight : carrid connid price' R_SFLIGHT ZAP_NULL.
  _DEFFCAT 'col_pos fieldname tabname seltext_m'.
  _ADDFCAT: '''1'' ''connid'' ''sflight'' ''Flight No.''',
            '''2'' ''carrid'' ''sflight'' ''Airline''',
            '''3'' ''price'' ''sflight'' ''Price'''.
  _DEFLAYOUT 'no_vline'.
  _ADDLAYOUT '''X'''.
  _DISPLAY R_SFLIGHT.

License

GPL License 2.0

zap's People

Contributors

abeljohny avatar

Stargazers

 avatar Amaury Van Espen avatar

Watchers

Amaury Van Espen avatar  avatar

Forkers

stone8207

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.