2007 Feb 27 10:27 AM
Hi All,
I need to search for a space in a string
For Eq: c_var = 'SDN SAP'
I just want to know which position is the space present in c_var
Search and find is not working out when i used for space
(I search for ' ')
Regards
Simin.R
2007 Feb 27 10:30 AM
hi Simin,
do this way ..
c_var = 'SDN SAP'
split c_var at 'space' into var1 var2.
v_pos = strlen( var1 ) + 1.
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
2007 Feb 27 10:31 AM
Hi,
SEARCH will work for space too.
Check if the space you see is indeed a space.
see this example:
DATA: text TYPE string VALUE `Roll over Beethoven`,
pos TYPE i.
SEARCH text FOR '. .'.
SEARCH text FOR ` `.
IF sy-subrc = 0.
pos = sy-fdpos + 2.
SEARCH text FOR 'bth' STARTING AT pos
ABBREVIATED AND MARK.
ENDIF.
Regards,
Ravi