0
votes

I have a program with a selection screen that produces an alv grid. The ALV grid has a hotspot which sends the user to a new screen which allows users to edit data based on their selection in the alv grid.

This program has a report type screen (selection screen) and dialog screen (the third screen), which type of transaction should i create (report or dialog). Since my starting screen is a default selection screen, should it be a report transaction? Or should i create a screen and make the selection screen a sub screen (if yes, can you please suggest how i do this and create an alv grid with this).

3

3 Answers

1
votes

This program "has a report type", you mean it's an "executable program" AKA "report", so use a "report" transaction, so as you probably tried, what happens?

Only the first screen is of some interest for choosing the type of a transaction.

If it's a selection screen, use a "report" transaction.

If it's a general screen, use a "dialog" transaction.

0
votes

First Program Report Type It should be report transaction. You can also create dialog transaction. If you write dialog transaction for the first ABAP program then you can declare selection screen as subscreen.

Following is the example of selection screen as subscreen.

SELECTION-SCREEN : BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN :  BEGIN OF BLOCK a WITH FRAME TITLE text-001.
PARAMETERS: rdb1 RADIOBUTTON GROUP rad1 DEFAULT 'X'.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rdb2 RADIOBUTTON GROUP rad1,
            p_data TYPE c LENGTH 35 DEFAULT 'Reporting / Maintenance Data'.
SELECTION-SCREEN END OF LINE.
PARAMETERS     rdb3 RADIOBUTTON GROUP rad1.
PARAMETERS     rdb4 RADIOBUTTON GROUP rad1. " Membership Expiry Report
SELECTION-SCREEN :END OF BLOCK a.
SELECTION-SCREEN: END OF SCREEN 1010.

Second ABAP Program Dialog/Report

Second ABAP program can be dialog program or report program for editable ALV.If you create dialog program then you have to create transaction.Report ABAP program you can call directly.

regards,

Umar Abdullah

0
votes

To keep it simple:
if the first line of code in your program logic starts with 'REPORT' go for a "Report" transaction; if not choose a dialog transaction type.

The type of transaction you create should not really matter in this case as long as the screen number of the transaction refers to the selection screen (this is '1000' by default).
As far as the type of program (module pool/dialog or report) goes, both are possible options for your requirement.

I suggest you use a dialog program if you haven't already since they allow for more flexibility and it's generally best practice and easier to stick with these for more complex programs with multiple screens.


Reports vs. Module Pools/Dialog Programs

Reports are generally used for displaying/analyzing data from the database, whilst dialog programs are used when data has to be updated. Another difference is that reports can be run directly and dialog programs can only be executed via a transaction code.