‎2012 Jun 06 1:22 PM
Hi experts,
can any one solve my problem..Thanks in Advance.....
I have one requirement to read the information from the editable rows of Table control.
starting i am displaying my internal table values in Table control in disable mode.in my screen i have created one INSERT button.
when user clicks on that insert button one row should become editable.I have done this part.
Now my requirement is when user clicks on insert button first time one row will get editable and user enters the data in fields of table control..now again when user clicks on insert button i need to read the previous data from editable row of table control and i need to update this in my internal table .
So how can i check whether the Table control field is in editable mode or not???
Please reply me.
‎2012 Jun 06 1:28 PM
Hi Priya,
You can read newly inserted rows from EXTRACT structure in table control. And you can also read FLAG as 'N', 'U' or 'D'.
Regards,
ManuB
‎2012 Jun 06 1:39 PM
can you please explain in detail..because i am new to this module pool Programming
‎2012 Jun 07 5:24 AM
Hello Priya,
In table comtrol, we can find two structures, EXTRACT[] and TOTAL[] which contain the data shown in table control. When you insert some lines in table, EXTRACT is populated.
In TOTAL[], if a line is modified, it will contain a flag with value 'U',
if line is deleted, it will contain a flag with value 'D',
& if line is added or inserted, it will contain a flag with value 'N'.
Each row in TOTAL and EXTRACT is stored as string., So you need to cast it into your table structure as below.
FIELD SYBMOL: <FS_TOTAL> type your_table.
Data pi_table type your_table.
*** PI_TOTAL is your TOTAL or EXTRACT structure.
LOOP AT pi_total ASSIGNING <fs_total> CASTING.
APPEND <fs_total> TO pi_table.
ENDLOOP.
UNASSIGN: <fs_total>.
So after reading the value of PI_TABLE-FLAG you can preform your operations.
Hope this will help you,
Best Regards,
ManuB