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 report

Former Member
0 Likes
2,241

hi guru's,

In alv reports wat is the use of slis.wat slis is this.and wat is the use of it_field_catalog.with out field ctalog can we able to write alv report.pls give me indetail.

use full full points.

thanx

yogi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,202

HI Yogi,

SLIS is a type group.., where all the declaractions required for the ALV list generation are stored !!

and about this FIELDCATALOg..

In the function module we have on parameter I_STRUCTURE .. this parameter accepts the dictionary structures !!

suppose if u are generating an ALV display for the SPFLI table's data . hope u want to print all the fields of the table .. then u can go for the option I_STRUCTURE and pass 'SPFLI' to this parameter !!

Now the list contains all the fields along with their column headings ,, and column widths .. taken from dictionary structure SPFLI..

But if u want to print Onli two fields CARRID and CONNID.. then u cannot use the I_STRUCTURE option.. now u need to go for the FIELDCATALOg..

Here u can prints onli those columns which u want.. u can customize ur ALV list output using this parameter !!

regards,

sai ramesh

hi guru's,

In alv reports wat is the use of slis.wat slis is this.and wat is the use of it_field_catalog.with out field ctalog can we able to write alv report.pls give me indetail.

use full full points.

thanx

yogi

13 REPLIES 13
Read only

Former Member
0 Likes
2,203

HI Yogi,

SLIS is a type group.., where all the declaractions required for the ALV list generation are stored !!

and about this FIELDCATALOg..

In the function module we have on parameter I_STRUCTURE .. this parameter accepts the dictionary structures !!

suppose if u are generating an ALV display for the SPFLI table's data . hope u want to print all the fields of the table .. then u can go for the option I_STRUCTURE and pass 'SPFLI' to this parameter !!

Now the list contains all the fields along with their column headings ,, and column widths .. taken from dictionary structure SPFLI..

But if u want to print Onli two fields CARRID and CONNID.. then u cannot use the I_STRUCTURE option.. now u need to go for the FIELDCATALOg..

Here u can prints onli those columns which u want.. u can customize ur ALV list output using this parameter !!

regards,

sai ramesh

Read only

0 Likes
2,202

hi ramesh,

tht's clear for me.but my doubt is that with out fieldcatalog can we able to write a alv report.if it's possible then wat is the use of field catalog.

thanx

yogi

Read only

0 Likes
2,202

suppose if u are generating an ALV display for the SPFLI table's data . hope u want to print all the fields of the table .. then u can go for the option I_STRUCTURE and pass 'SPFLI' to this parameter !!

Now the list contains all the fields along with their column headings ,, and column widths .. taken from dictionary structure SPFLI..

But if u want to print Onli two fields CARRID and CONNID.. then u cannot use the I_STRUCTURE option.. now u need to go for the FIELDCATALOg..

Here u can prints onli those columns which u want.. u can customize ur ALV list output using this parameter !!

You can color a particular column, you can give different column heading , you can make a particular column editable .., like so many options are there !!

