2007 Apr 20 4:43 PM
how to save data entered in table control in dialog program to the ztable and also how to get scrolling(sliding) in the table control.
how to save data entered in table control in dialog program to the ztable and also how to get scrolling(sliding) in the table control.
2007 Apr 20 4:46 PM
Hi
In screen layout there is an property called Vertical scroll bar & mark it check
Move the fields of tab control to itab structure as that of Ztable.
Modify ztable from itab.
Thanks
Sandeep
Reward if helpful
2007 Apr 20 4:47 PM
hi vivek,
Welcome to SDN.
The insert stmt itself will save the record in the table control.
Regards...
Arun.
Reward points if useful.
2007 Apr 20 4:48 PM
For Scrolling of the table control use the following code in ur PBO event of the screen.
MODULE LINES.
module LINES output.
DESCRIBE TABLE IT_cus LINES Contrl-LINES.
endmodule. " LINES OUTPUT
here it_cus is ur internal table and contrl is the name of ur table control.
Hope it helps.
2007 Apr 20 4:49 PM
Hi,
1) For saving to a ZTABLE.
Process the internal table that is used for the table control and
then move the values to the database table.
LOOP AT itab_tc.
ZTABLE-MANDT = sy-mandt.
ZTABLE-KEY = itab_tc-key1.
.....
Insert / Modify the records to the database table.
MODIFY ZTABLE.
ENDLOOP.
2) For scrolling use the function module SCROLLING_IN_TABLE
Thanks,
Naren
2007 Apr 20 4:55 PM
hi..
see these demo programs
<b>demo_dynpro_tabcont_loop</b>
<b>demo_dynpro_tabcont_loop_at</b>
regards,
veeresh
2007 Apr 20 4:56 PM
Hi,
In the Flow Logic write the code similar to this.
PROCESS AFTER INPUT.
module exit at exit-command.
LOOP at <itab>
CHAIN.
FIELD: <field1>, <field2>....<fieldn>. "fields of Table Control
MODULE update_data_0100 ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
In the module pool program for the sub routine update_data_0100 write the code.
<itab>-<field1> = <field1>. " First field of Tcable control.
....<itab>-<fieldn> = <fieldn>. " Last field of Table control.
Append <itab>.
In the module exit.
module exit input.
update ztab from itab.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |