Skip to Content

ABAP Report Wizard was a very interesting project that we worked on. The final product not only works, but was downloaded over 2000 times.

The original tool allows the generation of ABAP report via a Wizard that utilizes a SAP graphical tool to define the table join for the data selection. Additionally, the Selection screen, data declaration and end-of-selection events are built.

 

This helps generating ABAP reports, but it is very specific.

 

So, to celebrate the 2000 download mark for the ABAP Report Wizard, I here deliver a reduced version of the tool to help build “Select Join” statements in ABAP.

 

The idea is that now, being a smaller and more generic tool, it will be used by even more people.

 

See a demo of it here:

http://www.beyondtechnologies.ca/downloads/join_wizard.swf

 

1       Installation Guide

(Please make sure you have installed the ABAP Report Wizard Before)

Link: Reduce development costs with ABAP Report Wizard (Community Day Launch in Vegas!) 2007-10-01 

1.1 Download the wizard and instructions

 

ABAP Report Wizard Project on Google Code

 

1.2     Install Source Code via SAPlink

The ABAP Join Wizard was developed on NetWeaver 7.0.  Since it is a much smaller and simpler application, in comparison to the ABAP Report Wizard, it is possible that it will work on earlier releases, but that has not been confirmed. 

The first step is to import the SAPlink nugget file into your system.  If you do not have SAPlink installed on your system, you can download it from http://code.google.com/p/saplink/.  You will also need the following plug-ins which can be downloaded from http://code.google.com/p/saplink-plugins/

Required Plug-ins

•    Function Groups
•    Documentation  “DOCV – SE61 Documentation    docv“

Once you have SAPlink and the required plug-ins installed, you can run the executable program, ZSAPLINK.  Select the radiobutton for “Import Nugget”, and select the nugget file from the file location. Lastly, click the “Execute” button, or hit F8.

IMPORTANT: These instructions work both on SAPLink 0.1.3.  and 0.1.4. If you have a newer version (higher release) you are FINE!

SAPLink installation

Hopefully, the following screen will yield all success messages, signified by the green lights.
Notice that most of the imported objects follow a similar naming convention, and hopefully these objects do not conflict with existing objects in your system.

UPDATE: You might be required to enter a package. You will probably never transport this to other systems (since it is used only in DEV), but it is a good idea to add to a specific self-containing package.

SAPLink Import results
See? It works on 0.1.4…

1.3    Activation of Imported Objects

Next, you need to activate all objects which have been imported. Of course, there are a few ways to do this, but in order to insure a clean activation, follow these steps.

1)    Go to SE80, and select “Inactive Objects” from the object navigator drop down.

Activation 1

 

2)    Open the Class Library. Select ZCL_BT_ABAP_JOIN, then right-click and choose, “Activate”.

Activation 2

3)    Repeat the previous step for class ZCL_BT_ JOIN_SELECTION_FIELDS;

Activation 3

4)    Next, open the Function Groups, select ZWIZ_BT_JOIN_WIZARD, right click and select ACTIVATE;

Actication 4

 

1.4    Creating the Pattern (VERY IMPORTANT !!!)

In SE80,  choose  Utilities -> More Utilities -> Edit Pattern -> Create Pattern.
Creating the Pattern

 In the dialog enter,  Z_JOIN_WIZARD and click the green check.

Creating the Pattern 2

In the pattern editor, enter *$&$MUSTER and click “Save” and then the “Back” button.

Creating the Pattern 3

 

2    How to use the Join Wizard

 

2.1    Starting the Wizard

Now that the pattern has been created, you can now use the wizard.  In SE80, put your cursor on an empty line within the source code editor, and click the pattern button.
How to use it 1

In the dialog, select the radiobutton for “Pattern” and enter the name of the pattern as Z_REPORT_WIZARD and click the green check.  The wizard will then be triggered.

How to use 2

 

2.2    Using the ABAP Report Wizard

This first screen of the wizard is simply for information purposes, click continue to go to the first step of the wizard.  In this step, you will define the data source.  You can either do a single table read, or a table join.  If you select “Table”, you will be asked to enter the name of the table.  If you select “Table Join”, you will be asked to define the table join by clicking the “Define” button.

How to use 3

When you click the “Define” button, you will be presented with a graphical join editor.  Click the “Insert Table” icon on the application toolbar.  Enter the name of the first table in the join.

How to use 4

The table will then be added to the display.

How to use 5

