Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Performance tuning of user exit in 2LIS_03_BF

Hai,

I have an user exit in 2LIS_03_BF,when i am extracting the data it is taking so much time,the issue is with this below routine,

can any one tune this coding.

***********************************************************************

  • To populate the value of vbelv from table vbfa comparing vbeln with mseg-mblnr

WHEN '2LIS_03_BF'.

TYPES:BEGIN OF ty_vbfa,

vbeln TYPE vbfa-vbeln,

vbelv TYPE vbfa-vbelv,

END OF ty_vbfa.

DATA:git_vbfa TYPE TABLE OF ty_vbfa,

gs_vbfa LIKE LINE OF git_vbfa.

DATA:c_data1 LIKE ls_mc03bf0 OCCURS 0 .

c_data1[] = c_t_data[].

SELECT vbeln

vbelv

FROM vbfa

INTO TABLE git_vbfa

FOR ALL ENTRIES IN c_data1

WHERE vbeln = c_data1-mblnr.

SORT git_vbfa BY vbeln ASCENDING.

REFRESH: c_data1.

FREE: c_data1.

LOOP AT c_t_data INTO ls_mc03bf0.

l_tabix = sy-tabix.

READ TABLE git_vbfa INTO gs_vbfa WITH KEY vbeln = ls_mc03bf0-mblnr BINARY SEARCH.

IF sy-subrc = 0.

ls_mc03bf0-vbelv = gs_vbfa-vbelv.

MODIFY c_t_data FROM ls_mc03bf0 INDEX l_tabix.

ENDIF.

ENDLOOP.

REFRESH: git_vbfa.

FREE: git_vbfa.

**************************************************************************

Regards,

Harsha

Former Member
Not what you were looking for? View more on this topic or Ask a question