‎2008 Aug 22 8:26 AM
hi this is my code to display the large num but i can only see it but how to display it can u help me out.
tables: zdetails1.
data: begin of i_details occurs 0,
rollno like zdetails1-zrollno,
name like zdetails1-zsname,
end of i_details.
BREAK-POINT.
*data: wa like line of i_details.
data: rno type i.
data: rno1 type i.
data: larg type i.
Select zrollno zsname from zdetails1 into table i_details.
sort i_details by rollno descending.
SORT i_details by rollno descending.
Read i_details into wa index 1.
*ENDSELECT.
if sy-subrc = 0.
MESSAGE i009(zsms) with 'records fetched'.
endif.
just abov is my code
‎2008 Aug 22 8:29 AM
sort i_details by rollno descending.
Read i_details index 1 INTO wa.
write: wa-rollno.
‎2008 Aug 22 8:30 AM
‎2008 Aug 22 8:35 AM
Try this code
TABLES: zdetails1.
TYPES : BEGIN OF ty_details,
rollno LIKE zdetails1-zrollno,
name LIKE zdetails1-zsname,
END OF ty_details.
DATA: it_details TYPE TABLE OF ty_details,
wa_details TYPE ty_details.
SELECT
zrollno
zsname FROM zdetails1 INTO TABLE it_details.
SORT it_details BY rollno DESCENDING.
READ TABLE it_details INDEX 1 INTO wa_details.
WRITE 😕 wa_details-rollno.
Regards
Bala Krishna
‎2008 Aug 22 8:41 AM
HI,
Declair a char type.
Assign that large no to it & display.
Regards
Rajendra
‎2008 Aug 22 9:14 AM
Select zrollno zsname from zdetails1 into table i_details.
sort i_details by rollno descending.
if sy-subrc = 0.
MESSAGE i009(zsms) with 'records fetched'.
endif.
loop at idetails into wa.
write:/wa-zroll ,wa-zsname.
endloop.
Hope this helps.
thanks,
Rashmi.
‎2008 Aug 22 9:35 AM
>
> hi this is my code to display the large num but i can only see it but how to display it can u help me out.
>
>
> tables: zdetails1.
>
> data: begin of i_details occurs 0,
> rollno like zdetails1-zrollno,
> name like zdetails1-zsname,
> end of i_details.
Don't use internal tables with header lines; it's bad programming. Anyway, you don't need one. Use MAX. Something like this (may need tweaking).
DATA: BEGIN OF ls_details,
rollno LIKE zdetails1-zrollno,
name LIKE zdetails1-zsname,
END OF ls_details.
SELECT max(zrollno) zsname FROM zdetails1 INTO ls_details.
IF sy-subrc = 0.
" zsms(009) defined as: &1 &2 'records fetched'.
MESSAGE i009(zsms) WITH ls_details-rollno ls_details-name.
WRITE: / ls_details-rollno, ls_details-name, 'records fetched'.
ENDIF.