Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2878

Re: ABAP 7.40: using function 'segment' instead of command 'split'

$
0
0

I am just training 7.40.... So my example may offer no advantages. But it IS an advantage to append a part of a field to an internal table without using help variables, for instance. In my example:

 

data: tabnames type table of tabname. 

append to_upper( segment val = source index = 1 sep = '-' ) ) to tabnames.

 

instead of

 

data: tabnames type table of tabname. 

data: helpfield_1 type tabname.

data: helpfield_2 type string

split source at '-' into helpfield_1 helpfield_2. " helpfield_2 never used!

translate helpfield_1 to upper case.

append helpfield_1 to tabnames.


Viewing all articles
Browse latest Browse all 2878

Trending Articles



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