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

Validate Table Control Column.

Former Member
0 Likes
798

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
Read only

former_member282968
Contributor
0 Likes
758

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.

Read only

0 Likes
758

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.

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

Read only

0 Likes
758

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.

Read only

0 Likes
758

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.

Read only

0 Likes
758

Validating for a wrong date ..