I have added some script to check fields in transaction MIRO. The script looks like this:

on "/11" Fcode="/00" "Process=taxcode.txt"

The InputScript looks like this:

Screen SAPLMR1M.6000

        Enter "=HEADER_PAY"


Screen SAPLMR1M.6000

       Set V[Pmt] "&F[Pmt Method]"

 

        If V[Pmt= ]

                SetCursor F[Pmt Method]

                Message "Payment Method missing"

                Leave

        Endif

        Enter "/11"

If I test the script above and press SAVE, the InputScript gives me a pop-up message and the cursor is on the right field; that is OK. If I don't change anything at the screen, just only press SAVE again then the InputScript for my input check is not executed. Why not?

If your InputScript ends with "Message" ... "Leave", no "Enter" is performed since the GuiXT script is not processed after processing of the "Screen" block, and this is why your "On" statement is missing.

Solution 1:

Add the statement

on "/11" Fcode="/00" "Process=taxcode.txt"

in your InputScript, before the "Leave" statement

Solution 2:

Add a suitable "Enter" statement before the "Leave" statement.

I prefer solution 2: If you add more statements in the GuiXT script in the future, you would need to add these statements in the InputScript as well, with solution 1.