‎2008 Feb 04 1:30 PM
hi all,
I gt a table control. i need to do some validation check on the field in the table control. I got a problem in enable the field after the message class is shown. I need to know the flow logic so that the field can have input. Any code ?
thank
‎2008 Feb 04 1:34 PM
Hello,
Do like this:
PROCESS AFTER INPUT.
LOOP AT IT_TC01.
CHAIN.
FIELD IT_TC01-WTG002 MODULE TC01_MODIFY.
ENDCHAIN.
ENDLOOP.
Cheers,
Vasanth
‎2008 Feb 04 1:38 PM
Can you giv me a example for the MODULE TC01_MODIFY.
Let say i need to validate at least a entry in the table control, how to use the message class if no record has been enter.
Do i still need to make any changes to the flow logic u provided. Urgent> Thk
‎2008 Feb 04 1:44 PM
hi
Table controls indirectly relate to an internal table.
It is only form an internal table in a program that you access the table control.
And when displaying values in a table control, it will be done through an internal table from the program.
Even in the table control,the field names are given in the format <internal_table_name>-<field_name>.
If the value is being retrieved form a standard program,then the values need to be passed into the internal table and thus thye would be displayed on the table control.
The format that you need to follow in the PBO and PAI of the screen of the table control is :
PROCESS BEFORE OUTPUT.
LOOP WITH <table_control_name>.
MODULE user_command_0100.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL <table_control_name>.
module read_table_control.
ENDLOOP.
To handle table controls in ABAP programs, you must declare a control in the declaration part of the program for each table control using the following statement:
CONTROLS <ctrl> TYPE TABLEVIEW USING SCREEN <scr>.
where <ctrl> is the name of the table control on a screen in the ABAP program. The control allows the ABAP program to read the attributes of the table control and to influence the control. <scr> is the screen number where the initial values of the table are loaded.
Also,
While using table controls it is necessary to use loops in screen flowlogic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP WITH CONTROL FLIGHTS.
MODULE FILL_TABLE_CONTROL.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL FLIGHTS.
module read_table_control.
ENDLOOP.
module user_command_0100.
Here: flights is the name of ur table control
Write these modules in your main prog.
MODULE FILL_TABLE_CONTROL.
module read_table_control.
When ever using the table control in screen desing, It is mandatory that one should write .. loop.. endloop both in the PBO and PAI. In your case , it seems you have not return loop .. endloop in PAI. Plz check.
hope this helps .
regs,
Hema.