Application Development and Automation 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: 
Read only

ALV

Former Member
0 Likes
1,671

Hi can any one send me ALV documentation and Interactive ALV documentation?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,635

Hi Balu,

6/7/2006 2:09 PM • The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). • Using ALV, we can have three types of reports:

1. Simple Report

2. Block Report

3. Hierarchical Sequential Report

6/7/2006 2:09 PM There are some function modules which will enable to produce the above reports without much effort. All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS .

6/7/2006 2:09 PM SIMPLE REPORT 1. Simple Report The important function modules are:

 Reuse_alv_list_display

 Reuse_alv_fieldcatalog_merge

 Reuse_alv_events_get

 Reuse_alv_commentary_write

 Reuse_alv_grid_display

6/7/2006 2:09 PM BLOCK REPORT This is used to display multiple lists continuously. The important functions used in this report are:

A. REUSE_ALV_BLOCK_LIST_INIT

B. REUSE_ALV_BLOCK_LIST_APPEND

D. REUSE_ALV_BLOCK_HS_LIST_APPEND

C. REUSE_ALV_BLOCK_LIST_DISPLAY

6/7/2006 2:09 PM HIERARCHICAL REPORTS Hierarchical sequential list output. The function module is A. REUSE_ALV_HIERSEQ_LIST_DISPLAY 1. Export: a. I_CALLBACK_PROGRAM b. I_CALLBACK_PF_STATUS_SET c. I_CALLBACK_USER_COMMAND d. IS_LAYOUT

This is simple undestanding material for ALV.

send me your personal mail id then i will send full material for ALV.

Please reward me if it use full.

Hi can any one send me ALV documentation and Interactive ALV documentation?

14 REPLIES 14
Read only

naren112
Explorer
0 Likes
1,635

<b>Balu ,

ALV Abap List Viewer - Im witting abt ALV in brief and I'll send you the documents via email ,send me your email id .

In alv you can write reports that are having extra function , there is no need to write hard coding for a lot of things to get in the List ( o/p) .

Use type pools -- SLIS .

define field catalog ..

call function module like

reuse_alv_list_display / reuse_alv_grid_display

Very simple coding is required to get the reuqired o/p .

if you hav sm doubt ask me ...

Regards ,

Narender .

If helpfull rewards it .</b>

Read only

Former Member
0 Likes
1,635

Thanks Narender

[email protected] is my mail id ....plz send me the documentation..

Regards

balu

Read only

Former Member
0 Likes
1,635

Hi Naren,

Can you please send me the same document ?It would be lots of help to me.

My id is [email protected]

Thanks in advance

Read only

Former Member
0 Likes
1,635

hi Balu,

Go thru the foll link...just copy and paste the example pgms and know the diff.

<a href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm">ALV reporting - Step by step</a>

Rgds,

Jothi.P

*let me know the outcome.

Read only

Former Member
0 Likes
1,635
Read only

Former Member
0 Likes
1,635

hi,

this is an example interactive alv report.

check it.very helpful to understand all.

&----


*& Report ZZ_22038_22098_002 *

*& *

&----


*& This is an Interactive ALV report, where on line slection we can see

*& the secondry list

*&

*& *

&----


REPORT ZZ_22038_22098_002 NO STANDARD PAGE HEADING LINE-SIZE 650

MESSAGE-ID ZZ_9838 .

TYPE-POOLS: SLIS.

*type declaration for values from ekko

TYPES: BEGIN OF I_EKKO,

EBELN LIKE EKKO-EBELN,

AEDAT LIKE EKKO-AEDAT,

BUKRS LIKE EKKO-BUKRS,

BSART LIKE EKKO-BSART,

LIFNR LIKE EKKO-LIFNR,

END OF I_EKKO.

DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,

WA_EKKO TYPE I_EKKO.

*type declaration for values from ekpo

TYPES: BEGIN OF I_EKPO,

EBELN LIKE EKPO-EBELN,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

MENGE LIKE EKPO-MENGE,

MEINS LIKE EKPO-MEINS,

NETPR LIKE EKPO-NETPR,

END OF I_EKPO.

DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,

WA_EKPO TYPE I_EKPO .

*variable for Report ID

DATA: V_REPID LIKE SY-REPID .

*declaration for fieldcatalog

DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.

  • declaration for events table where user comand or set PF status will

  • be defined

DATA: V_EVENTS TYPE SLIS_T_EVENT,

WA_EVENT TYPE SLIS_ALV_EVENT.

  • declartion for layout

DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.

  • declaration for variant(type of display we want)

DATA: I_VARIANT TYPE DISVARIANT,

I_VARIANT1 TYPE DISVARIANT,

I_SAVE(1) TYPE C.

*PARAMETERS : p_var TYPE disvariant-variant.

