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

problem in dialog program

Former Member
0 Likes
647

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.

6 REPLIES 6
Read only

Former Member
0 Likes
619

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

Read only

Former Member
0 Likes
619

hi vivek,

Welcome to SDN.

The insert stmt itself will save the record in the table control.

Regards...

Arun.

Reward points if useful.

Read only

Former Member
0 Likes
619

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.

Read only

Former Member
0 Likes
619

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

Read only

former_member673464
Active Contributor
0 Likes
619

hi..

see these demo programs

<b>demo_dynpro_tabcont_loop</b>

<b>demo_dynpro_tabcont_loop_at</b>

regards,

veeresh

Read only

Former Member
0 Likes
619

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.