GOTO
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
GOTO (<Label name>)
Description
Causes the execution to continue at the mentioned label.
Diagram
Returned value type
None
Parameters
Parameter | Description |
<Label name> | Name of the label to jump to. |
Remarks
It is not allowed to use the goto command to jump into or out of a LOOP, into a STARTCASE ... ENDCASE command or to jump from one case to another case inside a STARTCASE .... ENDCASE command.
Example
q_bldsa.index (probldsab)
q_bldsa.equal (blnumber)
q_bldsa.start (0)
q_bldsa.where (q_bldsa.lijndcode = lijndcode)
loop q_bldsa
if q_bldsa.reisnr <> sa-reisnr then goto (next_bl1)
q_faknra.index (profaknras)
q_faknra.equal (q_bldsa.key, q_bldsa.volgnr)
q_faknra.start (0)
loop q_faknra
if q_faknra.faktnr <> sa-faktnr the goto (next_faknra)
add_faktuur ()
:next_faknra
endloop
:next_bl1
endloop
q_bldsa.equal (blnumber)
q_bldsa.start (0)
q_bldsa.where (q_bldsa.lijndcode = lijndcode)
loop q_bldsa
if q_bldsa.reisnr <> sa-reisnr then goto (next_bl1)
q_faknra.index (profaknras)
q_faknra.equal (q_bldsa.key, q_bldsa.volgnr)
q_faknra.start (0)
loop q_faknra
if q_faknra.faktnr <> sa-faktnr the goto (next_faknra)
add_faktuur ()
:next_faknra
endloop
:next_bl1
endloop