*Title displayed when the alv list is displayed

DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.

DATA: I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.

INITIALIZATION.

V_REPID = SY-REPID.

PERFORM BUILD_FIELDCATLOG.

PERFORM EVENT_CALL.

PERFORM POPULATE_EVENT.

START-OF-SELECTION.

PERFORM DATA_RETRIEVAL.

PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.

PERFORM DISPLAY_ALV_REPORT.

&----


*& Form BUILD_FIELDCATLOG

&----


  • Fieldcatalog has all the field details from ekko

----


FORM BUILD_FIELDCATLOG.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'EBELN'.

WA_FIELDCAT-SELTEXT_M = 'PO NO.'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'AEDAT'.

WA_FIELDCAT-SELTEXT_M = 'DATE.'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'BUKRS'.

WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'BUKRS'.

WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'LIFNR'.

WA_FIELDCAT-NO_OUT = 'X'.

WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

ENDFORM. "BUILD_FIELDCATLOG

&----


*& Form EVENT_CALL

&----


  • we get all events - TOP OF PAGE or USER COMMAND in table v_events

----


FORM EVENT_CALL.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = V_EVENTS

  • EXCEPTIONS

  • LIST_TYPE_WRONG = 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. "EVENT_CALL

&----


*& Form POPULATE_EVENT

&----


  • Events populated for TOP OF PAGE & USER COMAND

----


FORM POPULATE_EVENT.

READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

IF SY-SUBRC EQ 0.

WA_EVENT-FORM = 'TOP_OF_PAGE'.

MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

WA_EVENT-FORM.

ENDIF.

READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

IF SY-SUBRC EQ 0.

WA_EVENT-FORM = 'USER_COMMAND'.

MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

WA_EVENT-NAME.

ENDIF.

ENDFORM. "POPULATE_EVENT

&----


*& Form data_retrieval

&----


  • retreiving values from the database table ekko

----


FORM DATA_RETRIEVAL.

SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.

ENDFORM. "data_retrieval

&----


*& Form bUild_listheader

&----


  • text

----


  • -->I_LISTHEADEtext

----


FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.

DATA HLINE TYPE SLIS_LISTHEADER.

HLINE-INFO = 'this is my first alv pgm'.

HLINE-TYP = 'H'.

ENDFORM. "build_listheader

&----


*& Form display_alv_report

&----


  • text

----


FORM DISPLAY_ALV_REPORT.

V_REPID = SY-REPID.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = V_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

I_GRID_TITLE = I_TITLE_EKKO

  • I_GRID_SETTINGS =

  • IS_LAYOUT = ALV_LAYOUT

IT_FIELDCAT = I_FIELDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • i_default = 'ZLAY1'

I_SAVE = 'A'

  • is_variant = i_variant

IT_EVENTS = V_EVENTS

TABLES

T_OUTTAB = IT_EKKO

  • 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. "display_alv_report

&----


*& Form TOP_OF_PAGE

&----


  • text

----


FORM TOP_OF_PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_LISTHEADER

  • i_logo =

  • I_END_OF_LIST_GRID =

.

ENDFORM. "TOP_OF_PAGE

&----


*& Form USER_COMMAND

&----


  • text

----


  • -->R_UCOMM text

  • -->, text

  • -->RS_SLEFIELDtext

----


FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN '&IC1'.

READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.

PERFORM BUILD_FIELDCATLOG_EKPO.

PERFORM EVENT_CALL_EKPO.

PERFORM POPULATE_EVENT_EKPO.

PERFORM DATA_RETRIEVAL_EKPO.

PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.

PERFORM DISPLAY_ALV_EKPO.

ENDCASE.

ENDFORM. "user_command

&----


*& Form BUILD_FIELDCATLOG_EKPO

&----


  • text

----


FORM BUILD_FIELDCATLOG_EKPO.

WA_FIELDCAT-TABNAME = 'IT_EKPO'.

WA_FIELDCAT-FIELDNAME = 'EBELN'.

WA_FIELDCAT-SELTEXT_M = 'PO NO.'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'IT_EKPO'.

WA_FIELDCAT-FIELDNAME = 'EBELP'.

WA_FIELDCAT-SELTEXT_M = 'LINE NO'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'I_EKPO'.

WA_FIELDCAT-FIELDNAME = 'MATNR'.

WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'I_EKPO'.

WA_FIELDCAT-FIELDNAME = 'MENGE'.

WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'I_EKPO'.

WA_FIELDCAT-FIELDNAME = 'MEINS'.

WA_FIELDCAT-SELTEXT_M = 'UOM'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-TABNAME = 'I_EKPO'.

WA_FIELDCAT-FIELDNAME = 'NETPR'.

WA_FIELDCAT-SELTEXT_M = 'PRICE'.

