Hello Gurus,
I have a program attributed a logical database 'VAV'. I have a parameter after the logical selection field for maxium transaction hits. If the logical database selection exceeds the maximum hits , then I want the logical database selection to exit from further selection looping and go to next executable statement.
In case below, the next executable statement is (WRITE:/ 'Success'.). But I see that the program exits completely instead of going to the next execuatble statement. How can make program execution to go to exit LDB selection loop but still continue with further execution after maximum hit is encountered.
DATA: i_counter type i.
SELECTION-SCREEN BEGIN OF BLOCK BSD2 WITH FRAME Title text-025.
parameters: max_tran(8).
SELECTION-SCREEN END OF BLOCK BSD2.
NODES: vbak, vbap.
start-of-selection.
GET VBAK FIELDS KUNNR BSARK AUART VBELN BSTNK AUDAT AUGRU ERNAM VKBUR.
if not max_tran is initial.
i_counter = i_counter + 1.
if i_counter GT max_tran.
EXIT FROM STEP-LOOP.
endif.
endif.
end-of-selection.
write:/ 'success'.
Regards,
Jainam.
Edited by: Jainam Shah on Feb 26, 2009 6:26 PM