Skip to Content
0
Former Member
Oct 29, 2008 at 06:57 AM

advise on which method is more performance

37 Views

I have to initialise the structure BBSEG with / value

please advise of these 2 method which is more performance

method 1 -->(Using the FM NAMETAB)

REFRESH nametab.

CALL FUNCTION 'NAMETAB_GET'

EXPORTING

langu = sy-langu

tabname = tabname

TABLES

nametab = nametab

EXCEPTIONS

no_texts_found = 1.

IF sy-subrc NE 0.

MESSAGE e000 WITH 'DDIC Structure ' tabname ' not found'.

ENDIF.

LOOP AT nametab.

CLEAR char.

CONCATENATE 'I_' nametab-tabname '-' nametab-fieldname INTO char.

ASSIGN (char) TO <f1>.

<f1> = i_nodata.

ENDLOOP.

-


Methos 2 -->

data : wa_bbseg type bbseg.

field-symbols : <fs> type any.

do.

assign component sy-index of structure wa_bbseg to <fs>.

if sy-subrc = 0.

<fs> = '/'.

else.

exit.

endif.

enddo.