APPEND WA_FIELDCAT TO I_FIELDCAT.

CLEAR WA_FIELDCAT.

ENDFORM. "BUILD_FIELDCATLOG_EKPO

&----


*& Form event_call_ekpo

&----


  • we get all events - TOP OF PAGE or USER COMMAND in table v_events

----


FORM EVENT_CALL_EKPO.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = V_EVENTS

  • EXCEPTIONS

  • LIST_TYPE_WRONG = 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. "event_call_ekpo

&----


*& Form POPULATE_EVENT

&----


  • Events populated for TOP OF PAGE & USER COMAND

----


FORM POPULATE_EVENT_EKPO.

READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

IF SY-SUBRC EQ 0.

WA_EVENT-FORM = 'TOP_OF_PAGE'.

MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

WA_EVENT-FORM.

ENDIF.

ENDFORM. "POPULATE_EVENT

&----


*& Form TOP_OF_PAGE

&----


  • text

----


FORM F_TOP_OF_PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_LISTHEADER

  • i_logo =

  • I_END_OF_LIST_GRID =

.

ENDFORM. "TOP_OF_PAGE

&----


*& Form USER_COMMAND

&----


  • text

----


  • -->R_UCOMM text

  • -->, text

  • -->RS_SLEFIELDtext

----


*retreiving values from the database table ekko

FORM DATA_RETRIEVAL_EKPO.

SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.

ENDFORM.

FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.

DATA: HLINE1 TYPE SLIS_LISTHEADER.

HLINE1-TYP = 'H'.

HLINE1-INFO = 'CHECKING PGM'.

ENDFORM.

FORM DISPLAY_ALV_EKPO.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = V_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

I_GRID_TITLE = I_TITLE_EKPO

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = I_FIELDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT =

I_SAVE = 'A'

  • IS_VARIANT =

IT_EVENTS = V_EVENTS

TABLES

T_OUTTAB = IT_EKPO

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.

regards,

bharat.

Read only

Former Member
0 Likes
1,635
Read only

Former Member
0 Likes
1,636

Hi Balu,

6/7/2006 2:09 PM • The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). • Using ALV, we can have three types of reports:

1. Simple Report

2. Block Report

3. Hierarchical Sequential Report

6/7/2006 2:09 PM There are some function modules which will enable to produce the above reports without much effort. All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS .

6/7/2006 2:09 PM SIMPLE REPORT 1. Simple Report The important function modules are:

&#61656; Reuse_alv_list_display

&#61656; Reuse_alv_fieldcatalog_merge

&#61656; Reuse_alv_events_get

&#61656; Reuse_alv_commentary_write

&#61656; Reuse_alv_grid_display

6/7/2006 2:09 PM BLOCK REPORT This is used to display multiple lists continuously. The important functions used in this report are:

A. REUSE_ALV_BLOCK_LIST_INIT

B. REUSE_ALV_BLOCK_LIST_APPEND

D. REUSE_ALV_BLOCK_HS_LIST_APPEND

C. REUSE_ALV_BLOCK_LIST_DISPLAY

6/7/2006 2:09 PM HIERARCHICAL REPORTS Hierarchical sequential list output. The function module is A. REUSE_ALV_HIERSEQ_LIST_DISPLAY 1. Export: a. I_CALLBACK_PROGRAM b. I_CALLBACK_PF_STATUS_SET c. I_CALLBACK_USER_COMMAND d. IS_LAYOUT

This is simple undestanding material for ALV.

send me your personal mail id then i will send full material for ALV.

Please reward me if it use full.

Read only

0 Likes
1,635

Hi Praveen & All,

Please send the documents to me too

thanks in advance,

[email protected]

Read only

Former Member
0 Likes
1,635
Read only

Former Member
Read only

Former Member
0 Likes
1,635

hey, check out this.

Regards rakesh.

REPORT z_alv_chbox_flight_pssr.

TYPE-POOLS: slis.

TYPES:

BEGIN OF ty_sflight ,

check(1),

carrid TYPE sflight-carrid,

connid TYPE sflight-connid,

fldate TYPE sflight-fldate,

END OF ty_sflight.

DATA:

it_sflight TYPE TABLE OF ty_sflight,

is_sflight LIKE LINE OF it_sflight,

it_sbook TYPE TABLE OF sbook,

is_sbook LIKE LINE OF it_sbook,

it_fcatsec TYPE slis_t_fieldcat_alv,

is_fcatsec TYPE slis_fieldcat_alv.

DATA:

it_fcat TYPE lvc_t_fcat,

is_fcat TYPE lvc_s_fcat,

is_layout TYPE lvc_s_layo.

START-OF-SELECTION.

SELECT carrid connid fldate

FROM sflight

INTO CORRESPONDING FIELDS OF TABLE it_sflight

UP TO 100 ROWS.

END-OF-SELECTION.

PERFORM sub_fieldcat USING:

'CHECK' 'IT_SFLIGHT' 'X' 'X' '9' '1',

'CARRID' 'IT_SFLIGHT' ' ' '8' '2' 'CARRID',

'CONNID' 'IT_SFLIGHT' ' ' '10' '3' 'CONNID',

'FLDATE' 'IT_SFLIGHT' ' ' '10' '4' 'FLDATE'.

*is_layout-box_fname = 'CHECK'.

  • is_layout-no_rowmark = 'X'.

*is_layout-stylefname = 'CELLTAB'.

*

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

EXPORTING

i_callback_program = 'Z_ALV_CHBOX_FLIGHT_PSSR'

i_callback_user_command = 'USER_COMMAND1'

i_callback_pf_status_set = 'GRID_STATUS'

is_layout_lvc = is_layout

it_fieldcat_lvc = it_fcat

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.

&----


*& Form sub_fieldcat

&----


  • text

----


  • -->P_0068 text

  • -->P_0069 text

  • -->P_0070 text

  • -->P_0071 text

  • -->P_0072 text

  • -->P_0073 text

----


FORM sub_fieldcat USING p_01 TYPE any

p_02 TYPE any

p_03 TYPE any

p_04 TYPE any

p_05 TYPE any

p_06 TYPE any.

IF p_03 = 'X'.

is_fcat-fieldname = p_01.

is_fcat-tabname = p_02.

is_fcat-checkbox = p_03.

is_fcat-edit = p_04.

is_fcat-outputlen = p_05.

is_fcat-col_pos = p_06.

is_fcat-reptext = 'SELECT'.

ELSE.

is_fcat-fieldname = p_01.

is_fcat-tabname = p_02.

is_fcat-outputlen = p_04.

is_fcat-col_pos = p_05.

is_fcat-reptext = p_06.

ENDIF.

APPEND is_fcat TO it_fcat.

CLEAR is_fcat.

ENDFORM. " sub_fieldcat

&----


*& Form USER_COMMAND1

&----


  • text

----


  • -->W_UCOMM text

  • -->RS_SELFIELDtext

----


FORM user_command1 USING w_ucomm LIKE sy-ucomm rs_selfield TYPE

slis_selfield.

CASE w_ucomm.

WHEN '&IC1'.

READ TABLE it_sflight INTO is_sflight INDEX rs_selfield-tabindex.

SELECT * FROM sbook

INTO TABLE it_sbook

WHERE carrid = is_sflight-carrid

AND connid = is_sflight-connid.

PERFORM display_seclist.

CLEAR it_sbook.

CLEAR it_fcatsec.

WHEN 'DIS'.

ENDCASE.

ENDFORM. "USER_COMMAND1

&----


*& Form DISPLAY_SECLIST

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM display_seclist .

PERFORM sub_fieldcat2 USING:

'CARRID' 'IT_SFBOOK' 'CARRID',

'CONNID' 'IT_SFBOOK' 'CARRID',

'BOOKID' 'IT_SFBOOK' 'BOOKID',

'CUSTOMID' 'IT_SFBOOK' 'CUSTOMID'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = 'Z_ALV_CHBOX_FLIGHT_PSSR'

  • I_CALLBACK_PF_STATUS_SET = ' '

  • i_callback_user_command = 'USER_COMMAND2'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

it_fieldcat = it_fcatsec

  • 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 = 1

  • I_SCREEN_START_LINE = 1

  • I_SCREEN_END_COLUMN = 4

  • I_SCREEN_END_LINE = 4

  • 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_sbook

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. " DISPLAY_SECLIST

&----


*& Form sub_fieldcat2

&----


  • text

----


  • -->P_0278 text

  • -->P_0279 text

  • -->P_0280 text

----


FORM sub_fieldcat2 USING p_01

p_02

p_03.

is_fcatsec-fieldname = p_01.

is_fcatsec-seltext_l = p_03.

is_fcatsec-tabname = p_02.

APPEND is_fcatsec TO it_fcatsec.

CLEAR is_fcatsec.

ENDFORM. " sub_fieldcat2

&----


*& Form GRID_STATUS

&----


  • text

----


  • -->R_STAT text

----


FORM grid_status USING r_stat TYPE slis_t_extab.

SET PF-STATUS 'STATUS'.

ENDFORM. "GRID_STATUS

Read only

Former Member
0 Likes
1,635

Can any body send me ALV Interactive documentation?

Read only

0 Likes
1,635

Balu,

Did you go thru the links in the above threads..?

<a href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm">ALV Interactive Reporting - Step by step.</a>

Rgds,

Jothi.P

<u>** Reward pts for all useful answers.</u>