Skip to Content
0
Former Member
Nov 07, 2014 at 03:16 AM

Loop Without a Condition

811 Views

Hi all,

I have this standard SAP program copied into a custom program where in there is a LOOP function but I don't see any condition in the loop. I don't know how this works. Below is the code for the loop and how icdhdr is defined.

data: begin of icdhdr occurs 100. "Änderungsbelege: Header
include structure cdhdr.
data: end of icdhdr.

loop.

if sort <> '4'.
perform zahlen_linksbuendig.
endif.

perform zahlen_initialisieren.
clear gs_outtab.
move : icdhdr-udate to gs_outtab-udate,
icdhdr-utime to gs_outtab-utime,
icdhdr-username to gs_outtab-username,
icdpos-lifnr to gs_outtab-lifnr,
fldtext to gs_outtab-fname,
icdpos-bukrs to gs_outtab-bukrs,
icdpos-ekorg to gs_outtab-ekorg,
icdpos-f_old to gs_outtab-f_old,
icdpos-f_new to gs_outtab-f_new,
icdpos-f_old+35 to gs_outtab-f_old_35,
icdpos-f_new+35 to gs_outtab-f_new_35.


perform poszeile2_ausgeben changing gs_outtab-dscrp
gs_outtab-tabfeld
gs_outtab-other_keys.

append gs_outtab to gt_outtab.
endloop.

Thank you for your help.