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: 

ALV reports

Former Member
0 Kudos

Can anyone tell what is fieldcatalog used in reuse_alv_grid_display

8 REPLIES 8

Former Member
0 Kudos

HI,

it will give u the output(tabular format,column headings,each field type,length,...) structure.

this is the way how we use that function module.

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.

<b>DATA:FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.</b>

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = SY-REPID

I_INTERNAL_TABNAME = 'ITAB'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = SY-REPID

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = <b>FIELDCAT1</b>.

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 =

IT_FIELDCAT = <b>FIELDCAT1</b>

  • I_DEFAULT =

  • I_SAVE =

  • IT_EVENTS =

TABLES

T_OUTTAB = ITAB.

rgds,

bharat.

Former Member
0 Kudos

<b>reuse_alv_grid_display</b> - Output of a simple list (single-line)

Functionality

The function module outputs an internal table with whatever structure in the form of a formatted single- oder multi-line list.

Process:

Passing an internal table with the set of information to be output

Passing a structure with general layout specifications for list layout

Passing a field catalog in the form of an internal table

The field catalog describes the fields to be output in the list.

All interactions performed on the list refer directly to the internal output table. Sorting the list, for example, also involves a resorting of the internal output table passed (since it was passed by reference).

An important factor determining the usability of the tool or of various generic functions (totals, subtotals) is the expected amount of data to be displayed.

The application is responsible for critically testing this aspect and consider it when it comes to decision-making.

Parameters

I_INTERFACE_CHECK

I_BYPASSING_BUFFER

I_BUFFER_ACTIVE

I_CALLBACK_PROGRAM

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

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

I_SAVE

IS_VARIANT

IT_EVENTS

IT_EVENT_EXIT

IS_PRINT

IS_REPREP_ID

I_SCREEN_START_COLUMN

I_SCREEN_START_LINE

I_SCREEN_END_COLUMN

I_SCREEN_END_LINE

I_HTML_HEIGHT_TOP

I_HTML_HEIGHT_END

IT_ALV_GRAPHICS

IT_HYPERLINK

IT_ADD_FIELDCAT

IT_EXCEPT_QINFO

IR_SALV_FULLSCREEN_ADAPTER

E_EXIT_CAUSED_BY_CALLER

ES_EXIT_CAUSED_BY_USER

T_OUTTAB

Exceptions

PROGRAM_ERROR

Function Group

SLVC_FULLSCREEN

reward if useful

paruchuri_nagesh
Active Contributor
0 Kudos

hi

u have to define fieldcatalog by using typepool SLIS

reward if u find useful

regards

Nagesh.Paruchuri

Former Member
0 Kudos

Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields).A field catalog is required for every ALV list output to add desired functionality (i.e. Key, Hotspot, Specific headings, Justify, Col. position etc) to certain fields of the output. If not mentioned specifically, then the defaults are taken.The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module.

Former Member
0 Kudos

hi

<b>Fieldcatelog is having the properties of the fields in ALV...</b>

when we display alv,

<b>2.</b> a) column headings

b) each column widths,

c) blue color for key field

d) format of display

<b>3.</b> All such information,

we have to provide.

<b>4</b>. This information is contained

in an internal table (called field catalogue)

<b>5</b>. This information is

gather from the fields of the internal table

and using data-dictionary.

<b>In Classic ALV check the fieldcat in SLIS type pools...</b>

<b>In OOP's ALV try double clicking the fn modfule LVC_FIELDCATolog...</b>

<b>Please refer the following links.</b>

http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5fed2fe11d2b467006094192fe3/content.htm

http://help.sap.com/saphelp_46c/helpdata/fr/52/5f060de02d11d2b47d006094192fe3/content.htm

http://72.14.203.104/search?q=cache:3pSl4by0cTMJ:www.abap4.it/download/ALV.pdffieldcatalog+ALV&hl=en&gl=in&ct=clnk&cd=16

sample program

http://www.sap-img.com/abap/use-simple-alv-functions-to-make-reporting-easy.htm

Also this link is very good it shows how to build them manually.

http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm

reward points for useful ans

Regards

Vivek

Former Member
0 Kudos

Hi mahesh,

1. when we display alv,

2. a) column headings

b) each column widths,

c) blue color for key field

d) format of display

3. All such information,

we have to provide.

4. This information is contained

in an internal table (called field catalogue)

5. This information is

gather from the fields of the internal table

and using data-dictionary.

7. we can use the standard FM

REUSE_ALV_FIELDCATALOG_MERGE

8. which will automatically construct the field catalogue

from the internal table definitiion.

9. After that, we can, change

the internal table of fieldcatalogue,

to suit as per our needs,

eg. change in column heading

chaning col width,

hiding any column etc.

regards,

amit m.

regards,

amit m.

Former Member
0 Kudos

hi ,

we use SLIS_T_FIELDCAT_ALV

Cheers,

Rohith.

Reward Points If useful.

Former Member
0 Kudos

Hi,

Sample code:

Suppose I_PO_DETAILS is an internal table containing two fields EBELN (PO number) and EBELP (PO item no).

DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV. “Local variable to hold the parameters

for a particular field of the field catalog

CLEAR L_FIELDCAT.

L_FIELDCAT-TABNAME = 'I_PO_DETAILS'.

L_FIELDCAT-FIELDNAME = 'EBELN'.

L_FIELDCAT-KEY = 'X'. “The PO no is made the key field,

“Colored and non scrollable

L_FIELDCAT-HOTSPOT = 'X'. “The po no becomes a hotspot

L_FIELDCAT-SELTEXT_S = ‘P.O No’.

L_FIELDCAT-SELTEXT_M = 'P order No'.

L_FIELDCAT-SELTEXT_L = 'Purchase order No'.

APPEND L_FIELDCAT TO I_FIELDTAB.

CLEAR L_FIELDCAT

L_FIELDCAT-TABNAME = 'I_PO_DETAILS'.

L_FIELDCAT-FIELDNAME = 'EBELN'.

L_FIELDCAT-KEY = 'X'. “The po item no is made the key field,

“Colored and non scrollable

L_FIELDCAT-SELTEXT_S = 'Item No'.

L_FIELDCAT-SELTEXT_M = 'Item No`.

L_FIELDCAT-SELTEXT_L = 'PO Item No'.

APPEND L_FIELDCAT TO I_FIELDTAB.

CLEAR L_FIELDCAT

Thus the catalog for the report output is prepared.

reward if useful.