2006 Sep 21 2:27 PM
Shall I use where condititon with Describe key word?
2006 Sep 21 2:31 PM
Hi,
There is no where condtion option with Describe keyword.
press f1 on describe keyword in abap editor.
it will take you to the syntax of keyword.
cheers.
santosh.
2006 Sep 21 2:31 PM
2006 Sep 21 2:32 PM
Below are the syntax for DESCRIBE statement
-
Return attributes of a field
- DESCRIBE FIELD f.
Return attributes of an internal table
- DESCRIBE TABLE itab.
Determine distance between two fields
- DESCRIBE DISTANCE BETWEEN f1 AND f2 INTO f3.
Return attributes of a list
- DESCRIBE LIST NUMBER OF LINES lin.
- DESCRIBE LIST NUMBER OF PAGES n.
- DESCRIBE LIST LINE lin PAGE pag.
- DESCRIBE LIST PAGE pag.
-
using the select command , you can extract all the data into table with where condition, then you can use DESCRIBE to find the properties.
Regards
Vivek
<b> Please reward points for all the helpful answers </b>
2006 Sep 21 2:32 PM
no you cannot use.
instead move the entries into a temp internal table usinh a where condition and use descibe over the temp table.
loop at itab where field = <ghg>.
nove-corresponding itab to itab_temp.
append itab_temp.
endloop.
describe itab_temp line v_lines.
Regards,
Ravi
2006 Sep 21 2:33 PM
hi Sam,
Describe key will not support where condition ..
Regards,
Santosh
2006 Sep 21 2:33 PM
Hi Sam,
No, but you can use similar like condition with DESCRIBE statement.
DESCRIBE TABLE itab [KIND knd].
Effect:
The table type of the internal table itab is determined and a corresponding one-digit identification is assigned to the data object knd. A character-type data type is expected for the data object. The identifications are "T" for standard tables, "S" for sorted tables and "H" for hashed tables. These values are also defined as constants sydes_kind-standard, sydes_kind-sorted, and sydes_kind-hashed in the type group SYDES.
TYPE-POOLS sydes.
...
FORM sort_descending CHANGING itab TYPE ANY TABLE.
DATA tabkind(1) TYPE c.
DESCRIBE TABLE itab KIND tabkind.
IF tabkind = sydes_kind-standard OR
tabkind = sydes_kind-hashed.
SORT itab DESCENDING.
ELSEIF tabkind = sydes_kind-sorted.
MESSAGE '...' TYPE 'E'.
ELSE.
MESSAGE '...' TYPE 'E'.
ENDIF.
ENDFORM.
or
DESCRIBE DISTANCE BETWEEN dobj1 AND dobj2 INTO dst
IN {BYTE|CHARACTER} MODE.
Effect:
This statement assigns the distance between the starting positions of the data objects dobj1 and dobj2 to the data object dst, for which the data type i is expected. In case of deeper data types, the referenced data object is not relevant but the position of the internal reference (for strings and internal tables) or the reference variables. It is not important, in which order dobj1 and dobj2 are specified.
DATA: BEGIN OF struc,
comp1 TYPE i,
comp2(1) TYPE x,
comp3(4) TYPE c VALUE 'Hey',
comp4(4) TYPE c VALUE 'you!',
comp5 TYPE x,
END OF struc.
DATA: off TYPE i,
len TYPE i.
FIELD-SYMBOLS: <hex> TYPE x,
<result> TYPE c.
DESCRIBE DISTANCE BETWEEN:
struc AND struc-comp3 INTO off IN BYTE MODE,
struc-comp3 AND struc-comp5 INTO len IN BYTE MODE.
ASSIGN: struc TO <hex> CASTING,
<hex>+off(len) TO <result> CASTING.
Hope this will help.
Regards,
Ferry Lianto
2006 Sep 21 2:35 PM
Hello,
No you cannot use the keyword DESCRIBE in condition.
It is used to count the no. og entries in an internal table.
Regs,
Venkat
2006 Sep 21 2:35 PM
hi sam,
you cannot use where condiation.
if u want there is a logic.
data : ITAB like ztable occurs 0,
itab2 like itab,
num type i.
refresh itab2.
loop at itab where condition.
append itab2 from itab.
clear itab.
endloop.
describle table itab2 lines num.
write num.
rgds
anver
mark all helpful answerss
2006 Sep 21 3:15 PM
Hello,
Pls. close the thread and award points if your query is answered.
Regs,
Venkat
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |