2007 Sep 05 10:01 AM
Hi
i want to know how much field there is in table in code
(the table is in dictionary)
Thanks
Have a nice day
2007 Sep 05 10:12 AM
Hi
i want to know how much field there is in table in code
(the table is in dictionary)
Thanks
Have a nice day
2007 Sep 05 10:03 AM
your question is not clear.....there can be any number of fields in a dictionary table as you want....
may be there is a limit for table maintenance generation...not very sure on that..
please clarify a bit more on what you want to know..
Message was edited by:
Priyank Jain
2007 Sep 05 10:06 AM
For example in structure BAPIMEPOSCHEDULE
you have 21 field
PO_ITEM
SCHED_LINE
DEL_DATCAT_EXT
DELIVERY_DATE
QUANTITY
DELIV_TIME
STAT_DATE
PREQ_NO
PREQ_ITEM
PO_DATE
ROUTESCHED
MS_DATE
MS_TIME
LOAD_DATE
LOAD_TIME
TP_DATE
TP_TIME
GI_DATE
GI_TIME
DELETE_IND
REQ_CLOSED
2007 Sep 05 10:14 AM
data : it_dd03l type table of DD03L initial size 0.
data : n type I.
select * from DD03L
into it_dd03l
where tabname = 'BAPIMEPOSCHEDULE'.
describe table it_dd03l lines N.Regards
Gopi
2007 Sep 05 10:05 AM
Hi Balan,
Do you mean to say, you want to know the number of records in a database table during runtime???
If yes, declare an internal table similar to the database table.
Then do a SELECT * from the database table to the internal table.
Now use
DESCRIBE TABLE itab LINES lv_lin.
lv_lin should be of type Integer. This will give you number of records in the table.
<b>Reward points for helpful answers.</b>
Best Regards,
Ram.
2007 Sep 05 10:12 AM
2007 Sep 05 10:21 AM
Hi,
you can use fm REUSE_ALV_FIELDCATALOG_MERGE
EX.
DATA : I_ALV_FC TYPE SLIS_T_FIELDCAT_ALV.
CALL FUNCTION REUSE_ALV_FIELDCATALOG_MERGE
exporting
i_program_name = sy-repid
i_tab_name = 'ITAB'
i_inclname = sy-repid
changing
ct_fieldcat = I_ALV_FC
CNT = 0.
LOOP AT I_ALV_FC.
CNT = CNT + SY-TABIX.
ENDLOOP.