Application Development 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: 

Validate Table Control Column.

Former Member
0 Kudos

Hi Gurus,

I'm doing a project on Table Control concept, my problem is i have to validate a column in my table control.

It will be appreciating if you guys give some suggestions or code snippets.

regards.

Moderator Message: Please search for available info. Thread locked.

Message was edited by: Suhas Saha

5 REPLIES 5

former_member282968
Contributor
0 Kudos

Hi Rohan,

If you are validating the table control entries you have to do that in the PAI with in the loop of the table control internal table.Add a module and include your code for validation.

PROCESS AFTER INPUT.

  LOOP AT ITAB.

    CHAIN.

      FIELD: f1, f2,f3.

      MODULE check_inputs.

    ENDCHAIN.

  ENDLOOP.

0 Kudos

Hi Naveen,

application what i'm workin on is ao time sheet, The validation is for DATE field, such that

when i enter the date of activity , if the DATE is greater that Created on DATE(SY-DATUM)

is should throw a message.

i have written a code just check.

---------------------------------------------------------------------------------

PROCESS AFTER INPUT.
  MODULE user_command_0111.
  LOOP at it_tb.
    chain.
     field it_tb-dates.
   endchain.
   field it_tb-dates module validate_parts on Input.
  MODULE save_dat_to_table.
  ENDLOOP.

---------------------------------------------------------------------------------

module validate_parts input.
  get cursor line current_line.
    if it_tb-date GT it_tb-created_on.
      message i008(zmts).
    endif.
endmodule.

---------------------------------------------------------------------------------

0 Kudos

It seems ok..Are you just giving a remainder or validating for the wrong date?.If you are using an information message after the message the remaning code gets excuted so there wont be a check.When you use the error messge the code wont get executed until proper input is given.

0 Kudos

Yes i did the same , noe one more situation has arised,

the whole table control is in display mode, except the DATES field,

even if i give he right entry it is not taking, still shows the  message.

any suggestion.

regards.

0 Kudos

Validating for a wrong date ..