Understanding ABAP List Viewer 2

2. Block Report

This is used to have multiple lists continuously.

The important functions used in this report are:

A. REUSE_ALV_BLOCK_LIST_INIT

B. REUSE_ALV_BLOCK_LIST_APPEND

C. REUSE_ALV_BLOCK_LIST_HS_APPEND

D. REUSE_ALV_BLOCK_LIST_DISPLAY
 

A. REUSE_ALV_BLOCK_LIST_INIT 

Parameters: 

I.   I_CALLBACK_PROGRAM 

II.  I_CALLBACK_PF_STATUS_SET 

III. I_CALLBACK_USER_COMMAND 
 

This function module is used to set the default gui status etc.

B. REUSE_ALV_BLOCK_LIST_APPEND

Parameters : 

Export : 

I.   is_layout   : layout settings for block 

II.  it_fieldcat : field catalog 

III. i_tabname   : internal table name with output data 

IV.  it_events   : internal table with all possible events
 

Tables :

i. t_outtab : internal table with output data.

This function module adds the data to the block. 

Repeat this function for all the different blocks to be displayed one after the other.
 

C. REUSE_ALV_BLOCK_LIST_HS_APPEND

This function module is used for hierarchical sequential blocks. 
 

D. REUSE_ALV_BLOCK_LIST_DISPLAY 

Parameters :  All the parameters are optional. 

This function module display the list with data appended by the above function. 

Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE  can be used.
 

3. Hierarchical reports

Hierarchical sequential list output.

The function module is 

A. REUSE_ALV_HIERSEQ_LIST_DISPLAY

Parameters: 

I.   Export: 

i.   I_CALLBACK_PROGRAM 

ii.  I_CALLBACK_PF_STATUS_SET 

iii. I_CALLBACK_USER_COMMAND 

iv.  IS_LAYOUT 

v.   IT_FIELDCAT 

vi.  IT_EVENTS 

vii. i_tabname_header : Name of the internal table in the program containing the output data of  the highest hierarchy level.

viii. i_tabname_item  : Name of the internal table in the program containing the output data of the lowest hierarchy level.

ix.   is_keyinfo : This structure contains the header and item table field names which link the two tables (shared key). 

II. Tables

i.  t_outtab_header : Header table with data to be output

ii. t_outtab_item   : Name of the internal table in the program containing the output data of  the lowest hierarchy level. 
 
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
 

Important Attributes :

A. col_pos           : position of the column

B. fieldname       : internal fieldname

C. tabname         : internal table name

D. ref_fieldname : fieldname (dictionary)

E. ref_tabname   : table (dictionary)

F. key(1)        : column with key-color

G. icon(1)       : icon

H. symbol(1)     : symbol

I. checkbox(1)   : checkbox

J. just(1)       : (R)ight (L)eft (C)ent.

K. do_sum(1)     : sum up

L. no_out(1)     : (O)blig.(X)no out

M. outputlen     : output length

N. seltext_l     : long key word

O. seltext_m     : middle key word

P. seltext_s     : short key word

Q. reptext_ddic  : heading (ddic)

R. ddictxt(1)    : (S)hort (M)iddle (L)ong

S. datatype      : datatype

T. hotspot(1)    : hotspot

ABAP Tips

Read Also
Understanding ABAP List Viewer 1

Get help for your ABAP problems
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.