2010 Jan 06 9:33 AM
Friends,
ASSIGN (lv_struc) TO <fs>.
LOOP AT <fs> ASSIGNING <wa> .
ENDLOOP.
Inside the loop, i want to read a field of WA. that field name i have in a Variable. I want to check if that field is initial or not.
any idea.
Shastri.
2010 Jan 06 11:20 AM
hi,
you can use the statement
data variable type char 20.
field-symbols: <w_comp1> type any.
LOOP AT <fs> ASSIGNING <wa> .
ASSIGN COMPONENT (variable) of structure <wa> TO <w_comp1>.
ENDLOOP.hope this helps you....
Tanks,
Sid
hi,
you can use the statement
data variable type char 20.
field-symbols: <w_comp1> type any.
LOOP AT <fs> ASSIGNING <wa> .
ASSIGN COMPONENT (variable) of structure <wa> TO <w_comp1>.
ENDLOOP.hope this helps you....
Tanks,
Sid
2010 Jan 06 11:15 AM
hello ,
try this ......
data: ls_stru type ref to cl_abap_structdescr,
lt_comp type standard table of abap_componentdescr,
ls_stru ?= cl_abap_typedescr=>describe_by_data( <wa>).
lt_comp = ls_stru->get_components( ).
it_comp will have fieldname and values.
regards
Prabhu
2010 Jan 06 11:20 AM
hi,
you can use the statement
data variable type char 20.
field-symbols: <w_comp1> type any.
LOOP AT <fs> ASSIGNING <wa> .
ASSIGN COMPONENT (variable) of structure <wa> TO <w_comp1>.
ENDLOOP.hope this helps you....
Tanks,
Sid
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |