Skip to Content
0
Former Member
Aug 30, 2007 at 04:52 PM

ALV grid display problem...

22 Views

can you please help me tell what is missing in this program....

its giving run time error NO_FIELDCATALOG_AVAILABLE.

Also if possible give a good example for ALV grid program

TABLES: bsak.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.

PARAMETERS : p_bukrs TYPE bsak-bukrs,

p_augdt type bsak-augdt.

thanks!!

points willl be awarded

SELECTION-SCREEN END OF BLOCK B1.

TYPES : BEGIN OF st_bsak ,

bukrs type bsak-bukrs,

lifnr type bsak-lifnr,

augdt type bsak-augdt,

augbl type bsak-augbl,

gjahr type bsak-gjahr,

belnr type bsak-belnr,

budat type bsak-budat,

bldat type bsak-bldat,

hkont type bsak-hkont,

saknr type bsak-saknr,

zlsch type bsak-zlsch,

zlspr type bsak-zlspr,

hbkid type bsak-hbkid,

END OF st_bsak.

DATA it_bsak LIKE bsak OCCURS 0 WITH HEADER LINE.

SELECT bukrs

lifnr

augdt

augbl

gjahr

belnr

budat

bldat

hkont

saknr

zlsch

zlspr

hbkid

FROM bsak

INTO (it_bsak-bukrs,

it_bsak-lifnr,

it_bsak-augdt,

it_bsak-augbl,

it_bsak-gjahr,

it_bsak-belnr,

it_bsak-budat,

it_bsak-bldat,

it_bsak-hkont,

it_bsak-saknr,

it_bsak-zlsch,

it_bsak-zlspr,

it_bsak-hbkid) UP TO 10 ROWS "need to change it to 65000 rows

WHERE bukrs = p_bukrs.

endselect.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_STRUCTURE_NAME = 'st_bsak'

I_GRID_TITLE = 'SALES ORDER INFO'

TABLES

T_OUTTAB = it_bsak

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.