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: 

Table control

Former Member
0 Kudos
84

Hi Group,

I want to retrieve data from database table and display in Table control in a module pool program.

I don't want to use table control wizard. Any help is appreciated..

Thanks All.

5 REPLIES 5

Former Member
0 Kudos
63

Your best bet sounds like the table maintenance generator in SE11.

Rob

Former Member
0 Kudos
63

Table Control wizard is best way to create table control.

Otherwise there lotta stuff u need to add in PAI and PBO of the screen.

Otherwise

create screen : 100 and define table control with name TC.

then double click on screen 100 u will get PBO and PAI events.

Under the PBO:

LOOP AT I_ITAB1

INTO WA_ITAB1

WITH CONTROL TC

CURSOR TC-CURRENT_LINE.

MODULE TC_GET_LINES.

ENDLOOP.

*----In the main program

*&SPWIZARD: LINES OF TABLECONTROL 'TC'

DATA: G_TC_LINES LIKE SY-LOOPC.

MODULE TC_GET_LINES OUTPUT.

G_TC_LINES = SY-LOOPC.

ENDMODULE.

Under the PAI :

*--no need to write anything between loop and endloop.

LOOP AT I_ITAB1.

CHAIN.

FIELD WA_ITAB1-MATNR.

FIELD WA_ITAB1-MAKTX.

FIELD WA_ITAB1-WERKS.

ENDCHAIN.

ENDLOOP.

MODULE USER_COMMAND_0100.

In this MODULE USER_COMMAND_0100. you can write your own code.

Hope this will helpful to you .

0 Kudos
63

how to assign columns to table control??

0 Kudos
63

Please check the demo program.

DEMO_DYNPRO_TABCONT_LOOP

Shreekant

0 Kudos
63

Hi,

you first need to define input/out field into item level part of the table control and then define text field on header part of the table control.

that way you can manually assign columns to table control.