2009 Dec 01 5:56 AM
Hi All,
I am having a problem with the obligatory fields when I click on the BACK button. It requires me to fill in entries for all required fields even if I want to click on the BACK button.
Thanks in advance.
Regards,
Arlis
Hi All,
I am having a problem with the obligatory fields when I click on the BACK button. It requires me to fill in entries for all required fields even if I want to click on the BACK button.
Thanks in advance.
Regards,
Arlis
2009 Dec 01 5:58 AM
Hi,
Give the function type for the button as 'E' and write your code in the MODULE <module_name> AT EXIT-COMMAND.
2009 Dec 01 6:12 AM
Thanks Nitwick. I thought I already have one set for my GUI-STATUS and that it is not working.
2009 Dec 01 6:16 AM
Hello Arlis,
The module with AT EXIT-COMMAND will do well to fix your issue;
what really happens is; when you validate certain fields using FIELD <field-name> MODULE <validate_fields>, and when you click 'BACK' or 'EXIT'; it will gonig to check the fields against the validate_fields module and then the error message which you have specified keeps popping up hampering you to get back to the desired screen.
All you can do is to; put sy-ucomm or ok_code like sy-ucomm, in the validate_fields module, so as to easily get back to the desired screen.
For instance;
MODULE validate_fields INPUT.
IF NOT <field-name> IS INITIAL.
SELECT * FROM trdir INTO TABLE t_table WHERE name = <field-name>.
IF sy-subrc = 0.
fl_flag = 'Y'.
ELSE.
fl_flag = 'N'.
MESSAGE 'Invalid Program Name' TYPE 'E'.
ENDIF.
ELSEIF ok_code EQ 'BACK'.
LEAVE TO SCREEN 0.
ENDIF.
ENDMODULE.I hope, it'll gonna help you fix the issue.
Kind Regards,
Zahack
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |