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: 

Interactive Report

Former Member
0 Kudos
214

Hi all

What is the pre-requiste or conditons for an interactive report.

With regards

Vijay

10 REPLIES 10

Former Member
0 Kudos
153

An Interactive report is a dynamic drill down report that produces the list on users choice.

Difference from normal classical report or conditions under which it is used:

A) The list produced by classical report doesnu2019t allow user to interact with the system where as the list produced by interactive report allows the user to interact with the system.

B) Once a classical report, executed user looses control where as Interactive, user has control.

C) In classical report, drilling is not possible where as in interactive, drilling is possible.

in interactive report we can switch from one screen to other by making hotspot on for a particular field

thanks

reward points if helpful

Richa Khosla

Edited by: Richa Khosla on May 20, 2008 7:43 AM

Former Member
0 Kudos
153

Hi,

Both are reports, one is basic report with no user interaction, the other is an interactive reort which can handle user interaction and drill down to detailed reports.

Shruthi

Former Member
0 Kudos
153

hi,

Interactive reporting allows the user to participate actively in retrieving and presenting data during the session.

Instead of one extensive and detailed list, with interactive reporting you create a condensed basic list from which the user can call detailed information by positioning the cursor and entering commands.

Interactive reporting thus reduces information retrieval to the data actually required.

Secondary lists allow you to enhance the information presented in the basic list. The user can, for example, select a line of the basic list for which he wants to see more detailed information.

You display these details on a secondary list.Secondary lists may either overlay the basic list completely or you can display them in an extra window on the screen. The secondary lists can themselves be interactive again.

Events

AT LINE-SELECTION

Moment at which the user selects a line by double-clicking on it or by positioning the cursor on it and pressing F2.

AT USER-COMMAND

Moment at which the user presses a function key.

TOP-OF-PAGE DURING LINE-SELECTION Moment during list processing of a secondary list at which a new page starts.

pls reward if helpful.

Former Member
0 Kudos
153

Interactive events needs to be wriiten

Former Member
0 Kudos
153

Interactive Reporting

Purpose

User can actively control the data retrieval and display of data

To create a detailed list from a very basic list

To make a report interactive with another transaction.

Snippets

The detailed data is written on a secondary list.

The secondary list may either completely overlay the first screen or one can display it in a new screen

The secondary lists can be themselves interactive.

The first list may also call a transaction.

There are different events associated with interactive programming. (Again!)

The following are the different events associated with Interactive Reporting

1)At Line-Selection-Event is triggered by either the user double clicking a particular line or using F2 to select it

2)At User-Command- Event triggered by user pressing a function key.

3)At PFn- where n is between 0 to 99. Event triggered on press of a function key. The position of the cursor in the list is irrelevant.

4)Top-of-Page during Line Selection- Event called during list processing when a detailed list is called.

At Line-Selection

When the user triggers the function code PICK, AT LINE-SELECTION is always triggered if the cursor is positioned on a list line.

The function code PICK is, by default, always linked with function key F2 and hence with the mouse double-click.

The processing for the event AT LINE-SELECTION usually generates further list output (the details list) which completely covers the current list display.

At User-Command

The current function code is stored in the system field SY-UCOMM

Some commands used for Interactive Reporting.

Hotspot-

If one drags the mouse over the data displayed in the report using the FORMAT statement then the cursor changes to a Hand with an Outstretched Index finger

Syntax: Format Hotspot On (Off).

Hide-

This command helps you to store the field names based on which one will be doing further processing to get a detailed list. It is written directly after the WRITE statement for a field. When a row is selected the values get automatically filled in the variables for further use.

Syntax: Hide <field-name>.

Get Cursor Command-

Like Hide this is also used for getting the values after selection of a row.

Syntax:

1. GET CURSOR FIELD f. 2. GET CURSOR LINE lin.

please reward if found useful

regards

Palak

Former Member
0 Kudos
153

Hi Vijay,

First you need to create a Basic list ,And suppose if you want to display some particular fields in detail then go fo rinteractive reporting.

