Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in table control

Former Member
0 Likes
540

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

4 REPLIES 4
Read only

Former Member
0 Likes
517

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

Read only

Former Member
0 Likes
517

Make sure the buttons are defined as "Exit commands" in the gui and in the PAI:

module exit_0100 at exit-command.

Rob

Read only

Former Member
0 Likes
517

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....