Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

what is the difference between interactive report and alv interactive repor

Former Member
0 Kudos

what is the difference between interactive report and alv interactive report

could u plz explain clearly.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

ALV interactive report gives many advantages than interactive report like sorting, summing and getting graphics.

An interactive report generally basic list displayed. User double clicks on any valid line or user selects a line and presses as button on the tool bar. Then the corresponding event is triggered.

Regards,

Ferry Lianto

5 REPLIES 5

Former Member
0 Kudos

Hi,

Interactive report looks like normal reports and is created using "write". ALV is ABAP List Viewer and is based on pattern MVC (model view controller). ALV looks more fancy and is easier to program.

Regards,

Wojciech

ferry_lianto
Active Contributor
0 Kudos

Hi,

ALV interactive report gives many advantages than interactive report like sorting, summing and getting graphics.

An interactive report generally basic list displayed. User double clicks on any valid line or user selects a line and presses as button on the tool bar. Then the corresponding event is triggered.

Regards,

Ferry Lianto

0 Kudos

thanks

Former Member
0 Kudos

refer

http://www.sapgenie.com/abap/drill_down_reports.htm

You can find a interactive ALV report here

http://www.sap-img.com/abap/an-interactive-alv-report.htm

also refer

Below threads consist of number of interactive ALV codes:

Regards,

Santosh

Former Member
0 Kudos

Hi Rajesh,

interactive report or alv interactive report , both are same but except the viewer, Abap List Viewer (ALV).

Here in i am placing a sample simple ALV Interactive report.

Just double click on the customer number to go to the next screen.

&----


*& Report ZKAL_ALV_INTERACTIVE_1 *

*& *

&----


*& *

*& *

&----


REPORT ZKAL_ALV_INTERACTIVE_1 .

TYPE-POOLS: SLIS.

&----


TYPES: BEGIN OF TY_KNA1,

KUNNR TYPE KUNNR,

NAME1 TYPE NAME1,

ORT01 TYPE ORT01,

END OF TY_KNA1.

TYPES: BEGIN OF TY_VBAK,

VBELN TYPE VBELN,

ERNAM TYPE ERNAM,

ERDAT TYPE ERDAT,

NETWR TYPE NETWR,

WAERK TYPE WAERK,

END OF TY_VBAK.

&--


WORK AREA & TABLE DECLARATION--

DATA: W_KNA1 TYPE TY_KNA1.

DATA: T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1.

DATA: W_VBAK TYPE TY_VBAK.

DATA: T_VBAK TYPE STANDARD TABLE OF TY_VBAK INITIAL SIZE 1.

&--


FIELDCAT TABLE & WORK AREA--

DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV.

DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.

&----


DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.

DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.

&--


EVENT TABLE AND WORK AREA--

DATA: W_EVENTS TYPE SLIS_ALV_EVENT.

DATA: T_EVENTS TYPE SLIS_T_EVENT.

&----


DATA: W_EVENTS1 TYPE SLIS_ALV_EVENT.

DATA: T_EVENTS1 TYPE SLIS_T_EVENT.

&--


COMMENT TABLE & WORK AREA--

DATA: W_COMMENT TYPE SLIS_LISTHEADER.

DATA: T_COMMENT TYPE SLIS_T_LISTHEADER.

&----


DATA: W_COMMENT1 TYPE SLIS_LISTHEADER.

DATA: T_COMMENT1 TYPE SLIS_T_LISTHEADER.

&----


APPENDING FCAT -

W_FCAT-COL_POS = 1.

W_FCAT-FIELDNAME = 'KUNNR'.

W_FCAT-SELTEXT_M = 'CUST. NO'.

W_FCAT-HOTSPOT = 'X'. "HOT SPOT HAND SYMBOL

W_FCAT-EMPHASIZE = 'C119'. "FOR COLORING THE COLUMN 1

APPEND W_FCAT TO T_FCAT.

CLEAR W_FCAT.

W_FCAT-COL_POS = 2.

W_FCAT-FIELDNAME = 'NAME1'.

W_FCAT-SELTEXT_M = 'CUST. NAME'.

APPEND W_FCAT TO T_FCAT.

W_FCAT-COL_POS = 3.

W_FCAT-FIELDNAME = 'ORT01'.

W_FCAT-SELTEXT_M = 'CITY'.

APPEND W_FCAT TO T_FCAT.

&----


W_FCAT1-COL_POS = 1.

W_FCAT1-FIELDNAME = 'VBELN'.

W_FCAT1-SELTEXT_M = 'ORDER NO'.

W_FCAT1-EMPHASIZE = 'C519'.

APPEND W_FCAT1 TO T_FCAT1.

CLEAR W_FCAT.

W_FCAT1-COL_POS = 2.

