Skip to Content

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

Optimizing an ABAP program...

Hi All,

I have a requirement where I need to optimize the following code, it consists of the following format:

loop

select

select

endselect

select

endselect

if sy-subrc <> 0.

perform <<function module name>>

endselect

endloop

Following is the code:

-


loop at idtl.

refresh: ivbap,

ivbap2.

select obknr equnr sernr into (objk-obknr,objk-equnr,objk-sernr)

from objk where equnr eq idtl-equnr and

taser eq 'SER01' and

objvw eq 'S' and

sernr in s_sernr.

select lief_nr posnr into (ser01-lief_nr,ser01-posnr) from ser01

where obknr eq objk-obknr.

endselect.

if sy-subrc eq 0.

select vbelv posnv into (vbfa-vbelv,vbfa-posnv) from vbfa

where vbeln eq ser01-lief_nr and

posnn eq ser01-posnr and

vbtyp_v eq 'C'.

endselect.

if sy-subrc eq 0.

perform assign_component.

endif.

endif.

endselect.

endloop.

-


Please Help...

Thanks,

Vishal.

Tags:
Former Member

Helpful Answer

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