Skip to Content

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

Load on DB

Hi,

This code is taking so much time on DB nearly 60% Kindly suggest any way to reduce the load on DB.

  • job family

IF wa_p0001-stell GT '00000000'.

SELECT SINGLE * FROM hrp1001

WHERE plvar EQ '01'

AND otype EQ 'C'

AND sclas EQ '99'

AND subty EQ 'B007'

AND objid EQ wa_p0001-stell.

IF sy-subrc EQ 0.

p_objid = hrp1001-sobid.

SELECT SINGLE * FROM hrp1000

WHERE plvar EQ '01'

AND otype EQ '99'

AND langu EQ 'EN'

AND begda LE wa_p0001-endda

AND endda GE wa_p0001-begda

AND objid EQ p_objid.

IF sy-subrc EQ 0.

wa_datatab-stell = hrp1000-stext.

ELSE.

CONCATENATE text-e07 p_objid INTO msgv2

SEPARATED BY space.

PERFORM error_list USING 'HRP1000' msgv2.

ENDIF.

ELSE.

CONCATENATE text-e14 wa_p0001-stell INTO msgv2

SEPARATED BY space.

PERFORM error_list USING 'HRP1001' msgv2.

ENDIF.

ENDIF.

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