For interactive reporting you hve to make use of At line selection

At user command

Top of page during line selection

as per tyour requirements.

*reward if helpful

Rgds

Umakanth

Former Member
0 Kudos
153

Hi,

For Interactive report, first you need to get the data to be displayed.

In classical report , user cannot do any actions on report.

But, in interactive report...he can perform the actions on report.

for that you need to use some event.

1.AT LINE SELECTION -if he performn any action on report itself.

2.AT USER-COMMAND - if he performs any action using menu.

Here I am giving you the sample code.

jus have a luk at it.

REPORT z50871sd_rept_interactiverept NO STANDARD PAGE HEADING.

----


  • STRUCTURE DECLARATIONS

  • INTERNAL TABLE DECLARATIONS

  • WORKAREA DECLARATIONS

----


TYPES : BEGIN OF st_kna1,

kunnr TYPE kna1-kunnr, "CUSTOMER NUMBER

name1 TYPE kna1-name1, "CUSTOMER NAME

END OF st_kna1.

TYPES : BEGIN OF st_vbak,

kunnr TYPE kna1-kunnr,

vbeln TYPE vbak-vbeln, "SALES DOCUMENT NUMBER

erdat TYPE vbak-erdat, "DATE ON WHICH THE RECORD WAS CREATED

audat TYPE vbak-audat, "DOCUMENT DATE

auart TYPE vbak-auart, "SALES DOCUMENT TYPE

ernam TYPE vbak-ernam, "NAME OF PERSON WHO CREATED THE OBJECT.

augru TYPE vbak-augru, "ORDER REASON

END OF st_vbak.

TYPES : BEGIN OF st_vbap,

vbeln TYPE vbak-vbeln,

posnr TYPE vbap-posnr, "SALES DOCUMENT ITEM

matnr TYPE vbap-matnr, "MATERIAL NUMBER

charg TYPE vbap-charg, "BATCH NUMBER

matkl TYPE vbap-matkl, "MATERIAL GROUP

posar TYPE vbap-posar, "ITEM TYPE

END OF st_vbap.

DATA : it_kna1 TYPE STANDARD TABLE OF st_kna1,

it_vbak TYPE STANDARD TABLE OF st_vbak,

it_vbap TYPE STANDARD TABLE OF st_vbap,

wa_kna1 TYPE st_kna1,

wa_vbak TYPE st_vbak,

wa_vbap TYPE st_vbap.

DATA : v_fld(15),

v_kunnr TYPE kna1-kunnr,

v_vbeln TYPE vbak-vbeln.

----


  • SELECT-OPTIONS

  • PARAMETERS

----


SELECT-OPTIONS so_kunnr FOR v_kunnr. "CUSTOMER NUMBER

PARAMETERS : p_max TYPE i. "NUMBER OF HITS

----


  • START-OF-SELECTION

----


START-OF-SELECTION.

PERFORM get_customerdata.

SET PF-STATUS 'MENU1'.

----


  • AT LINE-SELECTION

----


AT LINE-SELECTION.

IF sy-lsind = 1.

PERFORM get_salesheader.

ELSEIF sy-lsind = 2.

PERFORM get_salesitemdata.

ENDIF.

----


  • AT USER-COMMAND

----


AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'DISP'.

PERFORM get_salesheader.

WHEN 'ITEM'.

PERFORM get_salesitemdata.

WHEN 'VA03'.

SET PARAMETER ID 'AUN' FIELD wa_vbak-vbeln.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

ENDCASE.

----


  • TOP-OF-PAGE

----


TOP-OF-PAGE.

ULINE AT /1(56).

WRITE : /1 sy-vline ,

2(15) text-004 COLOR 1 ,

sy-vline ,

20(35) text-005 COLOR 1 ,

sy-vline.

ULINE AT /1(56).

----


  • TOP-OF-PAGE DURING LINE-SELECTION.

----


TOP-OF-PAGE DURING LINE-SELECTION.

