ABAP PIN guessing 3 attempts with a loop?
DATA pin_correct TYPE i VALUE 1234. PARAMETERS lv_pin TYPE i. if lv_pin EQ pin_correct. WRITE 'Richtig'. else. WRITE' Falsch'. ENDIF.
Hey guys, how can I put the code in a loop where you have 3 attempts to guess the pin
With “DO 3 TIMES. […] ENDDO” a loop can be built.
In case of success (password correct), with “EXIT.” jump out prematurely.
But unfortunately, if I insert the PIN incorrectly, it will be spent 3 times wrong. So yes, no 3 attempts
Keep running your code to the right reporting time.
“AT SELECTION-SCREEN OUTPUT” was the event to get another input possibility.
https://www.berater-wiki.de/Reporting events
Only the selection image is not processed in this way – i.e. the originally entered value is then tested 3 times.