04-02-2009 9:00 AM
data: ZXX type sbook : here ZXX is the workarea.
data: ZYY type TY_BOOKINGS. here ZYY is what ?
note : TY_BOOKINGS is the table type.
Thanks
KR
04-02-2009 9:05 AM
04-02-2009 9:02 AM
Hi,
data: ZXX type sbook
data: ZYY type TY_BOOKINGS.
for the 2nd declaration, ZYY will be an internal table if TY_BOOKINGS is table type. And ZXX will be a work area.
If u want to declare the work area of type TY_BOOKINGS , then u have to take the line type of the TY_BOOKINGS. say for eg..line type for TY_BOOKINGS is LY_BOOKINGS. Then declare as :
DATA: WA_ZYY type LY_BOOKINGS
Keerthi
Edited by: Keerthy K on Apr 2, 2009 10:04 AM
04-02-2009 9:05 AM
04-02-2009 9:17 AM
>
> zyy is also a work area dear
Nonsense. He said it is a table type.
For everyone else: learn about tables without header lines. Tables with header lines is
a) Old fashioned
b) Bad programming
c) Often inefficient
04-02-2009 9:05 AM
04-02-2009 9:45 AM
data: ZXX type sbook : here ZXX is the workarea.
data: ZYY type TY_BOOKINGS. here ZYY is what ?
note : TY_BOOKINGS is the table type.
Here ZYY is also a work area.
If you would have mentioned type standard table of then it would have been internal table.
Regards,
Lalit Mohan Gupta.
04-02-2009 10:21 AM
Hi,
please try this:
create a table type ' zsflight' in se11 transaction using the line type as 'sflight'.
DATA: lt_sflight TYPE zsflight.
DATA: l_lines TYPE i.
PARAMETERS: p_carrid TYPE sflight-carrid.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE lt_sflight
WHERE carrid = p_carrid.
DESCRIBE TABLE lt_sflight LINES l_lines.
IF sy-subrc = 0.
WRITE:/ l_lines.
ENDIF.
Keerthi