02-06-2019 12:43 PM
Hey,
I made a table control and use my validation in PAI as.
in PAI.
loop at itab.
chain.
field1..
field 2..
field 3 module validate.
endchain.
.
.
now on screen if i press my back (pf-status) this validation code overwrite my back code (leave to screen 0.).
How can i resolve this issue?
02-06-2019 3:12 PM
02-06-2019 3:12 PM
02-06-2019 4:26 PM
02-07-2019 9:07 AM
Have you defined a variable in the ok code field for the screen? (It's generally the last field on the element list).
Rich
02-07-2019 12:53 PM
02-07-2019 2:04 PM
As I already said. If you want the BACK/EXIT/CANCEL functions to override the PAI logic then you can use on-exit command.
1) In your gui status for the function code BACK set the Functional Type to E (Exit Command)
2) In your PAI make this your first statement (before your PAI logic):
MODULE handle_exit AT EXIT-COMMAND.
loop at itab.
chain.
field1..
field 2..
field 3 module validate.
endchain.
3) Code your exit module like you want:
MODULE handle_exit INPUT.
CASE ok_code.
WHEN 'BACK' OR '????'.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDMODULE.
02-08-2019 12:33 AM
first if you defined back button in gui status = type E (on exit command) and call a module with extend: ON EXIT-COMMAND, when you click back button it will not go through the chain loop but go to that module.
second, you said "this validation code overwrite my back code", so i must guess you didnt define back button as exit type also you change or clear ok code inside validation method.