‎2009 Mar 03 12:30 PM
Hi,
I have the contents in fieldABC which i would like to copy based on the length of the value
Eg:
Field ABC has value 1
it need to be copied to Field1
FILEDABAC has 1234
it need to be copy in field 2
FILEDABC has 1234ABC
It need to be copy in Field 3
i means to say based on the lenght of the value i would like to copy the contents to multiple fields
Note: the data is for Heirachy...
Can anyone will help with code.
Thanks
‎2009 Mar 03 12:35 PM
take this field ABC as string and then check the length of field ABC and put it into respective fields.
Hope this is helpful to you
Regards
Rajnesh
‎2009 Mar 03 12:36 PM
‎2009 Mar 03 12:37 PM
Refer these sample codes. Instead of 'Test' pass ur value.
DATA: i TYPE i.
i = STRLEN('Test').
case i
when 1.
"pass to fld 1
"and so on
‎2009 Mar 03 12:50 PM
Hi,
You mean you want to copy contents of field ABC to Field1,Field2,Field3 based on there length??
if i have correctly understood you then do like:
data : g_strlen type i.
g_strlen = strlen ( ABC ).
if g_strlen = 1.
field1 = ABC.
elseif g_strlen > 1 and g_strlen <= 4.
field2 = ABC.
elseif g_strlen > 4 .
field3 = ABC.
endif.
Regards,
Neha
‎2009 Mar 03 1:21 PM
Hi,
Thanks for response...
ITs take the maximum length and copied only one text..
Can you advice how to put the whole string
Thanks
‎2009 Mar 03 1:29 PM