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 Without Wizard In Dialog Programming

Former Member
0 Kudos

Hi All,

I m beginner and new to Dialog Prgramming, I hv gone through lots of threads in SDN but not getting clarity on How to create Table Control without wizard.

I have tried creating it in SE80 using LAYOUT, But not able to understand how to create Columns after dragging the table control to screen. after that I would like to understand how we can use MODULES and write our code in that to make it functional.

Please forward any gud Documentation or real scenario based Screen shots with sample code with step by step procedure.

Thanks in Advance.

11 REPLIES 11

Former Member
0 Kudos

Hi,

check this link..

[http://help.sap.com/erp2005_ehp_04/helpdata/EN/45/adee2396f711d1b46b0000e8a52bed/frameset.htm]

Former Member

0 Kudos

Hi Niki,

Thanks to all of you for your Quick reply.

Things are quite clear in the link you have provided, Here we are appending records through TC in MARA table.

But little confusion:

I would like to understand :

1) Module V1.

Endmodule.-> Do we need to call these modules used in the coding from somewhere or it is like we use SUbroutines in our code. Manually Create.

2) I have created a table control on the screen, Now I would like to understand how you have created Columns.

3) If i want to populate this TC through ITAB what is the procedure. Say i want to populate this TC from my ITAB (I_MAKT) for two fileds MARA and MAKTX.

Thanks.

kamal.

0 Kudos

HI ,

For Eg :

your PAI and PBO shld look like this

and you need to fetch the data into your internal table in ur PBO.(GET_TABLE MODULE)

Now in Populate_screen module fill the .

controls : table1 type tableview using screen 901.

IF sy-stepl = 1.

table1-lines = table1-top_line + sy-loopc - 1.

ENDIF.

MOVE-CORRESPONDING wa_zloan to <proj>.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0901.

MODULE GET_TABLE.

LOOP AT ZLOAN2 WITH CONTROL TABLE1 .

  • MODULE POPULATE_SCREEN.

ENDLOOP.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0901.

LOOP AT ZLOAN2.

ENDLOOP.

Hope this helps.

Regards,

Krishna.

0 Kudos

Hi,

Those modules are called inside the PBO and PAI events.

Also you can move the values from the your itab into work area and loop through it.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0100.

module data_retrieval.

loop at it_ekko into wa_ekko with control TC100.

module populate_screen.

endloop.

*

PROCESS AFTER INPUT.

loop at it_ekko.

endloop.

  • MODULE USER_COMMAND_0100.

Kindly go through the link i sent before for a clear idea.

Hope this helps.

Regards,

Deepthi.

0 Kudos

Ok, Thats mean these are user defined modules we can name them as per the action we want to perform in them. i.e.

IN PBO.

module select_data.

select matnr maktx

from makt into table itab.

endmodule.

hope I m on the track.

Also, pls let me know my 2nd point. Creation of column in TC without wizard.

Regards.

0 Kudos

Hi,

Yes they are user defined modules. Just type 'module select_data.' Double click this the module gets created in the main program and you can write the required code within it.

Hope this helps.

Regards,

Deepthi.

0 Kudos

1) I have created a table control without wizard on the screen, Now I would like to understand how to create Columns.

Regards

0 Kudos

Hi,

Check out this link.

http://help.sap.com/saphelp_47x200/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm

Hope this can helps you.

Regards,

Deepthi.

Former Member
0 Kudos

Hi,

Check out this link.

[Table Control|http://www.sapdev.co.uk/dialog/tabcontrol/tc_basic.htm]

Hope this helps.

Regards,

Deepthi.

Former Member
0 Kudos

Hi

You create the table control by selecting the control from the toolbar and placing it on the screen.

Now click on the Dictionary button. Specify the name of the table (dictionary/program) and hit enter. A list of fields appear. Select the fields you want and click on Copy. Now you can place it in your table control. To view the rulers, select the checkboxes vertical and horizontal in the Attributes window of the table control.

As per your 3rd requirement, select the option from program to select the fields you want from your itab.

After you save and activate your screen, you click on flow Logic and specify the code to loop through your itab and display values in your table control. The code can be found in the links mentioned.

Hope this helps

Regards,

Jayanthi.K