ABAP Custom code generator dynamic pattern: ZCODEGEN

 In My last post about ABAP editor custom dynamic patterns. I talked about how to create new custom patterns to help you speed up various aspects of your day to day development.

Today I wanted to share with you a Custom dynamic pattern Utility that I built.

Here is what it looks like:

Starting the pattern:

ABAP Editor Custom Dynamic pattern ZCODEGEN

The UI:

ABAP Editor Custom Dynamic pattern ZCODEGEN  UI

Features:

You can declare:
 Types - With auto data declarations(Global/Local) 
 Data 
 Selection Screen - with Validation
 Basic SQL queries
 Setup Config to change prefixes of generated code.

Here is an example of generating a simple report to fetch data based on MATNR from MARA.
Declare Types:

ABAP Editor Custom Dynamic pattern ZCODEGEN Declare Types

Press the get fields button:
ABAP Editor Custom Dynamic pattern ZCODEGEN Get fields




Select field and copy:
ABAP Editor Custom Dynamic pattern ZCODEGEN SElect fields



Set data declaration checkboxes
ABAP Editor Custom Dynamic pattern ZCODEGEN set auto declaration


Move on to the selection screen tab.
ABAP Editor Custom Dynamic pattern ZCODEGEN Selection Screen Tab


Get fields to choose from as a selection screen.
ABAP Editor Custom Dynamic pattern ZCODEGEN choose selection screen Fields


Select field and copy and set obligatory and check table.
ABAP Editor Custom Dynamic pattern ZCODEGEN Copy Selection Screen Fields




Move to the SQL tab.
ABAP Editor Custom Dynamic pattern ZCODEGEN SQLTAB


Select fields for queries either directly or from local declared types, some for where condition and other semantics.

ABAP Editor Custom Dynamic pattern ZCODEGEN SQLTAB  add fields


Hit OK.

ABAP Editor Custom Dynamic pattern ZCODEGEN Generated Code


This is just a small example of how to use the utility. 

Here is the link to the source. ZCODEGEN

Use it as it is or modify it to suit your needs.

As Always, Hope you like the post and use this information in your day to day work.

Popular posts from this blog

ABAP convert internal table to excel (.xlsx) format and Send email or download

ABAP read excel(.XLSX) file to internal table in ABAP using CL_FDT_XL_SPREADSHEET

Application Logging in ABAP