CASE sy-lsind.

WHEN 1.

PERFORM get_topofpage1.

WHEN 2.

PERFORM get_topofpage2.

ENDCASE.

----


  • FORM GET_CUSTOMERDATA

----


FORM get_customerdata.

SELECT kunnr name1

FROM kna1

INTO TABLE it_kna1

UP TO p_max ROWS

WHERE kunnr IN so_kunnr.

IF sy-subrc EQ 0.

LOOP AT it_kna1 INTO wa_kna1.

WRITE : / sy-vline,

2(15) wa_kna1-kunnr ,

sy-vline ,

20 wa_kna1-name1,

sy-vline.

HIDE : wa_kna1-kunnr , wa_kna1-name1.

CLEAR wa_kna1.

ENDLOOP.

ULINE AT : /1(56).

ELSE.

MESSAGE w000(z50871msg).

ENDIF.

ENDFORM. "GET_CUSTOMERDATA

----


  • FORM GET_SALESHEADER

----


FORM get_salesheader.

SET PF-STATUS 'MENU2'.

GET CURSOR FIELD v_fld VALUE v_kunnr.

IF v_fld = 'WA_KNA1-KUNNR'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = v_kunnr

IMPORTING

output = v_kunnr.

SELECT kunnr vbeln erdat audat auart ernam augru

FROM vbak

INTO TABLE it_vbak

WHERE kunnr = v_kunnr.

IF sy-subrc EQ 0.

LOOP AT it_vbak INTO wa_vbak.

WRITE : / sy-vline ,

2(22) wa_vbak-vbeln ,

sy-vline,

27(25) wa_vbak-erdat ,

sy-vline ,

55(15) wa_vbak-audat ,

sy-vline ,

73(15) wa_vbak-auart ,

sy-vline,

91(16) wa_vbak-ernam ,

sy-vline,

109(13) wa_vbak-augru,

123 sy-vline.

HIDE : wa_vbak-vbeln.

CLEAR wa_vbak.

ENDLOOP.

ULINE AT : /1(123).

ELSE.

MESSAGE i015(z50871msg).

ENDIF.

ELSE.

MESSAGE i013(z50871msg).

ENDIF.

ENDFORM. "GET_SALESHEADER

----


  • FORM GET_SALESITEMDATA

----


FORM get_salesitemdata.

SET PF-STATUS space.

GET CURSOR FIELD v_fld VALUE v_vbeln.

IF v_fld = 'WA_VBAK-VBELN'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = v_vbeln

IMPORTING

output = v_vbeln.

SELECT vbeln posnr matnr charg matkl posar

FROM vbap

INTO TABLE it_vbap

WHERE vbeln = v_vbeln.

LOOP AT it_vbap INTO wa_vbap.

WRITE : /1 sy-vline,

2(13) wa_vbap-posnr ,

sy-vline,

18(18) wa_vbap-matnr ,

sy-vline,

40(13) wa_vbap-charg ,

sy-vline,

56(16) wa_vbap-matkl ,

sy-vline,

75 wa_vbap-posar,

112 sy-vline.

CLEAR wa_vbap.

ENDLOOP.

ULINE AT : /1(112).

ELSE.

MESSAGE i014(z50871msg).

ENDIF.

ENDFORM. "GET_SALESITEMDATA

----


  • FORM GET_TOPOFPAGE1

----


FORM get_topofpage1.

ULINE AT : /1(123).

WRITE : / sy-vline ,

2 text-000 ,

wa_kna1-kunnr ,

75 text-001 ,

wa_kna1-name1,

123 sy-vline.

ULINE AT : /1(123).

WRITE : / sy-vline ,

2(22) text-006 COLOR 1,

sy-vline,

27(25) text-007 COLOR 1 ,

sy-vline ,

55(15) text-008 COLOR 1 ,

sy-vline ,

73(15) text-009 COLOR 1 ,

sy-vline,

91(16) text-010 COLOR 1 ,

sy-vline,

