Skip to Content
0
Former Member
Apr 22, 2008 at 09:50 AM

code is taking more time on DB.

18 Views

Hi,

The following code is taking more time on DB.

Any changes can be done to this code to improve the performance..

FORM list_name.

DATA: adr_form TYPE anrex.

LOOP AT it_p0002 INTO wa_p0002

WHERE begda LE pn-endda

AND endda GE pn-begda.

CLEAR: adr_form, wa_name.

SELECT SINGLE * FROM t522t "1

WHERE anred EQ wa_p0002-anred "1

AND sprsl EQ 'EN'. "1

IF sy-subrc EQ 0. "1

adr_form = t522t-atext. "1

ENDIF. "1

CONCATENATE adr_form wa_p0002-vorna wa_p0002-nachn INTO

wa_name-cname SEPARATED BY space."complete name

wa_name-gbdat = wa_p0002-gbdat.

ENDLOOP.

IF sy-subrc NE 0.

wa_name-cname = text-n00.

PERFORM error_list USING 'PA0002' text-e02.

ENDIF.

ENDFORM.