2007 Aug 27 5:45 AM
What is the use of table control in BDC, is it the same in module pool table control?
2007 Aug 27 5:52 AM
Hi,
<b>in bdc table control means</b>
for eg there are 10 displayable rows in the table control
and if the 11th row is being added then there will not be any row available for it
to enter the data
and also in a row there more one column to enter the data
in that case we have to be care full in getting a new row to enter the data
so there will be an option in that to enter a new line so that we can enter the new entries
usually we will be using the concatenate statement with an counter
<b>
and in module pool</b>
it is used to display the data and even updating the data..
here we will be seeing the data online and modifying the data online
so we can press the next line easily
but if the same module pool is using in bdc then we have to take care of the module pool .... like cliking the button for the next line in background
thanks & regards,
Venkatesh
2007 Aug 27 5:54 AM
Create Table Control
Step 1 (Create new structure for table control)
Type is name of structure (ZTC_EKKO) and press create
Step 2 (Create Program)
Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
Enter your program name, please ensure that is begins with SAPMZ as this is a module pool (dialog program).
Press enter to create, and press yes!
Ensure that you create a top include, and press Enter.
Accept the name created for the top include.
Press Enter.
Press Save
Step 3 (Create TOP include)
Double click on the top include and enter following ABAP code:
Tables: ZTC_EKKO.
controls: tc100 type tableview using screen 100.
data: ok_code type sy-ucomm.
data: it_ekko type standard
table of ZTC_EKKO initial size 0,
wa_ekko type ZTC_EKKO.
data: ok_code type sy-ucomm.
Press Save and Activate
Step 4 (Create screen)
Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
Step 5 (Create table control)
Press the Layout button to bring up the screen painter editor.
Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
Step 6 (Populate table control )
Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the Get from Dict button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
Step 7 (Create flow control )
Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
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.
Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.