109(13) text-011 COLOR 1,

123 sy-vline.

ULINE AT : /1(123).

ENDFORM. "GET_TOPOFPAGE1

----


  • FORM GET_TOPOFPAGE2

----


FORM get_topofpage2.

ULINE AT : /1(112).

WRITE : / sy-vline ,

2 text-000 ,

wa_kna1-kunnr ,

35 text-001 ,

wa_kna1-name1 ,

85 text-003 ,

wa_vbak-vbeln ,

112 sy-vline.

ULINE AT : /1(112).

WRITE : /1 sy-vline,

2(13) text-012 COLOR 1,

sy-vline,

18(18) text-013 COLOR 1 ,

sy-vline,

40(13) text-014 COLOR 1 ,

sy-vline,

56(16) text-015 COLOR 1 ,

sy-vline,

75 text-016 COLOR 1 ,

112 sy-vline.

ULINE AT : /1(112).

ENDFORM. "GET_TOPOFPAGE2

Reward Points if helpful.

Regards

Sandeep Reddy

Former Member
0 Kudos
153

hi,

step by step understanding of interactive report. go through it, it will give u an idea wat an interactive report and how to code it.

INTERACTIVE REPORT:

CONCEPT:

With interactive reporting, the user can actively control data retrieval and display during the session. Instead of an extensive and detailled list, you create a basic list with condensed information from which the user can switch to detailed displays by positioning the cursor and entering commands ("interactively").

The detailed information appears in secondary lists. Secondary lists may either overlay the basic list completely or you can display them in an extra window on the screen. The secondary lists can themselves be interactive again.

EVENTS:

Event keyword Event

AT LINE-SELECTION Event triggered by the user double-clicking a line or selecting it using F2

AT USER-COMMAND Event triggered by the user pressing a function key

TOP-OF-PAGE DURING LINE-SELECTION Event during list processing when a new page begins on a detail list

DETAIL OR SECONDARY LIST:

Detail lists allow you to present more information than is contained in the basic list. The user can, for example, select a line of the basic list for which he or she wants to see more detailed information. You then display the extra information in a detail list.

This method requires that you have previously stored the contents of the selected line within the program.

To do this, you use the ABAP statement HIDE, which saves the field contents for the current line. When you start a detail list for a list line that has HIDE fields, the system places their values into the corresponding variables in the program.

In the program code, insert the HIDE statement directly after the WRITE statement for the current line.

HIDE: WA-CONNID, WA-CARRID.

This statement tells the system to store the fields WA-CONNID and WA-CARRID and to place their contents back into the fields on a detail list.

In addition to the HIDE statement, you need an event that occurs as soon as the user selects a line. The event keyword for a double-click is AT LINE-SELECTION. It is also triggered when the user presses F2 or chooses a function with the function code PICK.

USER INTERFACE:

The system automatically creates a user interface for your lists, which contains the basic list functions such as save, print, and so on. However, if you want to add extra functions to your lists, you must define your own list status. This also allows you to change the window title.

To create a new status, use the Menu Painter. With the Menu Painter, you can create menus and application toolbars. You can also assign function keys to certain functions.

SET PF-STATUS u2018STATUSu2019.

Note that you must specify the status name u2018STATUSu2019 in uppercase letters.

1. Check the syntax and save your program.

2. Double-click the name <STATUS>. A dialog box appears, asking you whether you want to create the status <STATUS>. Choose Yes.

3. Enter a short description for the status you want to create.

4. Choose List as status type. The system then automatically copies the standard list functions into your status.

5. Choose Continue. The Maintain status dialog box appears.

6. Expand the menu bar.

7. Choose Display standards.

The standard menus appear in the menu bar:

8. Replace the name of menu <List> with Flight data.

9. Double-click the Flight data menu.

A list of the standard menu entries appears. To define a menu entry, enter a value in the Func. column.

10. Place the cursor into the top line of the menu and choose Edit  Insert  Entry.

11. Enter the menu entry PICK in the Code column.

