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 controls

Former Member
0 Likes
397

Hi all ,

I am implementing the bdc's using call transaction and batch input .

Now i got some work to deal with the table controls , can anyone explain me about this .

Firstly tell me an T-code so that i can try on that .

And tell me the procedure so that i can implement that sample on the T-code .

2 REPLIES 2
Read only

Former Member
0 Likes
358

Check this thread...

ALso Check these threads.

Read only

Former Member
0 Likes
358

hi,

The Tcode for this is SE80. U will be doing it in Screen painter.

Below is an example for a simple table control, just try out..it helps u.

TABLE CONTROL COMPONENTS:

-


Table Control component is used to view the table records and if needed, we can directly modify table records and update the database table using table control.

Here, the records can be viewed in rows and columns format separated by horizontal and vertical lines.

SYNTAX:

-


CONTROLS <table_Control_name> TYPE TABLEVIEW USING SCREEN <MPP_screen_number>

CONTROLS statement is used to create a memory space area for table control component in AS.

TABLEVIEW is a data type for table control component.

SCREEN NUMBER should be specified to make the system know where the table control was physically created.

Navigations to create TABLE CONTROL COMPONENT:

-


Create MPP program -> In TOP INCLUDE FILE, write the following code:

DATA ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.

CONTROLS TABCTRL TYPE TABLEVIEW USING SCREEN '123'.

DATA CUR TYPE I.

Save -> Activate.

Create a Normal screen (123) -> Drag and drop TABLE CONTROL component from application toolbar -> Specify its name in attributes box -> Specify title if necessary -> Select HORIZONTAL and VERTICAL SEPARATORS checkbox -> If needed, select COLUMN and ROW selection radiobuttons -> Click on Dictionary/Program Fields from Appn. Toolbar -> Specify internal table name specified in top include file -> Click on 'GET FROM PROGRAM' pushbutton -> Choose required fields -> Click on continue -> Place the fields in table control component -> Add labels for each fields -> Create two pushbuttons (FETCH, EXIT) -> Save -> Flow Logic.

In PAI module, write following code:

CASE SY-UCOMM.

WHEN 'FETCH'.

SELECT * FROM KNA1 INTO TABLE ITAB.

TABCTRL-LINES = SY-DBCNT.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

In Flow Logic editor, write following code:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0123.

LOOP AT ITAB CURSOR CUR WITH CONTROL TABCTRL.

ENDLOOP.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0123.

LOOP AT ITAB.

ENDLOOP.

Here, LOOP AT ITAB-ENDLOOP statement in PBO event is used to fetch the records and insert into table control component. CURSOR statement is used to make use of the cursor in table control component whenever we try to select a particular field and modify it.

LOOP AT ITAB-ENDLOOP statement in PAI event is used to make necessary modifications to the database table from table control component.

Create Tcode(right click the program name ..goto create...tcode) -> Execute.

Regards,

Arunsri