W_FCAT1-FIELDNAME = 'ERNAM'.

W_FCAT1-SELTEXT_M = 'NAME OF PARTY'.

APPEND W_FCAT1 TO T_FCAT1.

W_FCAT1-COL_POS = 3.

W_FCAT1-FIELDNAME = 'ERDAT'.

W_FCAT1-SELTEXT_M = 'DATE'.

APPEND W_FCAT1 TO T_FCAT1.

W_FCAT1-COL_POS = 4.

W_FCAT1-FIELDNAME = 'NETWR'.

W_FCAT1-SELTEXT_M = 'ORDER VALUE'.

APPEND W_FCAT1 TO T_FCAT1.

W_FCAT1-COL_POS = 5.

W_FCAT1-FIELDNAME = 'WAERK'.

W_FCAT1-SELTEXT_M = 'CURRENCY'.

APPEND W_FCAT1 TO T_FCAT1.

&--


APPEND COMMENTRY--

W_COMMENT-TYP = 'H'.

W_COMMENT-INFO = 'CUSTOMER DETAILS'.

APPEND W_COMMENT TO T_COMMENT.

CLEAR W_COMMENT.

&--


APPEND EVENTS TABLE--

W_EVENTS-NAME = 'TOP_OF_PAGE'.

W_EVENTS-FORM = 'TOPPAGE'.

APPEND W_EVENTS TO T_EVENTS.

W_EVENTS-NAME = 'USER_COMMAND'.

W_EVENTS-FORM = 'SUB2'.

APPEND W_EVENTS TO T_EVENTS.

W_EVENTS1-NAME = 'TOP_OF_PAGE'.

W_EVENTS1-FORM = 'TOPPAGE1'.

APPEND W_EVENTS1 TO T_EVENTS1.

CLEAR W_EVENTS1.

W_EVENTS1-NAME = 'USER_COMMAND'.

W_EVENTS1-FORM = 'SUB3'.

APPEND W_EVENTS1 TO T_EVENTS1.

&----


SELECT-OPTIONS: CUSTNO FOR W_KNA1-KUNNR.

&----


SELECT KUNNR

NAME1

ORT01 FROM KNA1 INTO TABLE T_KNA1

WHERE KUNNR IN CUSTNO.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZKAL_ALV_INTERACTIVE_12'

I_BACKGROUND_ID = 'BIKE'

I_GRID_TITLE = 'CUSTOMER DETAILS'

IT_FIELDCAT = T_FCAT

IT_EVENTS = T_EVENTS

TABLES

T_OUTTAB = T_KNA1 .

&----


FORM TOPPAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = T_COMMENT

I_LOGO = 'LOGO_ALV'.

ENDFORM. "END OF TOPPAGE SUB.

&----


FORM SUB2 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.

READ TABLE T_KNA1 INTO W_KNA1 INDEX FIELDS1-TABINDEX.

SELECT VBELN

ERNAM

ERDAT

NETWR

WAERK

FROM VBAK

INTO TABLE T_VBAK

WHERE KUNNR = W_KNA1-KUNNR.

&----


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZKAL_ALV_INTERACTIVE_12'

I_BACKGROUND_ID = 'KALEEM'

I_GRID_TITLE = 'LIST OF ORDERS'

IT_FIELDCAT = T_FCAT1

IT_EVENTS = T_EVENTS1

TABLES

T_OUTTAB = T_VBAK.

ENDFORM. "END OF SUB2.

&----


FORM TOPPAGE1.

&--


APPEND COMMENTRYOF SECONDRY SCREEN--

W_COMMENT1-TYP = 'H'.

W_COMMENT1-INFO = 'LIST OF ORDERS'.

APPEND W_COMMENT1 TO T_COMMENT1.

W_COMMENT1-TYP = 'S'.

W_COMMENT1-KEY = 'CUSTOMER'.

W_COMMENT1-INFO = W_KNA1-KUNNR.

APPEND W_COMMENT1 TO T_COMMENT1.

CLEAR W_COMMENT.

W_COMMENT1-TYP = 'A'.

W_COMMENT1-INFO = W_KNA1-NAME1.

APPEND W_COMMENT1 TO T_COMMENT1.

CLEAR W_COMMENT1.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = T_COMMENT1

I_LOGO = 'LOGO_ALV'

.

REFRESH T_COMMENT1.

ENDFORM. "END OF TOPPAGE1

&----


FORM SUB3 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.

READ TABLE T_VBAK INTO W_VBAK INDEX FIELDS1-TABINDEX.

SET PARAMETER ID 'AUN' FIELD W_VBAK-VBELN.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.

ENDFORM.

*&----


U can also find some of the useful codes on WIKI-SDN.

Reward helpful Answers.

Regds,

Kaleem.