The following coding has to be translated into ABAP 7.40:
DATA:
source TYPE string VALUE 'MARA-MATNR=12345',
tabname TYPE tabname,
fieldname TYPE fieldname,
attribute TYPE string.
SPLIT:
source AT '-'
INTO tabname fieldname,
fieldname AT '='
into fieldname attribute.
" RESULT: tabname = 'MARA', fieldname = 'MATNR', attribute = '12345' !
I do not understand the F1 help of "segment" functions' features....
appendix:
via trial & error:
tabname = segment( val = source index = 1 sep = '-' ).
fieldname = segment( val = segment( val = source index = 2 sep = '-' ) index = 1 sep = '=' ).
attribute = segment( val = source index = 2 sep = '=' ).
any shorter codings?