2006 Oct 11 5:32 PM
Hi All,
I have a program that calls a subroutine multiple times.
There is a changing parameter on this subroutine e.g. f_value.
Sometimes when this subroutine is called the f_value value being passed in is based on CHAR60, other times CHAR40.
StrLen() does not do this becasue this gives me how many of the 40 or 60 characters are populated within the f_value field.
Within the subroutine I want to determine whether f_value is based on a CHAR40 or a CHAR60.
Is there a function that will allow me to determine this.
Many Thanks In Advance
David
2006 Oct 11 5:35 PM
hi,
Make use of <b>describe</b> field statement ...
describe field <fieldname> length v_len.Regards,
Santosh<b></b>
Hi All,
I have a program that calls a subroutine multiple times.
There is a changing parameter on this subroutine e.g. f_value.
Sometimes when this subroutine is called the f_value value being passed in is based on CHAR60, other times CHAR40.
StrLen() does not do this becasue this gives me how many of the 40 or 60 characters are populated within the f_value field.
Within the subroutine I want to determine whether f_value is based on a CHAR40 or a CHAR60.
Is there a function that will allow me to determine this.
Many Thanks In Advance
David
2006 Oct 11 5:34 PM
2006 Oct 11 5:35 PM
hi,
Make use of <b>describe</b> field statement ...
describe field <fieldname> length v_len.Regards,
Santosh<b></b>
2006 Oct 11 5:48 PM
Hi
Please check out the following code
DATA: ws_char TYPE char40.
DATA: descr_ref TYPE REF TO cl_abap_typedescr.
FIELD-SYMBOLS: <length> TYPE ANY.
descr_ref ?= cl_abap_tabledescr=>describe_by_data( ws_char ).
ASSIGN descr_ref->length TO <length>.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |