‎2006 Aug 31 11:19 PM
‎2006 Sep 01 2:02 AM
Hi tushar,
DESCRIBE stmt is used to describe the attributes.
DESCRIBE FIELD - Describes the attributes of a field.
DESCRIBE LIST - Describes the attributes of a list.
DESCRIBE TABLE - Describes the attributes of the internal table.
Think of this scenario in dialog programming. While using Table control we need to find the number of lines , so that we can able to position our cursor for the deletion or updation of a record. To get the number of lines we use that Describe stmt.
Hope u understood. If my suggestion is valid, don't forget to award points.
Regards....
Arun.
‎2006 Aug 31 11:23 PM
‎2006 Aug 31 11:43 PM
‎2006 Aug 31 11:52 PM
This explains on using the DESCRIBE Statement.
http://saphelp47.pe-c.com//saphelp47/helpdata/EN/fc/eb3145358411d1829f0000e829fbfe/frameset.htm
‎2006 Aug 31 11:53 PM
Hi,
If you use the DESCRIBE for an internal table..
DESCRIBE TABLE ITAB.
Then the number of the lines will be stored in
SY-TFILL.
Or you can directly a variable in the LINES addition.
DESCRIBE TABLE ITAB LINES V_LINES.
Thanks,
Naren
‎2006 Sep 01 12:54 AM
‎2006 Sep 01 1:38 AM
DESCRIBE keyword is used to determine the attributes of a field, itab or a list at runtime ex:
DESCRIBE FIELD f length len type typ.
This will put the length of the field in the variable len & data type in typ.
DESCRIBE TABLE itab lines len occurs n.
This will put the number of lines of the itab in the variable len & the value of occurs parameter in variable n.
DESCRIBE LIST NUMBER OF LINES lin.
this Returns the number of lines in the list.
~Suresh
‎2006 Sep 01 4:25 AM
1. If you want to know the no of records in an internal table and to know internal tabe type ,
we use
DESCRIBE TABLE ITAB LINES V_LINES
TYPE V_TYPE.
DATA : V_LINES TYPE I.
now you can use V_LINES to print total no of records in that table.
V_TYPE to know the table is standard or sorted or hashed table.
2. FOR a FIELD
DESCRIBE FIELD V_FIELD LENGH V_LENGTH IN CHARACTER MODE.
to know the length of the variable (while defining) it will come to V_LENGTH.
Regards
srikanth
‎2006 Sep 01 2:02 AM
Hi tushar,
DESCRIBE stmt is used to describe the attributes.
DESCRIBE FIELD - Describes the attributes of a field.
DESCRIBE LIST - Describes the attributes of a list.
DESCRIBE TABLE - Describes the attributes of the internal table.
Think of this scenario in dialog programming. While using Table control we need to find the number of lines , so that we can able to position our cursor for the deletion or updation of a record. To get the number of lines we use that Describe stmt.
Hope u understood. If my suggestion is valid, don't forget to award points.
Regards....
Arun.