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 Handling

Former Member
0 Likes
396

hi all,

Can any one send material related to table control...

points will be rewarded......

Regards,

Bhagya

bhagesh_007@yahoo.com

3 REPLIES 3
Read only

Former Member
0 Likes
381

Hi,

I have a couple of manuals but they are in spanish if you don't mind.

DS

Read only

Former Member
0 Likes
381

I suggest you start with:

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm

and follow the links from there. There are also plenty of demos in your SAP system - try looking through the various code that accesses the SFLIGHT suite of tables, plus the BIBS transaction of same dynpros.

Jonathan

Read only

former_member196299
Active Contributor
0 Likes
381

hi Bhagya,

There are many documents available for Table controls in SDN , please do a good search and you will get it . Else see the simple code provided below for assistance .

Creation of table controls in mpools

Here you go with the complete steps for creating module pool programs using table control:

open se51, choose the icon like a table for table control . drag it and then place it in your screen . click on F6 and you will get a screen where youi need to provide the table name / field name that ( fields ) you are going to use in the screen and table control. after giving the ztable name click on get it from dictionary . you will get the list of available fields in a table. next choose the fields you wish to place in the table control , and if you want to place all fields in your table control then select every fields . after this you will get a structure which you should drag place inside the table control area .

double click on the table control , set the proper attributes, tickmark the horizontal and vertical scroll bars to appear in your TC in the screen . save , check and activate ..

following are the sample code you should follow to display datas in your table control ..

write the following code in the flow logic of the screen ............

process before output.

module tc_01_init.

loop at g_tc_01_itab

into g_tc_01_wa

with control tc_01

cursor tc_01-current_line.

module tc_01_move.

module tc_01_get_lines.

endloop.

module status_0001.

process after input.

loop at g_tc_01_itab.

chain.

field sflight-carrid.

field sflight-connid.

field sflight-fldate.

module tc_01_modify on chain-request.

endchain.

endloop.

module tc_01_user_command.

Write the following code in your Zmodulepool program !!

program z_tst_mpool_tc_01.

data: begin of l_tab_sflight occurs 10,

carrid like sflight-carrid,

connid like sflight-connid,

fldate like sflight-fldate,

end of l_tab_sflight.

tables: sflight.

types: begin of t_tc_01,

carrid like sflight-carrid,

connid like sflight-connid,

fldate like sflight-fldate,

end of t_tc_01.

data: g_tc_01_itab type t_tc_01 occurs 0,

g_tc_01_wa type t_tc_01. "work area

data: g_tc_01_copied. "copy flag

controls: tc_01 type tableview using screen 0001.

data: g_tc_01_lines like sy-loopc.

data: ok_code like sy-ucomm.

include z_tst_mpool_tc_01_pbo .

include z_tst_mpool_tc_01_pai .

include z_tst_mpool_tc_01_incl01 .

include z_tst_mpool_tc_01_status_0001.

include Z_TST_MPOOL_TC_01_PBO .

  • inside include

module tc_01_init output.

if g_tc_01_copied is initial.

select * from sflight

into corresponding fields

of table g_tc_01_itab.

g_tc_01_copied = 'X'.

refresh control 'TC_01' from screen '0001'.

endif.

endmodule.

module tc_01_move output.

move-corresponding g_tc_01_wa to sflight.

endmodule.

module tc_01_get_lines output.

g_tc_01_lines = sy-loopc.

endmodule.

Else check for the sample programs in Txn ABAPDOCU

or search for prgrams in SE38 , you will get many more .

PS: Anytime you need a document do not post it as a thread until you dont get it in the SDN forum .

Regards,

Ranjita