‎2008 Mar 14 5:22 PM
Hi
I am facing a problem in table control with its mandatory fields.
I want the mandatory field if not filled should not give an error in case back,previous or cancel button is pressed
any pointers to this will really be helpfull...
regards
Edited by: pr sharma on Mar 14, 2008 6:22 PM
‎2008 Mar 14 5:27 PM
Within your edit MODULES, check that the OK_CODE and exit if it is one you don't want the edit performed on.
CHAIN.
FIELD: a1_zlmcont-zip.
MODULE zipcode_edit_0101.
ENDCHAIN.
and then
*&---------------------------------------------------------------------*
*& Module zipcode_edit_0101 INPUT
*&---------------------------------------------------------------------*
MODULE zipcode_edit_0101 INPUT.
PERFORM edit_zipcode USING a1_zlmcont-zip.
ENDMODULE. " zipcode_edit_0101 INPUT
*&---------------------------------------------------------------------*
*& Form edit_zipcode
*&---------------------------------------------------------------------*
FORM edit_zipcode USING p_zip.
DATA: zip_len TYPE p.
CHECK mode NE c_display. "<== change to check OK_CODE in your need
CHECK NOT p_zip IS INITIAL.
COMPUTE zip_len = strlen( p_zip ).
CHECK zip_len NE 5
AND zip_len NE 10.
MESSAGE e055.
ENDFORM. " edit_zipcode
‎2008 Mar 14 5:27 PM
Hi,
Check these links
ABLE CONTROL -
http://www.geekinterview.com/Interview-Questions/SAP-R-3
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
http://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
Eg of table Control:
http://members.aol.com/_ht_a/skarkada/sap/table_control/
table_control.htm
http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
Regards,
Laxmi.
‎2008 Mar 14 5:38 PM
Make sure the buttons are defined as "Exit commands" in the gui and in the PAI:
module exit_0100 at exit-command.Rob
‎2008 Mar 15 11:16 AM
hi,
ya u can do that....
give Function Type E to those two buttons ( in GUI Status)
now make one module in PAI...
PROCESS AFTER INPUT.
MODULE exit_0100 AT EXIT-COMMAND.
MODULE exit_0100 INPUT.
LEAVE PROGRAM.
ENDMODULE. " exit_0100 INPUT
reward if usefull....