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

Table control

Former Member
0 Likes
537

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
Read only

Former Member
0 Likes
516

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

Rob

Read only

Former Member
0 Likes
516

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 .

Read only

0 Likes
516

how to assign columns to table control??

Read only

0 Likes
516

Please check the demo program.

DEMO_DYNPRO_TABCONT_LOOP

Shreekant

Read only

0 Likes
516

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.