2006 Dec 27 8:47 AM
Hi Experts,
How to get serial numbers in ALV's ?
Thanks & Regards,
Sreedhar.
2006 Dec 27 8:51 AM
after all the data is fetched in your itab.
loop at itab.
itab-slno = sy-tabix.
modify itab index sy-tabix.
endloop.
it will show the sl no but if you sort or filter it will not rearrange the thing.
regards
shiba dutta
Hi Experts,
How to get serial numbers in ALV's ?
Thanks & Regards,
Sreedhar.
2006 Dec 27 8:51 AM
declare one field in internal table. And append the values by increment.
2006 Dec 27 8:52 AM
loop at itab.
itab-serial_no = sy-tabix.
modify itab index sy-tabix.
endloop.
pass this internal table to ALV grid FM..
amit
2006 Dec 27 8:51 AM
after all the data is fetched in your itab.
loop at itab.
itab-slno = sy-tabix.
modify itab index sy-tabix.
endloop.
it will show the sl no but if you sort or filter it will not rearrange the thing.
regards
shiba dutta
2006 Dec 27 9:28 AM
Hi,
i am taken the field slno, but it comes dump.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-FIELDNAME = 'slno'.
LS_FIELDCAT-SELTEXT_M = 'Serial No'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
2006 Dec 27 9:33 AM
Hi Sreedhar ,
LS_FIELDCAT-COL_POS = POS.
What is the value of the varaible POS.
Regards
Arun
2006 Dec 27 10:18 AM
2006 Dec 27 8:51 AM
make the one column for number in internal table.
after getting the all values in itab.
loop at itab.
itab-slno = sy-tabix.
modify itab index sy-tabix.
endloop.now use this internal table for alv.
2006 Dec 27 8:54 AM
Hi,
You need to add an additional field in the internal table which you are going to disply as ALV and just before displaying the ALV , modify the internal table populating the serial number.
But i would not prefer having serial number in ALV , because in ALV we have many feature like Sort e.t.c , when you do all this the sequence of serial number will not be correct.
Regard's
Arun
2006 Dec 27 9:30 AM
CHECK WHETHER YOUR POS CONTAINS 0 VALUE OR NOT.
IT MUST START AT 1.
AND CHECK WHETHER IT IS COINCIDING WITH ANY OTHER FIELDS OR NOT
REGARDS
SHIBA DUTTA
2006 Dec 27 9:40 AM
Hi shiba,
i am given the pos = 1, still the dump is continiue.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 1.
LS_FIELDCAT-FIELDNAME = 'slno'.
LS_FIELDCAT-SELTEXT_M = 'Serial No'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
2006 Dec 27 9:43 AM
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 1.
LS_FIELDCAT-FIELDNAME = 'slno'.
LS_FIELDCAT-SELTEXT_M = 'Serial No'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
Give the field name in capital letters and try
LS_FIELDCAT-FIELDNAME = 'SLNO'.
2006 Dec 27 9:46 AM
2006 Dec 27 9:47 AM
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 1.
<b>LS_FIELDCAT-FIELDNAME = 'SLNO'.</b>--->caps
LS_FIELDCAT-SELTEXT_M = 'Serial No'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT
kishan negi
2006 Dec 27 10:43 AM
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |