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

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 tab name,

  helpfield_1 type tabname,

  helpfield_2 type string.

 

split source at '-'

into helpfield_1  " only used as split target field

     helpfield_2. " helpfield_2 never used, just a dummy!

 

translate helpfield_1 to upper case.

 

append helpfield_1 to tabnames.


Viewing all articles
Browse latest Browse all 2806

Trending Articles



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