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

saving a custom table from table control

Former Member
0 Likes
623

Hi All,

I have to read a table control which will be filled by end user and update the same in a custom table. Im aware of displaying a table control with data from a table. But im not sure how to capture and move data from screen (i.e. table control) to custom table. Please let me know how to do it?

Regards,

Vinny

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
575

In my first reply I meant

PBO:

....

PAI: (instead of PBO)

....

4 REPLIES 4
Read only

Former Member
0 Likes
575

Basically the data transport is done in the PBO and PAI of your screen

PBO:

LOOP AT internal_table

INTO wa_for_internal_table

WITH CONTROL table_control_name

Here the fields of structure wa_for_internal_table are the ones you specify in the table control as columns (screen painter).

This loop takes care of the data tranport from the internal table to the table control.

The user can now make changes on the table control (change/add/delete) and when he hits enter the 'internal_table' contains the correct values.

PBO:

loop at internal_table.

the fields of structure wa_for_internal_table contain the values from the dynpro for each line of the table control.

endloop.

Make sure that you use wa_for_internal_table-field1, wa_for_internal_table-field2 etc when you define the table control columns.

I hope that helps.

Michael

Read only

Former Member
0 Likes
575

You can either look at internal_table when you hit save (assumed it is defined globally in your program) or at the time when you loop at internal_table in the PAI move the data out of wa_for_internal_table into whatever internal table you need it to be in.

Regards,

Michael

Read only

Former Member
0 Likes
576

In my first reply I meant

PBO:

....

PAI: (instead of PBO)

....

Read only

Former Member
0 Likes
575

Thanks a lot Michael.