Go on link..

link us with ...

Monday, December 13, 2010

classical ALV report

*&---------------------------------------------------------------------*
*& Report ZKV10 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

REPORT ZKV10 .

TABLES : ZSTUD .

TYPE-POOLS : SLIS.

daTA : GD_REPID LIKE SY-REPID.

types : begin of ST_STUD,
studid type zstud-studid,
studname type zstud-studname,
studadd type zstud-studadd,
studage type zstud-studage,
end of ST_STUD.
data : wa_stud type ST_STUD.

data : A like standard table of wa_stud.

DATA: WA_FCAT TYPE SLIS_FIELDCAT_ALV ,
IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.

*** Selection-screen design

SELECTION-SCREEN : BEGIN OF BLOCK B1 .
SELECT-OPTIONS: S_STUD FOR ZSTUD-STUDID.

SELECTION-SCREEN : END OF BLOCK B1 .





SELECT * FROM ZSTUD INTO TABLE A
WHERE STUDID IN S_STUD.






WA_FCAT-FIELDNAME = 'STUDID'.
WA_FCAT-COL_POS = '1' .
WA_FCAT-OUTPUTLEN = '10'.
WA_FCAT-SELTEXT_L = 'STUDentID'.
APPEND WA_FCAT TO IT_FCAT.

WA_FCAT-FIELDNAME = 'STUDNAME'.
WA_FCAT-COL_POS = '2' .
WA_FCAT-OUTPUTLEN = '8'.
WA_FCAT-SELTEXT_L = 'STUDNAME'.
APPEND WA_FCAT TO IT_FCAT.

WA_FCAT-FIELDNAME = 'STUDADD'.
WA_FCAT-COL_POS = '3' .
WA_FCAT-OUTPUTLEN = '12'.
WA_FCAT-SELTEXT_L = 'STUDADD'.
APPEND WA_FCAT TO IT_FCAT.

WA_FCAT-FIELDNAME = 'STUDAGE'.
WA_FCAT-COL_POS = '4' .
WA_FCAT-OUTPUTLEN = '10'.
WA_FCAT-SELTEXT_L = 'STUDAGE'.
APPEND WA_FCAT TO IT_FCAT.






CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* 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_fcat
* 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 = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = A
* 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.

No comments:

link us...

For Visitors

if you want to publish or Add something on ERP, SAP , SAP FUNCTIONAL, SAP ABAP then mail us along with your email-id. contain must be yours

email-id :- avinashkr_raj@yahoo.com(any email)

email-id :- avinaskr_raj.abap@blogger.com ( use only gmail)