2020 Jul 09 10:55 AM
Hi,
I facing syntax problem in ABAP.
For the line: "if sy-subrc <>." I get the Error-Message, as mentioned in the title.
Could you help me?
(BTW: The Code is working, if take a "do 18 times"-loop and comment out the if-block.)
field-symbols: <fs>.
loop at gt_output into data(gs_output).
do.
assign component sy-index of structure gs_output to <fs>.
if sy-subrc <>.
exit.
endif.
Write:/ <fs>.
enddo.
endloop.
2020 Jul 09 11:00 AM
Hello brenm1989
You're missing the value part of the IF SY-SUBRC <> condition. It should be like this:
do.
assign component sy-index of structure gs_output to <fs>.
if sy-subrc <> 0. " <-- added zero
exit.
endif.
Write:/ <fs>.
enddo.
Kind regards,2020 Jul 09 11:00 AM
Hello brenm1989
You're missing the value part of the IF SY-SUBRC <> condition. It should be like this:
do.
assign component sy-index of structure gs_output to <fs>.
if sy-subrc <> 0. " <-- added zero
exit.
endif.
Write:/ <fs>.
enddo.
Kind regards,2020 Jul 09 12:02 PM
Hi,
If condition is not completed. sy-subrc is not compared with any parameter