Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SEARCH statement issue

Former Member
0 Likes
431

Hi,

I am on ECC 6.0. When I try to search for a . (DOT) in below string, I am getting sy-subrc = 4. Infact, the path below has got .(DOT) in it. Any idea, why this is behaving like this ?


ind12fp01\Common\FSS\Invoices\AP\20080916\ipo200809160004A964.TIF

Search statement I am using is

l_file2 = '
ind12fp01\Common\FSS\Invoices\AP\20080916\ipo200809160004A964.TIF' .

search l_file2 for '.'

what mistake am I doing here ?

Regards

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
406

Hi check this

DATA: patt       TYPE string VALUE `.`,
      text       TYPE string VALUE '\\ind12fp01\Common\FSS\Invoices\AP\20080916\ipo200809160004A964.TIF',
      moff TYPE i, mlen TYPE i.

FIND patt IN text MATCH OFFSET moff.
FIND patt IN text MATCH LENGTH mlen.
WRITE: / moff , mlen.

FIND does not supply the sy-fdpos system field with data.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
406

SEARCH is obsolate in ECC6 instaead of use FIND


report  zars
        no standard page heading
        line-size 80
        line-count 65.
data: patt       type string value `.`,
      text       type string,
      result_tab type match_result_tab.

field-symbols <match> like line of result_tab.


find all occurrences of patt in
     '\ind12fp01CommonFSSInvoicesAP20080916ipo200809160004A964.TIF' 
     results result_tab.

loop at result_tab assigning <match>.
  write: / <match>-offset, <match>-length.
endloop.

a®

Read only

former_member156446
Active Contributor
0 Likes
407

Hi check this

DATA: patt       TYPE string VALUE `.`,
      text       TYPE string VALUE '\\ind12fp01\Common\FSS\Invoices\AP\20080916\ipo200809160004A964.TIF',
      moff TYPE i, mlen TYPE i.

FIND patt IN text MATCH OFFSET moff.
FIND patt IN text MATCH LENGTH mlen.
WRITE: / moff , mlen.

FIND does not supply the sy-fdpos system field with data.