Application Development 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: 

how to transfer data from table control to internal table

0 Kudos

How to transfer data entered by user in a table control to an internal table? A sample code will be truely useful

4 REPLIES 4

FredericGirod
Active Contributor

transaction BIBS

anujawani2426
Active Participant

Hi,

Please find below sample code.

In my sample code I created table control with wizard and I loop to internal table which is automatically created after creation of table control with wizard.

Get button is present on screen 100 where table control wizard is present. So once the get button is click i will get data from table control to my internal table.

I just write below code.

case sy-ucomm.
when 'EXIT'.
LEAVE PROGRAM.
when 'GET'.
loop at G_TABEMP_ITAB into G_TABEMP_WA.
wa_emp-employee_id = G_TABEMP_WA-employee_id.
wa_emp-employee_name = G_TABEMP_WA-employee_name.
wa_emp-gender = G_TABEMP_WA-gender.
wa_emp-blood_group = G_TABEMP_WA-blood_group.
append wa_emp to it_emp.
endloop.
call screen 300.
endcase.

raymond_giuseppi
Active Contributor
0 Kudos

Basically, you should have already built two loops in your dynpro logic based on table control

  • In PBO to mode data values from internal table to dynpro
  • In PAI to move data values from dynpro to internal table

There is also a wizard in screen painter for your first try.

What did you already do, where are you stuck?