Function code PICK triggers the event AT LINE-SELECTION.

12. Expand the function key setting section of the Menu Painter editor. Choose Merge list functions.

13. Expand the application toolbar section of the Menu Painter editor.

14. Into the first input field of the application toolbar, enter function code PICK and press ENTER .

15. A dialog box appears. Assign the function to function key F2.

The system automatically assigns an icon to this function, since in the recommended function key settings the function code PICK is predefined with this icon.

16. Choose Interface  Activate to activate the status.

You can now use the interface in your program.

17. Choose Back. This closes the Menu Painter and returns you to the ABAP Editor.

18. In the next line of the program, activate the GUI title using the statement:

SET TITLEBAR u2018TITLEBARu2019.

19. Check the syntax and activate your program.

20. Double-click the name <TITLEBAR>. A dialog box appears, asking you whether you want to create the title. Choose Yes.

21. Enter a title for your list and choose Save. The system then returns you to the ABAP Editor.

22. Run the program. The system displays the basic list with the newly-defined GUI title and status. Test the functions you defined.

reward points if helpful

regards

mano

Former Member
0 Kudos
153

hi here i am giving example to you. if it is helpfull give rewards.

Code listing for: ZTEST_ALV_USR_CMD_INCL

Description: Include ZTEST_ALV_USR_CMD_INCL

&----


*& Include ZTEST_ALV_USR_CMD_INCL

&----


REPORT Z_VIPUL_PROG31_ALV_USER_CMD NO STANDARD PAGE HEADING.

TYPE-POOLS : SLIS.

TABLES : SFLIGHT.

TYPES : BEGIN OF ST_SFLIGHT,

CARRID TYPE SFLIGHT-CARRID,

CONNID TYPE SFLIGHT-CONNID,

FLDATE TYPE SFLIGHT-FLDATE,

PRICE TYPE SFLIGHT-PRICE,

END OF ST_SFLIGHT.

DATA : IT_SFLIGHT TYPE STANDARD TABLE OF ST_SFLIGHT,

IT_LISTHEADER TYPE SLIS_T_LISTHEADER,

IT_FC_SFLIGHT TYPE SLIS_T_FIELDCAT_ALV,

IT_UC_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT,

SY_REPID TYPE SY-REPID.

PARAMETERS : PCARR TYPE SFLIGHT-CARRID.

Extracted by Direct Download Enterprise version 1.3.1 - E.G.Mellodew. 1998-2005 UK. Sap Release 700

main programm/..............................

Code listing for: Z_VIPUL_PROG31_ALV_USER_CMD

Description: Program Z_VIPUL_PROG31_ALV_USER_CMD

&----


*& Report Z_VIPUL_PROG31_ALV_USER_CMD

*&

&----


*&

*&

&----


******************************************************************

******************************************************************

include ZTEST_ALV_USR_CMD_INCL.

******************************************************************

******************************************************************

INITIALIZATION.

******************************************************************

PERFORM CREATE_FIELD_CATALOG.

PERFORM FILL_IT_LISTHEADER.

PERFORM BUILD_TOP_OF_PAGE.

SY_REPID = SY-CPROG.

*******************************************************************

START-OF-SELECTION.

*******************************************************************

PERFORM FILL_IT_SFLIGHT.

PERFORM SHOW_ALV_GRID_INITIAL.

*******************************************************************

&----


*& Form CREATE_FIELD_CATALOG

&----


  • text

-


  • --> p1 text

  • <-- p2 text

-


FORM CREATE_FIELD_CATALOG .

DATA WA_FC_SFLIGHT TYPE SLIS_FIELDCAT_ALV.

CLEAR WA_FC_SFLIGHT.

WA_FC_SFLIGHT-COL_POS = 1.

WA_FC_SFLIGHT-FIELDNAME = 'CARRID'.

WA_FC_SFLIGHT-TABNAME = 'SFLIGHT'.

WA_FC_SFLIGHT-EMPHASIZE = 'C311'.

WA_FC_SFLIGHT-SELTEXT_L = 'AIRLINE ID'.

WA_FC_SFLIGHT-SELTEXT_M = 'AIRLINE ID'.

WA_FC_SFLIGHT-SELTEXT_S = 'CARR ID'.

WA_FC_SFLIGHT-REF_FIELDNAME = 'CARRID'.

WA_FC_SFLIGHT-REF_TABNAME = 'SCARR'.

WA_FC_SFLIGHT-OUTPUTLEN = 20.

APPEND WA_FC_SFLIGHT TO IT_FC_SFLIGHT.

CLEAR WA_FC_SFLIGHT.

WA_FC_SFLIGHT-COL_POS = 2.

WA_FC_SFLIGHT-FIELDNAME = 'CONNID'.

WA_FC_SFLIGHT-TABNAME = 'SFLIGHT'.

WA_FC_SFLIGHT-EMPHASIZE = 'C400'.

WA_FC_SFLIGHT-SELTEXT_L = 'CONNECTION ID'.

WA_FC_SFLIGHT-SELTEXT_M = 'CONNECTION ID'.

WA_FC_SFLIGHT-SELTEXT_S = 'CONN. ID'.

WA_FC_SFLIGHT-REF_FIELDNAME = 'CONNID'.

WA_FC_SFLIGHT-REF_TABNAME = 'SPFLI'.

WA_FC_SFLIGHT-OUTPUTLEN = 15.

APPEND WA_FC_SFLIGHT TO IT_FC_SFLIGHT.

CLEAR WA_FC_SFLIGHT.

WA_FC_SFLIGHT-COL_POS = 3.

WA_FC_SFLIGHT-FIELDNAME = 'FLDATE'.

WA_FC_SFLIGHT-TABNAME = 'SFLIGHT'.

WA_FC_SFLIGHT-EMPHASIZE = 'C510'.

WA_FC_SFLIGHT-SELTEXT_L = 'FLIGHT DATE'.

WA_FC_SFLIGHT-SELTEXT_M = 'FLIGHT DATE'.

WA_FC_SFLIGHT-SELTEXT_S = 'FLDATE'.

WA_FC_SFLIGHT-OUTPUTLEN = 15.

APPEND WA_FC_SFLIGHT TO IT_FC_SFLIGHT.

CLEAR WA_FC_SFLIGHT.

WA_FC_SFLIGHT-COL_POS = 4.

WA_FC_SFLIGHT-FIELDNAME = 'PRICE'.

WA_FC_SFLIGHT-TABNAME = 'SFLIGHT'.

WA_FC_SFLIGHT-EMPHASIZE = 'C601'.

WA_FC_SFLIGHT-SELTEXT_L = 'PRICE'.

WA_FC_SFLIGHT-SELTEXT_M = 'PRICE'.

WA_FC_SFLIGHT-SELTEXT_S = 'PRICE'.

WA_FC_SFLIGHT-INPUT = 'X'.

WA_FC_SFLIGHT-DO_SUM = 'X'.

WA_FC_SFLIGHT-EDIT = 'X'.

WA_FC_SFLIGHT-OUTPUTLEN = 15.

APPEND WA_FC_SFLIGHT TO IT_FC_SFLIGHT.

ENDFORM. " CREATE_FIELD_CATALOG

&----


*& Form FILL_IT_LISTHEADER

&----


  • text

-


  • --> p1 text

  • <-- p2 text

-


FORM FILL_IT_LISTHEADER .

DATA: WA_LISTHEADER TYPE SLIS_LISTHEADER, " WORK AREA FOR IT_LISTHEADER

TEXT TYPE STRING,

DT(10) TYPE C,

TM(8) TYPE C.

"### ADD FIRST LINE. ###

WA_LISTHEADER-TYP = 'H'.

WA_LISTHEADER-INFO = 'EXM. OF ALV GRID WITH USER COMMAND'.

APPEND WA_LISTHEADER TO IT_LISTHEADER.

