05-05-2012 6:24 AM
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
05-05-2012 6:48 AM
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.
05-05-2012 7:14 AM
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.
---------------------------------------------------------------------------------
05-05-2012 7:44 AM
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.
05-05-2012 7:50 AM
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.
05-05-2012 8:09 AM