GOTO the documentation of this parameter ( In SE37 transaction open the fm REUSE_ALV_GRID_DISPLA and in this goto the parameter IT_FIELDCATALOG's Documentation)

these many options are there for fieldcatalog paramter !!

wa_fieldcat-row_pos = 2.

wa_fieldcat-col_pos = 3.

wa_fieldcat-fieldname = 'FLTIME'.

wa_fieldcat-tabname =

wa_fieldcat-currency

wa_fieldcat-cfieldname

wa_fieldcat-ctabname

wa_fieldcat-ifieldname

wa_fieldcat-quantity

wa_fieldcat-qfieldname

wa_fieldcat-qtabname

wa_fieldcat-round

wa_fieldcat-exponent

wa_fieldcat-key = 'X'.

wa_fieldcat-key_sel = ' '.

wa_fieldcat-icon = 'X'.

wa_fieldcat-symbol

wa_fieldcat-checkbox

wa_fieldcat-just = 'C'.

wa_fieldcat-no_sign

wa_fieldcat-no_zero = 'X'.

wa_fieldcat-no_out = 'X'.

wa_fieldcat-no_convext =

wa_fieldcat-edit_mask =

wa_fieldcat-emphasize = 'C400'.

wa_fieldcat-fix_column = 'X'.

wa_fieldcat-do_sum = 'X'.

wa_fieldcat-no_sum = 'X'.

wa_fieldcat-hotspot = 'X'.

wa_fieldcat-tech =

wa_fieldcat-outputlen = 6.

wa_fieldcat-offset =

wa_fieldcat-seltext_l = 'Airline Carrierid'.

wa_fieldcat-seltext_m = 'Carrier ID'.

wa_fieldcat-seltext_s = 'Aircarrid'.

wa_fieldcat-ddictxt =

wa_fieldcat-rollname =

wa_fieldcat-datatype =

wa_fieldcat-inttype =

wa_fieldcat-intlen =

wa_fieldcat-lowercase = 'X'.

wa_fieldcat-ref_fieldname = 'CARRID'.

wa_fieldcat-ref_tabname = 'SPFLI'.

wa_fieldcat-roundfieldname =

wa_fieldcat-roundtabname =

wa_fieldcat-decimalsfieldname =

wa_fieldcat-decimalstabname =

wa_fieldcat-decimals_out =

wa_fieldcat-text_fieldname =

wa_fieldcat-reptext_ddic = 'SPFLI DATA'.

wa_fieldcat-ddic_outputlen = 8.

regards,

sai ramesh

Read only

0 Likes
2,202

Your question is very right !!

There is <i>no need</i> of making a field catalog when u are using a standard table from the SAP ..

<b> field catalog is to tell the system what you want to display</b> .. u need it only when :

1. change the order of display of standard table fields or

2.mix tables with join or

3.define your own fields along with standard table fields, then u need to tell the system about it.

Message was edited by:

shweta soni

Read only

0 Likes
2,202

Hi Eswar,

Yes,we can do so.See this standard program<b> BCALV_EDIT_02</b>.

<b>

Here field catalog is not used</b>

<b>

Reward all helpful answers.</b>

Regards,

V.Raghavender

Read only

Former Member
0 Likes
2,202

Hi,

slis is a type pool,in type pools we can define variables and constants.

all the variables which are useful for alv reporting will be available in slis.

with out creating fieldcat alv reporting is not possible.

fieldcat gives the output structue.

but without using reuse_fieldcat_merge we can create a fieldcat manually.

check this code which has two ways of creating fieldcat.

REPORT ZBHALV_LIST_GRID2.

TABLES:MARA.

DATA:BEGIN OF ITAB OCCURS 0,

MATNR LIKE MARA-MATNR,

ERSDA LIKE MARA-ERSDA,

ERNAM LIKE MARA-ERNAM,

MBRSH LIKE MARA-MBRSH,

END OF ITAB.

TYPE-POOLS:SLIS.

DATA:AFIELD TYPE SLIS_FIELDCAT_ALV.

DATA:FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.

DATA:FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.

DATA:EVE TYPE SLIS_T_EVENT WITH HEADER LINE.

DATA:HEAD TYPE SLIS_T_LISTHEADER WITH HEADER LINE.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'ITAB'

  • I_STRUCTURE_NAME = 'ITAB'

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = SY-REPID

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = FIELDCAT1.

CLEAR AFIELD.

AFIELD-Col_pos = 1.

AFIELD-fieldname = 'MATNR'.

AFIELD-KEY = 'X'.

APPEND AFIELD TO FIELDCAT.

CLEAR FIELDCAT.

CLEAR AFIELD.

AFIELD-Col_pos = 2.

AFIELD-fieldname = 'ERSDA'.

AFIELD-KEY = 'X'.

APPEND AFIELD TO FIELDCAT.

CLEAR FIELDCAT.

CLEAR AFIELD.

AFIELD-Col_pos = 3.

AFIELD-fieldname = 'ERNAM'.

APPEND AFIELD TO FIELDCAT.

CLEAR FIELDCAT.

CLEAR AFIELD.

AFIELD-Col_pos = 4.

AFIELD-fieldname = 'MBRSH'.

APPEND AFIELD TO FIELDCAT.

CLEAR FIELDCAT.

EVE-NAME = 'TOP_OF_PAGE'.

EVE-FORM = 'HEADER'.

APPEND EVE.

CLEAR EVE.

EVE-NAME = 'END_OF_LIST'.

EVE-FORM = 'LISTEND'.

APPEND EVE.

CLEAR EVE.

EVE-NAME = 'TOP_OF_LIST'.

EVE-FORM = 'LISTTOP'.

APPEND EVE.

CLEAR EVE.

SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 20 ROWS

.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

  • I_STRUCTURE_NAME = 'ITAB'

IT_FIELDCAT = FIELDCAT1

I_DEFAULT = 'X'

I_SAVE = 'A'

IT_EVENTS = EVE[]

TABLES

T_OUTTAB = ITAB.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

  • I_STRUCTURE_NAME = 'ITAB'

IT_FIELDCAT = FIELDCAT[]

I_DEFAULT = 'X'

I_SAVE = 'A'

IT_EVENTS = EVE[]

TABLES

T_OUTTAB = ITAB.

FORM HEADER.

REFRESH HEAD.

HEAD-TYP = 'H'.

HEAD-INFO = 'GENERAL MATERIAL DATA'.

APPEND HEAD.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = HEAD[].

ENDFORM.

FORM LISTEND.

REFRESH HEAD.

HEAD-TYP = 'H'.

HEAD-INFO = 'END OF THE LIST'.

APPEND HEAD.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = HEAD[].

ENDFORM.

FORM LISTTOP.

REFRESH HEAD.

HEAD-TYP = 'H'.

HEAD-INFO = 'TOP OF THE LIST'.

APPEND HEAD.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = HEAD[].

ENDFORM.

rgds,

bharat.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
2,202

Hi

SLIS is a type group.., where all the declaractions required for the ALV list generation are stored !!

Type-groups: slis.

For better understandability go thru slis once.

Regards,

Sreeram

Read only

Former Member
0 Likes
2,202

hi,

field catalog is used to specify the output display characteristics of the fields.

without field catalog also u can display alv but u have to specify the database table or structure.

Read only

Former Member
0 Likes
2,202

Hi,

SLIS is a TYPE-POOLS, there we have all the global declarations, if you look at this from SE11, there press display, then you will find all the global declarations in this one.

The field catalog is defined in the Data Dictionary through table type LVC_T_FCAT . Each row of the field catalog table explains a field in your output table. Depending on whether a reference structure exists in the DDIC or not, you must at least fill the following fields of the field catalog structure for each field

FIELDNAME

REF_TABLE

REF_FIELD

Regards

Sudheer

Read only

0 Likes
2,202

hi sudheer,

tht's clear for me.but my doubt is that with out fieldcatalog can we able to write a alv report.if it's possible then wat is the use of field catalog.

thanx

yogi

Read only

Former Member
0 Likes
2,202

HI,

All the definitions of internal tables, structures and Constants are declared in a type-pool called SLIS.

u can write an alv report even without field catlog but u need 2 pass the standard structure like spfli, mara to it_structure.

reward points if helpful.

regards,

kiran kumar k

Read only

Former Member
0 Likes
2,202

Hi Yogi,

Check out these links : top one is on slis specifcally,

Reward if useful !!

Read only

Former Member
0 Likes
2,202

Hi Eswar,

SLIS is the standard <b>TYPE GROUP</b>,where definitions are created for global use....

And field catalog is one of the interface parameter,Actually it is internal table.

To set attributes to the fields which are there on the screen.

Say for example: I want the first to be desplayed in RED color,second with some other...

not only this very option are there......see <b>LVC_S_FCAT</b> structure for more info.

Yes,we can do so.See this standard program BCALV_EDIT_02.

<b>

Here field catalog is not used in this standard program.

Just giving Structure itself is enough.</b>

<b>

Reward all helpful answers</b>

Regards,

V.Raghavender.