‎2008 Jul 09 9:15 AM
my logic goes this way
i have a loop which is on material numbers
inside the loop we have a 4 performs
inside my first perform i have a function module
now my requirement is
after comming out from function module if sy-subrc = 0.
i need to proceed further
and if sy-subrc <> 0
i need to come out of the perform and i should not process
the other preceeding performs.
finally i have to go to next material in the loop.
can any one help me in this..
‎2008 Jul 09 9:18 AM
HI
data: flag typ c.
write code inside perform
if sy-subrc <> 0.
flag = 'X'.
exit.
endif.
Outside perform write down
Perform xyz.
if flag = 'X'
continue.
endif.
Aditya
‎2008 Jul 09 9:18 AM
HI
data: flag typ c.
write code inside perform
if sy-subrc <> 0.
flag = 'X'.
exit.
endif.
Outside perform write down
Perform xyz.
if flag = 'X'
continue.
endif.
Aditya
‎2008 Jul 09 9:18 AM
Loop at itab.
perform first changing subrc.
if subrc NE 0.
continue.
endif.
perform second
perform third
perform fourth .
endloop.
‎2008 Jul 09 9:19 AM
try something like this
Loop at it_mat_tab.
perform do_something changing rc.
check rc = 0.
perform do_more.
Endloop.
form do_something changing rc.
CALL FUNCTION 'XYZ'.
check sy-subrc eq 0.
rc = sy-subrc
exit
Endform.cheers
VJ
‎2008 Jul 09 9:26 AM
hi
loop at itab.
clear flag.
perform a1.
if flag = X..
perform a2.
perform a3.
perform a4.
else.
exit.
endif.
endloop.
form a1.
call function ''ABC".
.
.
.
if sy-subrc = 0.
flag = 'X'.
endif.
endform.
Thanks & Regards
vinsee
‎2008 Jul 09 9:33 AM
‎2008 Jul 09 9:37 AM
HI,
you can have this code:
loop at itab.
.
.
perform1
perform2
perform3
.
.
endloop.
let us take
form1
call function module 'fm'.
.
.
.
if sy-subrc ne 0.
continue.
endif.
endform.
this will work.
so reward me if is useful.
thanks
AM