Hi,
TYPES : BEGIN OF ty_csks,
kostl like csks-kostl,
prctr like csks-prctr,
END OF ty_csks,
BEGIN OF ty_marc,
matnr type matnr,
werks type werks_d,
END OF ty_marc.
DATA : it_csks TYPE TABLE OF ty_csks,
wa_csks LIKE LINE OF it_csks,
it_marc TYPE TABLE OF ty_marc,
wa_marc LIKE LINE OF it_marc.
.
SELECT KOSTL PRCTR WERKS FROM CSKS INTO TABLE IT_CSKS WHERE KOSTL = 'CHAR' AND
PRCTR = 'CHAR'.
IF SY-SUBRC EQ 0.
MESSAGE 'Data Found' TYPE 'I'.
ELSE.
MESSAGE 'No Data Found' TYPE 'E'.
ENDIF.
SELECT MATNR WERKS PRCTR FROM MARC INTO TABLE IT_MARC WHERE MATNR = 'CHAR' AND
WERKS = 'CHAR' .
IF SY-SUBRC EQ 0.
MESSAGE 'Data Found' TYPE 'I'.
ELSE.
MESSAGE 'No Data Found' TYPE 'E'.
ENDIF.
READ TABLE IT_CSKS INTO WA_CSKS WITH KEY KOSTL = 'CHAR'.
READ TABLE IT_MARC INTO WA_MARC WITH KEY MATNR = 'CHAR'
WERKS = 'CHAR'.
In the above code i had mentioned read statement.I didnt move to final internal table am doing this in uer exit include program. if i move to final internal table then i need to clear waorkarea and i need to call function module ther in outtab = it_final this is the format right.but i dont have idea whether function module works or not in user exits include program if i wil use function modul reuse_alv_grid display then i need to use alv declarations right..so, help me...