Next, click the “Insert Table” icon on the application toolbar again to add the second table in the join.  Again, give the name of the table and hit enter.  The graphical editor will then display both tables as well as the join condition between the two.  Click the “Back” button to leave the editor.

How to use 6

Continuing to the next step of the wizard, you will need to define the selection criteria. Click “Continue” when finished defining your selection screen.

How to use 7

The next step of the wizard is to define the output fields in your report. Open the node of the specific table an select the fields that you want to be displayed in the ALV Output.  Click “Continue” when finished selecting your output fields.

How to use 8

The last screen is a “Completion” screen.  Simply click the complete button.

How to use 9

The required source code will then be written to your program. Example below:

*———————————————————————-*
* Code generated by ABAP Join Wizard v. 1.0                            *
*———————————————————————-*
* Report Name:                                                         *
* Created by: EXT719                                                   *
* Created on: 2009/02/16 at 23:09:19 EST_                              *
*———————————————————————-*

*———————————————*
*       D A T A   D E C L A R A T I O N       *
*———————————————*

* Types
TYPES: BEGIN OF ty_target,
      mara_matnr  TYPE mara-matnr,
      ersda       TYPE mara-ersda,
      ernam       TYPE mara-ernam,
      laeda       TYPE mara-laeda,
      werks       TYPE marc-werks,
      marc_pstat  TYPE marc-pstat,
      marc_lvorm  TYPE marc-lvorm,
      END OF ty_target.

* Internal tables and work areas
DATA:
      it_data        TYPE TABLE OF ty_target,
      wa_data        LIKE LINE OF it_data.

*———————————————*
*       D A T A   S E L E C T I O N           *
*———————————————*

SELECT a~matnr a~ersda a~ernam a~laeda b~werks b~pstat b~lvorm
  FROM ( mara AS a
           INNER JOIN marc AS b ON a~matnr = b~matnr )
  INTO TABLE it_data   ” <–  Attention ! Field sequence !
  WHERE a~matnr IN so_matnr AND
        a~ersda IN so_ersda AND
        a~ernam IN so_ernam AND
        b~werks IN so_werks ..

 

 

Reference Links below:

ABAP Report Wizard reaches 2000 Downloads! 2009-02-19

SDN Community project ABAP Report Wizard @ ASUG’08 ! 2008-05-02 

ABAP Report Wizard – One of the best kept secrets of SDN… 2008-01-21 

Reduce development costs with ABAP Report Wizard (Community Day Launch in Vegas!) 2007-10-01 

How to Install the ABAP Report Wizard 2007-10-01 

Community Day Vegas: Automate ABAP report generation using ABAP Report Wizard (a true SDN project) 2007-09-17 

SDN Day Session: Using Wizards to Automate ABAP Code Generation  2006-09-19

 

 

 

Leonardo De Araujo

ABAP Report and Join Wizards Team

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Alvaro Tejada Galindo
    Leo:

    Sorry it took me too long to post a comment…But you know I was on vacations -;)
    I love how you manage to deploy this kind of projects…This wizards are really great and shows us the possibilities that ABAP offers us -:D
    Keep on doing such great contributions to the Community!

    Greetings,
    Blag.

    (0) 
    1. Leonardo De Araujo Post author
      Hi Blag,
      Glad you liked it.
      I know it may not be the most up-to-date technology out there, but is something that can help the majority of us in our day-to-day.
      If we can speed up abap development just a bit, it may be enough to give people time to spend it on researching on what new is out there.
      It is still sad a lot of “good” developers don’t even know what SAPLink is…
      I expected more people downloading it though… only 55 so far.. (considering that the original ABAP Report Wizard got 2000 downloads…).

      Leo

      (0) 
    1. Leonardo De Araujo Post author
      As mentioned on the blog, there is one requirement: you need to have the ABAP Report Wizard, since it shares objects with it).

      Please follow link below:
      (Please make sure you have installed the ABAP Report Wizard Before)

      Link: Reduce development costs with ABAP Report Wizard (Community Day Launch in Vegas!) 2007-10-01 

      Leo

      (0) 
  2. Alvaro Olmos
    I im new in abap. I follow the steps until the step 1.3 creating the patter.I can`t create the pattern because I can`t go to Utilities -> More Utilities (I can see the option) I miss some step?, could you help me please.

    My best regards.

    Alvaro

    (0) 
    1. Leonardo De Araujo Post author
      Once you are in SE38 and enter a program and go to the editor , you should be able to see the option Utilities > More Utilities > Create Pattern.

      Leonardo

      (0) 

Leave a Reply