CLEAR WA_LISTHEADER.

"### GET SYSTEM DATE & TIME. ###

WRITE SY-DATUM TO DT DD/MM/YYYY.

WRITE SY-UZEIT TO TM USING EDIT MASK '__:__:__' .

"### ADD SECOND LINE. ###

CONCATENATE 'Date :' DT INTO TEXT SEPARATED BY SPACE.

WA_LISTHEADER-TYP = 'S'.

WA_LISTHEADER-INFO = TEXT.

APPEND WA_LISTHEADER TO IT_LISTHEADER.

CLEAR WA_LISTHEADER.

"### ADD THIRD LINE. ###

CONCATENATE 'Time :' TM INTO TEXT SEPARATED BY SPACE.

WA_LISTHEADER-TYP = 'A'.

WA_LISTHEADER-INFO = TEXT.

APPEND WA_LISTHEADER TO IT_LISTHEADER.

CLEAR WA_LISTHEADER.

ENDFORM. " FILL_IT_LISTHEADER

&----


*& Form BUILD_TOP_OF_PAGE

&----


  • text

-


  • --> p1 text

  • <-- p2 text

-


FORM BUILD_TOP_OF_PAGE .

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_LISTHEADER

I_LOGO = 'VC-ERP'

  • I_END_OF_LIST_GRID =

  • I_ALV_FORM =

.

ENDFORM. " BUILD_TOP_OF_PAGE

&----


*& Form SHOW_ALV_GRID_INITIAL

&----


  • text

-


  • --> p1 text

  • <-- p2 text

-


FORM SHOW_ALV_GRID_INITIAL .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = SY_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'SHOW_SELECETED_DATA'

I_CALLBACK_TOP_OF_PAGE = 'BUILD_TOP_OF_PAGE '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

I_GRID_TITLE = 'LIST OF FLIGHT.'

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = IT_FC_SFLIGHT

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = IT_SFLIGHT

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " SHOW_ALV_GRID_INITIAL

&----


*& Form SHOW_SELECETED_DATA

&----


  • text

-


  • -->UCOMM text

  • -->SELFIELD text

-


FORM SHOW_SELECETED_DATA USING UCOMM TYPE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.

DATA WA_SFLIGHT TYPE ST_SFLIGHT.

CLEAR IT_UC_SFLIGHT.

READ TABLE IT_SFLIGHT INTO WA_SFLIGHT INDEX SELFIELD-TABINDEX.

SELECT * FROM SFLIGHT

INTO TABLE IT_UC_SFLIGHT

WHERE CARRID = WA_SFLIGHT-CARRID

AND CONNID = WA_SFLIGHT-CONNID

AND FLDATE = WA_SFLIGHT-FLDATE.

PERFORM ALV_GRID_FOR_SELTEXT.

ENDFORM. "SHOW_SELECETED_DATA

&----


*& Form ALV_GRID_FOR_SELTEXT

&----


  • text

-


  • --> p1 text

  • <-- p2 text

-


FORM ALV_GRID_FOR_SELTEXT .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = SY_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

I_STRUCTURE_NAME = 'SFLIGHT'

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

  • IT_FIELDCAT =

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

I_SCREEN_START_COLUMN = 5

I_SCREEN_START_LINE = 15

I_SCREEN_END_COLUMN = 120

I_SCREEN_END_LINE = 20

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = IT_UC_SFLIGHT

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " ALV_GRID_FOR_SELTEXT

&----


*& Form FILL_IT_SFLIGHT

&----


  • text

-


  • --> p1 text

  • <-- p2 text

-


FORM FILL_IT_SFLIGHT .

SELECT CARRID CONNID FLDATE PRICE FROM SFLIGHT

INTO TABLE IT_SFLIGHT

WHERE CARRID = PCARR.

ENDFORM. " FILL_IT_SFLIGHT

regards,

Vipul.

Former Member
0 Kudos
153

u can make max 20. interactive plus 1 main report so total 21