segment function

https://www.youtube.com/watch?v=yda87_t0KxY 


REPORT ytest_segment1.

DATAlv_data TYPE string VALUE 'sooraj, sam, john, jim'.
DATAlv_result TYPE string.

do 30 TIMES.
TRY.
    lv_result segmentval lv_data   index SY-INDEX sep ',' ).
    WRITE/ lv_result.
CATCH cx_sy_strg_par_val.
    WRITE'wrong index'SY-INDEX.
    "EXIT
ENDTRY.
enddo.

Comments

Popular posts from this blog

sap abap import from excell to table (transparent table)

sap abap Import from excell to internal table that works 100%