Quantcast
Channel: SCN: Message List - Any chance of using regular expression?
Viewing all articles
Browse latest Browse all 6

Re: Any chance of using regular expression?

$
0
0

I went for an ABAP solution, I'm creating an additional table in the ABAP system to hold the addresses and will drop the source column from the original table when I'm done.

 

In case your interested, my code to extraxt postal code and city (the country was determined and stripped from the string earlier)

 

    if ms_address-country = 'DE'.
*-Finde den Beginn der PLZ inkl. umschliessender Whitespaces      find first occurrence of        regex 'sd{5}s'        in mv_string        match offset lv_offset.      if sy-subrc = 0.        add 1 to lv_offset.        ms_address-post_code = mv_string+lv_offset(5).        lv_city = lv_offset + 6.        ms_address-city = mv_string+lv_city.      endif.
endif.

 

Edited by: Andre Köster on Jan 26, 2012 12:51 PM

 


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>